/* =================================================================
   CCO REDESIGN — Archive / Shop / Category page retrofit
   Inherits CSS vars (--green, --gold, --cream, --ink) from redesign-home.css.
   Targets the existing .catalog-* markup without rebuilding it.
   ================================================================= */

/* ---------- Container + base typography ---------- */
.catalog-wrapper,
.catalog-wrapper * { font-family:'Jost', system-ui, sans-serif; }

.catalog-wrapper {
    max-width:1280px;
    margin:0 auto;
    padding:24px 32px 60px;
    color:var(--ink);
}

/* ---------- Brand / Category hero ---------- */
body .catalog-wrapper .catalog-header {
    display:grid;
    grid-template-columns:1.1fr 1fr;
    gap:48px;
    align-items:center;
    padding:24px 0 36px;
    border-bottom:1px solid var(--hairline);
    margin-bottom:28px;
    position:relative;
}
/* Full-width brand banner replaces the split layout */
body .catalog-wrapper .catalog-header.has-brand-banner {
    display:block;
    padding:0 0 22px;
    border-bottom:1px solid var(--hairline);
    margin-bottom:26px;
}
body .catalog-wrapper .catalog-header.has-brand-banner .catalog-header-right { display:none; }
body .catalog-wrapper .catalog-header.has-brand-banner .catalog-header-left { padding:0; max-width:880px; }
body .catalog-wrapper .catalog-header-left {
    padding-right:16px;
}
body .catalog-wrapper .catalog-header-title,
body .catalog-wrapper .catalog-header h1 {
    font-family:'Cormorant Garamond', Georgia, serif !important;
    font-weight:500;
    font-size:48px;
    line-height:1.1;
    letter-spacing:-0.005em;
    color:var(--ink);
    margin:0 0 14px;
}
body .catalog-wrapper .catalog-header-stars,
body .catalog-wrapper .catalog-header-meta {
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:var(--gold-deep, #a8821f);
    font-size:13px;
    font-weight:500;
}
body .catalog-wrapper .catalog-header-stars svg,
body .catalog-wrapper .catalog-header-stars i,
body .catalog-wrapper .catalog-header-stars [class*="star"] {
    color:var(--gold) !important;
}
body .catalog-wrapper .catalog-meta-item {
    color:var(--mute);
    font-size:13px;
    letter-spacing:0.04em;
}
body .catalog-wrapper .catalog-meta-item + .catalog-meta-item::before {
    content:"•";
    color:var(--gold);
    margin:0 10px;
}
body .catalog-wrapper .catalog-description-wrapper,
body .catalog-wrapper .catalog-description-short {
    font-size:14.5px;
    line-height:1.7;
    color:var(--ink-soft);
    margin:18px 0 12px;
}
body .catalog-wrapper .catalog-learn-more-scroll {
    font-family:'Cormorant Garamond', Georgia, serif;
    font-style:italic;
    color:var(--gold-deep, #a8821f);
    font-size:14px;
    text-decoration:none;
    border-bottom:1px solid currentColor;
    padding-bottom:2px;
    cursor:pointer;
}
body .catalog-wrapper .catalog-header-right {
    position:relative;
}
body .catalog-wrapper .catalog-header-image {
    width:100%;
    height:auto;
    border-radius:8px;
    overflow:hidden;
    box-shadow:0 18px 50px -14px rgba(58,36,24,.18);
}
body .catalog-wrapper .catalog-header-image img {
    display:block;
    width:100%;
    height:auto;
    border-radius:8px;
}

/* ---------- Vintage tobacco engraving (fallback when no photo/video) ---------- */
/* min-width:0 stops a wide image from blowing out the 1fr grid column. */
body .catalog-wrapper .catalog-header-right { min-width:0; }
body .catalog-wrapper .catalog-header-right.has-etch {
    display:flex;
    align-items:center;
    justify-content:center;
}
body .catalog-wrapper .catalog-header-etch {
    width:100%;
    max-width:460px;
    border-radius:10px;
    overflow:hidden;
    border:1px solid var(--hairline);
    background:var(--cream-light);
    box-shadow:0 18px 50px -18px rgba(58,36,24,.22);
}
body .catalog-wrapper .catalog-header-etch img {
    display:block;
    width:100%;
    height:auto;
}

/* ---------- Faint hand-etched accent on every category header ---------- */
body .catalog-wrapper .catalog-header-left,
body .catalog-wrapper .catalog-header-right { position:relative; z-index:1; }

/* ---------- Full-width brand banner (per-category hero) ---------- */
body .catalog-wrapper .catalog-brand-banner {
    margin:6px 0 22px;
    border-radius:14px;
    overflow:hidden;
    border:1px solid var(--hairline);
    box-shadow:0 18px 50px -20px rgba(58,36,24,.22);
    line-height:0;
}
body .catalog-wrapper .catalog-brand-banner img {
    display:block;
    width:100%;
    aspect-ratio:3 / 1;   /* every banner is 1600x533 → identical height, like Partagás */
    height:auto;
    object-fit:cover;
}

/* ---------- Filter bar ---------- */
body .catalog-wrapper .catalog-filters {
    display:flex;
    align-items:center;
    gap:18px;
    padding:18px 0;
    border-bottom:1px solid var(--hairline);
    margin-bottom:24px;
}
body .catalog-wrapper .catalog-filter-label,
body .catalog-wrapper .catalog-sort-label {
    font-family:'Cormorant Garamond', Georgia, serif;
    font-weight:500;
    font-size:14px;
    color:var(--ink);
    letter-spacing:0.04em;
}
body .catalog-wrapper .catalog-filter-left {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
    flex:1;
}
body .catalog-wrapper .catalog-filter-btn,
body .catalog-wrapper .catalog-filter-toggle {
    background:#fff !important;
    border:1px solid var(--hairline) !important;
    color:var(--ink) !important;
    padding:10px 18px !important;
    font-family:'Jost', sans-serif !important;
    font-size:12px !important;
    font-weight:500 !important;
    letter-spacing:0.08em;
    text-transform:uppercase;
    border-radius:4px !important;
    cursor:pointer;
    transition:all .2s ease;
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:38px;
}
body .catalog-wrapper .catalog-filter-btn:hover,
body .catalog-wrapper .catalog-filter-toggle:hover {
    border-color:var(--gold) !important;
    color:var(--gold-deep, #a8821f) !important;
    box-shadow:0 2px 8px rgba(184,153,104,.12);
}
body .catalog-wrapper .catalog-filter-btn.active,
body .catalog-wrapper .catalog-filter-btn[aria-expanded="true"] {
    background:var(--ink) !important;
    color:#fff !important;
    border-color:var(--ink) !important;
}
body .catalog-wrapper .catalog-filter-dropdown {
    background:#fff !important;
    border:1px solid var(--hairline) !important;
    border-radius:8px !important;
    box-shadow:0 18px 50px -14px rgba(58,36,24,.18) !important;
    padding:14px !important;
}
body .catalog-wrapper .catalog-filter-dropdown-content label,
body .catalog-wrapper .catalog-filter-dropdown-content a {
    font-family:'Jost', sans-serif !important;
    font-size:13px !important;
    color:var(--ink) !important;
    padding:8px 10px !important;
    border-radius:4px;
}
body .catalog-wrapper .catalog-filter-dropdown-content label:hover,
body .catalog-wrapper .catalog-filter-dropdown-content a:hover {
    background:var(--ivory) !important;
    color:var(--gold-deep, #a8821f) !important;
}

/* Sort dropdown */
body .catalog-wrapper .catalog-sort-wrapper {
    margin-left:auto;
    display:flex;
    align-items:center;
    gap:10px;
}
body .catalog-wrapper .catalog-sort-wrapper select {
    font-family:'Jost', sans-serif;
    font-size:13px;
    color:var(--ink);
    padding:10px 30px 10px 14px;
    border:1px solid var(--hairline);
    background:#fff;
    border-radius:4px;
    min-height:38px;
    cursor:pointer;
}
.catalog-sort-wrapper select:hover { border-color:var(--gold); }

/* Active filter pills */
body .catalog-wrapper .catalog-active-filters {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    align-items:center;
    margin:0 0 22px;
}
body .catalog-wrapper .active-filters-label {
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:0.18em;
    color:var(--mute);
    font-weight:600;
    margin-right:6px;
}
body .catalog-wrapper .active-filter-tag {
    background:var(--cream);
    color:var(--ink);
    border:1px solid var(--gold);
    padding:6px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:500;
    display:inline-flex;
    align-items:center;
    gap:6px;
}
body .catalog-wrapper .active-filter-tag::after {
    content:"×";
    color:var(--gold-deep, #a8821f);
    font-size:14px;
    font-weight:700;
    cursor:pointer;
}
body .catalog-wrapper .catalog-clear-all-filters {
    font-size:11px;
    letter-spacing:0.18em;
    text-transform:uppercase;
    color:var(--gold-deep, #a8821f);
    font-weight:600;
    text-decoration:none;
    margin-left:8px;
    cursor:pointer;
    background:none;
    border:0;
}

/* ---------- Product list (horizontal rows — original layout, restyled) ---------- */
/* NOTE: We intentionally KEEP the horizontal row layout from archive-product.php.
   Only typography, colors, spacing get the redesign paint. */
body .catalog-wrapper .catalog-product-item {
    transition:all .2s ease;
}
body .catalog-wrapper .catalog-product-item:hover {
    box-shadow:0 8px 24px -10px rgba(58,36,24,.18);
    border-color:var(--gold) !important;
    transform:translateY(-1px);
}
body .catalog-wrapper .catalog-product-image,
body .catalog-wrapper .catalog-product-item .catalog-product-image a {
    background:#fff;
    aspect-ratio:1/1;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    position:relative;
}
body .catalog-wrapper .catalog-product-image img {
    width:100%;
    height:100%;
    object-fit:contain;
    padding:14px;
    box-sizing:border-box;
    transition:transform .35s ease;
}
body .catalog-wrapper .catalog-product-item:hover .catalog-product-image img {
    transform:scale(1.04);
}
body .catalog-wrapper .catalog-product-info {
    padding:16px 16px 0;
    flex:1;
    display:flex;
    flex-direction:column;
}
body .catalog-wrapper .catalog-product-name,
body .catalog-wrapper .catalog-product-name a {
    font-family:'Cormorant Garamond', Georgia, serif !important;
    font-weight:500 !important;
    font-size:18px !important;
    line-height:1.3 !important;
    color:var(--ink) !important;
    margin:0 0 6px !important;
    text-decoration:none;
    letter-spacing:0;
    text-transform:none;
}
.catalog-product-name a:hover { color:var(--gold-deep, #a8821f) !important; }
body .catalog-wrapper .catalog-product-meta {
    font-size:12px;
    color:var(--mute);
    line-height:1.5;
    margin:0 0 10px;
    text-transform:none;
    letter-spacing:0.02em;
}
body .catalog-wrapper .catalog-product-meta strong,
body .catalog-wrapper .catalog-product-meta b {
    color:var(--ink-soft);
    font-weight:500;
}
body .catalog-wrapper .catalog-product-reviews,
body .catalog-wrapper .catalog-reviews {
    display:flex;
    align-items:center;
    gap:6px;
    font-size:12px;
    color:var(--mute);
    margin:0 0 10px;
}
body .catalog-wrapper .catalog-product-reviews .star,
body .catalog-wrapper .catalog-product-reviews [class*="star"],
body .catalog-wrapper .catalog-reviews [class*="star"] {
    color:var(--gold) !important;
}
body .catalog-wrapper .catalog-product-price,
body .catalog-wrapper .catalog-price-current {
    font-family:'Jost', sans-serif !important;
    font-size:18px !important;
    font-weight:700 !important;
    color:var(--ink) !important;
    margin:8px 0 12px !important;
    letter-spacing:-0.005em;
}
body .catalog-wrapper .catalog-product-price del,
body .catalog-wrapper .catalog-product-price .woocommerce-Price-amount.del {
    color:var(--mute) !important;
    font-weight:400 !important;
    font-size:14px !important;
    margin-right:6px;
}
body .catalog-wrapper .catalog-product-price ins {
    text-decoration:none;
    color:var(--ink) !important;
    font-weight:700 !important;
}

/* Add to cart button */
body .catalog-wrapper .catalog-product-purchase,
body .catalog-wrapper .catalog-product-item .button {
    padding:0 16px 16px;
}
body .catalog-wrapper .catalog-add-to-cart,
a.button.catalog-add-to-cart,
body .catalog-wrapper .catalog-product-item .button.add_to_cart_button {
    display:flex !important;
    width:100% !important;
    align-items:center;
    justify-content:center;
    gap:8px;
    white-space:nowrap !important;
    background:var(--wine) !important;
    color:#fff !important;
    padding:13px 12px !important;
    font-family:'Jost', sans-serif !important;
    font-size:11px !important;
    letter-spacing:0.14em !important;
    text-transform:uppercase !important;
    font-weight:700 !important;
    border:0 !important;
    border-radius:6px !important;
    text-decoration:none !important;
    box-shadow:none !important;
    margin:0 !important;
    transition:background .15s, box-shadow .15s !important;
}
body .catalog-wrapper .catalog-add-to-cart:hover,
body .catalog-wrapper .catalog-product-item .button.add_to_cart_button:hover {
    background:var(--wine-dark) !important;
    color:#fff !important;
    box-shadow:0 8px 18px -6px rgba(107,31,31,.4) !important;
}
body .catalog-wrapper .catalog-add-to-cart.added::before,
.catalog-add-to-cart.loading::before { color:var(--cream-light) !important; }

/* Pagination */
body .catalog-wrapper .catalog-pagination,
body .catalog-wrapper .woocommerce-pagination {
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
    margin:40px 0 0;
    padding:0;
    list-style:none;
}
body .catalog-wrapper .catalog-pagination a,
body .catalog-wrapper .catalog-pagination span,
body .catalog-wrapper .woocommerce-pagination a,
body .catalog-wrapper .woocommerce-pagination .page-numbers {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:38px;
    height:38px;
    padding:0 12px;
    font-family:'Jost', sans-serif;
    font-size:13px;
    font-weight:500;
    color:var(--ink);
    background:#fff;
    border:1px solid var(--hairline);
    border-radius:4px;
    text-decoration:none;
    transition:all .2s ease;
}
body .catalog-wrapper .catalog-pagination a:hover,
body .catalog-wrapper .woocommerce-pagination a:hover {
    border-color:var(--gold);
    color:var(--gold-deep, #a8821f);
}
body .catalog-wrapper .catalog-pagination .current,
body .catalog-wrapper .catalog-pagination span.current,
body .catalog-wrapper .woocommerce-pagination .current {
    background:var(--ink) !important;
    color:#fff !important;
    border-color:var(--ink) !important;
}

/* ---------- Brand story section (below products) ---------- */
body .catalog-wrapper .brand-story-section {
    background:var(--cream-light);
    padding:60px 32px;
    margin:60px -32px 0;
    border-top:1px solid var(--hairline);
}
body .catalog-wrapper .brand-story-content {
    max-width:880px;
    margin:0 auto;
    font-family:'Jost', sans-serif;
    font-size:15px;
    line-height:1.75;
    color:var(--ink-soft);
}
body .catalog-wrapper .brand-story-content h2,
body .catalog-wrapper .brand-story-content h3 {
    font-family:'Cormorant Garamond', Georgia, serif;
    font-weight:500;
    color:var(--ink);
    letter-spacing:-0.005em;
    margin:24px 0 14px;
}
.brand-story-content h2 { font-size:32px; }
.brand-story-content h3 { font-size:22px; }
.brand-story-content p { margin:0 0 16px; }
body .catalog-wrapper .brand-story-content a {
    color:var(--gold-deep, #a8821f);
    text-decoration:underline;
    text-underline-offset:3px;
}

/* No products */
body .catalog-wrapper .catalog-no-products {
    text-align:center;
    padding:60px 24px;
    color:var(--mute);
    font-size:14px;
    font-style:italic;
}

/* Loading state */
body .catalog-wrapper .catalog-loading {
    color:var(--mute);
    font-size:13px;
    letter-spacing:0.06em;
}

/* WooCommerce result count */
body .catalog-wrapper .woocommerce-result-count {
    font-size:12px;
    color:var(--mute);
    letter-spacing:0.04em;
    margin:0;
}

/* =================================================================
   Responsive
   ================================================================= */

@media (max-width:1024px) {
    .catalog-header-title { font-size:38px; }
}

@media (max-width:768px) {
    .catalog-wrapper { padding:18px 16px 40px; }

    /* Hero stacks */
    body .catalog-wrapper .catalog-header {
        grid-template-columns:1fr;
        gap:24px;
        padding:16px 0 24px;
    }
    .catalog-header-left { order:2; padding-right:0; }
    .catalog-header-right { order:1; }
    .catalog-header-title { font-size:32px; }
    .catalog-description-wrapper { font-size:14px; }

    /* Filters */
    body .catalog-wrapper .catalog-filters {
        flex-direction:column;
        align-items:stretch;
        gap:12px;
    }
    .catalog-filter-left { gap:8px; }
    body .catalog-wrapper .catalog-filter-btn,
    body .catalog-wrapper .catalog-filter-toggle {
        font-size:11px !important;
        padding:9px 14px !important;
    }
    body .catalog-wrapper .catalog-sort-wrapper {
        margin-left:0;
        width:100%;
    }
    .catalog-sort-wrapper select { flex:1; }

    /* Product list — keep stacked rows on mobile (already the default) */
    body .catalog-wrapper .catalog-product-name,
    .catalog-product-name a { font-size:15px !important; line-height:1.25 !important; }
    .catalog-product-meta { font-size:11px; }
    body .catalog-wrapper .catalog-product-price,
    .catalog-price-current { font-size:16px !important; }
    body .catalog-wrapper .catalog-add-to-cart,
    body .catalog-wrapper .catalog-product-item .button.add_to_cart_button {
        padding:11px 8px !important;
        font-size:10.5px !important;
        letter-spacing:0.08em !important;
    }
    /* widen the button area in the card so "ADD TO CART" stays on one line */
    body .catalog-wrapper .catalog-product-purchase,
    body .catalog-wrapper .catalog-product-item .button { padding:0 10px 12px !important; }
    .catalog-product-info { padding:12px 12px 0; }

    /* Brand story */
    .brand-story-section { padding:40px 16px; margin:40px -16px 0; }
    .brand-story-content { font-size:14px; line-height:1.7; }
    .brand-story-content h2 { font-size:26px; }
}

@media (max-width:480px) {
    body .catalog-wrapper .catalog-product-name,
    .catalog-product-name a { font-size:14px !important; }
}

/* ===== Search results: hide category filters (they don't apply cross-search) ===== */
body.search .catalog-filters .catalog-filter-left,
body.search .catalog-filter-label { display:none !important; }
body.search .catalog-filters { justify-content:flex-end; }
body.search .catalog-sort-wrapper { margin-left:0; }
/* If the whole filter row would be empty, collapse its top border gap */
body.search .catalog-filters { border-top:none; padding-top:0; }
