/* shop.css — the skincare shelf, a product page, the basket and checkout.
   Same editorial language as the rest of the site. Prefix .sh- */

.sh-page { display: block; }
.sh-admin-more { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sh-admin-more > summary { padding: 12px 14px; cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--ink-soft); line-height: 1.5; }
.sh-admin-more-body { padding: 4px 14px 16px; }

/* ---------------------------------------------------------------- shelf */

.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 34px 24px; }
.sh-card { display: flex; flex-direction: column; min-width: 0; }
.sh-card-media {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius-sm); background: var(--aqua-tint); flex: none;
}
.sh-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.sh-card:hover .sh-card-media img { transform: scale(1.05); }
.sh-card-badge { position: absolute; top: 11px; left: 11px; z-index: 2; max-width: calc(100% - 22px); white-space: normal; }
.sh-card-body { padding: 18px 2px 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.sh-card-brand { font-size: 10.5px; line-height: 1.5; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.sh-card-name { font-size: 15.5px; font-weight: 500; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.sh-card-name:hover { border-bottom: 1px solid currentColor; }
.sh-card-price { font-variant-numeric: tabular-nums; font-size: 15px; line-height: 1.5; margin-top: auto; padding-top: 4px; margin-bottom: 8px; }
.sh-card .btn { margin-top: 0; border-radius: 2px; }

/* -------------------------------------------------------------- product */

.sh-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 54px; align-items: start; }
.sh-detail > * { min-width: 0; }
.sh-detail-media { aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--aqua-tint); }
.sh-detail-media img { width: 100%; height: 100%; object-fit: cover; }
.sh-detail-body { display: grid; gap: 20px; }
.sh-detail-body > * { min-width: 0; margin: 0; }
.sh-detail-body > * + * { margin-top: 0; }
.sh-detail-body > .tag { justify-self: start; max-width: 100%; white-space: normal; }
.sh-detail-body h1 { line-height: 1.2; overflow-wrap: anywhere; }
.sh-detail-price { font-family: var(--font-display); font-size: 2rem; line-height: 1.35; font-variant-numeric: tabular-nums; }
.sh-buy { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sh-buy .btn { border-radius: 2px; flex: 1 1 200px; }
.sh-qty { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 2px; padding: 4px; }
.sh-qty-v { min-width: 34px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.sh-qty-sm { padding: 2px; }
.sh-qty-sm .iconbtn { width: 44px; height: 44px; }
.sh-qty-sm .iconbtn svg { width: 15px; height: 15px; }
.sh-reassure { display: grid; gap: 14px; padding: 22px 0; border-top: 1px solid var(--line); font-size: .9rem; line-height: 1.6; color: var(--ink-soft); }
.sh-reassure .row { align-items: flex-start; }
.sh-reassure svg { color: var(--aqua-text); flex: none; }
@media (max-width: 860px) { .sh-detail { grid-template-columns: 1fr; gap: 28px; } }

/* --------------------------------------------------------------- basket */

.sh-line { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.sh-line > .grow { display: grid; justify-items: start; gap: 8px; }
.sh-line > .grow > * { min-width: 0; max-width: 100%; }
.sh-line-media { width: 66px; height: 66px; border-radius: 8px; overflow: hidden; flex: none; background: var(--aqua-tint); }
.sh-line-media img { width: 100%; height: 100%; object-fit: cover; }
.sh-line-name { font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.sh-line-total { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

.st-cart-btn { position: relative; }
.st-cart-count {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--yellow); color: var(--brand-dark);
  font-size: 10.5px; font-weight: 800; text-align: center;
}

/* ------------------------------------------------------------- checkout */

.sh-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 54px; align-items: start; }
.sh-checkout > *, .sh-checkout-main > * { min-width: 0; }
.sh-checkout-main section { border-bottom: 1px solid var(--line); padding-bottom: 30px; }
.sh-checkout-main section:last-child { border-bottom: 0; padding-bottom: 0; }
.sh-checkout-main h2 { line-height: 1.35; }
.sh-checkout .label { line-height: 1.5; margin-bottom: 8px; }
.sh-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 14px; }
.sh-fields .field + .field { margin-top: 0; }
.sh-summary {
  position: sticky; top: 110px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; background: var(--surface);
}
.sh-summary .btn { border-radius: 2px; }
.sh-summary .row-between { align-items: flex-start; gap: 18px; line-height: 1.6; }
.sh-summary .row-between > :first-child { flex: 1; overflow-wrap: anywhere; }
.sh-summary .row-between > :last-child { flex: none; white-space: nowrap; }
.sh-summary > .stack { display: grid; gap: 14px; }
.sh-summary > .stack > * + * { margin-top: 0; }
@media (max-width: 920px) {
  .sh-checkout { grid-template-columns: 1fr; gap: 30px; }
  .sh-summary { position: static; }
}

/* A payment or fulfilment choice: one tap, and it says what happens next. */
.sh-picks { display: grid; gap: 12px; }
.sh-pick {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  padding: 18px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); transition: border-color .15s, background .15s;
}
.sh-pick:hover { border-color: var(--aqua-deep); }
.sh-pick.on { border-color: var(--aqua-deep); background: var(--aqua-tint); }
.sh-pick-dot {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; margin-top: 2px;
  transition: border-color .15s, box-shadow .15s;
}
.sh-pick.on .sh-pick-dot { border-color: var(--aqua-deep); box-shadow: inset 0 0 0 4px var(--aqua-deep); }
.sh-pick-label { display: block; font-weight: 600; line-height: 1.5; }
.sh-pick-note { display: block; font-size: .85rem; color: var(--ink-faint); margin-top: 7px; line-height: 1.6; }
.sh-pick-label, .sh-pick-note { overflow-wrap: anywhere; }

/* --------------------------------------------------------- confirmation */

.sh-done { display: grid; gap: 20px; max-width: 620px; margin: 0 auto; text-align: center; justify-items: center; }
.sh-done > * { min-width: 0; max-width: 100%; margin: 0; }
.sh-done > * + * { margin-top: 0; }
.sh-done .bk-secondary { justify-content: center; }
.sh-done .bk-msg, .sh-done .sh-recap { text-align: left; width: 100%; }
.sh-recap { display: grid; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
/* Recap values include addresses, so they need a text column that can wrap. */
.sh-recap .row-between { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 18px; align-items: start; line-height: 1.6; }
.sh-recap .row-between > * { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 620px) {
  .sh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .sh-card-name { font-size: 14px; }
  .sh-card .btn { padding-inline: 10px; }
  .sh-summary, .sh-recap { padding: 20px; }
}
@media (max-width: 480px) {
  /* Keep quantity controls and totals in separate rows on a narrow basket. */
  .sh-line { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px 14px; }
  .sh-line-media { width: 54px; height: 54px; }
  .sh-line > .stack { grid-column: 2; display: flex; justify-content: space-between; gap: 10px; }
  .sh-line > .stack > * + * { margin-top: 0; }
}
@media (max-width: 380px) {
  .sh-grid { grid-template-columns: 1fr; gap: 32px; }
  .sh-card-name { font-size: 15.5px; }
  .sh-buy .btn { flex-basis: 100%; }
  .sh-recap .row-between { grid-template-columns: 1fr; gap: 6px; }
}

.sh-order-state { display: grid; justify-items: start; gap: 6px; }
