/* Bedworld shop, category and brand archives (woocommerce/archive-product.php) + product cards. */
.bw-shop-hero { background: var(--bw-dark); color: #fff; padding: 22px 0 26px; position: relative; overflow: hidden; }
.bw-shop-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--bw-navy); }
.bw-shop-hero::after { content: ""; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(175,0,0,.45), transparent 70%); pointer-events: none; }
.bw-shop-hero .bw-container { position: relative; z-index: 1; }
.bw-shop-hero .bw-breadcrumb, .bw-shop-hero .bw-breadcrumb a { color: #c98b8b; font-size: 13px; }
.bw-shop-hero h1 { font-family: var(--bw-display); font-size: clamp(30px, 4vw, 44px); line-height: 1.05; margin: 8px 0 6px; color: #fff; }
.bw-shop-hero__intro { max-width: 720px; color: rgba(255,255,255,.78); margin: 0 0 14px; font-size: 15px; }

.bw-quick { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.bw-quick__label { flex: 0 0 74px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--bw-yellow); }
.bw-quick__list { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.bw-quick__chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); color: #fff; text-decoration: none; font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s; }
.bw-quick__chip:hover { border-color: var(--bw-yellow); }
.bw-quick__chip.is-on { background: #fff; color: var(--bw-dark); border-color: #fff; }
.bw-quick__chip .bw-comfort__meter { margin: 0; gap: 3px; }
.bw-quick__chip .bw-comfort__meter i { width: 10px; height: 6px; background: rgba(255,255,255,.25); }
.bw-quick__chip .bw-comfort__meter i.on { background: var(--bw-yellow); }
.bw-quick__chip.is-on .bw-comfort__meter i { background: var(--bw-gray-light); }
.bw-quick__chip.is-on .bw-comfort__meter i.on { background: var(--bw-navy); }
.bw-quick__help { flex: 0 0 auto; align-self: center; font-size: 13px; color: var(--bw-yellow); white-space: nowrap; margin-left: 4px; }

.bw-shop { background: var(--bw-light); padding: 18px 0 48px; }
.bw-shop-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.bw-shop-toolbar__count { margin-right: auto; font-size: 14px; color: var(--bw-charcoal); }
.bw-shop-toolbar__count p { margin: 0; }
.bw-shop-toolbar .woocommerce-ordering { margin: 0; }
.bw-shop-toolbar .woocommerce-ordering select { height: 42px; border-radius: 999px; border: 1.5px solid var(--bw-gray-light); padding: 0 36px 0 16px; background-color: #fff; font-weight: 600; color: var(--bw-text); }
.bw-shop .bw-shop-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.bw-shop .bw-shop-sidebar { background: #fff; border-radius: var(--bw-radius); padding: 18px; border: 1px solid var(--bw-gray-light); position: sticky; top: var(--bw-sticky-top, 140px); max-height: calc(100vh - var(--bw-sticky-top, 140px) - 16px); overflow-y: auto; }
.bw-shop .bw-widget { margin-bottom: 18px; }
.bw-shop .bw-widget-title, .bw-active-filters__header h2 { font-family: var(--bw-font); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--bw-text); margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--bw-yellow); }
.bw-active-filters { background: #fff7f5; border: 1px solid #f1d6d0; border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.bw-active-filters__header { display: flex; justify-content: space-between; align-items: baseline; }
.bw-active-filters__header h2 { border: 0; padding: 0; }
.bw-active-filters__clear { font-size: 13px; color: var(--bw-navy); font-weight: 700; }
.bw-active-filters__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bw-active-filters__tag { background: var(--bw-navy); color: #fff !important; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.bw-category-filter, .bw-check-filter { list-style: none; margin: 0; padding: 0; }
.bw-category-filter > li > a, .bw-category-filter__children a { display: flex; justify-content: space-between; padding: 6px 4px; color: var(--bw-text); text-decoration: none; font-size: 14px; border-radius: 8px; }
.bw-category-filter__children { list-style: none; margin: 0 0 4px 10px; padding-left: 8px; border-left: 2px solid var(--bw-gray-light); }
.bw-category-filter__children a { font-size: 13px; color: var(--bw-charcoal); }
.bw-category-filter .active > a { color: var(--bw-navy); font-weight: 700; background: #fff7f5; }
.bw-category-filter .count { color: var(--bw-charcoal); font-size: 12px; }
.bw-check-filter a { display: flex; align-items: center; gap: 10px; padding: 5px 4px; color: var(--bw-text); text-decoration: none; font-size: 14px; }
.bw-check { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #cdbfb7; flex: 0 0 18px; display: inline-flex; align-items: center; justify-content: center; }
.bw-check-filter .active .bw-check { background: var(--bw-navy); border-color: var(--bw-navy); }
.bw-check-filter .active .bw-check::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.bw-check-filter--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6px; }
.bw-check-filter--grid a { font-size: 13px; }

/* Product cards */
.bw-shop ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 18px !important; }
ul.products li.product { display: flex; flex-direction: column; }
ul.products li.product .woocommerce-loop-product__link img { aspect-ratio: 1 / 1; object-fit: contain; }
.bw-card-spec { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12.5px; color: var(--bw-charcoal); margin: 2px 16px 6px; }
.bw-card-spec b { color: var(--bw-text); font-weight: 700; }
.bw-card-spec .bw-comfort__meter { margin: 0; gap: 2px; }
.bw-card-spec .bw-comfort__meter i { width: 9px; height: 5px; background: var(--bw-gray-light); }
.bw-card-spec .bw-comfort__meter i.on { background: var(--bw-navy); }
ul.products li.product .button { margin-top: auto !important; }

.bw-shop-empty { background: #fff; border-radius: var(--bw-radius); padding: 32px; text-align: center; border: 1px solid var(--bw-gray-light); }
.bw-shop-empty h2 { font-family: var(--bw-display); margin: 0 0 8px; }
.bw-shop-empty .bw-btn { margin: 12px 4px 0; }

@media (min-width: 1300px) { .bw-shop ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (max-width: 1024px) {
  .bw-shop .bw-shop-layout { grid-template-columns: 1fr; }
  .bw-shop .bw-shop-sidebar { position: fixed; top: 0; right: -100%; width: min(340px, 92vw); height: 100%; max-height: none; border-radius: 0; z-index: 10000; transition: right .25s; box-shadow: var(--bw-shadow-lg); }
  .bw-shop .bw-shop-sidebar.bw-shop-sidebar--open { right: 0; }
  .bw-shop .bw-sidebar-toggle { display: inline-flex !important; position: static !important; flex-direction: row !important; gap: 8px; width: auto !important; height: 42px !important; padding: 0 16px; border-radius: 999px !important; background: var(--bw-dark) !important; color: #fff !important; font-weight: 700; font-size: 14px; box-shadow: none !important; }
  .bw-shop ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
}
@media (max-width: 560px) {
  .bw-quick { flex-direction: column; align-items: stretch; gap: 6px; }
  .bw-quick__label { flex: none; }
  .bw-shop-toolbar__count { flex-basis: 100%; }
  .bw-shop-toolbar .woocommerce-ordering { margin-left: auto; }
  .bw-shop-toolbar .woocommerce-ordering select { max-width: 200px; }
  ul.products li.product .woocommerce-loop-product__title { font-size: 15px !important; }
  .bw-card-spec { margin: 2px 10px 6px; font-size: 12px; }
}

main.bw-main.bw-shop { padding-top: 18px; }
.bw-shop-hero + main.bw-main { margin-top: 0; }

/* Product photos fill the card width at every screen size (they kept a fixed 250px and left empty bands). */
ul.products li.product a.woocommerce-loop-product__link img { width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; object-fit: contain; }
/* The Filters button sits in the toolbar on every listing (shop, categories, specials), never floating over products. */
@media (max-width: 1024px) {
  .bw-shop-toolbar .bw-sidebar-toggle { display: inline-flex !important; position: static !important; flex-direction: row !important; gap: 8px; width: auto !important; height: 42px !important; padding: 0 16px; border-radius: 999px !important; background: var(--bw-dark) !important; color: #fff !important; font-weight: 700; font-size: 14px; box-shadow: none !important; }
  .bw-shop-toolbar .bw-sidebar-toggle span { font-size: 14px; }
}

@media (max-width: 1024px) { .bw-shop-toolbar { position: static !important; top: auto !important; } }
@media (max-width: 560px) { .bw-card-spec { margin: 2px 16px 6px !important; } }

/* Product cards: the photo sits on clean white edge to edge (photos have white backgrounds), with a hairline under it. */
ul.products li.product a.woocommerce-loop-product__link img,
ul.products li.product .woocommerce-loop-product__link img.attachment-woocommerce_thumbnail { background: #fff !important; padding: 22px !important; margin: 0 !important; border-radius: 0 !important; border-bottom: 1px solid var(--bw-gray-light); box-sizing: border-box; transition: transform .35s ease; }
ul.products li.product { overflow: hidden; }
ul.products li.product:hover a.woocommerce-loop-product__link img { transform: scale(1.04); }
ul.products li.product .woocommerce-loop-product__link { display: block; overflow: hidden; }
ul.products li.product .onsale, ul.products li.product .bw-badge-sale { z-index: 2; }


/* ── Shop filters, phones + tablets (2026-11-14) ───────────────────────────
   Size / comfort chips wrap onto extra lines: no scroll bar and no half-hidden chips at any width.
   The Filters + Sort bar sticks just under the site header (never over it), so filters are always
   one tap away while scrolling the products. */
.bw-quick__list { flex-wrap: wrap; overflow: visible; padding: 2px 0; }
.bw-shop-count-m { display: none; }
/* Phones + tablets (2026-11-15, Tiaan): a STATIC styled filter card above the products, never sticky or
   floating. Row 1: "Filter & sort" + result count. Row 2: Filters button, then the Sort select filling the rest. */
@media (max-width: 1024px) {
  .bw-quick__list { gap: 7px; }
  .bw-quick__chip { padding: 7px 12px; font-size: 13px; }
  .bw-shop-count-m { display: none !important; }
  .bw-shop-toolbar {
    position: static !important; top: auto !important; left: auto !important; right: auto !important; z-index: auto;
    display: grid !important; grid-template-columns: auto 1fr; gap: 10px; width: auto !important; max-width: none !important;
    margin: 0 0 18px !important; padding: 14px !important;
    background: #fff; border: 1px solid var(--bw-gray-light); border-radius: 18px;
    box-shadow: 0 8px 22px -18px rgba(36, 17, 19, .45);
  }
  .bw-shop-toolbar::before {
    content: 'Filter & sort'; grid-column: 1 / 2; align-self: center;
    font-family: var(--bw-font-display, 'Fraunces', serif); font-weight: 700; font-size: 17px; color: var(--bw-dark, #241113);
  }
  .bw-shop-toolbar .bw-shop-toolbar__count { display: block !important; grid-column: 2 / 3; grid-row: 1; justify-self: end; align-self: center; margin: 0 !important; flex-basis: auto !important; }
  .bw-shop-toolbar .bw-shop-toolbar__count p { margin: 0; font-size: 12px; color: var(--bw-charcoal); text-align: right; }
  .bw-shop-toolbar .bw-sidebar-toggle { grid-row: 2; grid-column: 1; width: auto !important; justify-content: center; height: 46px !important; padding: 0 20px !important; }
  .bw-shop-toolbar .woocommerce-ordering { grid-row: 2; grid-column: 2; width: 100%; min-width: 0; margin: 0 !important; }
  .bw-shop-toolbar .woocommerce-ordering select { width: 100%; max-width: none !important; height: 46px; font-size: 13px; padding: 0 30px 0 14px; }
}

/* Shop / categories / Specials on phones + tablets (2026-11-15, Tiaan): the filter bar STAYS ON SCREEN while scrolling,
   pinned directly under the site header (never over it or under it). One compact row: Filters button + Sort. */
@media (max-width: 1024px) {
    .bw-shop-toolbar {
        position: -webkit-sticky !important; position: sticky !important; top: var(--bw-hdr-h, 116px) !important; z-index: 900 !important;
        grid-template-columns: auto minmax(0, 1fr) !important; gap: 8px !important; align-items: center;
        margin: 0 calc(50% - 50vw) 16px !important; padding: 10px 16px !important;
        border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important;
        box-shadow: 0 10px 18px -16px rgba(36, 17, 19, .55) !important;
    }
    .bw-shop-toolbar::before { content: none !important; display: none !important; }
    .bw-shop-toolbar .bw-shop-toolbar__count { display: none !important; }
    .bw-shop-toolbar .bw-sidebar-toggle { grid-row: 1 !important; height: 44px !important; padding: 0 18px !important; }
    .bw-shop-toolbar .bw-sidebar-toggle, .bw-shop-toolbar .bw-sidebar-toggle span { text-transform: none !important; letter-spacing: 0 !important; font-family: var(--bw-font, Inter, sans-serif) !important; font-size: 14px !important; font-weight: 700 !important; }
    .bw-shop-toolbar .woocommerce-ordering { grid-row: 1 !important; }
    .bw-shop-toolbar .woocommerce-ordering select { height: 44px !important; }
}
