/* ═══════════════════════════════════════════════════════════
   DIOURA ELEGANCE — Cart Page Styles
   Matching Boutique Reference Design: Soft Blush, Clean White & Berry
   "Your style, Your choice."
═══════════════════════════════════════════════════════════ */

.cart-section {
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 5.5rem;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--nav-h));
}

/* Corner Botanical Leaf Sprig (matching reference) */
.cart-botanical-br {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: clamp(240px, 28vw, 360px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

/* ── Page Title Header with Bag Icon Badge ─────────────── */
.cart-header-wrap {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 2.25rem;
  position: relative;
  z-index: 1;
  animation: heroFadeInUp 0.65s var(--ease) 0.05s both;
}

.cart-title-badge {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #FDE8ED;
  color: var(--rose-btn, #B04A62);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(176, 74, 98, 0.08);
}

.cart-header-title {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 3.2vw, 2.7rem);
  font-weight: 600;
  color: var(--dark, #281B20);
  margin: 0 0 0.25rem;
  line-height: 1.15;
}

.cart-header-subtitle {
  font-family: var(--font-sans);
  font-size: 0.94rem;
  color: var(--medium, #5C484E);
  margin: 0;
}

/* ── Cart Layout (Items Column + Sticky Order Summary) ──── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.25rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

.cart-items-column {
  min-width: 0;
}

/* ── Left Cart Items Card ──────────────────────────────── */
.cart-items-card {
  background: #FFFFFF;
  border: 1px solid rgba(238, 210, 218, 0.65);
  border-radius: 22px;
  padding: 1.75rem 2.25rem;
  box-shadow: 0 4px 20px rgba(176, 74, 98, 0.04);
  animation: heroFadeInUp 0.65s var(--ease) 0.12s both;
}

.cart-items-container {
  display: flex;
  flex-direction: column;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(238, 210, 218, 0.45);
  transition: background var(--t-hover) var(--ease-hover);
}
.cart-item:first-child {
  padding-top: 0;
}
.cart-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cart-item-image {
  width: 90px;
  height: 114px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(238, 210, 218, 0.6);
  background: #FAF1F3;
  flex-shrink: 0;
}
.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cart-item-name {
  font-family: var(--font-sans);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--dark, #281B20);
  margin: 0 0 0.35rem 0;
  line-height: 1.35;
}

.cart-item-meta {
  font-size: 0.88rem;
  color: #6E575F;
  margin-bottom: 0.75rem;
}
.cart-item-meta strong {
  font-weight: 600;
  color: var(--dark);
}

.cart-item-price {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark, #281B20);
  font-variant-numeric: tabular-nums;
  margin-top: auto;
}

/* Stepper & Trash in Cart Item Row */
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-shrink: 0;
}

.cart-qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: #FAF1F3;
  border: 1.5px solid #F0D5DD;
  border-radius: 9999px;
  padding: 0.32rem 0.85rem;
}

.cart-qty-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--dark, #281B20);
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
  transition: background 0.22s var(--ease),
              color 0.22s var(--ease),
              transform 0.22s var(--ease);
}
.cart-qty-btn:hover {
  background: rgba(176, 74, 98, 0.12);
  color: var(--rose-btn);
  transform: scale(1.08);
}
.cart-qty-btn:active {
  transform: scale(0.96);
  transition-duration: 0.1s;
}

.cart-qty-num {
  min-width: 22px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark, #281B20);
  font-variant-numeric: tabular-nums;
}

.cart-trash-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--rose-btn, #B04A62);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s var(--ease),
              color 0.25s var(--ease),
              transform 0.25s var(--ease);
  padding: 0;
}
.cart-trash-btn:hover {
  background: rgba(176, 74, 98, 0.1);
  transform: scale(1.06);
}
.cart-trash-btn:active {
  transform: scale(0.95);
  transition-duration: 0.1s;
}

/* Continue Shopping Link & Clear Bag */
.cart-continue-wrap {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.cart-clear-bag-btn {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  color: var(--medium, #8C8284);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.3rem 0;
  transition: color 0.2s ease;
}
.cart-clear-bag-btn:hover {
  color: var(--rose-btn, #B04A62);
}

.cart-continue-link {
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--rose-btn, #B04A62);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  transition: color 0.25s var(--ease),
              transform 0.25s var(--ease);
}
.cart-continue-link:hover {
  text-decoration: underline;
  transform: translateX(-3px);
}

/* ── Right Order Summary Card ──────────────────────────── */
.order-summary-card {
  background: rgba(254, 246, 248, 0.85);
  border: 1px solid rgba(238, 210, 218, 0.7);
  border-radius: 22px;
  padding: 2.25rem 2rem;
  box-shadow: 0 4px 20px rgba(176, 74, 98, 0.04);
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  animation: heroFadeInUp 0.65s var(--ease) 0.18s both;
}

.summary-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

.summary-header-icon {
  color: var(--rose-btn, #B04A62);
  display: flex;
  align-items: center;
}

.summary-header h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--dark, #281B20);
  margin: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.96rem;
  color: var(--medium, #5C484E);
  margin-bottom: 1rem;
}
.summary-row .value {
  font-weight: 600;
  color: var(--dark, #281B20);
  font-variant-numeric: tabular-nums;
}

.badge-delivery-free {
  background: #FEE8ED;
  color: var(--rose-btn, #B04A62);
  padding: 0.22rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.summary-row.total-row {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark, #281B20);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 1.85rem;
  border-top: 1px solid rgba(238, 210, 218, 0.6);
}
.summary-row.total-row .value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark, #281B20);
}

/* Primary WhatsApp Order Action Button */
.btn-whatsapp-order {
  width: 100%;
  background: var(--rose-btn, #B04A62);
  color: var(--white, #FFFFFF);
  border: 1.5px solid var(--rose-btn, #B04A62);
  border-radius: 9999px;
  padding: 0.95rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(176, 74, 98, 0.28);
  transition: all var(--t-hover) var(--ease-hover);
  margin-bottom: 0.85rem;
}
.btn-whatsapp-order:hover {
  background: var(--rose-btn-hover, #94394E);
  border-color: var(--rose-btn-hover, #94394E);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(176, 74, 98, 0.4);
}
.btn-whatsapp-order .wa-icon-svg {
  flex-shrink: 0;
}

.summary-note {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: var(--medium, #5C484E);
  text-align: center;
  line-height: 1.5;
  margin: 0;
}

/* ── Empty Cart State ──────────────────────────────────── */
.cart-empty {
  text-align: center;
  padding: 4.5rem 2rem;
  background: #FFFFFF;
  border: 1px solid rgba(238, 210, 218, 0.7);
  border-radius: 22px;
  max-width: 580px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(176, 74, 98, 0.04);
}

.cart-empty .empty-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #FAF1F3;
  color: var(--rose-btn, #B04A62);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.cart-empty h3 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--dark, #281B20);
  margin-bottom: 0.5rem;
}

.cart-empty p {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--medium, #5C484E);
  margin-bottom: 1.75rem;
}

/* ── Responsive Rules ──────────────────────────────────── */
@media (max-width: 960px) {
  .cart-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .order-summary-card {
    position: static;
    max-width: 540px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .cart-section {
    padding-top: calc(var(--nav-h) + 1.25rem);
    padding-bottom: 3.5rem;
  }
  .cart-header-title {
    font-size: 1.85rem;
  }
  .cart-title-badge {
    width: 44px;
    height: 44px;
  }
  .cart-items-card {
    padding: 1.25rem 1rem;
    border-radius: 18px;
  }
  .cart-item {
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.25rem 0;
  }
  .cart-item-image {
    width: 78px;
    height: 98px;
  }
  .cart-item-name {
    font-size: 1rem;
  }
  .cart-item-meta {
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
  }
  .cart-item-price {
    font-size: 1.08rem;
  }
  .cart-item-actions {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(238, 210, 218, 0.5);
  }
  .order-summary-card {
    padding: 1.75rem 1.25rem;
    border-radius: 18px;
  }
  .cart-botanical-br {
    width: 180px;
    opacity: 0.22;
  }
}

@media (max-width: 380px) {
  .cart-header-wrap { gap: 0.75rem; }
  .cart-header-title { font-size: 1.55rem; }
  .cart-header-subtitle { font-size: 0.85rem; }
  .cart-title-badge { width: 40px; height: 40px; }
  .cart-items-card { padding: 1.1rem 0.75rem; }
  .cart-item-image { width: 68px; height: 86px; }
  .cart-item-name { font-size: 0.92rem; }
  .cart-item-price { font-size: 0.98rem; }
  .order-summary-card { padding: 1.35rem 0.85rem; }
}

@media (max-width: 340px) {
  .cart-header-title { font-size: 1.38rem; }
  .cart-title-badge { width: 36px; height: 36px; }
  .cart-items-card { padding: 0.95rem 0.55rem; }
  .cart-item-image { width: 60px; height: 76px; }
}
