/* ==========================================================================
   Shop: home, product grid, search, product page shell, basket, confirmation
   ========================================================================== */

/* Home hero: the coming soon page, grown up -------------------------------- */
.hero { text-align: center; padding-block: var(--s6) var(--s7); display: flex; flex-direction: column; align-items: center; }
.hero > * { opacity: 0; animation: fadeUp 0.8s ease forwards; }
.hero .caption { animation-delay: 0.1s; }
.hero .caption__rule { transform: scaleX(0); animation: growLine 0.7s 0.3s ease forwards; }
.hero__title {
  font-size: var(--step-4); line-height: 1.4;
  max-width: 34rem; margin: var(--s3) auto var(--s3);
  animation-delay: 0.35s;
}
.hero__lede { color: var(--ink-soft); max-width: 30rem; margin-inline: auto; animation-delay: 0.5s; }
.hero .patches { animation-delay: 0.65s; }
.hero__media { margin-top: var(--s7); width: min(100%, 44rem); animation-delay: 0.8s; }
.hero__media-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.hero__media figure { margin: 0; background: var(--white); position: relative; }
.hero__media img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.hero__media figcaption {
  position: absolute; left: 10px; bottom: 8px;
  font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
  background: rgba(251, 247, 244, 0.9); padding: 3px 8px; border-radius: 999px;
}
@media (prefers-reduced-motion: reduce) {
  .hero > *, .hero .caption__rule { opacity: 1 !important; transform: none !important; }
}

/* How it works ------------------------------------------------------------ */
.how { padding-block: var(--s6) var(--s7); border-top: 1px solid var(--line); }
.how .caption { margin-bottom: var(--s5); }
.how__steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.how__steps li { counter-increment: step; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; font-size: var(--step--1); color: var(--ink-soft); line-height: 1.7; }
.how__steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--gold-deep); margin-bottom: var(--s3); }
.how__steps strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; color: var(--ink); margin-bottom: var(--s2); }

/* Product grid ------------------------------------------------------------ */
.shop-head { text-align: center; padding-top: var(--s4); margin-bottom: var(--s5); }
.shop-head .section-title { font-size: var(--step-3); margin-bottom: var(--s4); }
.filter { justify-content: center; }

.product-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: var(--s5); }
.product-card__link {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.product-card__link:hover { border-color: var(--gold); color: var(--ink); transform: translateY(-2px); }
.product-card__media { aspect-ratio: 1; background: var(--white); display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.product-card__media img { width: 92%; height: 92%; object-fit: contain; }
.product-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.product-card__code { order: -1; font-size: var(--step--2); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: var(--s1); }
.product-card__name { font-size: 1.3rem; margin-bottom: var(--s2); }
.product-card__summary { font-size: var(--step--1); color: var(--ink-soft); flex: 1; }
.product-card__price { margin: 0; padding-top: var(--s3); border-top: 1px solid var(--line); font-size: var(--step--1); display: flex; justify-content: space-between; align-items: baseline; }
.product-card__price strong { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; }

/* Product page shell (matches the prototype layout) ------------------------ */
.product__head { text-align: center; max-width: 34rem; margin: 0 auto var(--s6); }
.product__head .page-title { margin-bottom: var(--s2); }
.product__head p { color: var(--ink-soft); font-size: 0.875rem; margin-inline: auto; }
.product__from { font-size: var(--step--2) !important; letter-spacing: 0.14em; text-transform: uppercase; }

.product-info { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s6); margin-bottom: var(--s6); }
.product-info .panel { margin: 0; }
.product-info .panel > p { font-size: 0.85rem; line-height: 1.65; color: var(--ink-soft); margin: 0; max-width: none; }

/* Basket ------------------------------------------------------------------ */
.basket__layout { display: grid; grid-template-columns: 1fr 21rem; gap: var(--s6); align-items: start; }
.basket__items { list-style: none; margin: 0; padding: 0; }
.basket-item {
  display: grid; grid-template-columns: 7rem 1fr auto; gap: var(--s4);
  padding: 16px 18px; margin-bottom: var(--s3);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: opacity 0.2s;
}
.basket-item.is-removing { opacity: 0.4; }
.basket-item__media { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; overflow: hidden; }
.basket-item__media img { width: 100%; height: 100%; object-fit: contain; }
.basket-item__name { font-size: 1.2rem; margin-bottom: var(--s2); }
.basket-item__name a { text-decoration: none; }
.basket-item__detail { font-size: 0.75rem; color: var(--ink-soft); margin-bottom: 2px; }
.basket-item__actions { display: flex; gap: var(--s4); margin-top: var(--s3); }
.basket-item__price { text-align: right; font-size: var(--step--1); color: var(--ink-soft); }
.basket-item__price p { margin-bottom: var(--s1); }
.basket-item__total { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); }
.basket__summary { position: sticky; top: var(--s4); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.basket__summary .section-title { font-size: 1.3rem; }
.basket__summary .note { margin-top: var(--s4); }

/* Order lines (checkout summary, confirmation, account) ------------------- */
.order-lines { list-style: none; margin: 0 0 var(--s4); padding: 0; }
.order-line { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.order-line__name { font-weight: 500; font-size: 0.875rem; margin-bottom: var(--s1); }
.order-line__detail { font-size: 0.75rem; margin-bottom: 2px; color: var(--ink-soft); }
.order-line__price { text-align: right; font-size: 0.75rem; white-space: nowrap; color: var(--ink-soft); }
.order-line__price p { margin: 0; }
.order-line__total { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }

/* Confirmation ------------------------------------------------------------ */
.confirm { text-align: center; margin-inline: auto; }
.confirm p { margin-inline: auto; }
.confirm .panel { text-align: left; }
.confirm__badge {
  width: 4rem; height: 4rem; margin: 0 auto var(--s4);
  border-radius: 50%; border: 1px solid var(--gold);
  position: relative;
}
.confirm__badge::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px solid var(--gold); }
.confirm__badge::after {
  content: ""; position: absolute; left: 1.45rem; top: 1rem;
  width: 0.8rem; height: 1.5rem; border: solid var(--gold-deep); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.confirm__ref { font-family: var(--serif); font-size: 1.2rem; }

@media (max-width: 900px) {
  .how__steps { grid-template-columns: 1fr; }
  .product-info { grid-template-columns: 1fr; gap: var(--s4); }
  .basket__layout { grid-template-columns: 1fr; }
  .basket__summary { position: static; }
}
@media (max-width: 560px) {
  .hero__media-inner { grid-template-columns: 1fr; }
  .basket-item { grid-template-columns: 5rem 1fr; }
  .basket-item__price { grid-column: 2; text-align: left; }
}
