/* ============== CART DRAWER ============== */

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 30, 56, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
  z-index: 1000;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 92%;
  max-width: 460px;
  background: var(--bg);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 60px rgba(12, 30, 56, 0.18);
}
.cart-drawer.open { transform: translateX(0); }

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  flex-shrink: 0;
}
.cart-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}
.cart-title {
  font-family: var(--serif);
  font-size: 26px;
  color: #0c1e38;
  font-weight: 400;
  line-height: 1;
}
.cart-title em { color: var(--coral); font-weight: 500; }
.cart-close {
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: #0c1e38;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.cart-close:hover {
  background: #0c1e38;
  color: var(--bg);
  border-color: #0c1e38;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 26px;
  -webkit-overflow-scrolling: touch;
}

/* CART ITEM */
.cart-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  display: block;
  aspect-ratio: 4/5;
  background: var(--bg-warm);
  overflow: hidden;
  width: 88px;
}
.cart-item-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.cart-item-img:hover img { transform: scale(1.05); }

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cart-item-cat {
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 700;
  margin-bottom: 2px;
}
.cart-item-name {
  font-family: var(--serif);
  font-size: 17px;
  color: #0c1e38;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}
.cart-item-name:hover { color: var(--coral); }
.cart-item-variant {
  font-size: 11.5px;
  color: #6e6755;
  font-style: italic;
  font-family: var(--serif);
  margin-top: 2px;
}
.cart-item-bottom {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.cart-qty {
  display: flex;
  align-items: center;
  border: 1px solid rgba(20, 42, 74, 0.18);
  background: var(--bg-soft);
}
.cart-qty-btn {
  width: 30px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #0c1e38;
  font-weight: 600;
  line-height: 1;
}
.cart-qty-btn:hover { background: rgba(20, 42, 74, 0.06); }
.cart-qty-val {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: #0c1e38;
  font-weight: 500;
  padding: 0 4px;
}
.cart-item-price {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: #0c1e38;
  font-weight: 600;
}

.cart-item-remove {
  position: absolute;
  top: 22px;
  right: 0;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  display: flex; align-items: center; justify-content: center;
  color: #6e6755;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s var(--ease);
}
.cart-item-remove:hover { color: var(--coral); opacity: 1; }

/* EMPTY STATE */
.cart-empty {
  text-align: center;
  padding: 60px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.cart-empty-icon {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: var(--bg-warm);
  display: flex; align-items: center; justify-content: center;
  color: var(--coral);
  margin-bottom: 8px;
}
.cart-empty h3 {
  font-family: var(--serif);
  font-size: 28px;
  color: #0c1e38;
  font-weight: 400;
}
.cart-empty p {
  color: #4a4434;
  font-size: 14.5px;
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 8px;
}

/* FOOTER */
.cart-foot {
  padding: 18px 26px 22px;
  border-top: 1px solid var(--line);
  background: var(--bg-warm);
  flex-shrink: 0;
}

.cart-shipping-bar {
  margin-bottom: 18px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border-left: 3px solid var(--coral);
}
.cart-shipping-bar.achieved { border-left-color: #2a8b5f; }
.cart-shipping-bar.achieved .cart-shipping-text { color: #2a8b5f; font-weight: 600; }
.cart-shipping-text {
  font-size: 12.5px;
  color: #4a4434;
  margin-bottom: 8px;
  line-height: 1.4;
}
.cart-shipping-text strong { color: var(--coral); font-weight: 700; }
.cart-shipping-track {
  height: 4px;
  background: rgba(20, 42, 74, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.cart-shipping-fill {
  height: 100%;
  background: var(--coral);
  border-radius: 999px;
  transition: width 0.6s var(--ease);
}
.cart-shipping-bar.achieved .cart-shipping-track { display: none; }

.cart-totals {
  margin-bottom: 16px;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  font-size: 14px;
  color: #0c1e38;
}
.cart-total-row strong {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: #0c1e38;
  font-weight: 600;
}
.cart-total-row.muted {
  font-size: 12px;
  color: #6e6755;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 4px;
}

.cart-checkout {
  width: 100%;
  padding: 18px !important;
  background: #0c1e38 !important;
  color: var(--bg) !important;
  border-color: #0c1e38 !important;
  font-size: 11px !important;
  letter-spacing: 0.32em !important;
  font-weight: 700 !important;
  justify-content: center;
}
.cart-checkout::before { background: var(--coral) !important; }
.cart-checkout:hover { color: var(--bg) !important; }

.cart-trust {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: #6e6755;
  font-weight: 500;
}
.cart-trust span { display: inline-flex; align-items: center; gap: 4px; }

/* CART TOAST */
.cart-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0c1e38;
  color: var(--bg);
  padding: 14px 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 14px 40px rgba(12, 30, 56, 0.3);
  opacity: 0;
  transition: all 0.4s var(--ease);
  z-index: 1100;
  pointer-events: none;
  max-width: 90%;
}
.cart-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cart-toast-icon {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* MOBILE */
@media (max-width: 760px) {
  .cart-drawer { width: 100%; max-width: 100%; }
  .cart-head { padding: 18px 20px 14px; }
  .cart-title { font-size: 22px; }
  .cart-body { padding: 10px 20px; }
  .cart-item { grid-template-columns: 70px 1fr auto; gap: 12px; padding: 18px 0; }
  .cart-item-img { width: 70px; }
  .cart-item-name { font-size: 15px; }
  .cart-item-cat { font-size: 8.5px; letter-spacing: 0.28em; }
  .cart-item-variant { font-size: 11px; }
  .cart-item-price { font-size: 14px; }
  .cart-qty-btn { width: 26px; height: 28px; font-size: 14px; }
  .cart-qty-val { font-size: 13px; min-width: 22px; }
  .cart-foot { padding: 14px 20px 18px; }
  .cart-total-row strong { font-size: 19px; }
  .cart-checkout { padding: 16px !important; font-size: 10px !important; letter-spacing: 0.28em !important; }
  .cart-trust { gap: 10px; font-size: 9.5px; flex-wrap: wrap; }
  .cart-empty { padding: 40px 16px 30px; }
  .cart-empty h3 { font-size: 22px; }
  .cart-empty p { font-size: 13.5px; }
  .cart-toast { bottom: 90px; font-size: 12px; padding: 12px 18px; }
}
