/* -------------------------------------------------------
   EPICWD Window Layout – Full CSS
   ------------------------------------------------------- */

/* ---------- Base / Reset ---------- */

.epicwd-wl-widget * {
    box-sizing: border-box;
}

/* ---------- Wrapper ---------- */

.epicwd-wl-widget {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Inter", "Segoe UI", sans-serif;
    color: #0b1220;
}

.epicwd-wl-inner {
    position: relative;
    background: #f9fafb;
    border-radius: 32px;
    padding: 32px 32px 36px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    overflow: visible;
}

/* ---------- Top main categories (Windows / Doors / Accessories) ---------- */

.epicwd-wl-maincats {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    background: transparent;
}

.epicwd-cta-button-wrapper {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    background: transparent;
}

/* Each CTA item - dynamic width, equal height */
.epicwd-cta-button-item {
    flex: 0 1 auto;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.epicwd-cta-button-item .epicwd-cta-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    height: 60px;
    box-sizing: border-box;
    white-space: nowrap;
    font-size: 14px;
    line-height: 60px !important;
}

/* Desktop: position the CTA wrapper in bottom-right, naturally wraps if needed */
@media (min-width: 900px) {
    .epicwd-wl-inner .epicwd-cta-button-wrapper {
        position: absolute;
        right: 24px;
        bottom: 24px;
        margin-top: 0;
        background: transparent;
        justify-content: flex-end;
        width: max-content;
        align-items: flex-start;
    }

    .epicwd-cta-button-item {
        flex: 0 1 auto;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .epicwd-cta-button-item .epicwd-cta-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 60px;
        white-space: nowrap;
        font-size: 14px;
    }
}

@media (max-width: 899px) {
    .epicwd-wl-inner .epicwd-cta-button-wrapper {
        position: static;
        width: 100%;
        margin-top: 20px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .epicwd-cta-button-item {
        flex: 0 1 auto;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .epicwd-cta-button-item .epicwd-cta-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 60px;
        white-space: nowrap;
        font-size: 14px;
    }

    .epicwd-cta-button-item .epicwd-cta-btn {
        display: block;
        width: 100%;
    }
}


.epicwd-wl-maincat {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 2.4rem;
    border-radius: 999px;
    border: 1.5px solid #d1d5db;
    background: #ffffff;
    font-size: 0.98rem;
    font-weight: 500;
    color: #111827;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition:
        background-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        transform 0.1s ease;
}

.epicwd-wl-maincat:hover {
    border-color: #fb2994;
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.35);
    transform: translateY(-1px);
}

.epicwd-wl-maincat.is-active {
    background: radial-gradient(circle at 25% 0, #ff72c4, #ff008c);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 16px 40px rgba(236, 72, 153, 0.55);
}

/* ---------- Horizontal subtype selector (Awning, Casement, etc.) ---------- */

.epicwd-wl-sidebar-wrap {
    margin: 0 -32px 1.75rem;
    padding: 0 32px 0.5rem;
    background: linear-gradient(to bottom, #fdf2ff, #f9fafb);
}

.epicwd-wl-sidebar {
    display: flex;
    align-items: stretch;
    gap: 1.1rem;
    overflow-x: auto;
    padding: 1.1rem 0.25rem 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(248, 113, 174, 0.8) transparent;
    position: relative;
    background: linear-gradient(to bottom, #fdf2ff, #f9fafb);
}

/* scrollbars – we hide on desktop later */
.epicwd-wl-sidebar::-webkit-scrollbar {
    height: 6px;
}
.epicwd-wl-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.epicwd-wl-sidebar::-webkit-scrollbar-thumb {
    background: rgba(248, 113, 174, 0.8);
    border-radius: 999px;
}

/* subtype tab card */
.epicwd-wl-tab {
    position: relative;
    flex: 0 0 160px;
    min-height: 90px;
    border-radius: 24px;
    border: 2px solid transparent;
    background: #ffffff;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.3;
    color: #111827;
    letter-spacing: 0.01em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 0.7rem 0.75rem 0.85rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

.epicwd-wl-tab:hover {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
    transform: translateY(-1px);
}

/* thumb inside tab */
.epicwd-wl-tab-thumb {
    width: 68%;
    max-width: 76px;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 0.35rem;
    background: #f3f4f6;
}
.epicwd-wl-tab-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.epicwd-wl-tab-label {
    display: block;
    margin-top: 0.05rem;
    font-size: 0.9rem;
    color: #111827;
}

/* Active subtype tab – border only & popped up */
.epicwd-wl-tab.is-active {
    background: #ffffff;
    color: #111827;
    border-color: #ff008c;
    box-shadow:
        0 14px 32px rgba(236, 72, 153, 0.35),
        0 0 0 1px rgba(248, 113, 173, 0.35);
    transform: translateY(-4px) scale(1.02);
}

.epicwd-wl-tab.is-active .epicwd-wl-tab-label {
    color: #111827;
}

.epicwd-wl-tab.is-active .epicwd-wl-tab-thumb {
    background: #ffffff;
    box-shadow: none;
}

/* underline under tabs – DISABLED (was causing the pink bar) */
.epicwd-wl-sidebar::after {
    content: none;
}

/* ---------- Panels Layout ---------- */

.epicwd-wl-panel {
    display: none;
}
.epicwd-wl-panel.is-active {
    display: block;
}

/* two columns on desktop */
.epicwd-wl-panel-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.1fr);
    align-items: flex-start;
    gap: 2.5rem;
}

/* ---------- Image / Main render ---------- */

.epicwd-wl-image-wrap {
    position: relative;
    max-width: 460px;
    width: 100%;
    margin: 0 auto 1.75rem;
    border-radius: 28px;
    background: #e5e7eb;
    padding: 1.75rem 1.75rem 1.9rem;
    box-shadow:
        0 20px 55px rgba(15, 23, 42, 0.16),
        0 0 0 1px rgba(148, 163, 184, 0.28);
}

.epicwd-wl-image-wrap img.epicwd-wl-main-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ---------- Thumbnail gallery below main image ---------- */

.epicwd-wl-gallery-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.epicwd-wl-thumb {
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0;
    background: transparent;
}

.epicwd-wl-thumb > img {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);
    border: 3px solid transparent;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.epicwd-wl-thumb:hover > img {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
}

.epicwd-wl-thumb.is-active > img {
    border-color: #ff008c;
    box-shadow: 0 14px 32px rgba(236, 72, 153, 0.55);
}

/* ---------- Text column ---------- */

.epicwd-wl-text-col {
    align-self: stretch;
}

.epicwd-wl-title {
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #0b1220;
    margin: 0 0 1.5rem;
}

/* info rows: What / Where / Pros / Cons */

.epicwd-wl-text-wrap {
    background: #f9fafb;
    border-radius: 28px;
    padding: 1.75rem 2rem 1.75rem;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.epicwd-wl-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1.75rem;
    margin-bottom: 1.25rem;
}

.epicwd-wl-row:last-child {
    margin-bottom: 0.25rem;
}

.epicwd-wl-label {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.03em;
    color: #0b1220;
    white-space: nowrap;
}

.epicwd-wl-row-content {
    font-size: 0.98rem;
    line-height: 1.6;
    color: #4b5563;
}

/* bullet lists inside row-content */
.epicwd-wl-row-content ul {
    margin: 0.1rem 0 0.35rem;
    padding-left: 1.3rem;
}
.epicwd-wl-row-content li {
    margin-bottom: 0.25rem;
}
.epicwd-wl-row-content li:last-child {
    margin-bottom: 0;
}

/* RTE paragraphs */
.epicwd-wl-row-content p {
    margin: 0 0 0.35rem;
}
.epicwd-wl-row-content p:last-child {
    margin-bottom: 0;
}

/* ---------- RESPONSIVE ---------- */

/* Mobile / small tablets */
@media (max-width: 899px) {

    .epicwd-wl-inner {
        padding: 24px 16px 24px;
        border-radius: 24px;
    }

    .epicwd-wl-maincats {
        padding: 8px 8px 6px;
        margin: -24px -16px 8px;
        background: rgba(249, 250, 251, 0.96);
        backdrop-filter: blur(8px);
    }

    .epicwd-wl-maincat {
        padding: 0.4rem 1.6rem;
        font-size: 0.9rem;
    }

    .epicwd-wl-sidebar-wrap {
        margin: 0 -16px 1.25rem;
        padding: 0 16px 0.35rem;
        background: rgba(249, 250, 251, 0.96);
    }

    .epicwd-wl-sidebar {
        padding: 0.9rem 0.2rem 1rem;
        gap: 0.75rem;
        background: transparent;
    }

    /* more compact cards on mobile */
    .epicwd-wl-tab {
        flex: 0 0 130px;
        min-height: 80px;
        padding: 0.6rem 0.55rem 0.7rem;
    }

    .epicwd-wl-tab-thumb {
        max-width: 56px;
        aspect-ratio: 4 / 3;
        margin-bottom: 0.35rem;
    }

    .epicwd-wl-tab-label {
        font-size: 0.85rem;
    }

    /* stack panel content in a column & control order */
    .epicwd-wl-panel-inner {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .epicwd-wl-image-wrap {
        order: 1;
        max-width: 100%;
        margin: 0 auto 1rem;
        padding: 1.3rem 1.3rem 1.45rem;
        border-radius: 24px;
    }

    .epicwd-wl-gallery-row {
        order: 2;
        align-self: center;
        margin: 0.5rem 0 1.2rem;
        justify-content: center;
    }

    .epicwd-wl-text-col {
        order: 3;
        align-self: stretch;
    }

    .epicwd-wl-thumb > img {
        width: 62px;
        height: 62px;
        border-radius: 16px;
    }

    .epicwd-wl-title {
        text-align: center;
        margin-bottom: 1.7rem;
        font-size: 1.6rem;
    }

    .epicwd-wl-text-wrap {
        padding: 1.3rem 1rem 0.95rem;
        border-radius: 22px;
    }

    .epicwd-wl-row {
        display: block;
        margin-bottom: 1.2rem;
    }

    .epicwd-wl-label {
        display: block;
        margin-bottom: 0.25rem;
        text-align: left;
    }

    .epicwd-wl-row-content {
        text-align: left;
    }

    .epicwd-wl-panel-inner {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .epicwd-wl-media-col {
        margin-bottom: 1.25rem;
    }
}

/* Make main category bar & subcategory bar both sticky on mobile + tablets */
@media (max-width: 1024px) {

    /* top bar: Windows / Doors */
    .epicwd-wl-maincats {
        position: sticky;
        top: 0;
        z-index: 40;
    }

    /* subcategory bar: Awning / Casement / … */
    .epicwd-wl-sidebar {
        position: sticky;
        top: var(--epicwd-maincats-height, 56px);
        z-index: 39;
        background: rgba(249, 250, 251, 0.96);
    }

    .epicwd-wl-sidebar-wrap {
        margin-top: 0;
        padding-top: 0;
    }
}

/* Large screens */
@media (min-width: 1280px) {

    .epicwd-wl-inner {
        padding: 36px 40px 40px;
        overflow: hidden;
    }

    .epicwd-wl-panel-inner {
        gap: 3rem;
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
    }

    .epicwd-wl-title {
        font-size: 2.1rem;
    }

    .epicwd-wl-image-wrap {
        max-width: 520px;
    }
}

/* Desktop-only tweaks: hide horizontal scrollbar */
@media (min-width: 1025px) {

    .epicwd-wl-sidebar {
        scrollbar-width: none;
    }

    .epicwd-wl-sidebar::-webkit-scrollbar {
        height: 0;
        display: none;
    }
}
