/* ==========================================================================
   THE FOURTH KIND — LUXURY WHITE-THEMED CART SYSTEM
   Clean White Background, Jet Black Accents, Responsive
   ========================================================================== */

/* Cart Overlay */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Cart Drawer Container */
.cart-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: -480px;
  width: 420px;
  max-width: 100vw;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  background-color: #ffffff !important;
  color: #000000 !important;
  border-left: 1px solid #eeeeee;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.12);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Kumbh Sans', 'Inter', -apple-system, sans-serif;
  box-sizing: border-box;
  overflow: hidden;
}

.cart-drawer.open {
  right: 0 !important;
}

/* Cart Header */
.cart-header {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eeeeee !important;
  background-color: #ffffff !important;
  color: #000000 !important;
  flex-shrink: 0;
}

.cart-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-heading {
  font-family: 'Kumbh Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #000000 !important;
}

.cart-items-total {
  font-size: 14px;
  color: #888888 !important;
}

.cart-close-btn {
  background: none !important;
  border: none !important;
  color: #666666 !important;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
}

.cart-close-btn:hover {
  color: #000000 !important;
  transform: scale(1.15);
}

/* Cart Body */
.cart-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 28px;
  background-color: #ffffff !important;
  color: #000000 !important;
}

/* Empty State */
.cart-empty {
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  color: #000000 !important;
}

.empty-title {
  font-family: 'Kumbh Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #000000 !important;
  margin-top: 8px;
}

.empty-desc {
  font-size: 13px;
  color: #666666 !important;
  max-width: 240px;
  line-height: 1.5;
}

.empty-cta {
  margin-top: 14px;
  display: inline-block;
  padding: 10px 22px;
  background: #f5f5f5 !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 4px;
  color: #000000 !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.empty-cta:hover {
  background: #ebebeb !important;
}

/* Items List */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0 !important;
}

.item-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background-color: #f7f7f7 !important;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #eeeeee;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.item-name {
  font-family: 'Kumbh Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #000000 !important;
}

.item-remove {
  background: none !important;
  border: none !important;
  color: #999999 !important;
  font-size: 14px;
  cursor: pointer;
  padding: 2px;
  transition: color 0.2s ease;
}

.item-remove:hover {
  color: #ff3333 !important;
}

.item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e0e0e0 !important;
  border-radius: 4px;
  background: #fafafa !important;
}

.qty-btn {
  background: none !important;
  border: none !important;
  color: #000000 !important;
  padding: 4px 10px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.qty-btn:hover {
  background: #eeeeee !important;
}

.qty-value {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 0 8px;
  color: #000000 !important;
}

.item-price {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #000000 !important;
}

/* Cart Footer */
.cart-footer {
  padding: 24px 28px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #eeeeee !important;
  background: #ffffff !important;
  flex-shrink: 0;
}

.cart-subtotal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.subtotal-label {
  font-family: 'Kumbh Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #000000 !important;
}

.subtotal-amount {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #000000 !important;
}

.cart-shipping-note {
  font-size: 12px;
  color: #777777 !important;
  margin-bottom: 18px;
}

.checkout-btn {
  width: 100%;
  padding: 16px;
  background-color: #000000 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 4px;
  font-family: 'Kumbh Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  display: block;
  touch-action: manipulation;
}

.checkout-btn:hover {
  background-color: #222222 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.checkout-btn:active {
  transform: translateY(0);
}

/* Responsive (Mobile & Tablet) */
@media (max-width: 640px) {
  .cart-drawer {
    width: 100vw;
    right: -100vw;
  }

  .cart-header {
    padding: 18px 20px;
  }

  .cart-body {
    padding: 18px 20px;
  }

  .cart-footer {
    padding: 18px 20px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .cart-shipping-note {
    margin-bottom: 14px;
    font-size: 11px;
  }

  .checkout-btn {
    padding: 14px;
  }
}
