/* ============================================
   VELMOND SPIRITS — Cart Styles
   ============================================ */

/* ---- Cart Nav Button ---- */
.cart-nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}
.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #C8A46D;
  color: #1E1C1A;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---- Cart Drawer ---- */
.cart-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  pointer-events: none;
  visibility: hidden;
}
.cart-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

/* Overlay */
.cart-drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 28, 26, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.cart-drawer.open .cart-drawer-overlay {
  opacity: 1;
}

/* Panel */
.cart-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 90vw;
  height: 100%;
  background: #F7F3EB;
  box-shadow: -10px 0 40px rgba(75, 46, 32, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-drawer.open .cart-drawer-panel {
  transform: translateX(0);
}

/* Header */
.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(200, 164, 109, 0.2);
}
.cart-drawer-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1E1C1A;
  margin: 0;
}
.cart-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #6B4A3A;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}
.cart-drawer-close:hover {
  color: #1E1C1A;
  background: rgba(200, 164, 109, 0.15);
}

/* Body */
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

/* Empty cart */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 1.5rem;
  text-align: center;
}
.cart-empty p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: #6B4A3A;
}
.cart-continue-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #F7F3EB;
  background: #1E1C1A;
  padding: 14px 32px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s;
}
.cart-continue-btn:hover {
  background: #C8A46D;
}

/* Cart Item */
.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(200, 164, 109, 0.12);
  align-items: flex-start;
}
.cart-item:last-child {
  border-bottom: none;
}
.cart-item-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: rgba(200, 164, 109, 0.08);
}
.cart-item-img-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: rgba(200, 164, 109, 0.1);
  flex-shrink: 0;
}
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1E1C1A;
  margin: 0 0 4px;
  line-height: 1.3;
}
.cart-item-price {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  color: #A8864D;
  margin: 0 0 8px;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cart-item-qty span {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1E1C1A;
  min-width: 20px;
  text-align: center;
}
.cart-qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(200, 164, 109, 0.3);
  border-radius: 4px;
  background: white;
  font-size: 1rem;
  color: #6B4A3A;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.cart-qty-btn:hover {
  border-color: #C8A46D;
  color: #C8A46D;
}

.cart-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.cart-item-total {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #4B2E20;
}
.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #B09080;
  padding: 4px;
  transition: color 0.2s;
}
.cart-item-remove:hover {
  color: #C0392B;
}

/* Footer */
.cart-drawer-footer {
  padding: 1.2rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(200, 164, 109, 0.2);
  background: white;
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.cart-subtotal span:first-child {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6B4A3A;
}
.cart-subtotal span:last-child {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1E1C1A;
}
.cart-checkout-btn {
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #F7F3EB;
  background: #1E1C1A;
  border: none;
  padding: 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}
.cart-checkout-btn:hover {
  background: #C8A46D;
  transform: translateY(-1px);
}
.cart-shipping-note {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  color: #A8864D;
  text-align: center;
  margin: 0.8rem 0 0;
}

/* ---- Add to Cart Button ---- */
.add-to-cart-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #F7F3EB;
  background: #C8A46D;
  border: none;
  padding: 16px 40px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.add-to-cart-btn:hover {
  background: #4B2E20;
  transform: translateY(-2px);
}
.add-to-cart-btn.loading {
  opacity: 0.7;
  cursor: wait;
}
.add-to-cart-btn.added {
  background: #2D7D46;
}
.add-to-cart-btn .spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(247, 243, 235, 0.3);
  border-top-color: #F7F3EB;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Boutique card add-to-cart */
.product-card-cart-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F7F3EB;
  background: #C8A46D;
  border: none;
  padding: 10px 16px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}
.product-card-cart-btn:hover {
  background: #4B2E20;
}
.product-card-cart-btn.added {
  background: #2D7D46;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Out of Stock Warning ---- */
.cart-item-unavailable {
  opacity: 0.6;
  position: relative;
}
.cart-item-unavailable::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(192, 57, 43, 0.04) 8px,
    rgba(192, 57, 43, 0.04) 16px
  );
  pointer-events: none;
  border-radius: 4px;
}
.cart-item-stock-warning {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  color: #C0392B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 6px;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .cart-drawer-panel {
    width: 100vw;
    max-width: 100vw;
  }
  .cart-item-img {
    width: 56px;
    height: 56px;
  }
}
