/* ═══════════════════════════════════════
   PRODUCT CATEGORY PAGE — shared styles
   Used by: windows/*, doors/*, commercial/*
═══════════════════════════════════════ */

/* ── PAGE RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --green: #90c33f;
    --green-light: #9dcf45;
    --green-dark: #6b8f28;
    --dark: #1a1a1a;
    --grey: #303030;
    --slide-duration: 5000ms;
}

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
    position: relative;
    width: 100%;
    height: 100svh;
    max-height: 1080px;
    overflow: hidden;
    background: var(--dark);
}

.hero-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img,
.hero-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Slide overlay gradient — stronger at top (text) and bottom (nav) */
.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.55) 0%,
        rgba(0,0,0,0.22) 38%,
        rgba(0,0,0,0.05) 55%,
        rgba(0,0,0,0.55) 100%
    );
    pointer-events: none;
}

/* ── FIXED HERO OVERLAY (intro content) ── */
.hero-overlay {
    position: absolute;
    bottom: 120px;
    left: 56px;
    z-index: 10;
    color: #fff;
}

.hero-overlay-eyebrow {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background-color: #90c33f;
    margin-bottom: 18px;
    display: inline-block;
    color: #fff;
    padding: 10px;
}

.hero-overlay-heading {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 600;
    color: #fff;
    line-height: 1.12;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
    padding-bottom: 4px;
    border-bottom: 1px solid #fff;
}

.hero-overlay-heading span {
    color: #90c33f;
    font-weight: 600;
    font-family: 'AnekBangla';
}

.hero-overlay-sub {
    font-size: 1.6rem;
    color: rgba(255,255,255,0.88);
    line-height: 1.7;
    font-weight: 100;
    font-family: 'AnekBangla-SemiExpanded';
}

/* ── PREV / NEXT ARROWS ── */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s, border-color 0.2s;
    font-size: 18px;
    line-height: 1;
    user-select: none;
}

.hero-arrow:hover {
    background: rgba(144, 195, 63, 0.25);
    border-color: var(--green);
}

.hero-arrow.prev { left: 20px; }
.hero-arrow.next { right: 20px; }

/* ── THUMBNAIL NAV ── */
.hero-nav {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 10px;
    align-items: flex-end;
    padding: 10px 14px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
}

.hero-thumb {
    position: relative;
    width: 80px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.25s, transform 0.25s;
    flex-shrink: 0;
}

.hero-thumb img,
.hero-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.hero-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    transition: background 0.25s;
}

.hero-thumb.active {
    border-color: var(--green);
    transform: translateY(-4px);
}

.hero-thumb.active::after {
    background: rgba(0,0,0,0);
}

/* Video thumb play icon */
.hero-thumb .thumb-play {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.85);
    font-size: 16px;
}

/* Active indicator dot below thumb */
.hero-thumb-dot {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--green);
    opacity: 0;
    transition: opacity 0.25s;
}

.hero-thumb.active .hero-thumb-dot {
    opacity: 1;
}

/* ── PROGRESS BAR ── */
.hero-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    height: 3px;
    background: rgba(255,255,255,0.12);
}

.hero-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--green-dark), var(--green), var(--green-light));
    transition: width linear;
}

/* ═══════════════════════════════════════
   SERIES / PRODUCT GRID
═══════════════════════════════════════ */
.sw-grid-section {
    background: #222;
    padding: 30px 24px 80px;
}

.sw-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    background: #222;
}

.sw-tile-header {
    font-family: 'AnekBangla-SemiExpanded', sans-serif;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.4;
    font-weight: 100;
    margin-bottom: 20px;
}

.sw-tile {
    position: relative;
    background: #f2f1ef;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: background 0.2s ease;
    border: none;
    text-align: left;
    padding: 0;
    border-radius: 8px;
    filter: drop-shadow(0px 3px 5px rgba(0, 0, 0, 0.1));
}

.sw-tile:hover { background: #fafafa; }
.sw-tile:focus-visible { outline: 2px solid #90c33f; outline-offset: -2px; }

.sw-tile-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f0efed;
}

.sw-tile-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sw-tile:hover .sw-tile-img-wrap img {
    transform: scale(1.04);
}

.sw-tile-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.92);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #111;
    padding: 4px 10px 0px 10px;
    border-radius: 15px;
    filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));
}

.sw-tile-body {
    padding: 20px 22px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.sw-tile:hover .sw-tile-body { border-top-color: #90c33f; }

.sw-tile-series {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #90c33f;
}

.sw-tile-name {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    line-height: 1.35;
}

.sw-tile-sub {
    font-size: 0.82rem;
    color: #888;
    margin-top: 2px;
}

.sw-tile-arrow {
    margin-top: auto;
    padding-top: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #111;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sw-tile:hover .sw-tile-arrow {
    opacity: 1;
    transform: translateX(0);
}

.sw-tile-arrow svg {
    width: 14px;
    height: 14px;
    stroke: #111;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ═══════════════════════════════════════
   EXPANDED DETAIL OVERLAY
═══════════════════════════════════════ */
.sw-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: #fff;
    display: flex;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.sw-detail-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* Close button */
.sw-detail-close {
    position: fixed;
    top: 22px;
    right: 28px;
    z-index: 910;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid #ddd;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s, background 0.15s;
}

.sw-detail-overlay.open .sw-detail-close {
    opacity: 1;
    transform: scale(1);
}

.sw-detail-close:hover { background: #f0f0f0; }

.sw-detail-close svg {
    width: 18px;
    height: 18px;
    stroke: #111;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

/* ── LEFT: image panel ── */
.sw-detail-left {
    width: 50%;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    background: #f0efed;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sw-gallery {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.sw-gallery-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.sw-gallery-img.active { opacity: 1; }

.sw-gallery-nav {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.sw-gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.sw-gallery-dot.active {
    background: #fff;
    transform: scale(1.3);
}

.sw-gallery-arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 2;
    pointer-events: none;
}

.sw-gallery-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    transition: background 0.15s;
}

.sw-gallery-btn:hover { background: #fff; }

.sw-gallery-btn svg {
    width: 16px;
    height: 16px;
    stroke: #111;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── RIGHT: content panel ── */
.sw-detail-right {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 64px 56px 80px;
    scroll-behavior: smooth;
    background-color: #f2f1ef;
}

.sw-detail-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #90c33f;
    margin-bottom: 12px;
    display: block;
}

.sw-detail-heading {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 400;
    color: #111;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.sw-detail-subheading {
    font-size: 1rem;
    color: #888;
    font-weight: 500;
    margin-bottom: 28px;
}

.sw-detail-divider {
    width: 40px;
    height: 2px;
    background: #90c33f;
    margin-bottom: 28px;
}

.sw-detail-desc {
    font-size: 0.97rem;
    color: #333;
    line-height: 1.75;
    margin-bottom: 32px;
}

/* Features list */
.sw-features-list {
    list-style: none;
    margin-bottom: 36px;
}

.sw-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 0;
    border-bottom: 1px solid #eee;
    font-size: 0.93rem;
    color: #222;
    line-height: 1.55;
}

.sw-features-list li:first-child { border-top: 1px solid #eee; }

.sw-features-list li::before {
    content: "\f054";
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    display: inline-block;
    color: #90c33f;
    font-size: 0.6rem;
    flex-shrink: 0;
    margin-top: 4px;
}

/* Specs table */
.sw-specs-box {
    background: linear-gradient(210deg, #9dcf45 0%, var(--green) 40%, #6b8f28 100%);
    padding: 24px 28px;
    margin-bottom: 36px;
}

.sw-specs-note {
    font-size: 0.8rem;
    color: #fff;
    line-height: 1.55;
    margin-bottom: 18px;
    font-style: italic;
}

.sw-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.sw-specs-table tr {
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.sw-specs-table tr:last-child { border-bottom: none; }

.sw-specs-table td {
    padding: 9px 0;
    font-size: 0.88rem;
    color: #fff;
}

.sw-specs-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: #fff;
}

/* CTA */
.sw-detail-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #111;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 14px 28px 11px 28px;
    text-decoration: none;
    transition: background 0.2s ease;
    margin-top: 8px;
}

.sw-detail-cta:hover { background: #90c33f; }

.sw-detail-cta svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-top: -3px;
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 1024px) {
    .sw-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sw-grid { grid-template-columns: 1fr; gap: 24px; }

    /* Hero caption — bottom-aligned & scaled like the home page */
    .hero-overlay {
        left: 24px;
        right: 24px;
        bottom: 96px;
        padding: 0;
    }
    .hero-overlay-heading {
        font-size: clamp(24px, 6.5vw, 32px);
        margin-bottom: 8px;
        max-width: none;
    }
    .hero-overlay-sub {
        font-size: 1rem;
        line-height: 1.5;
    }
    .hero-arrow { width: 38px; height: 38px; font-size: 16px; }
    .hero-arrow.prev { left: 10px; }
    .hero-arrow.next { right: 10px; }
    .hero-nav { bottom: 20px; gap: 6px; padding: 7px 9px; max-width: calc(100vw - 24px); }
    .hero-thumb { width: 46px; height: 32px; }

    .sw-detail-overlay { flex-direction: column; }

    .sw-detail-left {
        width: 100%;
        height: 55vw;
        min-height: 260px;
        position: relative;
    }

    .sw-detail-right {
        height: auto;
        flex: none;
        padding: 36px 24px 60px;
        overflow-y: unset;
    }

    .sw-detail-overlay { overflow-y: auto; }

    .sw-hardware-head h3 {
        line-height: 1.2;
    }
    .sw-hardware-head > * {
        width: 50%;
    }
    .sw-hardware-nav {
        justify-content: end;
    }
}

@media (max-width: 480px) {
    .sw-detail-right { padding: 28px 18px 48px; }
    .hero-thumb { width: 40px; height: 28px; }
}

/* ═══════════════════════════════════════
   DETAIL ACTIONS (Product Sheet / Brochures / Quote)
═══════════════════════════════════════ */
.sw-detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
}
.sw-detail-actions .sw-detail-cta { white-space: nowrap; }
.sw-detail-actions > a:last-child { margin-left: auto; }

.sw-brochures { position: relative; display: inline-block; }
.sw-brochures-btn { border: none; cursor: pointer; font-family: inherit; }

.sw-brochures-panel {
    display: none;
    position: absolute;
    bottom: calc(100% - 4px);
    left: 0;
    z-index: 30;
    width: 340px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    padding: 16px;
}
.sw-brochures:hover .sw-brochures-panel:not(.force-closed),
.sw-brochures-panel.open { display: block; }

.sw-brochures-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.sw-brochure-card { position: relative; display: block; cursor: pointer; }
.sw-brochure-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    border: 1px solid #e2e2e2;
}
.sw-brochure-card input[type="checkbox"] {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 16px;
    height: 16px;
    accent-color: #90c33f;
    cursor: pointer;
    z-index: 1;
}
.sw-brochure-name {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #333;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sw-brochures-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
}
.sw-brochures-cancel {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    color: #666;
    padding: 6px 4px;
}
.sw-brochures-cancel:hover { color: #111; }
.sw-brochures-download {
    background: #111;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 9px 18px 7px;
    transition: background 0.2s ease;
}
.sw-brochures-download:hover { background: #90c33f; }

@media (max-width: 600px) {
    .sw-brochures-panel { width: 280px; }
    .sw-detail-actions > a:last-child { margin-left: 0; }
}

/* ═══════════════════════════════════════
   CERTIFICATIONS + COMPATIBLE HARDWARE
═══════════════════════════════════════ */
.sw-certs {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin: 0 0 22px;
}
.sw-certs-wrap { flex-wrap: wrap; }
.sw-certs-wrap .sw-cert-box { flex: 0 0 calc(33.333% - 8px); }
.sw-cert-box {
    flex: 1 1 0;
    min-width: 0;
    background: linear-gradient(150deg, #ffffff 0%, #f4f7ee 45%, #e4eed4 100%);
    border: 1px solid #d9e3c6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    padding: 18px 10px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.sw-cert-box img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    /* 360 Green (#90c33f) */
    filter: brightness(0) saturate(100%) invert(70%) sepia(76%) saturate(371%) hue-rotate(36deg) brightness(88%) contrast(90%);
    margin-bottom: 7px;
}
.sw-cert-name {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1a1a1a;
    line-height: 1;
}
.sw-cert-sub {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #777;
    line-height: 1;
}

.sw-hardware {
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 22px;
}
.sw-hardware-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}
.sw-hardware-head h3 {
    color: #1a1a1a;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}
.sw-hardware-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-size: 0.85rem;
}
.sw-hardware-nav button {
    width: 34px;
    height: 34px;
    background: none;
    border: 1px solid #bbb;
    color: #333;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.sw-hardware-nav button:hover:not(:disabled) { border-color: #90c33f; color: #90c33f; }
.sw-hardware-nav button:disabled { opacity: 0.35; cursor: default; }
.sw-hardware-viewport { overflow: hidden; }
.sw-hardware-track {
    display: flex;
    transition: transform 0.45s ease;
}
.sw-hardware-slide {
    flex: 0 0 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.sw-hardware-card img {
    width: 100%;
    display: block;
    border: 1px solid #e0e0e0;
}
.sw-hardware-brand {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.95rem;
    margin: 10px 0 2px;
}
.sw-hardware-name { color: #555; font-size: 0.85rem; }

@media (max-width: 600px) {
    .sw-certs { gap: 8px; }
    .sw-cert-box { padding: 12px 4px 10px; }
    .sw-cert-box img { width: 30px; height: 30px; }
    .sw-cert-name { font-size: 0.62rem; }
    .sw-cert-sub { font-size: 0.5rem; }
    .sw-hardware-slide { grid-template-columns: 1fr; }
}
