/* Al Qamis — storefront: the editorial heroes, sticky filter pills and cards of Shirts, Pants and
   Our fabrics, the "Where to next" rail of the story pages and the pre-footer of every public page.
   Built by js/ui/storefront.js and the page scripts. Loaded before glass.css. */

/* ---- editorial hero ------------------------------------------------------ */
.shop-hero {
  position: relative; overflow: hidden;
  padding: 40px 0 0;
  border-bottom: 1px solid var(--glass-edge);
  background:
    radial-gradient(700px 380px at 92% 10%, rgba(184, 146, 90, .16), transparent 70%),
    linear-gradient(115deg, rgba(255, 255, 255, .78) 0%, rgba(255, 255, 255, .3) 60%, rgba(242, 232, 214, .35) 100%);
}
.shop-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain); background-size: 180px 180px; opacity: .07;
}
.shop-hero__grid { position: relative; display: grid; gap: 28px; }
.shop-hero__copy { position: relative; z-index: 1; }
.shop-hero .eyebrow { margin-bottom: 18px; }
.shop-hero__title {
  margin: 0 0 20px; max-width: 11ch;
  font-size: clamp(2.7rem, 9vw, 5.6rem); line-height: .96; letter-spacing: -.02em;
}
.shop-hero__title em { color: var(--brass-ink); font-weight: 500; }
.shop-hero__line {
  margin: 0 0 26px; max-width: 44ch; padding-left: 16px;
  border-left: 1px solid var(--brass); font-size: 1.06rem; color: var(--ink-soft);
}
.shop-hero__actions { margin: 0; }

/* The picture side: a vertical brand mark and up to three tiles standing on the hero's base line. */
.shop-hero__art { position: relative; height: 230px; }
.shop-hero__mark {
  position: absolute; left: 0; bottom: 6px;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--font-serif); font-weight: 600; font-size: 3.2rem; line-height: 1; letter-spacing: .06em;
  color: rgba(184, 146, 90, .3); white-space: nowrap; user-select: none;
}
@supports (-webkit-text-stroke: 1px black) {
  .shop-hero__mark { color: transparent; -webkit-text-stroke: 1px rgba(165, 127, 71, .6); }
}
.shop-hero__pieces { position: absolute; top: 0; right: 0; bottom: 0; left: 56px; }
.shop-hero__piece {
  position: absolute; overflow: hidden;
  background: radial-gradient(100% 80% at 50% 20%, #fff 0%, rgba(232, 240, 241, .75) 85%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 18px 40px -22px rgba(19, 39, 41, .45), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.shop-hero__piece .garment-svg { width: 100%; height: 100%; padding: 14px 18px 4px; }
.shop-hero__piece .item-photo, .shop-hero__piece .swatch-photo, .shop-hero__piece .swatch-svg { width: 100%; height: 100%; object-fit: cover; }
.shop-hero__piece--1 { right: 0; bottom: 0; width: 52%; height: 100%; border-radius: 6px 6px 0 0; border-bottom: 0; }
.shop-hero__piece--2 { right: 47%; bottom: 0; width: 34%; height: 74%; border-radius: 6px 6px 0 0; border-bottom: 0; }
.shop-hero__piece--3 { right: 79%; bottom: 0; width: 21%; height: 48%; border-radius: 5px 5px 0 0; border-bottom: 0; }
.shop-hero__piece--3 .garment-svg { padding: 8px 6px 2px; }
/* Fabrics: the tiles are cloth. */
.shop-hero--fabrics .shop-hero__piece { background: var(--ivory-2); }

@media (min-width: 900px) {
  .shop-hero { padding-top: 64px; }
  .shop-hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: end; }
  .shop-hero__copy { padding-bottom: 72px; }
  .shop-hero__art { height: 440px; }
  .shop-hero__mark { font-size: clamp(4rem, 6vw, 5.4rem); bottom: 18px; }
  .shop-hero__pieces { left: 84px; }
}

/* ---- the catalog and its sticky filter pills ---------------------------- */
.shop-catalog { padding: 0 0 72px; }
@media (min-width: 900px) { .shop-catalog { padding-bottom: 96px; } }
.shop-catalog__tabs { padding-top: 28px; }
.filter-bar {
  position: sticky; top: var(--header-h); z-index: 30;
  margin-bottom: 28px; padding: 12px 0;
  background: rgba(246, 249, 249, .8);
  border-bottom: 1px solid var(--glass-edge);
}
.shop-catalog__tabs + .filter-bar { margin-top: 14px; }
.filter-bar__inner { display: flex; align-items: center; gap: 10px 20px; }
.pills {
  display: flex; gap: 8px; flex: 1 1 auto; min-width: 0;
  overflow-x: auto; padding: 3px; margin: -3px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid rgba(28, 53, 56, .16); border-radius: 999px; background: rgba(255, 255, 255, .78);
  cursor: pointer; white-space: nowrap; font-size: .88rem; font-weight: 500; color: var(--ink-soft);
  transition: background .2s, border-color .2s, color .2s;
}
.pill:hover { border-color: var(--ink-soft); color: var(--ink); background: #fff; }
.pill[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill__count { font-size: .74rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.pill[aria-pressed='true'] .pill__count { color: rgba(255, 255, 255, .7); }
.filter-bar__count { flex: none; margin: 0; font-size: .84rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 599px) {
  .filter-bar__count { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---- cards ---------------------------------------------------------------- */
.shop-grid { display: grid; gap: 26px 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 256px), 1fr)); }
.shop-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 6px;
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  transition: box-shadow .3s var(--ease);
}
.shop-card:hover { box-shadow: 0 24px 46px -22px rgba(19, 39, 41, .42), inset 0 1px 0 rgba(255, 255, 255, .8); }

.shop-card__media {
  order: -1; position: relative; aspect-ratio: 4 / 4.4; overflow: hidden;
  background: radial-gradient(100% 80% at 50% 20%, #fff 0%, rgba(232, 240, 241, .7) 85%);
}
.shop-card__pic { position: absolute; inset: 0; display: block; padding: 0; border: 0; background: none; cursor: pointer; }
.shop-card__pic > .garment-svg, .shop-card__pic > img, .shop-card__pic > .swatch-svg {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transform-origin: 50% 45%; transition: transform .8s var(--ease);
}
.shop-card__pic--drawn > .garment-svg { padding: 22px 30px 8px; }
/* A fabric card: the cloth fills the picture, a garment cut from it stands at its corner. */
.shop-card__pic--cloth > .garment-svg {
  position: absolute; width: 62%; height: auto; right: -6%; bottom: -24%;
  transform: rotate(-6deg); filter: drop-shadow(0 14px 18px rgba(19, 39, 41, .32));
}
.shop-card__pic--cloth.is-pants > .garment-svg { width: 46%; right: 2%; bottom: -16%; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .shop-card:hover .shop-card__pic > *, .shop-card:focus-within .shop-card__pic > * { transform: scale(1.045); }
  .shop-card:hover .shop-card__pic--cloth > .garment-svg, .shop-card:focus-within .shop-card__pic--cloth > .garment-svg { transform: rotate(-3deg) translateY(-6px); }
}

/* A card with 2 or 3 real photos (js/ui/storefront.js gallery): swiped on a phone, ‹ › on a computer. */
.shop-card__pic--gallery > .card-gallery__track {
  display: flex; width: 100%; height: 100%; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth;
}
.card-gallery__track::-webkit-scrollbar { display: none; }
.card-gallery__track > img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; scroll-snap-stop: always; }
.shop-card .card-gallery__arrow { width: 34px; height: 34px; margin-top: -17px; font-size: 1.4rem; opacity: 0; transition: opacity .2s, background-color .2s, transform .2s var(--ease); }
.shop-card .card-gallery__arrow.slider__arrow--prev { left: 8px; }
.shop-card .card-gallery__arrow.slider__arrow--next { right: 8px; }
.shop-card:hover .card-gallery__arrow:not(:disabled), .card-gallery__arrow:focus-visible { opacity: 1; }
.card-gallery__arrow:disabled { visibility: hidden; }
.card-gallery__dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.card-gallery__dot { width: 6px; height: 6px; border-radius: 3px; background: rgba(19, 39, 41, .22); box-shadow: 0 0 0 1px rgba(255, 255, 255, .75); transition: width .25s var(--ease), background-color .25s; }
.card-gallery__dot[data-on] { width: 16px; background: var(--ink); }
@media (prefers-reduced-motion: reduce) { .card-gallery__track { scroll-behavior: auto; } .card-gallery__dot { transition: none; } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .shop-card:hover .shop-card__pic--gallery > *, .shop-card:focus-within .shop-card__pic--gallery > * { transform: none; }
}

/* The tag sits in the picture's top corner, the same on every card; the price is in the card's foot. */
.shop-card__tag {
  position: absolute; top: 12px; left: 12px; max-width: calc(100% - 24px); padding: 5px 9px; pointer-events: none;
  background: #fff; color: var(--ink-soft); border: 1px solid var(--paper-line); border-radius: 2px;
  font-size: .64rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shop-card__foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 14px; margin-top: auto; padding-top: 12px; border-top: 1px solid #eef2f1; }
.shop-card__price { font-weight: 600; font-variant-numeric: lining-nums; }
.shop-card__links { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-left: auto; }
.shop-card__cta {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-ink);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.shop-card__cta:hover { color: var(--ink); }
/* A look: its pieces side by side. */
.shop-card__pic--look { display: flex; align-items: center; justify-content: center; }
.shop-look { display: flex; align-items: flex-end; justify-content: center; gap: 4%; width: 100%; height: 100%; padding: 34px 18px 12px; box-sizing: border-box; }
.shop-look__piece { display: block; height: 100%; }
.shop-look__piece--shirt { width: 56%; }
.shop-look__piece--pants { width: 34%; }
.shop-look__piece > .garment-svg { display: block; width: 100%; height: 100%; }
.shop-card__pic--drawn > .garment-svg { padding-top: 34px; }

.shop-card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 20px 20px; }
.shop-card__name { margin: 0; font-size: 1.55rem; line-height: 1.08; }
.shop-card__desc { margin: 0; font-size: .9rem; color: var(--muted); }
.shop-card__cloth { display: flex; align-items: center; gap: 10px; margin: 2px 0 0; font-size: .8rem; color: var(--ink-soft); }
.shop-swatches { display: inline-flex; flex: none; }
.shop-swatches__dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(28, 53, 56, .16); }
.shop-swatches__dot + .shop-swatches__dot { margin-left: 3px; }
.shop-card__arrow { transition: transform .25s var(--ease); }
@media (prefers-reduced-motion: no-preference) { .shop-card__cta:hover .shop-card__arrow { transform: translateX(3px); } }
.shop-card__more {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0;
  border: 0; background: none; cursor: pointer; font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.shop-card__more:hover { color: var(--brass-ink); }
.shop-card__more svg { width: 16px; height: 16px; }
.shop-empty { grid-column: 1 / -1; }

/* ---- "Where to next" rail (story pages) -------------------------------- */
.cross-rail { padding: 72px 0 0; }
@media (min-width: 900px) { .cross-rail { padding-top: 96px; } }
.cross-rail__head { max-width: 640px; margin-bottom: 28px; }
.cross-rail__head h2 { margin: 0; }
.cross-rail__list { list-style: none; display: grid; gap: 16px; }
@media (min-width: 760px) { .cross-rail__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.cross-card {
  position: relative; display: grid; grid-template-columns: 112px 1fr; align-items: stretch; overflow: hidden;
  border-radius: 6px;
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  transition: box-shadow .3s var(--ease);
}
.cross-card:hover { box-shadow: 0 24px 46px -22px rgba(19, 39, 41, .42), inset 0 1px 0 rgba(255, 255, 255, .8); }
.cross-card:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.cross-card__art {
  order: -1; position: relative; overflow: hidden; min-height: 128px;
  background: radial-gradient(100% 80% at 50% 20%, #fff 0%, rgba(232, 240, 241, .75) 85%);
}
.cross-card__art > .garment-svg, .cross-card__art > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease); transform-origin: 50% 40%;
}
.cross-card__art > .garment-svg { padding: 10px 8px 2px; }
.cross-card__art--fabrics { display: flex; }
.cross-card__swatch { flex: 1; position: relative; overflow: hidden; transition: transform .8s var(--ease); }
.cross-card__swatch + .cross-card__swatch { box-shadow: -1px 0 0 rgba(255, 255, 255, .7); }
.cross-card__swatch > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cross-card__body { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.cross-card__title { margin: 0; font-size: 1.45rem; }
.cross-card__link { color: var(--ink); text-decoration: none; }
.cross-card__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.cross-card__link:focus-visible { outline: none; }
.cross-card p { margin: 0; font-size: .88rem; color: var(--muted); }
.cross-card__go { margin-top: auto; padding-top: 6px; font-size: .88rem; font-weight: 600; color: var(--brass-ink); }
@media (min-width: 760px) {
  .cross-card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .cross-card__art { aspect-ratio: 16 / 11; min-height: 0; }
  .cross-card__art > .garment-svg { padding: 18px 20px 4px; }
  .cross-card__body { padding: 18px 20px 22px; }
  .cross-card__title { font-size: 1.6rem; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .cross-card:hover .cross-card__art > *, .cross-card:focus-within .cross-card__art > * { transform: scale(1.045); }
}

/* ---- pre-footer (every public page) ------------------------------------ */
.prefooter { padding: 64px 0; }
@media (min-width: 900px) { .prefooter { padding: 88px 0; } }
.cross-rail + .prefooter { padding-top: 40px; }
.shop-catalog + .prefooter { padding-top: 0; }
.prefooter__panel {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: 26px; padding: 34px 24px;
  border-radius: 6px; border: 1px solid rgba(184, 146, 90, .3);
  background:
    radial-gradient(520px 300px at 100% 0%, rgba(184, 146, 90, .2), transparent 70%),
    linear-gradient(140deg, rgba(255, 255, 255, .92) 0%, rgba(246, 240, 228, .9) 100%);
  box-shadow: var(--shadow);
}
.prefooter__panel::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain); background-size: 180px 180px; opacity: .07;
}
.prefooter__panel::after {
  content: ''; position: absolute; inset: 10px; pointer-events: none;
  border: 1.5px dashed rgba(184, 146, 90, .4); border-radius: 5px;
}
.prefooter__title { margin: 0; max-width: 13ch; font-size: clamp(2.3rem, 6vw, 4rem); line-height: .98; letter-spacing: -.015em; }
.prefooter__facts { list-style: none; display: grid; gap: 12px; margin: 0 0 24px; }
.prefooter__price { display: grid; gap: 2px; }
.prefooter__price span { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 600; line-height: 1.1; color: var(--brass-ink); font-variant-numeric: lining-nums; min-height: 1.1em; }
.prefooter__price small { font-size: .82rem; color: var(--muted); }
.prefooter__service { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); }
.prefooter__service svg { flex: none; width: 20px; height: 20px; color: var(--brass-ink); }
.prefooter__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.prefooter__actions .btn svg { width: 18px; height: 18px; }
@media (max-width: 459px) { .prefooter__actions .btn { width: 100%; } }
@media (min-width: 900px) {
  .prefooter__panel { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: end; padding: 60px 64px; }
  .prefooter__side { padding-left: 40px; border-left: 1px solid rgba(184, 146, 90, .3); }
}
.shop-catalog > .filter-bar[hidden] + .container { padding-top: 40px; }

/* Phones: two cards a row from 480 px; a shorter picture when one card fills the row. */
@media (max-width: 759px) {
  .shop-grid { gap: 16px 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
  .shop-card__body { padding: 14px 14px 16px; }
  .shop-card__name { font-size: 1.35rem; }
  .shop-card__cta { padding: 8px 16px; font-size: .88rem; white-space: normal; text-align: left; }
}
@media (max-width: 479px) {
  .shop-card__media { aspect-ratio: 5 / 4; }
}
.prefooter:has(+ .signup-band) { padding-bottom: 8px; }
/* The drawings carry room around the garment: fill the hero tiles with them. */
.shop-hero--shirts .shop-hero__piece .garment-svg { transform: scale(1.28); transform-origin: 50% 34%; }
.shop-hero--pants .shop-hero__piece .garment-svg { transform: scale(1.7); transform-origin: 50% 46%; }
