/* Gear House: styles for the browse pages (catalog, item, kit, studio, crew). Loaded after main.css. */

/* Catalog: VAT note under the result count, tier help, active filter chips, empty state */
.result-wrap { display: grid; gap: 2px; }
.vat-note { font-size: 12px; color: var(--mist); }
.filter-help { margin: -4px 0 10px; font-size: 12px; line-height: 1.45; color: var(--mist); }
.active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.active-chips[hidden] { display: none; }
.active-chips .fchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border: 1px solid var(--smoke-2); border-radius: 999px; background: transparent; color: var(--bone); font-size: 13px; cursor: pointer; }
.active-chips .fchip:hover { border-color: var(--bone-2); }
.active-chips .fchip .x { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--smoke); font-size: 13px; line-height: 1; }
.active-chips .fclear { background: none; border: 0; color: var(--red-text, var(--tungsten)); font-size: 13px; text-decoration: underline; cursor: pointer; padding: 6px 4px; }
.empty .empty-msg { color: var(--bone); font-size: 17px; margin: 0 0 6px; }
.empty .empty-why { margin: 0 0 18px; }
.empty .empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 18px; }

/* Item / kit pages: placeholder while the catalog loads (no jump when the price box appears) */
.item-skel { min-height: 420px; border-radius: var(--radius-lg, 14px); background: linear-gradient(100deg, var(--graphite) 30%, var(--graphite-2) 50%, var(--graphite) 70%); background-size: 300% 100%; animation: gh-skel 1.4s ease-in-out infinite; }
.item-skel.info { min-height: 560px; }
@keyframes gh-skel { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .item-skel { animation: none; } }
@media (max-width: 900px) { .item-skel { min-height: 280px; } .item-skel.info { min-height: 480px; } }
.load-error { grid-column: 1 / -1; }

/* Rate tabs with fewer than four options: no empty slot */
.rate-tabs.rt-fit { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }

/* Booking line under the Add button, stock note next to the quantity stepper */
.book-hint { margin: 0; font-size: 13px; line-height: 1.45; color: var(--mist); }
.stock-note { display: block; margin-top: 6px; font-size: 12px; color: var(--mist); }
.stock-note[hidden] { display: none; }
.qty button:disabled { opacity: 0.35; cursor: not-allowed; }

/* Inline question (dates choice, "booked on these dates") */
.gh-ask { margin-top: 12px; padding: 14px; border: 1px solid var(--smoke-2); border-radius: 14px; background: var(--ink-2); }
.gh-ask p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; color: var(--bone); }
.gh-ask-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* Date fields: message when a date can't be used */
.date-msg { margin: 8px 0 0; font-size: 13px; line-height: 1.4; color: var(--red-text, var(--signal)); }
.date-msg[hidden] { display: none; }
input[type="date"][aria-invalid="true"] { outline: 1px solid var(--signal); outline-offset: 2px; }

/* Lightbox arrows and counter (same look as the studio page) */
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--smoke-2); background: rgba(10,10,11,0.7); color: var(--bone); font-size: 18px; cursor: pointer; }
.lightbox .lb-nav.prev { left: 16px; }
.lightbox .lb-nav.next { right: 16px; }
.lightbox .lb-nav[hidden] { display: none; }
.lightbox .lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font: 500 12px/1 var(--font-mono); color: var(--mist); }

/* Phones: compact price + Add bar above the tab bar while the price box is off screen */
.buy-bar { display: none; }
@media (max-width: 760px) {
  .buy-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h, 58px) + var(--safe-b, env(safe-area-inset-bottom, 0px))); z-index: 1300;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
    background: rgba(13,14,19,0.96); border-top: 1px solid var(--smoke); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    transform: translateY(110%); opacity: 0; pointer-events: none; transition: transform 0.25s var(--ease-out, ease), opacity 0.2s; }
  body:not(.has-tabbar) .buy-bar { bottom: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .buy-bar.show { transform: none; opacity: 1; pointer-events: auto; }
  .buy-bar .bb-price { display: grid; gap: 2px; min-width: 0; }
  .buy-bar .bb-price .v { font-weight: 700; font-size: 18px; color: var(--bone); }
  .buy-bar .bb-price .u { font-size: 11.5px; color: var(--mist); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .buy-bar .btn { flex: 0 0 auto; }
  body.has-buybar main { padding-bottom: 72px; }
  body.has-buybar .toast-wrap { bottom: calc(var(--tabbar-h, 58px) + var(--safe-b, 0px) + 80px); }
}
.rb-dates .date-msg { flex-basis: 100%; margin: 0; }

/* ---------- Catalog fixes (Oct 11 2026 UI test) ---------- */
/* Card "+" shows ✓ once in the list, at every width (not only phones) */
.product .plus.added .i-plus { display: none; }
.product .plus.added .i-check { display: block; }
/* Touch screens: a tapped "+" doesn't stay red from the hover style after the item is removed */
@media (hover: none) { .product .plus:not(.added):hover { background: var(--ink-on-light); color: #fff; transform: none; } }
/* Free accessories: "Included free" instead of "0 MAD" */
.product .price .v:only-child { font-size: 15px; }
/* Space between the category chips and the search bar / filters */
.cat-head #cat-chips { margin-bottom: 20px; }
/* Banner text stays readable on light photos (marble, lens markings) */
.cat-banner::before { background: linear-gradient(to right, rgba(13,14,19,0.9), rgba(13,14,19,0.55) 45%, rgba(13,14,19,0.1) 80%), linear-gradient(to top, rgba(13,14,19,0.94), rgba(13,14,19,0.25) 60%); }
.cat-banner .lede { color: var(--bone); }
/* Toast buttons in the same case ("Undo", "View") */
.toast a { text-transform: none; letter-spacing: 0; font-weight: 600; }
/* Brand search inside the filters */
.brand-find { width: 100%; margin: 0 0 10px; padding: 9px 12px; border: 1px solid var(--smoke); border-radius: 10px; background: var(--ink-2); color: var(--bone); font: inherit; font-size: 14px; }
.brand-find:focus { outline: none; border-color: var(--tungsten); }
.brand-none { font-size: 13px; color: var(--mist); }
.filter-group h3 { font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--bone); margin-bottom: 6px; }
.filters-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.filter-group[role="group"] { border: 0; padding: 0; margin: 0; min-width: 0; }
.cat-head .chips .chip[aria-pressed="true"] { outline: none; }

/* Tablets: the filters open as a side panel, not a full-width sheet */
@media (min-width: 761px) and (max-width: 1024px) {
  .filters { width: min(420px, 90vw); right: auto; padding-top: 24px; box-shadow: 20px 0 60px rgba(0,0,0,0.5); border-right: 1px solid var(--smoke); }
}
@media (max-width: 760px) {
  /* phone list cards: no tier / Popular tag on top of the small photo */
  .product-grid .product-visual .tier, .product-grid .product-visual .flag { display: none; }
  /* banner text in full */
  .cat-banner .lede { display: block; -webkit-line-clamp: unset; overflow: visible; color: var(--mist); }
  .filters .filter-group h3 { font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--bone-2); margin-bottom: 10px; }
  .filters-head h2 { font-size: 20px; }
}

/* ---------- gear page: ready-made kits above the items, one row that scrolls sideways ---------- */
.cat-kits { margin: 4px 0 28px; }
.cat-kits-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.cat-kits-head h2 { font-size: 18px; font-weight: 600; }
.cat-kits-head h2 .n { color: var(--mist); font-weight: 400; font-size: 14px; margin-inline-start: 4px; }
.cat-kits-head a { font-size: 14px; white-space: nowrap; }
.cat-kits .kits-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 28px) / 3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 6px; }
.cat-kits .kits-grid > * { scroll-snap-align: start; }
@media (max-width: 1100px) { .cat-kits .kits-grid { grid-auto-columns: calc((100% - 14px) / 2); } }
@media (max-width: 760px) { .cat-kits .kits-grid { grid-auto-columns: 82%; } }
