/* ===== CART BADGE ===== */
.cart-icon { position: relative; }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  width: 18px;
  height: 18px;
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

/* ===== OVERLAY ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

/* ===== DRAWER ===== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

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

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.cart-drawer-header h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.cart-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: none;
}

.cart-close svg {
  width: 20px;
  height: 20px;
  stroke: #1D1D1B;
  stroke-width: 2;
  fill: none;
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
}

.cart-empty {
  text-align: center;
  padding: 60px 0;
  color: #888;
  font-size: 0.9rem;
}

/* ===== CART ITEM ===== */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.cart-item-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.cart-item-size {
  font-size: 0.78rem;
  color: #888;
  margin-top: 2px;
}

.cart-item-price {
  font-size: 0.85rem;
  margin-top: 6px;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-qty {
  display: flex;
  align-items: center;
  border: 1px solid rgba(0,0,0,0.1);
}

.cart-qty button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  background: none;
  color: #1D1D1B;
  transition: background 0.2s;
}

.cart-qty button:hover { background: #f0f0f0; }

.cart-qty span {
  width: 32px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.cart-item-total {
  font-size: 0.9rem;
  font-weight: 700;
}

.cart-item-remove {
  opacity: 0.3;
  transition: opacity 0.2s;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.cart-item-remove:hover { opacity: 1; }

/* ===== DRAWER FOOTER ===== */
.cart-drawer-footer {
  padding: 24px 28px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.cart-shipping-note {
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 20px;
}

.cart-checkout-btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* ===== PRODUCT CARD UPDATES ===== */
.size-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.size-btn {
  font-size: 0.72rem;
  padding: 6px 12px;
  border: 1.5px solid rgba(0,0,0,0.1);
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s;
  color: #1D1D1B;
}

.size-btn:hover { border-color: #1D1D1B; }

.size-btn.active {
  border-color: #1D1D1B;
  background: #1D1D1B;
  color: #fff;
}

.qty-selector {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.qty-label {
  font-size: 0.78rem;
  color: #888;
  font-weight: 500;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid rgba(0,0,0,0.1);
}

.qty-control button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  background: none;
  transition: background 0.2s;
}

.qty-control button:hover { background: #f0f0f0; }

.qty-value {
  width: 40px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.add-to-cart {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

/* ===== CHECKOUT PAGE ===== */
.checkout-page {
  padding: 120px 48px 80px;
  max-width: 1000px;
  margin: 0 auto;
}

.checkout-page h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 48px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
}

.checkout-section {
  margin-bottom: 36px;
}

.checkout-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.checkout-section .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkout-section input,
.checkout-section select {
  width: 100%;
  padding: 14px 0;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.12);
  font-family: inherit;
  font-size: 0.9rem;
  background: transparent;
  border-radius: 0;
  -webkit-appearance: none;
}

.checkout-section input:focus,
.checkout-section select:focus {
  outline: none;
  border-bottom-color: #BC2F2C;
}

.checkout-section .full-width { grid-column: 1 / -1; }

/* Card input styling */
.card-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
}

/* Order summary */
.order-summary {
  background: #f7f7f7;
  padding: 32px;
  align-self: start;
  position: sticky;
  top: 100px;
}

.order-summary h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.summary-item-name {
  font-size: 0.88rem;
  font-weight: 600;
}

.summary-item-detail {
  font-size: 0.75rem;
  color: #888;
}

.summary-item-price {
  font-size: 0.88rem;
  font-weight: 600;
  text-align: right;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.88rem;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 16px 0 0;
  margin-top: 8px;
  border-top: 1.5px solid #1D1D1B;
  font-size: 1.1rem;
  font-weight: 700;
}

.checkout-submit {
  width: 100%;
  justify-content: center;
  margin-top: 24px;
}

.checkout-error {
  color: #BC2F2C;
  font-size: 0.85rem;
  margin-top: 12px;
  display: none;
}

.checkout-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.72rem;
  color: #888;
}

.checkout-secure svg {
  width: 14px;
  height: 14px;
  stroke: #888;
  stroke-width: 2;
  fill: none;
}

/* Invoice notice box */
.checkout-invoice-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
  background: #f0f8f4;
  border: 1px solid #c8e6d5;
  border-radius: 6px;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #333;
}

.checkout-invoice-notice svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.checkout-invoice-notice strong {
  color: #1D1D1B;
}

@media (max-width: 768px) {
  .checkout-page { padding: 100px 24px 60px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-section .form-row { grid-template-columns: 1fr; }
  .order-summary { position: static; }
}
