/* ==========================================================================
   Astro Cheveux — cart page
   ========================================================================== */

.cart-page { background: var(--white); padding: 32px var(--gutter) 64px; }

.cart-page__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cart-page__title { font-family: var(--serif); font-weight: 500; font-size: 36px; line-height: 1.08; color: var(--ink); }

.cart-page__layout { margin-top: 28px; }

/* --------------------------------------------------------------------------
   Line items
   -------------------------------------------------------------------------- */

.cart-lines { border-top: 1px solid var(--cloud); }

.cart-line { display: flex; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--cloud); }
.cart-line__media { flex-shrink: 0; }
.cart-line__media img { width: 92px; height: 116px; object-fit: cover; background: var(--champagne); display: block; }
.cart-line__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cart-line__line {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
  opacity: 0.75;
}
.cart-line__name { font-family: var(--serif); font-weight: 500; font-size: 22px; color: var(--ink); margin-top: 4px; }
.cart-line__variant { font-size: 14px; color: var(--charcoal); margin-top: 6px; }
.cart-line__terms { font-size: 12px; color: var(--charcoal); opacity: 0.7; margin-top: 8px; }
.cart-line__edit {
  font-size: 13px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  align-self: flex-start;
  margin-top: 8px;
}
.cart-line__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.cart-line__price { font-size: 16px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.cart-line .qty { border-color: var(--ink); }
.cart-line .qty button { width: 38px; height: 38px; }

/* --------------------------------------------------------------------------
   Swatch Kit upsell
   -------------------------------------------------------------------------- */

.kit-upsell {
  background: var(--champagne);
  padding: 20px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.kit-upsell__media { display: none; }
.kit-upsell__title { font-family: var(--serif); font-weight: 500; font-size: 21px; color: var(--ink); }
.kit-upsell p { font-size: 13px; line-height: 1.55; color: var(--charcoal); margin-top: 4px; }
.kit-upsell .btn { height: 44px; padding: 0 24px; font-size: 12px; letter-spacing: 0.12em; background: transparent; }
.kit-upsell .btn:hover { background: var(--white); }

/* --------------------------------------------------------------------------
   What happens next
   -------------------------------------------------------------------------- */

.next-steps {
  display: flex;
  flex-direction: column;
  margin-top: 32px;
  border: 1px solid var(--cloud);
}
.next-step { padding: 18px 20px; }
.next-step + .next-step { border-top: 1px solid var(--cloud); }
.next-step__num { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; color: var(--citrine); }
.next-step__title { font-size: 14px; font-weight: 500; color: var(--ink); margin-top: 8px; }
.next-step p { font-size: 13px; color: var(--charcoal); opacity: 0.75; margin-top: 3px; }

.cart-page__question { font-size: 14px; color: var(--charcoal); margin-top: 28px; }

/* --------------------------------------------------------------------------
   Order summary
   -------------------------------------------------------------------------- */

.summary { background: var(--mist); padding: 24px; margin-top: 28px; }
.summary__title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.summary .sum-row:first-of-type { margin-top: 20px; }
.summary__note { font-size: 12px; color: var(--charcoal); opacity: 0.7; margin-top: 12px; }
.summary__rule { height: 1px; background: var(--cloud); margin: 20px 0; }
.summary__finance { font-size: 13px; color: var(--charcoal); }
.summary .btn { height: 56px; margin-top: 20px; }

.summary__secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--charcoal);
  opacity: 0.8;
}
.summary__badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; align-items: center; margin-top: 16px; }
.summary__badge {
  padding: 3px 8px;
  border: 1px solid var(--cloud);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--charcoal);
}

/* The mark is a white card, which needs the hairline the text badge carries
   to stay separated from the summary panel behind it. */
.summary__badge--mark {
  padding: 0;
  height: 26px;
  width: auto;
  display: block;
  border: 1px solid var(--cloud);
}
.summary__guarantee { font-size: 12px; color: var(--charcoal); opacity: 0.75; text-align: center; margin-top: 16px; }

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

.cart-empty-page { text-align: center; padding: 64px 0; }
.cart-empty-page .cart-page__title { font-size: 34px; }
.cart-empty-page p { font-size: 15px; color: var(--charcoal); opacity: 0.85; margin: 16px auto 0; max-width: 400px; line-height: 1.6; }
.cart-empty-page__ctas { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }

/* --------------------------------------------------------------------------
   Sticky mobile checkout bar
   -------------------------------------------------------------------------- */

.checkout-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--cloud);
  padding: 12px 16px 16px;
  z-index: 150;
  box-shadow: 0 -2px 16px rgba(17, 17, 17, 0.06);
}
.checkout-bar .btn { width: 100%; height: 52px; }
body.has-checkout-bar { padding-bottom: 88px; }

/* --------------------------------------------------------------------------
   Minimal footer — the cart and checkout pages keep distractions out
   -------------------------------------------------------------------------- */

.mini-footer { background: var(--midnight); color: var(--white); }
.mini-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 28px var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.mini-footer img { height: 44px; width: auto; display: block; }
.mini-footer__links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.mini-footer__links a { font-size: 13px; color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.mini-footer__links a:hover { color: var(--white); }
.mini-footer__legal { font-size: 12px; color: rgba(255, 255, 255, 0.5); }

/* ==========================================================================
   DESKTOP
   ========================================================================== */

@media (min-width: 1024px) {

  .cart-page { padding: 56px var(--gutter) 96px; }
  .cart-page__title { font-size: 48px; }

  .cart-page__layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 56px;
    margin-top: 44px;
    align-items: start;
  }

  .cart-line { gap: 28px; padding: 32px 0; }
  .cart-line__media img { width: 140px; height: 176px; }
  .cart-line__name { font-size: 26px; }
  .cart-line__edit { margin-top: auto; }
  .cart-line .qty button { width: 40px; height: 40px; }

  /* Swatch Kit upsell goes horizontal with its photo */
  .kit-upsell {
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding: 24px 28px;
    margin-top: 32px;
  }
  .kit-upsell__media { display: block; flex-shrink: 0; }
  .kit-upsell__media img { width: 96px; height: 96px; object-fit: cover; display: block; background: var(--white); }
  .kit-upsell__body { flex: 1; min-width: 0; }
  .kit-upsell .btn { flex-shrink: 0; }

  /* Next steps across */
  .next-steps { flex-direction: row; margin-top: 48px; }
  .next-step { flex: 1; padding: 24px 28px; }
  .next-step + .next-step { border-top: none; border-left: 1px solid var(--cloud); }

  .cart-page__question { margin-top: 32px; }

  /* Summary sticks alongside the items */
  .summary { position: sticky; top: 112px; padding: 36px; margin-top: 0; }
  .summary .sum-row:first-of-type { margin-top: 24px; }

  .cart-empty-page { padding: 96px 0; }
  .cart-empty-page .cart-page__title { font-size: 44px; }
  .cart-empty-page__ctas { flex-direction: row; gap: 16px; justify-content: center; margin-top: 32px; }

  /* Checkout lives in the summary panel on desktop */
  .checkout-bar { display: none; }
  body.has-checkout-bar { padding-bottom: 0; }

  .mini-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 32px var(--gutter);
    text-align: left;
    gap: 16px;
    flex-wrap: wrap;
  }
  .mini-footer__links { gap: 24px; }
}
