/* ================================================================
   WooCommerce Category Showcase — v7 (UI Update)
   ================================================================ */

/* ── Reset ─────────────────────────────────────────────────── */
.wcs-wrap *,
.wcs-wrap *::before,
.wcs-wrap *::after { box-sizing: border-box; }
.wcs-wrap ul,
.wcs-wrap li { margin: 0; padding: 0; list-style: none; }
.wcs-wrap button { font-family: inherit; }

/* ══════════════════════════════════════════════════════════════
   OUTER WRAPPER
   ══════════════════════════════════════════════════════════════ */
.wcs-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
    background: var(--wcs-section-bg, #f0f2f5);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--wcs-section-shadow, 0 10px 50px rgba(0,0,0,0.13));
    min-height: 460px;
}

/* ══════════════════════════════════════════════════════════════
   LEFT SIDEBAR — full height, tabs top-to-bottom
   ══════════════════════════════════════════════════════════════ */
.wcs-left {
    flex: 0 0 240px;
    width: 240px;
    background: var(--wcs-left-bg, #ffffff);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    border-right: 1px solid rgba(0,0,0,0.07);
}

/* ── Tabs ──────────────────────────────────────────────────── */
.wcs-tab {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    outline: none;
    cursor: pointer;
    text-align: left;
    background: transparent;
    color: var(--wcs-tab-inactive, #1a1a1a);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.01em;
    text-transform: capitalize;
    padding: 13px 18px 13px 22px;
    width: 100%;
    border-radius: 0;
    border-bottom: none;
    position: relative;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

/* left accent bar */
.wcs-tab::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 55%;
    border-radius: 0 3px 3px 0;
    background: var(--wcs-tab-gradient, linear-gradient(180deg, #e84118 0%, #f39c12 100%));
    transition: transform 0.18s ease;
}

.wcs-tab:hover:not(.wcs-tab--active) {
    background: var(--wcs-tab-gradient, linear-gradient(135deg, #e84118 0%, #f39c12 100%));
    color: #fff;
}
.wcs-tab:hover:not(.wcs-tab--active)::before {
    transform: translateY(-50%) scaleY(1);
}

.wcs-tab--active {
    background: var(--wcs-tab-gradient, linear-gradient(135deg, #e84118 0%, #f39c12 100%));
    color: var(--wcs-tab-active-text, #ffffff) !important;
    box-shadow: 0 3px 16px rgba(232,65,24,0.28);
}
.wcs-tab--active::before {
    transform: translateY(-50%) scaleY(1);
    background: rgba(255,255,255,0.7);
}

.wcs-tab:focus-visible {
    outline: 2px solid rgba(232,65,24,0.5);
    outline-offset: -2px;
}

/* fills leftover space so sidebar bg extends full height */
.wcs-left-spacer { flex: 1; }

/* ══════════════════════════════════════════════════════════════
   CONTENT AREA
   ══════════════════════════════════════════════════════════════ */
.wcs-content-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ── Panel ─────────────────────────────────────────────────── */
.wcs-panel {
    display: none;
    flex: 1;
    grid-template-columns: 1fr 240px;
    grid-template-rows: 1fr;
    align-items: stretch;
}
.wcs-panel--active {
    display: grid;
    animation: wcs-in 0.22s ease;
}
@keyframes wcs-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   CENTER COLUMN
   ══════════════════════════════════════════════════════════════ */
.wcs-center {
    padding: 26px 24px 24px 24px;
    background: var(--wcs-center-bg, #ffffff);
    overflow-y: auto;
}

.wcs-cat-title {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--wcs-cat-title, #c0392b);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: capitalize;
}
.wcs-arrow {
    font-style: normal;
    opacity: 0.55;
    font-size: 18px;
    font-weight: 700;
}

.wcs-cat-desc {
    margin: 0 0 18px 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--wcs-cat-desc, #666666);
}

/* ── Product list ──────────────────────────────────────────── */
.wcs-product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wcs-product-item {
    border-radius: 8px;
    overflow: hidden;
    transition: background 0.13s;
}

/* Non-accordion hover */
.wcs-product-item:not(.wcs-has-accordion):hover {
    background: rgba(0,0,0,0.032);
}

/* ── Accordion: open/active header gets the same gradient as wcs-tab--active ── */
.wcs-has-accordion .wcs-product-header {
    border-radius: 8px;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

/* Light border on inactive accordion items */
.wcs-has-accordion:not(.wcs-open) {
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 8px;
    background: rgba(0,0,0,0.015);
}
.wcs-has-accordion.wcs-open {
    border: 1px solid rgba(232,65,24,0.25);
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(232,65,24,0.13);
}

.wcs-has-accordion:not(.wcs-open) .wcs-product-header:hover {
    background: var(--wcs-tab-gradient, linear-gradient(135deg, #e84118 0%, #f39c12 100%));
    box-shadow: 0 3px 14px rgba(232,65,24,0.22);
}
.wcs-has-accordion:not(.wcs-open) .wcs-product-header:hover .wcs-product-name,
.wcs-has-accordion:not(.wcs-open) .wcs-product-header:hover .wcs-acc-chevron {
    color: #ffffff !important;
    opacity: 1 !important;
}

.wcs-has-accordion.wcs-open .wcs-product-header {
    background: var(--wcs-tab-gradient, linear-gradient(135deg, #e84118 0%, #f39c12 100%));
    box-shadow: 0 3px 16px rgba(232,65,24,0.28);
    border-radius: 8px 8px 0 0;
}
.wcs-has-accordion.wcs-open .wcs-product-header .wcs-product-name,
.wcs-has-accordion.wcs-open .wcs-product-header .wcs-acc-chevron {
    color: #ffffff !important;
    opacity: 1 !important;
}

.wcs-product-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    gap: 10px;
}

.wcs-product-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--wcs-prod-name, #c0392b);
    line-height: 1.4;
    text-transform: capitalize;
}
.wcs-acc-trigger { cursor: pointer; user-select: none; }
.wcs-acc-trigger:hover .wcs-product-name { opacity: 0.7; }

.wcs-acc-chevron {
    flex-shrink: 0;
    color: var(--wcs-prod-name, #c0392b);
    opacity: 0.6;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}
.wcs-has-accordion.wcs-open .wcs-acc-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* Non-accordion body always visible */
.wcs-product-body:not(.wcs-acc-body) { padding: 0 12px 12px; }

/* Accordion body — zero height & zero padding when closed */
.wcs-acc-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 12px;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
}
.wcs-open .wcs-acc-body {
    max-height: 1200px;
    opacity: 1;
    padding: 10px 12px 14px;
}

.wcs-product-price { display: none !important; }

.wcs-product-short,
.wcs-product-full-desc {
    font-size: 14px;
    line-height: 1.75;
    color: var(--wcs-prod-desc, #555555);
}
.wcs-product-short { margin-bottom: 6px; }
.wcs-product-short p,
.wcs-product-full-desc p { margin: 0 0 6px; }
.wcs-product-short p:last-child,
.wcs-product-full-desc p:last-child { margin-bottom: 0; }

/* View product link */
.wcs-product-full-desc a,
.wcs-product-short a {
    font-size: 14px;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   RIGHT COLUMN — gradient background, image centered vertically
   ══════════════════════════════════════════════════════════════ */
.wcs-right {
    /* Same gradient as active tab */
    background: var(--wcs-tab-gradient, linear-gradient(135deg, #e84118 0%, #f39c12 100%));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    border-left: none;
    padding: 20px 16px;
}

.wcs-image-card {
    flex: 0 1 auto;
    background: transparent;
    box-shadow: 0 6px 28px rgb(0 0 0 / 76%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    margin: auto 0;
}

/* Image centered in its container */
.wcs-card-image-wrap {
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    max-height: 320px;
    flex: 1;
}
.wcs-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.38s ease;
}
.wcs-image-card:hover .wcs-card-img { transform: scale(1.05); }

.wcs-card-no-img {
    flex: 1;
    min-height: 160px;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}
.wcs-card-no-img span {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    padding: 16px;
}

/* card title */
.wcs-card-body {
    flex: 0 0 auto;
    padding: 10px 14px 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.18);
}
.wcs-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: #ffffff;
    text-transform: capitalize;
}

/* ── Misc ─────────────────────────────────────────────────── */
.wcs-empty { padding: 40px; color: #aaa; font-style: italic; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .wcs-panel { grid-template-columns: 1fr; }
    .wcs-right {
        border-left: none;
        border-top: none;
        padding: 16px;
        justify-content: flex-start;
    }
    .wcs-card-image-wrap { height: 200px; flex: none; min-height: unset; max-height: unset; }
    .wcs-card-img { position: static; width: 100%; height: 200px; }
}

@media (max-width: 700px) {
    .wcs-wrap { flex-direction: column; border-radius: 12px; min-height: 0; }
    .wcs-left {
        flex: none;
        width: 100%;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 7px 8px;
        gap: 4px;
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.07);
        scrollbar-width: none;
    }
    .wcs-left::-webkit-scrollbar { display: none; }
    .wcs-left-spacer { display: none; }
    .wcs-tab {
        flex: 0 0 auto;
        width: auto;
        border-radius: 7px;
        text-align: center;
        font-size: 13px;
        padding: 8px 14px;
        white-space: nowrap;
        box-shadow: none;
    }
    .wcs-tab::before { display: none; }
    .wcs-tab--active { box-shadow: 0 2px 10px rgba(232,65,24,0.28); }
    .wcs-center { padding: 18px 16px 16px; }
    .wcs-cat-title { font-size: 18px; }
    .wcs-cat-desc { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .wcs-panel, .wcs-acc-body, .wcs-acc-chevron,
    .wcs-tab, .wcs-card-img {
        transition: none !important;
        animation: none !important;
    }
}
