/* ============================================================
   BLUE — shop / catalog page
   Namespaced: .shophero  .fbar  .shopsale  .shopgrid
               .shopempty  .shopfoot
   ============================================================ */

/* [hidden] must win over the display values below */
.fbar-feels[hidden],
.shopsale[hidden],
.shopempty[hidden] { display: none !important; }

/* ---------------------------------------------- page hero */
.shophero {
  position: relative;
  overflow: clip;
  background: linear-gradient(180deg, var(--powder-2) 0%, var(--canvas) 100%);
  padding: clamp(44px, 7vw, 92px) 0 clamp(34px, 4.5vw, 60px);
}
.shophero .container { position: relative; z-index: 1; }

.shophero-crumb {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--text-xs); font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-soft);
}
.shophero-crumb a { transition: color .2s; }
.shophero-crumb a:hover { color: var(--royal); }
.shophero-crumb .sep { color: var(--brass); }

.shophero-title { margin-top: 16px; }
.shophero-sub { margin-top: 14px; max-width: 520px; }

.shophero-count {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 26px;
  font-size: var(--text-xs); font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft);
}
.shophero-count::before { content: ''; width: 26px; height: 1px; background: var(--brass); }
.shophero-count b { color: var(--ink); font-size: var(--text-sm); }

/* ---------------------------------------------- filter bar */
.fbar {
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(247, 244, 238, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.fbar-row {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 12px 18px;
  padding-block: 13px;
}

/* category pills */
.fbar-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fbar-pill {
  padding: 9px 19px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: transparent;
  font-size: var(--text-sm); font-weight: 600; color: var(--ink);
  white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease-out);
}
.fbar-pill:hover { border-color: var(--ink); transform: translateY(-1px); }
.fbar-pill.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* feel chips (mattresses only) */
.fbar-feels {
  display: flex; align-items: center; gap: 6px;
  padding-inline-start: 18px; border-inline-start: 1px solid var(--line-soft);
  animation: fbar-in .4s var(--ease-out);
}
.fbar-chip {
  padding: 8px 15px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  background: transparent;
  font-size: var(--text-sm); font-weight: 600; color: var(--ink-soft);
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.fbar-chip:hover { background: var(--powder-2); color: var(--ink); }
.fbar-chip.is-on { background: var(--powder); color: var(--royal-deep); border-color: rgba(var(--royal-rgb), .18); }
@keyframes fbar-in { from { opacity: 0; transform: translateX(-6px); } }
[dir="rtl"] .fbar-feels { animation-name: fbar-in-rtl; }
@keyframes fbar-in-rtl { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }

/* sort */
.fbar-sort { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 10px; }
.fbar-sort-label {
  font-size: var(--text-xs); font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft);
}
.fbar .field-lite {
  appearance: none; -webkit-appearance: none;
  padding-block: 9px; padding-inline: 18px 38px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234C5B72' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 15px center / 10px auto;
  font-family: inherit; font-size: var(--text-sm); font-weight: 600; color: var(--ink);
  cursor: pointer; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
[dir="rtl"] .fbar .field-lite { background-position: left 15px center; }
.fbar .field-lite:hover { border-color: var(--ink); }
.fbar .field-lite:focus-visible { border-color: var(--royal); box-shadow: 0 0 0 3px rgba(var(--royal-rgb), .12); }

.fbar-pill:focus-visible,
.fbar-chip:focus-visible,
.shopsale-clear:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; }

/* ---------------------------------------------- sale banner */
.shopsale {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px 24px;
  margin-bottom: clamp(24px, 3vw, 36px);
  padding: 15px 22px;
  border: 1px solid rgba(192, 154, 94, .35); border-radius: var(--r-md);
  background: linear-gradient(90deg, rgba(192, 154, 94, .16), rgba(192, 154, 94, .05));
  font-size: var(--text-sm); color: var(--ink);
}
.shopsale b { letter-spacing: .02em; }
[dir="rtl"] .shopsale { background: linear-gradient(270deg, rgba(192, 154, 94, .16), rgba(192, 154, 94, .05)); }
.shopsale-clear {
  border: 0; background: none; padding: 0;
  font-size: var(--text-sm); font-weight: 700; color: var(--royal);
  white-space: nowrap;
}
.shopsale-clear:hover { color: var(--royal-deep); text-decoration: underline; }

/* ---------------------------------------------- grid section */
.shopgrid { padding: clamp(32px, 4.5vw, 56px) 0 var(--sect-pad); }

/* ---------------------------------------------- empty state */
.shopempty {
  display: grid; justify-items: center; gap: 10px;
  padding: clamp(56px, 9vw, 110px) 20px;
  text-align: center; color: var(--ink-soft);
}
.shopempty-moon {
  display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--powder-2); color: var(--royal);
  margin-bottom: 8px;
}
.shopempty-moon svg { width: 26px; height: 26px; }
.shopempty-big { font-family: var(--font-display); font-weight: 600; font-size: var(--text-xl); color: var(--ink); }
.shopempty .btn { margin-top: 14px; }

/* ---------------------------------------------- foot band */
.shopfoot {
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--canvas), var(--powder-2));
}
.shopfoot-inner {
  display: grid; justify-items: center; text-align: center; gap: 18px;
  padding-block: var(--sect-pad);
}
.shopfoot .eyebrow::before { display: none; }
.shopfoot-lead { max-width: 460px; }
.shopfoot-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 10px; }

/* ---------------------------------------------- responsive */
@media (max-width: 960px) {
  .fbar-row { gap: 10px 14px; }
  .fbar-feels { padding-inline-start: 14px; }
}

@media (max-width: 640px) {
  .fbar-row { padding-block: 11px; }
  .fbar-pills {
    flex-wrap: nowrap; overflow-x: auto; max-width: 100%;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
  }
  .fbar-pills::-webkit-scrollbar { display: none; }
  .fbar-feels { border-inline-start: 0; padding-inline-start: 0; flex-wrap: wrap; }
  .fbar-sort { margin-inline-start: 0; width: 100%; justify-content: space-between; }
  .shopsale { padding: 13px 18px; }
  .shopfoot-ctas .btn { width: 100%; justify-content: center; }
}

/* ---------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fbar-feels { animation: none; }
  .fbar-pill,
  .fbar-pill:hover { transform: none; transition: none; }
}
