/* ==========================================================================
   SAKANA — reusable components: section heads, product cards, badges,
   forms, stepper, options, accordion, empty states, cart lines.
   ========================================================================== */

/* Section head ------------------------------------------------------------- */

.sec-head { display: grid; gap: 6px; padding-inline: var(--g); margin-block-end: 24px; justify-items: start; }
.sec-head h2 { font-family: var(--f-serif); font-weight: 300; font-size: var(--fs-h2); line-height: 1.1; }
.sec-head__note { font-size: 14px; color: var(--soft); }
.sec-head--center { justify-items: center; text-align: center; }
.sec-head--row { grid-template-columns: 1fr auto; align-items: baseline; }
.sec-head--row > .text-link { justify-self: end; }
@media (min-width: 960px) {
  .sec-head:not(.sec-head--center):not(.sec-head--row) { grid-template-columns: 1fr auto; align-items: end; }
  .sec-head:not(.sec-head--center):not(.sec-head--row) > :not(.text-link) { grid-column: 1; }
  .sec-head:not(.sec-head--center):not(.sec-head--row) > .text-link { grid-column: 2; grid-row: 1 / 4; align-self: end; }
}

/* Badges --------------------------------------------------------------------- */

.badge {
  display: inline-block; padding: 3px 9px;
  background: var(--cream); color: var(--accent);
  font-size: 12px; letter-spacing: 0.04em; font-weight: 600; line-height: 1.4;
}
.badge--muted { color: var(--soft); }
.badge--sample { background: transparent; border: 1px dashed var(--accent); color: var(--accent); }

/* Buttons: small variant --------------------------------------------------- */

.btn--sm { min-block-size: 40px; padding: 8px 16px; font-size: 14px; }

/* Product grid & card ------------------------------------------------------ */

.pgrid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 12px; padding-inline: var(--g);
}
@media (min-width: 720px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 18px; } }
@media (min-width: 1100px) { .pgrid, .pgrid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 20px; } }

.pcard { position: relative; display: grid; align-content: start; gap: 10px; }
.pcard__media { aspect-ratio: 4 / 5; display: block; }
.pcard__media img {
  position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover;
  transition: opacity 0.7s var(--ease), transform 1.2s var(--ease);
}
.pcard__media img + img, .pcard__media img + img.is-loaded { opacity: 0; }
.pcard__media .badge { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; z-index: 2; }
.pcard__body { display: grid; gap: 1px; }
.pcard__link { color: inherit; }
/* Whole card is clickable; buttons below sit above this layer. */
.pcard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard__link:focus-visible { outline: none; }
.pcard__link:focus-visible::after { outline: 1.5px solid var(--accent); outline-offset: 4px; }
.pcard__title { font-family: var(--f-serif); font-weight: 400; font-size: 17px; line-height: 1.3; transition: color var(--t-fast); }
.pcard__meta { font-size: 13px; color: var(--soft); }
.pcard__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-block-start: 2px; }
.pcard__price { font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.pcard__avail { font-size: 12px; color: var(--accent); }
.pcard__avail--sold-out { color: var(--soft); }
.pcard.is-sold .pcard__media img { opacity: 0.55; filter: saturate(0.3); }
.pcard.is-sold .pcard__price { color: var(--soft); font-weight: 400; }

/* Card buttons */
.fav {
  display: grid; place-items: center; inline-size: 40px; block-size: 40px; padding: 0;
  background: rgba(251, 248, 243, 0.92); border: 0; color: var(--ink);
  transition: color var(--t-fast), background var(--t-fast), transform 0.3s var(--ease);
}
@media (hover: hover) { .fav:hover { color: var(--accent); } }
.fav[aria-pressed="true"] { color: var(--accent); }
.fav[aria-pressed="true"] .icon { fill: currentColor; }
.fav:active { transform: scale(0.9); }
.pcard__fav { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; z-index: 2; }
.fav--inline { background: transparent; inline-size: 44px; block-size: 44px; flex: none; }

.pcard__ql {
  position: absolute; inset-block-end: 6px; inset-inline-end: 6px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-inline-size: 40px; block-size: 40px; padding: 0 10px;
  background: rgba(251, 248, 243, 0.92); border: 0; font-size: 13px; font-weight: 600;
  transition: background var(--t-fast), color var(--t-fast);
}
.pcard__ql span { display: none; }
@media (hover: hover) { .pcard__ql:hover { background: var(--ink); color: var(--cream); } }
@media (hover: hover) and (min-width: 720px) {
  .pcard__ql { inset-inline: 8px; inset-block-end: 8px; opacity: 0; transform: translateY(6px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background var(--t-fast), color var(--t-fast); }
  .pcard__ql span { display: inline; }
  .pcard:hover .pcard__ql, .pcard__ql:focus-visible { opacity: 1; transform: none; }
  .pcard:hover .pcard__media img + img.is-loaded { opacity: 1; }
  .pcard:hover .pcard__media img { transform: scale(1.03); }
  .pcard:hover .pcard__title { color: var(--accent); }
}

.pcard__actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.pcard__actions .text-link { min-block-size: 40px; font-size: 14px; }

/* Compact card (recently viewed strip) */
.pcard--compact { gap: 6px; }
.pcard--compact .pcard__title { font-size: 14px; }
.pcard--compact .pcard__price { font-size: 13px; }
.pcard--compact .fav { inline-size: 34px; block-size: 34px; }
.pcard--compact .fav .icon { inline-size: 17px; block-size: 17px; }

/* Horizontal strip (recently viewed) */
.recent { padding-block: var(--section) 0; }
.strip__head { display: flex; justify-content: space-between; align-items: baseline; padding-inline: var(--g); margin-block-end: 14px; }
.strip__head h2 { font-family: var(--f-serif); font-weight: 400; font-size: 22px; }
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 34vw; gap: 12px;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--g);
  padding-inline: var(--g); padding-block-end: 6px; scrollbar-width: thin;
}
.strip > li { scroll-snap-align: start; }
@media (min-width: 720px) { .strip { grid-auto-columns: 150px; } }

/* Forms -------------------------------------------------------------------- */

.field { display: grid; gap: 6px; }
.field label, .field .label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 13px; color: var(--soft); }
.input, .select, .textarea {
  inline-size: 100%; min-block-size: 50px;
  padding: 12px 14px;
  background: var(--cream); border: 1px solid var(--line); border-radius: 0;
  transition: border-color var(--t-fast);
}
.textarea { min-block-size: 160px; resize: vertical; line-height: 1.6; }
@media (hover: hover) { .input:hover, .select:hover, .textarea:hover { border-color: var(--soft); } }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: 18px 50%, 23px 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  padding-inline-start: 14px; padding-inline-end: 40px; /* chevron sits at the inline end (left in RTL) */
}
[dir="ltr"] .select { background-position: right 23px center, right 18px center; }

.check { display: flex; align-items: center; gap: 12px; min-block-size: 40px; cursor: pointer; font-size: var(--fs-sm); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box {
  inline-size: 18px; block-size: 18px; flex: none; border: 1px solid var(--ink);
  display: grid; place-items: center; transition: background var(--t-fast);
}
.check__box::after { content: ""; inline-size: 8px; block-size: 8px; background: var(--cream); transform: scale(0); transition: transform 0.25s var(--ease); }
.check input:checked + .check__box { background: var(--ink); }
.check input:checked + .check__box::after { transform: scale(1); }
.check input:focus-visible + .check__box { outline: 1.5px solid var(--accent); outline-offset: 3px; }
.check__count { color: var(--soft); font-size: 13px; margin-inline-start: auto; }
.check:has(input:disabled) { opacity: 0.4; cursor: default; }

/* Option buttons (sizes, lengths) ------------------------------------------- */

.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  position: relative; min-inline-size: 56px; min-block-size: 48px; padding: 10px 16px;
  background: transparent; border: 1px solid var(--line);
  font-size: var(--fs-sm); font-variant-numeric: tabular-nums;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
@media (hover: hover) { .opt:hover { border-color: var(--ink); } }
.opt[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.opt.is-out { color: var(--soft); background: linear-gradient(to top left, transparent calc(50% - 0.5px), var(--line) 50%, transparent calc(50% + 0.5px)); }
.opt.is-out[aria-pressed="true"] { background: var(--paper-2); color: var(--soft); border-color: var(--soft); }

/* Quantity stepper ---------------------------------------------------------- */

.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); background: var(--cream); }
.stepper button { inline-size: 44px; min-block-size: 44px; background: none; border: 0; font-size: 18px; line-height: 1; }
@media (hover: hover) { .stepper button:hover:not(:disabled) { color: var(--accent); } }
.stepper button:disabled { color: var(--line); cursor: not-allowed; }
.stepper output, .stepper span {
  min-inline-size: 36px; display: grid; place-items: center;
  font-variant-numeric: tabular-nums; font-size: var(--fs-sm);
}

/* Accordion (details/summary) ---------------------------------------------- */

.acc { border-block-start: 1px solid var(--line); }
.acc details { border-block-end: 1px solid var(--line); }
.acc summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-block-size: 60px; padding-block: 14px;
  font-family: var(--f-serif); font-size: 19px; font-weight: 400;
  transition: color var(--t-fast);
}
.acc summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .acc summary:hover { color: var(--accent); } }
.acc summary::after {
  content: ""; flex: none; inline-size: 12px; block-size: 12px;
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat,
              linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
  transition: transform 0.4s var(--ease);
}
.acc details[open] summary::after { transform: rotate(45deg); }
.acc__body { padding-block: 0 22px; color: var(--soft); max-inline-size: 64ch; }
.acc__body > * + * { margin-block-start: 0.8em; }
.acc details[open] .acc__body { animation: acc-in 0.5s var(--ease); }
@keyframes acc-in { from { opacity: 0; transform: translateY(-6px); } }

/* Empty state ------------------------------------------------------------------- */

.empty {
  display: grid; justify-items: center; gap: 18px; text-align: center;
  padding: clamp(56px, 10vw, 140px) var(--g);
}
.empty__mark { font-family: var(--f-latin); font-style: italic; font-size: 22px; color: var(--accent); }
.empty h2, .empty h3 { font-family: var(--f-serif); font-weight: 300; font-size: clamp(30px, 4vw, 52px); line-height: 1.15; max-inline-size: 18ch; }
.empty p { color: var(--soft); max-inline-size: 40ch; }

/* Cart line ------------------------------------------------------------------- */

.cline {
  display: grid; grid-template-columns: 88px 1fr; gap: 16px;
  padding-block: 20px; border-block-end: 1px solid var(--line);
}
.cline:last-child { border-block-end: 0; }
.cline__img { aspect-ratio: 4 / 5; }
.cline__info { display: grid; gap: 4px; align-content: start; }
.cline__title { font-family: var(--f-serif); font-size: 18px; line-height: 1.3; }
@media (hover: hover) { .cline__title a:hover { color: var(--accent); } }
.cline__meta { font-size: 14px; color: var(--soft); }
.cline__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-block-start: 10px; }
.cline__price { font-variant-numeric: tabular-nums; }
.cline__remove { background: none; border: 0; padding: 8px 0; min-block-size: 40px; font-size: 13px; color: var(--soft); text-decoration: underline; text-underline-offset: 4px; }
@media (hover: hover) { .cline__remove:hover { color: var(--accent); } }
.cline__note { font-size: 13px; color: var(--accent); }

.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.sum-row--total { font-family: var(--f-serif); font-size: 22px; }
.sum-note { font-size: 13px; color: var(--soft); }
.checkout-note {
  font-size: 13px; color: var(--accent); line-height: 1.55;
  border: 1px dashed var(--accent); padding: 10px 12px; background: transparent;
}

/* Dialog ---------------------------------------------------------------------- */

.dialog { border: 0; padding: 0; background: var(--paper); color: var(--ink); max-inline-size: min(520px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(42, 35, 32, 0.45); }
.dialog__inner { padding: 36px 32px 28px; display: grid; gap: 16px; }
.dialog h2 { font-family: var(--f-serif); font-weight: 300; font-size: 30px; line-height: 1.2; }
.dialog p { color: var(--soft); }
.dialog[open] { animation: dialog-in 0.45s var(--ease-out); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px); } }

/* Pill-free chips for active filters ------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-block-size: 36px; padding: 6px 12px;
  background: var(--cream); border: 1px solid var(--line); font-size: 14px;
}
@media (hover: hover) { .chip:hover { border-color: var(--accent); color: var(--accent); } }
.chip span[aria-hidden] { font-size: 16px; line-height: 1; }

/* ==========================================================================
   Shared product UI (product page + Quick Look)
   ========================================================================== */

/* Gallery ---------------------------------------------------------------------- */

.gallery { display: grid; gap: 10px; min-inline-size: 0; }
.gallery__main { position: relative; }
.gallery__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; aspect-ratio: 1 / 1; background: var(--paper-2);
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track:focus-visible { outline-offset: -3px; }
.gallery__slide { scroll-snap-align: start; position: relative; overflow: hidden; margin: 0; }
.gallery__slide img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.gallery__slide.is-sold img { opacity: 0.6; filter: saturate(0.35); }
.gallery__count {
  position: absolute; inset-block-end: 10px; inset-inline-start: 10px; z-index: 1;
  font-family: var(--f-latin); font-style: italic; font-size: 16px;
  background: rgba(251, 248, 243, 0.9); padding: 1px 9px; pointer-events: none;
}
.gallery__arrows { display: flex; position: absolute; inset-block-end: 8px; inset-inline-end: 8px; gap: 2px; z-index: 1; }
.gallery__arrows button {
  display: grid; place-items: center; inline-size: 40px; block-size: 40px; border: 0;
  background: rgba(251, 248, 243, 0.9); transition: background var(--t-fast), color var(--t-fast);
}
@media (hover: hover) { .gallery__arrows button:hover:not(:disabled) { background: var(--ink); color: var(--cream); } }
.gallery__arrows button:disabled { color: var(--line); cursor: default; }

.gallery__thumbs { order: 2; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block-end: 4px; }
.gallery__thumbs button {
  flex: none; inline-size: 56px; aspect-ratio: 1; padding: 0; border: 1px solid transparent;
  background: var(--paper-2); opacity: 0.6; transition: opacity var(--t-fast), border-color var(--t-fast);
}
.gallery__thumbs button[aria-current="true"] { opacity: 1; border-color: var(--accent); }
@media (hover: hover) { .gallery__thumbs button:hover { opacity: 1; } }
.gallery__thumbs img { inline-size: 100%; block-size: 100%; object-fit: cover; }

/* Product info bits ---------------------------------------------------------- */

.pdp__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pdp__badges:empty { display: none; }
.pdp__meta { color: var(--soft); font-size: var(--fs-sm); }
.pdp__price { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pdp__price s { color: var(--soft); font-size: 18px; font-weight: 400; }

/* Buy box ----------------------------------------------------------------------- */

.buy { display: grid; gap: 16px; padding-block: 18px; border-block: 1px solid var(--line); }
.buy fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.buy legend { padding: 0; margin-block-end: 8px; font-size: 14px; font-weight: 600; display: flex; gap: 8px; inline-size: 100%; }
.buy legend [data-selected] { font-weight: 400; color: var(--soft); }
.buy legend a { margin-inline-start: auto; font-weight: 400; font-size: 13px; color: var(--soft); text-decoration: underline; text-underline-offset: 4px; }
@media (hover: hover) { .buy legend a:hover { color: var(--accent); } }
.buy__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.buy__qty-label { font-size: 14px; font-weight: 600; }
.buy__error { font-size: 14px; color: var(--accent); min-block-size: 0; }
.buy__error:empty { display: none; }
.buy .opt { min-inline-size: 52px; min-block-size: 44px; }

.avail { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.avail i { inline-size: 7px; block-size: 7px; border-radius: 50%; background: #4f6b4a; flex: none; }
.avail--low i, .avail--unique i { background: var(--accent); }
.avail--out i { background: var(--line); }
.avail--out { color: var(--soft); }

/* Back link --------------------------------------------------------------------- */

.back-link {
  display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px;
  font-weight: 600; font-size: var(--fs-sm); transition: color var(--t-fast);
}
@media (hover: hover) { .back-link:hover { color: var(--accent); } }
.back-link .icon { transition: transform 0.3s var(--ease); }
@media (hover: hover) { .back-link:hover .icon { transform: translateX(4px); } }

/* Chips (extra states) ---------------------------------------------------------- */

.chip { cursor: pointer; font: inherit; font-size: 14px; color: inherit; }
.chip[aria-pressed="true"], .chip[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.chip--remove span[aria-hidden] { color: var(--soft); }

/* Empty-state variants ---------------------------------------------------------- */

.empty--compact { padding-block: clamp(32px, 6vw, 72px); }
.empty__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; }
.empty__icon { color: var(--accent); }
.empty .chips { justify-content: center; max-inline-size: 560px; }

/* ==========================================================================
   "Added to cart" notice
   ========================================================================== */

.added-host {
  position: fixed; z-index: var(--z-toast);
  inset-inline: 10px; inset-block-end: 10px;
  pointer-events: none; opacity: 0; transform: translateY(16px);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease-out);
}
.added-host.is-on { opacity: 1; transform: none; pointer-events: auto; }
.added-host:empty { display: none; }
@media (min-width: 720px) {
  .added-host { inset-inline: auto 20px; inset-inline-start: auto; inset-inline-end: 20px; inset-block: calc(var(--header-h) + 44px) auto; inline-size: 360px; transform: translateY(-10px); }
}
.added { background: var(--cream); border: 1px solid var(--line); box-shadow: 0 18px 40px -20px rgba(42, 35, 32, 0.4); padding: 14px 16px 16px; display: grid; gap: 12px; }
.added__head { display: flex; justify-content: space-between; align-items: center; }
.added__title { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent); }
.added__x { min-inline-size: 36px; min-block-size: 36px; margin-inline-end: -8px; }
.added__items { display: grid; gap: 8px; max-block-size: 200px; overflow-y: auto; }
.added__items li { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; }
.added__img { aspect-ratio: 1; }
.added__info { display: grid; line-height: 1.35; }
.added__name { font-family: var(--f-serif); font-size: 16px; }
.added__meta { font-size: 13px; color: var(--soft); }
.added__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.added__actions .btn { min-block-size: 44px; padding-inline: 10px; font-size: 14px; }
.ql .added { box-shadow: none; margin-block-start: 4px; }

/* ==========================================================================
   Quick Look (dialog)
   ========================================================================== */

.ql {
  border: 0; padding: 0; margin: 0; background: transparent; color: var(--ink);
  inline-size: 100%; max-inline-size: 100%; block-size: 100%; max-block-size: 100%;
}
.ql::backdrop { background: rgba(42, 35, 32, 0.45); }
.ql[open] { display: flex; align-items: flex-end; }
.ql__panel {
  inline-size: 100%; max-block-size: 92svh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); animation: ql-up 0.4s var(--ease-out);
}
@keyframes ql-up { from { transform: translateY(40px); opacity: 0; } }
.ql__bar {
  position: sticky; inset-block-start: 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px 4px 16px; padding-inline: 16px 6px; background: var(--paper); border-block-end: 1px solid var(--line);
}
.ql__label { font-size: 13px; letter-spacing: 0.06em; color: var(--soft); }
.ql__body { display: grid; gap: 16px; padding: 14px 16px 20px; }
.ql__info { display: grid; gap: 10px; align-content: start; }
.ql__titlerow { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ql__title { font-family: var(--f-serif); font-weight: 300; font-size: 28px; line-height: 1.15; }
.ql__full { justify-self: start; }
.ql .gallery__track { aspect-ratio: 4 / 3; }
@media (min-width: 720px) {
  .ql[open] { align-items: center; justify-content: center; }
  .ql__panel { inline-size: min(940px, calc(100vw - 48px)); max-block-size: min(86svh, 720px); animation-name: ql-in; }
  @keyframes ql-in { from { transform: translateY(12px) scale(0.99); opacity: 0; } }
  .ql__body { grid-template-columns: 1.05fr 1fr; gap: 28px; padding: 20px 24px 28px; }
  .ql .gallery__track { aspect-ratio: 1; }
}

/* ==========================================================================
   Search overlay
   ========================================================================== */

.search {
  border: 0; padding: 0; margin: 0; inline-size: 100%; max-inline-size: 100%;
  background: transparent; color: var(--ink); max-block-size: 100%;
}
.search::backdrop { background: rgba(42, 35, 32, 0.4); }
.search__panel {
  background: var(--paper); padding: 10px var(--g) 22px;
  max-block-size: 88svh; overflow-y: auto; animation: search-in 0.3s var(--ease-out);
  border-block-end: 1px solid var(--line);
}
@keyframes search-in { from { transform: translateY(-14px); opacity: 0; } }
.search__form { display: flex; align-items: center; gap: 10px; border-block-end: 1px solid var(--ink); max-inline-size: 900px; margin-inline: auto; }
.search__form input {
  flex: 1; min-inline-size: 0; min-block-size: 56px; border: 0; background: transparent;
  font-family: var(--f-serif); font-size: clamp(20px, 2.4vw, 28px); font-weight: 300;
}
.search__form input:focus-visible { outline: none; }
.search__form input::-webkit-search-cancel-button { display: none; }
.search__form:focus-within { border-color: var(--accent); }
.search__status, .search__hint { max-inline-size: 900px; margin: 12px auto 8px; font-size: 14px; color: var(--soft); }
.search__results { max-inline-size: 900px; margin-inline: auto; }
.search__results .chips { margin-block-start: 6px; }
.search__all { display: block; max-inline-size: 900px; margin: 14px auto 0; }
.search__empty { padding-block: 18px; display: grid; gap: 6px; }
.sresults { display: grid; }
.sresult {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center;
  padding-block: 8px; border-block-end: 1px solid var(--line);
}
.sresult:focus-visible .sresult__name { color: var(--accent); }
@media (hover: hover) { .sresult:hover .sresult__name { color: var(--accent); } }
.sresult__img { aspect-ratio: 1; }
.sresult__info { display: grid; line-height: 1.35; }
.sresult__name { font-family: var(--f-serif); font-size: 17px; transition: color var(--t-fast); }
.sresult__meta { font-size: 13px; color: var(--soft); }
.sresult__price { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

.shop-sample { padding: 20px var(--g) 0; font-size: var(--fs-xs); color: var(--soft); }
.help-band--row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.help-band { margin: var(--section) var(--g) 0; padding: clamp(20px, 3vw, 36px); background: var(--cream); display: grid; gap: 14px; justify-items: start; }
.help-band p:first-child { font-family: var(--f-serif); font-weight: 300; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; }

/* Small cards: lighter controls */
@media (max-width: 719px) {
  .pcard__fav, .pcard__ql { inline-size: 36px; block-size: 36px; min-inline-size: 36px; background: rgba(251, 248, 243, 0.85); }
  .pcard__fav .icon, .pcard__ql .icon { inline-size: 18px; block-size: 18px; }
  .pcard__media .badge { font-size: 11px; padding: 2px 7px; inset-block-start: 6px; inset-inline-start: 6px; }
}
.ql__panel:focus { outline: none; }
@media (max-width: 719px) {
  /* leave room for the browser's own bottom toolbar (e.g. iOS Safari) */
  .ql__body { padding-block-end: 48px; }
}

/* iOS zooms the page when a focused field's text is under 16px. */
@media (max-width: 959px) {
  .input, .select, .textarea, .letter-form input, .search__form input { font-size: max(16px, 1em); }
  .toolbar__sort .select, .slot__variant .select { font-size: 16px; }
}
