/* =============================================================================
   cart.css — UR Perfumes
   Custom cart page styles.
   Sections: Banner · Layout · Items · Actions · Summary · Empty · Responsive
============================================================================= */

/* ── 1. Page Banner ───────────────────────────────────────────────────────── */
.cart-page-banner {
  background: var(--dark);
  padding-block: calc(var(--header-h) + var(--announce-h) + 2rem) 3.2rem;
  position: relative;
  overflow: hidden;
}
.cart-page-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 120% at 25% 60%, rgba(184,150,90,0.09) 0%, transparent 65%);
  pointer-events: none;
}

.cart-banner-breadcrumb {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1.6rem;
}
.cart-banner-breadcrumb a { color: rgba(255,255,255,0.55); transition: color 0.25s ease; }
.cart-banner-breadcrumb a:hover { color: var(--gold); }
.cart-banner-breadcrumb span[aria-hidden="true"] { color: var(--gold); opacity: 0.5; }

.cart-banner-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: clamp(3.2rem, 4vw, 5.6rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.95);
  margin: 0;
}

/* ── 2. Notices ───────────────────────────────────────────────────────────── */
.cart-notices-wrap {
  background: var(--cream);
  padding-block: 1.2rem;
}
.cart-notices-wrap:empty { display: none; }
.cart-notices-wrap .woocommerce-message,
.cart-notices-wrap .woocommerce-error,
.cart-notices-wrap .woocommerce-info {
  background: transparent;
  border-top: none;
  border-left: 2px solid var(--gold);
  padding: 0.8rem 1.2rem;
  font-size: 1.35rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.cart-notices-wrap .woocommerce-error { border-color: #c0392b; }

/* Remove WooCommerce default icons injected via ::before */
.cart-notices-wrap .woocommerce-message::before,
.cart-notices-wrap .woocommerce-info::before,
.cart-notices-wrap .woocommerce-error::before { display: none; }

/* ── 3. Page Wrap ─────────────────────────────────────────────────────────── */
.cart-page-wrap {
  background: var(--cream);
  padding-block: 6.4rem 10rem;
  min-height: 50vh;
}

/* ── 4. Two-column Layout ─────────────────────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 38rem;
  gap: 5.6rem;
  align-items: start;
}

/* ── 5. Cart Items Column ─────────────────────────────────────────────────── */
.cart-col-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cart-label-right {
  display: flex;
  gap: 6rem;
}

/* AJAX updating state */
.cart-item.is-updating {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Single cart item row */
.cart-item {
  display: flex;
  gap: 2.4rem;
  padding: 2.8rem 0;
  border-bottom: 1px solid var(--border-light);
}

/* Thumbnail */
.cart-item-img {
  flex-shrink: 0;
  width: 10rem;
  height: 13rem;
  overflow: hidden;
  background: var(--cream-2);
}
.cart-item-img a { display: block; width: 100%; height: 100%; }
.cart-item-img img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
}

/* Details column */
.cart-item-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cart-item-name-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.6rem;
}

.cart-item-name {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}
.cart-item-name a { color: inherit; text-decoration: none; transition: color 0.25s ease; }
.cart-item-name a:hover { color: var(--gold); }

.cart-item-remove {
  flex-shrink: 0;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s ease;
  padding: 0.2rem;
}
.cart-item-remove:hover { color: var(--gold); }

/* Variation meta */
.cart-item-details .variation {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin: 0;
}
.cart-item-details .variation dt,
.cart-item-details .variation dd { display: inline; margin: 0; }
.cart-item-details .variation dd::after { content: ''; display: block; }

/* Unit price */
.cart-item-price {
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--text-muted);
}
.cart-item-price .woocommerce-Price-amount { color: var(--text-muted); }

/* Bottom row: qty + line total */
.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1.4rem;
}

/* WC quantity input */
.cart-item-qty .quantity {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border-light);
  transition: border-color 0.25s ease;
}
.cart-item-qty .quantity:focus-within { border-color: var(--gold); }
.cart-item-qty .qty {
  width: 4rem;
  padding: 1rem 0.4rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
  -moz-appearance: textfield;
}
.cart-item-qty .qty::-webkit-outer-spin-button,
.cart-item-qty .qty::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Qty stepper buttons injected by cart.js */
.qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  user-select: none;
}
.qty-btn:hover { color: var(--gold); }

/* Line total */
.cart-item-subtotal {
  font-family: var(--font-body);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--gold);
}
.cart-item-subtotal .woocommerce-Price-amount { color: var(--gold); }

/* ── 6. Coupon (inside summary box) ──────────────────────────────────────── */
.cart-coupon-form { margin-bottom: 2.4rem; }

.cart-coupon-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1rem;
}
.cart-coupon-row { display: flex; }
.cart-coupon-input {
  flex: 1;
  min-width: 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-right: none;
  background: rgba(255,255,255,0.05);
  font-family: var(--font-body);
  font-size: 1.35rem;
  color: rgba(255,255,255,0.85);
  outline: none;
  transition: border-color 0.25s ease;
}
.cart-coupon-input:focus { border-color: var(--gold); }
.cart-coupon-input::placeholder { color: rgba(255,255,255,0.3); }

.cart-coupon-btn {
  padding: 1.1rem 1.8rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.cart-coupon-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ── 7. Order Summary Column ──────────────────────────────────────────────── */
.cart-col-summary {
  position: sticky;
  top: calc(var(--header-h) + var(--announce-h) + 2.4rem);
}

.cart-summary-box {
  background: var(--dark);
  padding: 3.6rem;
  position: relative;
}
/* Gold line at top */
.cart-summary-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.cart-summary-heading {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 2.8rem;
}

/* WooCommerce cart totals table */
.cart-summary-box .cart_totals > h2 { display: none; }
.cart-summary-box .cart_totals {}
.cart-summary-box .shop_table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}
.cart-summary-box .shop_table th,
.cart-summary-box .shop_table td {
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-family: var(--font-body);
  font-size: 1.4rem;
  color: rgba(255,255,255,0.7);
  text-align: left;
  vertical-align: middle;
}
.cart-summary-box .shop_table td { text-align: right; }
.cart-summary-box .shop_table tr:last-child th,
.cart-summary-box .shop_table tr:last-child td { border-bottom: none; }

/* Subtotal / shipping rows */
.cart-summary-box .shop_table .woocommerce-Price-amount { color: rgba(255,255,255,0.7); }

/* Order total row */
.cart-summary-box .order-total th,
.cart-summary-box .order-total td {
  padding-top: 2rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: none;
}
.cart-summary-box .order-total td { color: var(--gold); }
.cart-summary-box .order-total .woocommerce-Price-amount { color: var(--gold); }

/* Shipping methods */
.cart-summary-box .shipping ul { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.cart-summary-box .shipping ul li {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.4rem;
}
.cart-summary-box .shipping ul li label { color: rgba(255,255,255,0.55); }
.cart-summary-box .shipping ul li input { accent-color: var(--gold); }

/* Checkout button — typography & color handled globally in buttons.css */
.cart-summary-box .wc-proceed-to-checkout { margin-top: 2.8rem; padding: 0; }

/* Continue shopping link */
.cart-continue-link {
  display: block;
  text-align: center;
  margin-top: 1.8rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s ease;
}
.cart-continue-link:hover { color: var(--gold); }

/* ── 8. Empty Cart State ──────────────────────────────────────────────────── */
.cart-empty-state {
  text-align: center;
  padding: 8rem 2rem 10rem;
}
.cart-empty-icon {
  display: flex;
  justify-content: center;
  color: var(--gold);
  margin: 0 auto 2.8rem;
  opacity: 0.65;
}
.cart-empty-heading {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 4vw, 4.8rem);
  font-weight: 400;
  color: var(--text);
  margin: 0 0 1.2rem;
}
.cart-empty-text {
  font-size: 1.7rem;
  color: var(--text-muted);
  margin: 0 auto 3.6rem;
  max-width: 40rem;
  line-height: 1.75;
}

/* ── 9. Generic page styles (non-WC pages via page.php) ───────────────────── */
.page-content-wrap {
  background: var(--cream);
  padding-block: 8rem 10rem;
}
.page-title {
  font-family: var(--font-heading);
  font-size: clamp(3.2rem, 4vw, 5.6rem);
  font-weight: 400;
  color: var(--text);
  margin: 0 0 4rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--border-light);
}
.page-body {
  font-size: 1.7rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 72rem;
}
.page-body p { margin-bottom: 1.6rem; }
.page-body p:last-child { margin-bottom: 0; }

/* ── 10. Responsive ───────────────────────────────────────────────────────── */

/* ≤ 1200px — slightly tighter columns */
@media (max-width: 1200px) {
  .cart-layout { grid-template-columns: 1fr 34rem; gap: 4rem; }
}

/* ≤ 1023px — narrow the summary column more */
@media (max-width: 1023px) {
  .cart-layout { grid-template-columns: 1fr 30rem; gap: 3.2rem; }
  .cart-summary-box { padding: 2.8rem; }
}

/* ≤ 900px — stack columns; summary goes below items */
@media (max-width: 900px) {
  .cart-page-banner { padding-block: calc(var(--header-h) + var(--announce-h) + 1.2rem) 2.4rem; }
  .cart-page-wrap { padding-block: 4rem 6.4rem; }

  .cart-layout { grid-template-columns: 1fr; gap: 3.6rem; }
  .cart-col-summary { position: static; max-width: 52rem; }

  .cart-col-labels .cart-label-right { gap: 3.2rem; }

  .cart-summary-box { padding: 2.8rem; }
}

/* ≤ 767px — mobile spacing and compact items */
@media (max-width: 767px) {
  .cart-page-wrap { padding-block: 3.2rem 5.6rem; }

  .cart-col-summary { max-width: 100%; }

  /* Compact item row */
  .cart-item { gap: 1.2rem; padding: 1.6rem 0; }
  .cart-item-img { width: 7.2rem; height: 10rem; }
  .cart-item-details { gap: 0.2rem; }
  .cart-item-name { font-size: 1.55rem; }
  .cart-item-price { font-size: 1.3rem; }
  .cart-item-bottom { margin-top: 0.6rem; padding-top: 0; }
  .cart-item-subtotal { font-size: 1.6rem; }

  .cart-summary-box { padding: 2.4rem 2rem; }
  .cart-coupon-form { margin-bottom: 2rem; }
}

/* ≤ 480px — smallest phones */
@media (max-width: 480px) {
  .cart-col-labels { display: none; }

  .cart-item { gap: 1rem; padding: 1.4rem 0; }
  .cart-item-img { width: 6.4rem; height: 10rem; }
  .cart-item-name { font-size: 1.45rem; }
  .cart-item-bottom { flex-wrap: nowrap; gap: 0.8rem; }

  .qty-btn { width: 2.6rem; font-size: 1.6rem; }
  .cart-item-qty .qty { width: 3.2rem; font-size: 1.35rem; }

  .cart-summary-box { padding: 2rem 1.6rem; }
}
