/* =============================================================
   WooCommerce Showrooms — Frontend CSS v2.3
   Single-class selectors for easy theme overrides.
   ============================================================= */

/* ------------------------------------------------------------------
   Showroom wrapper
------------------------------------------------------------------ */
.wcs-showroom       { margin: 0 0 2.5rem; }
.wcs-title          { margin: 0 0 0.5rem; }

/* Description — sits between title and hero image */
.wcs-description {
    margin: 0 0 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    max-width: 800px;
}
.wcs-description p  { margin: 0 0 0.5em; }
.wcs-description p:last-child { margin-bottom: 0; }

.wcs-hero           { margin-bottom: 1.5rem; }
.wcs-hero-img,
.wcs-hero img       { width: 100%; height: auto; display: block; }

/* ------------------------------------------------------------------
   Grid layout
------------------------------------------------------------------ */
.wcs-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(3, 1fr);
}
.wcs-cols-1 { grid-template-columns: repeat(1, 1fr); }
.wcs-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wcs-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wcs-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .wcs-cols-3,
    .wcs-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .wcs-grid   { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   Advanced layout rows
------------------------------------------------------------------ */
.wcs-advanced       { display: flex; flex-direction: column; gap: 1.25rem; }
.wcs-adv-row        { display: flex; gap: 1.25rem; align-items: stretch; }
.wcs-adv-col        { min-width: 0; }

@media (max-width: 680px) {
    .wcs-adv-row    { flex-direction: column; }
    .wcs-adv-col    { flex: 1 1 100% !important; max-width: 100% !important; }
}

/* ------------------------------------------------------------------
   Product Card — clean image, no overlay
------------------------------------------------------------------ */
.wcs-card {
    display: block;
    cursor: pointer;
    outline: none;
    background: transparent;
}
.wcs-card:focus-visible .wcs-card-img-wrap {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.wcs-card-img-wrap {
    position: relative;
    overflow: hidden;
    line-height: 0;
    background: #f5f5f5;
}
.wcs-card-img,
.wcs-card-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.wcs-card:hover .wcs-card-img-wrap img {
    transform: scale(1.03);
    opacity: 0.9;
}

.wcs-card-name {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: #444;
    text-align: center;
}

/* ------------------------------------------------------------------
   Lightbox overlay
------------------------------------------------------------------ */
.wcs-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.wcs-lightbox-overlay[hidden] { display: none; }

body.wcs-no-scroll { overflow: hidden; }

/* Full-image box — no sidebar, image fills the box */
.wcs-lightbox-box {
    position: relative;
    max-width: 1200px;
    max-height: 90vh;
    width: 100%;
    line-height: 0;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* Close button */
.wcs-lightbox-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 20;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.wcs-lightbox-close:hover { background: rgba(0,0,0,0.85); }

/* Image — fills the full box */
.wcs-lightbox-img-wrap {
    position: relative;
    width: 100%;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}
.wcs-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.wcs-lightbox-img.wcs-lb-loaded { opacity: 1; }

/* Meta panel hidden — we overlay on image instead */
.wcs-lightbox-meta { display: none; }

/* Overlay gradient + content at bottom of image */
.wcs-lightbox-img-wrap::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
    pointer-events: none;
    z-index: 5;
}

/* Title + button container over the image */
.wcs-lb-overlay-content {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    width: 90%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.wcs-lightbox-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.wcs-lightbox-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.wcs-lightbox-price:empty { display: none; }

.wcs-lightbox-actions { display: contents; }

.wcs-lb-view-btn {
    display: inline-block;
    padding: 0.9rem 3rem;
    background: rgba(255,255,255,0.95);
    color: #111;
    text-decoration: none;
    border-radius: 3px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.wcs-lb-view-btn:hover {
    background: #fff;
    color: #000;
}

/* Enquire button — removed from HTML, belt-and-braces hide */
.wcs-lb-enquire-btn,
#wcs-lb-enquire { display: none !important; }

/* Responsive */
@media (max-width: 600px) {
    .wcs-lightbox-overlay { padding: 0; }
    .wcs-lightbox-box { border-radius: 0; max-height: 100vh; }
    .wcs-lightbox-img { max-height: 100vh; }
    .wcs-lightbox-title { font-size: 1.1rem; }
    .wcs-lb-overlay-content { bottom: 1.25rem; }
    .wcs-lb-view-btn { font-size: 1rem; padding: 0.75rem 2rem; }
}

/* ------------------------------------------------------------------
   Hide Kallyas blog footer + related articles on showroom pages.
   Targets both the body class Kallyas adds and the CPT class.
------------------------------------------------------------------ */
.single-showroom .blog-sg-footer,
.postid- .blog-sg-footer,
body[class*="single-showroom"] .blog-sg-footer { display: none !important; }

.single-showroom .related-articles,
body[class*="single-showroom"] .related-articles { display: none !important; }

/* ------------------------------------------------------------------
   Editor content area on the CPT page
------------------------------------------------------------------ */
.wcs-showroom-editor-content { margin-top: 2rem; }
