/* ==========================================================================
   ViriX Ayurveda — Cart page stylesheet
   Dedicated file — same convention as ayurveda-dashboard.css / ayurveda-auth.css
   / ayurveda-herbs.css: self-contained, doesn't depend on the 150KB+ main
   ayurveda.css. Design tokens redeclared locally (matching the sitewide
   brand values) so this page stays visually consistent without loading
   that whole file.

   Mobile-first, 9 breakpoints: 320 / 375 / 390 / 430 / 768 / 1024 / 1280 /
   1440 / 1920 — per the site's standing responsive_breakpoint_plan.
   ========================================================================== */

.ay-cart-page {
  --ay-c-forest: #1B4332;
  --ay-c-forest-deep: #0E2A1E;
  --ay-c-gold: #C9A227;
  --ay-c-gold-soft: #E8D9A0;
  --ay-c-ivory: #FAF7F0;
  --ay-c-ivory-warm: #F3ECDC;
  --ay-c-maroon: #7C2D3E;
  --ay-c-ink: #1F2421;
  --ay-c-ink-muted: #5B6660;
  --ay-c-border: #E3DCC8;
  --ay-c-card-bg: #FFFFFF;
  --ay-c-shadow: 0 12px 32px -12px rgba(27, 67, 50, .18);
  --ay-c-radius-lg: 20px;
  --ay-c-radius-md: 12px;
  --ay-c-radius-sm: 8px;
  --ay-c-font-head: 'Fraunces', serif;
  --ay-c-font-body: 'Inter', system-ui, sans-serif;

  min-height: 60vh;
  background: var(--ay-c-ivory);
  color: var(--ay-c-ink);
  font-family: var(--ay-c-font-body);
  font-size: 13px;
  padding: 20px 16px 100px;
}

.ay-cart-page *,
.ay-cart-page *::before,
.ay-cart-page *::after {
  box-sizing: border-box;
}

.ay-cart-page a { color: inherit; }

.ay-cart-page a:focus-visible,
.ay-cart-page button:focus-visible {
  outline: 2px solid var(--ay-c-gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.ay-cart-wrap {
  max-width: 1180px;
  margin: 0 auto;
}

.ay-cart-title {
  font-family: var(--ay-c-font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--ay-c-forest);
  margin: 0 0 4px;
}

.ay-cart-subtitle {
  font-size: 12.5px;
  color: var(--ay-c-ink-muted);
  margin: 0 0 18px;
}

/* ---- Layout: single column mobile, two-column desktop ---- */
.ay-cart-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---- Line items ---- */
.ay-cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ay-cart-item {
  background: var(--ay-c-card-bg);
  border: 1px solid var(--ay-c-border);
  border-radius: var(--ay-c-radius-md);
  padding: 14px;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
}

.ay-cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--ay-c-radius-sm);
  object-fit: cover;
  background: var(--ay-c-ivory-warm);
  display: block;
}

.ay-cart-item-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--ay-c-ink);
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}
.ay-cart-item-name:hover { color: var(--ay-c-forest); }

.ay-cart-item-price {
  font-size: 12.5px;
  color: var(--ay-c-ink-muted);
  margin-bottom: 8px;
}
.ay-cart-item-price strong { color: var(--ay-c-forest); font-weight: 800; }

.ay-cart-item-warning {
  font-size: 11px;
  font-weight: 700;
  color: #9A6A00;
  background: #FFF3D6;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.ay-cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ay-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--ay-c-border);
  border-radius: 999px;
  overflow: hidden;
}
.ay-qty-stepper button {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--ay-c-ivory-warm);
  color: var(--ay-c-forest);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease;
}
.ay-qty-stepper button:hover { background: var(--ay-c-gold-soft); }
.ay-qty-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.ay-qty-stepper span {
  min-width: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
}

.ay-cart-item-line-total {
  font-weight: 800;
  font-size: 14px;
  color: var(--ay-c-forest);
}

.ay-cart-item-remove {
  background: none;
  border: none;
  color: var(--ay-c-maroon);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 4px;
  text-decoration: underline;
}
.ay-cart-item-remove:hover { color: #5a1f2c; }

/* ---- Order summary ---- */
.ay-cart-summary {
  background: var(--ay-c-card-bg);
  border: 1px solid var(--ay-c-border);
  border-radius: var(--ay-c-radius-lg);
  padding: 18px;
  box-shadow: var(--ay-c-shadow);
}

.ay-cart-summary h2 {
  font-family: var(--ay-c-font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--ay-c-forest);
  margin: 0 0 12px;
}

.ay-cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ay-c-border);
}
.ay-cart-summary-row:last-of-type { border-bottom: none; }
.ay-cart-summary-row.total {
  font-weight: 800;
  font-size: 15px;
  color: var(--ay-c-forest);
  padding-top: 12px;
}

.ay-cart-checkout-note {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--ay-c-radius-sm);
  background: var(--ay-c-ivory-warm);
  border: 1px dashed var(--ay-c-border);
  font-size: 11.5px;
  color: var(--ay-c-ink-muted);
  text-align: center;
}

.ay-cart-checkout-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  background: linear-gradient(135deg, var(--ay-c-forest), var(--ay-c-forest-deep));
  color: #fff;
  border: none;
  margin-top: 14px;
  cursor: pointer;
  text-decoration: none;
}

.ay-cart-checkout-btn:hover {
  background: linear-gradient(135deg, var(--ay-c-forest-deep), var(--ay-c-forest));
}

.ay-cart-continue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ay-c-forest);
  text-decoration: none;
}
.ay-cart-continue:hover { text-decoration: underline; }

/* ---- Empty state ---- */
.ay-cart-empty {
  text-align: center;
  padding: 40px 16px;
  background: var(--ay-c-card-bg);
  border: 1px solid var(--ay-c-border);
  border-radius: var(--ay-c-radius-lg);
}
.ay-cart-empty-icon { font-size: 44px; margin-bottom: 10px; }
.ay-cart-empty h2 {
  font-family: var(--ay-c-font-head);
  font-size: 18px;
  color: var(--ay-c-forest);
  margin: 0 0 6px;
}
.ay-cart-empty p { font-size: 13px; color: var(--ay-c-ink-muted); margin: 0 0 16px; }

.ay-cart-empty-btn {
  display: inline-flex;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--ay-c-gold);
  color: var(--ay-c-forest-deep);
  font-weight: 700;
  font-size: 12.5px;
  text-decoration: none;
}
.ay-cart-empty-btn:hover { background: var(--ay-c-gold-soft); }

.ay-cart-recommend-title {
  font-family: var(--ay-c-font-head);
  font-size: 16px;
  color: var(--ay-c-forest);
  margin: 28px 0 12px;
  text-align: left;
}

.ay-cart-product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ay-cart-product-card {
  background: var(--ay-c-card-bg);
  border: 1px solid var(--ay-c-border);
  border-radius: var(--ay-c-radius-md);
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ay-cart-product-card:hover { transform: translateY(-3px); box-shadow: var(--ay-c-shadow); }
.ay-cart-product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--ay-c-ivory-warm);
  display: block;
}
.ay-cart-product-body { padding: 10px 12px 12px; }
.ay-cart-product-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ay-c-ink);
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ay-cart-product-price { font-size: 13px; font-weight: 800; color: var(--ay-c-forest); }

/* ==========================================================================
   Mobile-first breakpoints
   ========================================================================== */

@media (min-width: 375px) {
  .ay-cart-page { font-size: 13.5px; }
}

@media (min-width: 390px) {
  .ay-cart-page { font-size: 14px; }
}

@media (min-width: 430px) {
  .ay-cart-item { grid-template-columns: 84px 1fr; }
  .ay-cart-item-img { width: 84px; height: 84px; }
}

@media (min-width: 768px) {
  .ay-cart-page { font-size: 14.5px; padding: 28px 24px 100px; }
  .ay-cart-product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .ay-cart-page { font-size: 15px; }
  .ay-cart-layout { flex-direction: row; align-items: flex-start; }
  .ay-cart-items { flex: 1 1 auto; min-width: 0; }
  .ay-cart-summary { width: 340px; flex-shrink: 0; position: sticky; top: 90px; }
  .ay-cart-item { grid-template-columns: 96px 1fr; }
  .ay-cart-item-img { width: 96px; height: 96px; }
}

@media (min-width: 1280px) {
  .ay-cart-page { padding: 32px 32px 100px; }
  .ay-cart-summary { width: 380px; }
  .ay-cart-product-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1440px) {
  .ay-cart-summary { width: 400px; }
  .ay-cart-page { padding: 36px 40px 100px; }
}

@media (min-width: 1920px) {
  .ay-cart-page { font-size: 16px; }
  .ay-cart-wrap { max-width: 1600px; }
}

/* ---- Touch targets below 768px ---- */
@media (max-width: 767px) {
  .ay-qty-stepper button,
  .ay-cart-checkout-btn,
  .ay-cart-empty-btn {
    min-height: 46px;
  }
}
@media (max-width: 429px) {
  .ay-qty-stepper button {
    width: 40px;
    height: 40px;
  }
}
