/* ==========================================================================
   Shopify-Style Cart Drawer (Dawn / Impulse Theme Aesthetic)
   SpicesPalace.com - E-Commerce Engine
   ========================================================================== */

/* Drawer Backdrop */
.shopify-cart-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* Slide-out Drawer Panel */
.shopify-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background-color: #FFFFFF;
  z-index: 2501;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.shopify-cart-backdrop.open .shopify-cart-drawer {
  transform: translateX(0);
}

/* Drawer Header */
.cart-drawer-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #EAE4DC;
}

.cart-drawer-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1A1A1A;
  letter-spacing: -0.01em;
}

.cart-drawer-close-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #666666;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.cart-drawer-close-btn:hover {
  background-color: #F4EFEA;
  color: #000000;
}

/* Free Shipping Threshold Progress Bar */
.cart-free-shipping-box {
  padding: 14px 24px;
  background-color: #FAF7F2;
  border-bottom: 1px solid #EAE4DC;
}

.cart-free-shipping-msg {
  font-size: 0.825rem;
  font-weight: 600;
  color: #333333;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-free-shipping-msg .highlight {
  color: #FF5000;
  font-weight: 700;
}

.free-shipping-progress-track {
  width: 100%;
  height: 6px;
  background-color: #E8E2D8;
  border-radius: 99px;
  overflow: hidden;
}

.free-shipping-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FF5000 0%, #FFA07A 100%);
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* Cart Items Container */
.cart-items-scroll {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Single Cart Item */
.cart-drawer-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #F0EBE3;
  position: relative;
}

.cart-item-thumb {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #F8F5F0;
  border: 1px solid #EBE5DC;
  flex-shrink: 0;
}

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

.cart-item-info {
  display: flex;
  flex-direction: column;
}

.cart-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1F1B18;
  line-height: 1.3;
  margin-bottom: 4px;
  padding-right: 24px;
}

.cart-item-variant {
  font-size: 0.8rem;
  color: #78716C;
  margin-bottom: 8px;
}

.cart-item-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.cart-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #D8D2C9;
  border-radius: 6px;
  background-color: #FFFFFF;
}

.cart-stepper-btn {
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #333333;
  font-size: 1rem;
}

.cart-stepper-btn:hover {
  background-color: #F5EFE6;
}

.cart-stepper-val {
  width: 28px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #111111;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: #11100F;
}

.cart-item-remove-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  color: #A8A29E;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s ease;
}

.cart-item-remove-btn:hover {
  color: #E11D48;
}

/* Empty Cart State */
.cart-empty-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  margin: auto;
}

.cart-empty-view svg {
  color: #FF5000;
  margin-bottom: 16px;
}

.cart-empty-view h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1C1917;
}

.cart-empty-view p {
  font-size: 0.9rem;
  color: #78716C;
  margin-bottom: 24px;
  max-width: 260px;
}

/* Drawer Footer */
.cart-drawer-footer {
  border-top: 1px solid #EAE4DC;
  padding: 20px 24px;
  background-color: #FFFFFF;
}

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

.cart-subtotal-label {
  font-size: 1rem;
  font-weight: 700;
  color: #1C1917;
}

.cart-subtotal-amount {
  font-size: 1.35rem;
  font-weight: 800;
  color: #11100F;
}

.cart-shipping-note {
  font-size: 0.78rem;
  color: #78716C;
  margin-bottom: 16px;
}

.cart-checkout-btn {
  width: 100%;
  background-color: #FF5000;
  color: #FFFFFF;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.18s ease;
  box-shadow: 0 4px 14px rgba(255, 80, 0, 0.28);
}

.cart-checkout-btn:hover {
  background-color: #E04600;
  transform: translateY(-1px);
}

/* Shopify Express Checkout Mock Buttons */
.cart-express-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0 12px;
  color: #A8A29E;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cart-express-divider::before,
.cart-express-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #E7E0D8;
}

.cart-express-divider span {
  padding: 0 10px;
}

.shopify-express-buttons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.shopify-pay-btn {
  border: none;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8rem;
  transition: opacity 0.15s ease;
}

.shopify-pay-btn:hover {
  opacity: 0.9;
}

.btn-shop-pay {
  background-color: #5A31F4;
  color: #FFFFFF;
}

.btn-paypal {
  background-color: #FFC439;
  color: #003087;
}

.btn-gpay {
  background-color: #000000;
  color: #FFFFFF;
}

/* Order Note Drawer */
.cart-order-note-toggle {
  background: none;
  border: none;
  font-size: 0.825rem;
  color: #78716C;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 12px;
  display: inline-block;
}

.cart-order-note-area {
  width: 100%;
  height: 60px;
  border: 1px solid #D8D2C9;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
  margin-bottom: 12px;
  resize: vertical;
  display: none;
}

.cart-order-note-area.active {
  display: block;
}
