/* ==========================================================================
   shakenest — store, cart and policy pages.
   Loaded on top of style.css. Reuses its tokens; defines no new colours.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page header for interior pages
   -------------------------------------------------------------------------- */

.page-head {
  padding-block: clamp(7.5rem, 14vh, 10rem) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: var(--step-4); margin-bottom: 1.25rem; }
.page-head .lede { max-width: 52ch; }

.crumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--step--1);
  color: var(--milk-faint);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.crumb a { min-height: 44px; display: inline-flex; align-items: center; }
.crumb a:hover { color: var(--lime); }
.crumb span[aria-hidden] { opacity: 0.5; }

/* --------------------------------------------------------------------------
   2. Trust bar
   -------------------------------------------------------------------------- */

.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.trust__item {
  background: var(--void);
  padding: 1.25rem clamp(1rem, 2vw, 1.5rem);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.trust__item svg { width: 20px; height: 20px; color: var(--lime); flex: none; margin-top: 2px; }
.trust__item h3 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 0.15rem;
}
.trust__item p { font-size: 0.78rem; color: var(--milk-faint); line-height: 1.5; }

@media (max-width: 900px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .trust { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   3. Category filter
   -------------------------------------------------------------------------- */

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.filters button {
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--milk-dim);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease),
              background-color 0.25s var(--ease);
}
.filters button:hover { color: var(--milk); border-color: var(--milk-faint); }
.filters button[aria-pressed="true"] {
  background: var(--lime);
  border-color: var(--lime);
  color: #10160B;
}

/* --------------------------------------------------------------------------
   4. Product grid
   -------------------------------------------------------------------------- */

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30,38,43,0.42), rgba(30,38,43,0.12));
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover { border-color: rgba(196, 240, 74, 0.4); transform: translateY(-3px); }

.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(80% 70% at 50% 30%, rgba(196,240,74,0.08), transparent 70%),
    #12181B;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }

/* Placeholder mark for products with no photo in Stripe yet */
.card__mark {
  width: 42%;
  max-width: 90px;
  opacity: 0.5;
}

.card__badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 100px;
  background: rgba(8, 11, 13, 0.8);
  border: 1px solid var(--line-strong);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
}

.card__body { padding: 1.1rem 1.15rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.card__body h3 { font-size: var(--step-1); margin-bottom: 0.35rem; }
.card__desc {
  font-size: 0.82rem;
  color: var(--milk-dim);
  line-height: 1.5;
  margin-bottom: 0.9rem;
  flex: 1;
}

.card__price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  margin-bottom: 0.9rem;
}
.card__amount {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.card__per { font-size: 0.76rem; color: var(--milk-faint); font-variant-numeric: tabular-nums; text-align: right; }

.card__actions { display: flex; gap: 0.5rem; }
.card__actions .btn { flex: 1; min-height: 46px; padding-inline: 1rem; font-size: var(--step--1); }

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}
.empty h2 { font-size: var(--step-2); margin-bottom: 0.75rem; }
.empty p { color: var(--milk-dim); max-width: 44ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   5. Product detail
   -------------------------------------------------------------------------- */

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.detail__media {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(80% 70% at 50% 25%, rgba(196,240,74,0.08), transparent 70%),
    #12181B;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: sticky;
  top: 7rem;
}
.detail__media img { width: 100%; height: 100%; object-fit: cover; }
.detail__media .card__mark { width: 38%; max-width: 150px; }

.detail h1 { font-size: var(--step-3); margin-bottom: 1rem; }
.detail__desc { color: var(--milk-dim); font-size: var(--step-0); margin-bottom: 1.75rem; }

.detail__price {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.25rem;
  border-block: 1px solid var(--line);
  margin-bottom: 1.75rem;
}
.detail__amount {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.detail__per { font-size: var(--step--1); color: var(--milk-faint); font-variant-numeric: tabular-nums; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  overflow: hidden;
}
.qty button {
  width: 48px; height: 48px;
  background: none;
  border: 0;
  color: var(--milk);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.qty button:hover { background: rgba(240, 234, 224, 0.07); color: var(--lime); }
.qty input {
  width: 54px;
  height: 48px;
  background: none;
  border: 0;
  color: var(--milk);
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.qty input:focus { outline: none; }
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.detail__buy { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.75rem; }
.detail__buy .btn { flex: 1; min-width: 12rem; }

.spec-list { border-top: 1px solid var(--line); }
.spec-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
}
.spec-list dt { color: var(--milk-dim); }
.spec-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .detail__media { position: static; aspect-ratio: 4 / 3; }
}

/* --------------------------------------------------------------------------
   6. Cart
   -------------------------------------------------------------------------- */

.cart {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.line {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.line__media {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #12181B;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.line__media img { width: 100%; height: 100%; object-fit: cover; }
.line__media .card__mark { width: 55%; }
.line h3 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; margin-bottom: 0.2rem; }
.line__meta { font-size: 0.78rem; color: var(--milk-faint); }
.line__right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.6rem; }
.line__amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.line__remove {
  background: none;
  border: 0;
  color: var(--milk-faint);
  font-family: var(--font-body);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
  padding: 0;
}
.line__remove:hover { color: #F0765C; }
.line .qty { transform: scale(0.85); transform-origin: right center; }

@media (max-width: 640px) {
  .line { grid-template-columns: 4rem 1fr; gap: 1rem; }
  .line__right { grid-column: 2; align-items: flex-start; flex-direction: row; justify-content: space-between; width: 100%; }
  .line .qty { transform: scale(0.85); transform-origin: left center; }
}

.summary {
  position: sticky;
  top: 7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--steel), #12181B);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.summary h2 { font-size: var(--step-2); margin-bottom: 1.25rem; }
.summary__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6rem;
  font-size: var(--step--1);
  color: var(--milk-dim);
}
.summary__row b { color: var(--milk); font-variant-numeric: tabular-nums; font-weight: 500; }
.summary__total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--line);
  font-weight: 600;
}
.summary__total b {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-variant-numeric: tabular-nums;
}
.summary .btn { width: 100%; margin-top: 1.5rem; }

/* Free-shipping progress */
.ship-progress { margin-top: 1.25rem; }
.ship-progress p { font-size: 0.78rem; color: var(--milk-dim); margin-bottom: 0.5rem; }
.ship-progress .bar {
  height: 5px;
  border-radius: 100px;
  background: rgba(240, 234, 224, 0.09);
  overflow: hidden;
}
.ship-progress .bar i {
  display: block;
  height: 100%;
  border-radius: 100px;
  background: var(--accent-grad);
  transition: width 0.5s var(--ease);
}
.ship-progress.is-free p { color: var(--lime); }

.secure-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--milk-faint);
  line-height: 1.5;
}
.secure-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--lime); }

@media (max-width: 900px) {
  .cart { grid-template-columns: 1fr; }
  .summary { position: static; }
}

/* --------------------------------------------------------------------------
   7. Cart link in the header
   -------------------------------------------------------------------------- */

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  color: var(--milk);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
  flex: none;
}
.cart-link:hover { border-color: var(--lime); color: var(--lime); }
.cart-link svg { width: 19px; height: 19px; }
.cart-count {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  border-radius: 100px;
  background: var(--lime);
  color: #10160B;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  display: none;
}
.cart-count.is-visible { display: block; }

/* --------------------------------------------------------------------------
   8. Toast
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 300;
  transform: translate(-50%, 140%);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  max-width: calc(100vw - 2rem);
  padding: 0.9rem 1.25rem;
  border-radius: 100px;
  border: 1px solid rgba(196, 240, 74, 0.4);
  background: rgba(8, 11, 13, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.9);
  font-size: var(--step--1);
  transition: transform 0.45s var(--ease);
}
.toast.is-up { transform: translate(-50%, 0); }
.toast svg { width: 17px; height: 17px; color: var(--lime); flex: none; }

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
  .ship-progress .bar i { transition: none; }
}

/* --------------------------------------------------------------------------
   9. Prose — policy and legal pages
   -------------------------------------------------------------------------- */

.prose { max-width: 46rem; }
.prose h2 {
  font-size: var(--step-2);
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 1rem;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0;
  margin: 2rem 0 0.5rem;
}
.prose p, .prose li { color: var(--milk-dim); margin-bottom: 1rem; }
.prose ul { margin: 0 0 1.5rem; padding-left: 1.1rem; list-style: disc; }
.prose li { padding-left: 0.3rem; }
.prose a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--milk); font-weight: 600; }
.prose .updated {
  font-size: var(--step--1);
  color: var(--milk-faint);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.faq-item { border-bottom: 1px solid var(--line); padding-block: 1.35rem; }
.faq-item h3 { margin: 0 0 0.5rem; font-size: var(--step-0); }
.faq-item p { margin: 0; color: var(--milk-dim); font-size: var(--step--1); }

/* --------------------------------------------------------------------------
   10. Success page
   -------------------------------------------------------------------------- */

.receipt {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--steel), #12181B);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  max-width: 34rem;
}
.receipt__mark {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(196, 240, 74, 0.12);
  border: 1px solid rgba(196, 240, 74, 0.4);
  margin-bottom: 1.5rem;
}
.receipt__mark svg { width: 24px; height: 24px; color: var(--lime); }
.receipt h1 { font-size: var(--step-3); margin-bottom: 0.75rem; }
.receipt p { color: var(--milk-dim); margin-bottom: 1rem; }
.receipt__ref {
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--milk);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   11. Language switcher
   -------------------------------------------------------------------------- */

.lang {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  overflow: hidden;
  flex: none;
  height: 46px;
}
.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 100%;
  padding-inline: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--milk-faint);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.lang a:hover { color: var(--milk); }
.lang a[aria-current="true"] {
  background: var(--lime);
  color: #10160B;
}

@media (max-width: 420px) {
  /* 46px on the frame so the links inside still clear 44px once the
     1px border is taken off each edge. */
  .lang { height: 46px; }
  .lang a { min-width: 36px; padding-inline: 0.4rem; }
}
