/**
 * Shop Archive — Fixes (v1.6.2)
 *
 * 1. [hidden] guard — fixes the forever-spinning loader
 * 2. Suppress the parent theme's duplicate page-header block
 * 3. Container widened to 1500px
 * 4. Filter typography scaled up
 */

/* =====================================================================
 * 1. [hidden] GUARD — CRITICAL
 *
 * The `hidden` HTML attribute is implemented as a UA-stylesheet rule
 * (`[hidden] { display: none }`) with the LOWEST possible specificity.
 * Any class-level `display` declaration silently overrides it.
 *
 * `.jw-shop__loader { display: flex }` therefore beat `[hidden]`, so the
 * loader stayed visible and spun forever — the JS was toggling `hidden`
 * correctly the entire time; the CSS was ignoring it.
 *
 * These rules restore the attribute's meaning for every element that
 * relies on it.
 * =================================================================== */

body.jw-shop-page [hidden],
.jw-shop__loader[hidden],
.jw-shop__empty[hidden],
.jw-chips[hidden],
.jw-shop__more-btn[hidden],
.jw-filters__clear[hidden],
.jw-shelf[hidden] {
    display: none !important;
}

/* =====================================================================
 * 2. KILL THE PARENT THEME'S DUPLICATE ARCHIVE HEADER
 * =================================================================== */

body.jw-shop-page .page-title-bar,
body.jw-shop-page .page-header,
body.jw-shop-page .archive-header,
body.jw-shop-page .shop-page-header,
body.jw-shop-page .woocommerce-products-header,
body.jw-shop-page .page-title,
body.jw-shop-page .entry-header,
body.jw-shop-page .tf-page-title,
body.jw-shop-page .woocommerce-products-header__title {
    display: none !important;
}

body.jw-shop-page .site-content,
body.jw-shop-page .site-main,
body.jw-shop-page main,
body.jw-shop-page #main,
body.jw-shop-page .content-area {
    padding-top: 0 !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body.jw-shop-page .woocommerce-result-count,
body.jw-shop-page .woocommerce-ordering,
body.jw-shop-page nav.woocommerce-pagination {
    display: none !important;
}

/* =====================================================================
 * 3. CONTAINER — 1500px
 * =================================================================== */

body.jw-shop-page .jw-shop__container {
    max-width: 1500px;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 48px;
}

body.jw-shop-page .jw-shop { padding-top: 40px; padding-bottom: 88px; }

/* =====================================================================
 * 4. HERO
 * =================================================================== */

body.jw-shop-page .jw-shop-hero {
    padding: 48px clamp(16px, 4vw, 40px) 44px;
    margin: 0;
}
body.jw-shop-page .jw-shop-hero__crumbs { margin-bottom: 16px; }
body.jw-shop-page .jw-shop-hero__title  { margin-bottom: 0; }
body.jw-shop-page .jw-shop-hero__intro  { margin-top: 14px; }

/* =====================================================================
 * 5. FILTER TYPOGRAPHY — scaled up for readability
 * =================================================================== */

body.jw-shop-page .jw-filters {
    padding: 24px 24px 12px;
}

body.jw-shop-page .jw-filters__title {
    font-size: 24px;
}

body.jw-shop-page .jw-filters__clear {
    font-size: 12px;
    letter-spacing: 0.08em;
}

/* Facet headings: METAL / PURITY / PRICE / CATEGORY */
body.jw-shop-page .jw-facet__label {
    font-size: 13px;
    letter-spacing: 0.12em;
}
body.jw-shop-page .jw-facet__head {
    padding: 15px 0;
}
body.jw-shop-page .jw-facet__chev {
    font-size: 13px;
}

/* Checkbox rows */
body.jw-shop-page .jw-check {
    padding: 9px 6px;
    gap: 12px;
}
body.jw-shop-page .jw-check__box {
    width: 19px;
    height: 19px;
    border-radius: 5px;
}
body.jw-shop-page .jw-check input:checked + .jw-check__box::after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 10px;
}
body.jw-shop-page .jw-check__label {
    font-size: 15px;
}
body.jw-shop-page .jw-check__count {
    font-size: 12px;
}

/* Purity pills */
body.jw-shop-page .jw-facet__body--pills { gap: 8px; }
body.jw-shop-page .jw-pill__face {
    padding: 9px 14px;
    font-size: 13px;
}
body.jw-shop-page .jw-pill__face em {
    font-size: 11px;
}
/* Zero-count purities belong to metals with no stock — hide rather than grey out */
body.jw-shop-page .jw-pill.is-disabled { display: none; }

/* Price */
body.jw-shop-page .jw-price-range__field span {
    font-size: 11px;
    letter-spacing: 0.1em;
}
body.jw-shop-page .jw-price-range__field input {
    padding: 11px 12px !important;
    font-size: 14px;
}
body.jw-shop-page .jw-price-range__apply {
    padding: 12px 16px;
    font-size: 12px;
}
body.jw-shop-page .jw-price-range__note {
    font-size: 12px;
    line-height: 1.55;
}

/* =====================================================================
 * 6. TOOLBAR
 * =================================================================== */

body.jw-shop-page .jw-toolbar {
    margin-bottom: 24px;
    padding-bottom: 16px;
}
body.jw-shop-page .jw-toolbar__count { font-size: 13px; }
body.jw-shop-page .jw-sort__label    { font-size: 11px; }
body.jw-shop-page .jw-sort__select   { font-size: 14px; }

/* =====================================================================
 * 7. GRID
 * =================================================================== */

body.jw-shop-page ul.jw-card-grid--shop { gap: 24px !important; }

/* Loader must never block interaction even when visible */
body.jw-shop-page .jw-shop__loader { pointer-events: none; }

/* =====================================================================
 * 8. RESPONSIVE
 * =================================================================== */

@media (max-width: 1300px) {
    body.jw-shop-page .jw-shop__container {
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 36px;
    }
}
@media (max-width: 900px) {
    body.jw-shop-page .jw-shop { padding-top: 24px; }
    body.jw-shop-page .jw-shop-hero { padding: 36px 16px 32px; }
    body.jw-shop-page .jw-shop__container { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    body.jw-shop-page ul.jw-card-grid--shop { gap: 12px !important; }
}
