/* Cart Drawer & Free Shipping Progress Bar - Pixie Rebels Streetwear Style */

.cart-drawer-overlay,
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1004;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal, 0.3s ease);
}

.cart-drawer-overlay.active,
.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  background: #ffffff;
  z-index: 1005;
  transform: translateX(100%);
  transition: transform var(--transition-smooth, 0.35s cubic-bezier(0.16, 1, 0.3, 1));
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
}

.cart-drawer.active {
  transform: translateX(0);
}

/* 1. Cart Header */
.cart-header {
  padding: 20px 22px 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.cart-title-row,
.cart-title-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.cart-title {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #111111;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.cart-count,
#cartTotalCount {
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  color: inherit;
}

.cart-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f4f4f5;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #555555;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.cart-close-btn:hover {
  background: #e4e4e7;
  color: #111111;
}

/* 2. Free Shipping Progress Meter */
.free-shipping-section,
.shipping-progress-container {
  padding: 4px 0 2px 0;
}

.shipping-progress-text,
.shipping-text {
  font-size: 0.8rem;
  color: #18181b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  line-height: 1.35;
}

.shipping-progress-text strong,
.shipping-text strong {
  font-weight: 800;
  color: #111111;
}

.shipping-progress-bar-bg,
.progress-bar {
  width: 100%;
  height: 4px;
  background: #e4e4e7;
  border-radius: 999px;
  overflow: hidden;
}

.shipping-progress-bar-fill,
.progress-fill {
  height: 100%;
  width: 0%;
  background: #111111;
  border-radius: 999px;
  transition: width 0.4s ease, background-color 0.3s ease;
}

.shipping-progress-bar-fill.unlocked,
.progress-fill.unlocked {
  background: #10b981;
}

/* 3. Cart Items Body */
.cart-body,
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
}

/* Cart Item Layout (Matching Reference Screenshot) */
.cart-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
  box-sizing: border-box;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 3px;
  background: #18181b;
  flex-shrink: 0;
}

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

.cart-item-top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.cart-item-designer {
  font-size: 0.72rem;
  font-weight: 700;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: #111111;
  white-space: nowrap;
}

.cart-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111111;
  line-height: 1.25;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-variant {
  font-size: 0.78rem;
  color: #71717a;
  margin-bottom: 10px;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d4d4d8;
  border-radius: 2px;
  background: #ffffff;
  height: 26px;
  box-sizing: border-box;
}

.qty-btn {
  background: transparent;
  border: none;
  width: 24px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #111111;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background 0.15s ease;
}

.qty-btn:hover {
  background: #f4f4f5;
}

.qty-val {
  min-width: 22px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #111111;
  padding: 0 4px;
}

.cart-item-remove,
.cart-item-remove-link {
  font-size: 0.74rem;
  color: #71717a;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.cart-item-remove:hover,
.cart-item-remove-link:hover {
  color: #111111;
}

/* 4. Empty Cart State */
.cart-empty,
.cart-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cart-empty-icon {
  width: 52px;
  height: 52px;
  color: #a1a1aa;
}

.cart-empty-title {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #18181b;
  margin: 0;
}

.cart-empty-text,
.cart-empty-state p {
  font-size: 0.82rem;
  color: #71717a;
  max-width: 260px;
  margin: 0;
}

/* 5. Cart Footer & Checkout */
.cart-footer {
  padding: 16px 22px 22px 22px;
  border-top: 1px solid #f0f0f0;
  background: #ffffff;
  box-sizing: border-box;
}

.cart-coupon-box,
.coupon-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e4e4e7;
  padding: 6px 0 8px 0;
  margin-bottom: 14px;
}

.cart-coupon-input,
.coupon-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.82rem;
  color: #111111;
  padding: 2px 0;
}

.cart-coupon-input::placeholder,
.coupon-input::placeholder {
  color: #71717a;
  font-size: 0.8rem;
}

.coupon-btn,
#applyCouponBtn {
  background: transparent;
  border: none;
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #111111;
  cursor: pointer;
  padding: 2px 0 2px 10px;
  text-transform: uppercase;
}

.coupon-btn:hover,
#applyCouponBtn:hover {
  opacity: 0.7;
}

.cart-summary,
.cart-summary-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.cart-summary-row,
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  color: #18181b;
}

.cart-summary-row span:last-child,
.summary-row span:last-child {
  font-weight: 700;
  color: #111111;
}

.cart-summary-row.discount-row,
.summary-row.discount-row {
  color: #ef4444 !important;
}

.cart-summary-row.discount-row span:last-child,
.summary-row.discount-row span:last-child {
  color: #ef4444 !important;
}

.cart-summary-row.total-row,
.summary-row.total-row {
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 800;
  color: #111111;
}

.cart-summary-row.total-row span:last-child,
.summary-row.total-row span:last-child {
  font-size: 1.05rem;
  font-weight: 800;
}

.cart-checkout-btn,
.btn-checkout {
  width: 100%;
  padding: 14px 16px;
  background: #000000;
  color: #ffffff;
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  display: block;
  text-align: center;
  transition: opacity 0.2s ease, transform 0.1s ease;
  box-sizing: border-box;
}

.cart-checkout-btn:hover,
.btn-checkout:hover {
  opacity: 0.9;
}

.cart-checkout-btn:disabled,
.btn-checkout:disabled {
  background: #a1a1aa;
  cursor: not-allowed;
  opacity: 0.6;
}

.cart-guarantee-note,
.cart-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #3f3f46;
  margin-top: 10px;
  text-align: center;
}
