/* ============================================================
   MODERN CHECKOUT - Complete Redesign
   Colors: Primary #338ae7 | Accent #f57298
   Layout: Order Bump Top | 2-Column (Billing+Shipping | Order+Payment)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Root Variables ─────────────────────────────────────── */
:root {
  --primary: #338ae7;
  --primary-dark: #1e74d6;
  --primary-light: #eef5fd;
  --primary-glow: rgba(51, 138, 231, 0.18);
  --accent: #f57298;
  --accent-dark: #d45a7e;
  --accent-light: #fff0f4;
  --success: #22c55e;
  --danger: #ef4444;
  --text: #1a2236;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Widget Wrapper ─────────────────────────────────────── */
.custom-checkout-widget {
  font-family: 'Hind Siliguri', 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  padding: 24px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Checkout Title ─────────────────────────────────────── */
.checkout-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: -0.3px;
}

/* ============================================================
   ORDER BUMP / PRODUCT SHOWCASE — Full width at top
   ============================================================ */
.product-selection {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.showcase-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.showcase-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
  flex-shrink: 0;
}

.deselect-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.deselect-all-btn,
.select-all-btn {
  padding: 6px 14px;
  border: 1.5px solid var(--primary);
  background: var(--card);
  color: var(--primary);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  font-family: inherit;
}

.deselect-all-btn:hover,
.select-all-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* Product option card */
.product-option {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
  cursor: pointer;
  background: var(--card);
  position: relative;
}

.product-option:last-child { margin-bottom: 0; }

.product-option:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.product-option.selected {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

.product-option label {
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
  gap: 12px;
}

.showcase-product-input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}

.product-info {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 14px;
}

.product-info img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.product-name {
  flex: 1;
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}

.product-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 17px;
  white-space: nowrap;
}

/* Variation chips */
.variation-selector {
  padding: 12px 0 4px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attr-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.variation-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.variation-chip {
  padding: 5px 13px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.variation-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.variation-chip.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.variation-chip.out-of-stock {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

.variation-message {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
}

/* ============================================================
   CHECKOUT WRAPPER — 2-column grid
   ============================================================ */
.checkout-wrapper {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: start;
}

/* Coupon outside columns — full width */
.coupon-section {
  grid-column: 1 / -1;
  background: var(--card);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.coupon-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.coupon-field-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.coupon-field-wrapper input {
  flex: 1;
  min-width: 160px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: var(--transition);
}

.coupon-field-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.apply-coupon-btn {
  padding: 10px 20px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.apply-coupon-btn:hover {
  background: var(--primary);
}

.coupon-message {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}

.coupon-message.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.coupon-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.coupon-discount {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}

.coupon-discount span:last-child {
  font-weight: 700;
  color: var(--accent);
}

/* ============================================================
   COLUMN 1 — Billing Section (left)
   ============================================================ */
.billing-section {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Section card style */
.billing-card,
#custom-checkout-form {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 24px;
}

#custom-checkout-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Section heading with accent bar */
.billing-section > h3,
.billing-section h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
}

.billing-section > h3::before,
.billing-section h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

/* Form fields */
.form-group {
  margin-bottom: 16px;
}

.form-group:last-child { margin-bottom: 0; }

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder {
  color: #a0aec0;
}

/* ── Shipping Section (inside col-1 below billing form) ─── */
.shipping-section {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 24px;
}

.shipping-section h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shipping-section h4::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

.shipping-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shipping-method {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  transition: var(--transition);
  cursor: pointer;
  background: var(--bg);
}

.shipping-method:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.shipping-method:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.shipping-method label {
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
  gap: 10px;
}

.shipping-method input[type='radio'] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.shipping-method input[type='radio']:checked {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 3px #fff;
}

.shipping-text {
  flex: 1;
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.shipping-cost {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
  background: var(--card);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* ============================================================
   COLUMN 2 — Order Summary + Payment (right)
   ============================================================ */
.order-summary {
  grid-column: 2;
  grid-row: 1 / 3;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 24px;
  position: sticky;
  top: 20px;
}

.order-summary h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.order-summary h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

/* Product title labels inside summary */
.cart-products-title,
.default-products-title,
.showcase-products-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
  padding: 0;
  background: none;
  border: none;
}

.cart-products-list,
.default-products-list,
.showcase-products-list {
  margin-bottom: 12px;
}

/* Order item rows */
.order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: var(--transition);
  border: none;
}

.order-item:last-child { margin-bottom: 0; }

.item-info {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 10px;
}

.item-info img,
.product-info img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border) !important;
  flex-shrink: 0;
}

.item-details {
  flex: 1;
}

.item-name {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 3px;
  line-height: 1.3;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.cart-item-quantity,
.default-product-quantity,
.showcase-product-quantity {
  width: 52px !important;
  padding: 3px 4px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 6px !important;
  font-size: 13px;
  text-align: center;
  outline: none !important;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
}

.quantity {
  color: var(--text-secondary);
  font-size: 13px;
}

.item-price {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
  flex-shrink: 0;
}

.remove-cart-item {
  padding: 0 !important;
  border: none !important;
  background: none !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
}

button.remove-cart-item svg {
  width: 100%;
  height: 100%;
  fill: var(--accent);
}

.remove-cart-item:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Order Totals */
.order-totals {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 14px;
}

.order-totals h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.subtotal,
.shipping-total,
.total,
.coupon-discount,
div#discount-row,
.dynamic_discount_increase_total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 14px;
}

.subtotal,
.shipping-total {
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--border);
}

div#discount-row {
  color: var(--success);
  border-bottom: 1px dashed var(--border);
}

.dynamic_discount_increase_total {
  color: var(--success);
  font-size: 13px;
}

.total {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  padding-top: 12px;
  margin-top: 4px;
}

.total span:last-child {
  color: var(--primary);
}

.free-delivery-message {
  color: var(--success);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.free-delivery-message::before {
  content: '✓';
  font-weight: 800;
}

/* Discount indicator */
.discount-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}

/* ── Payment Section (inside col-2, below order summary) ── */
.payment-section {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 24px;
  margin-top: 16px;
}

.payment-section h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-section h4::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.payment-method {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  transition: var(--transition);
  cursor: pointer;
  background: var(--bg);
}

.payment-method:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.payment-method:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.payment-method label {
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
  gap: 10px;
}

.payment-method input[type='radio'] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.payment-method input[type='radio']:checked {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 3px #fff;
}

.payment-title {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  flex: 1;
}

.payment-description {
  margin-top: 8px;
  margin-left: 28px;
  padding: 8px 12px;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #92400e;
  font-size: 13px;
  line-height: 1.4;
}

.payment-privacy {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  display: block;
  padding-top: 4px;
}

/* ── Complete Order Button ─────────────────────────────── */
.complete-order-btn {
  width: 100% !important;
  padding: 16px 22px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none !important;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700 !important;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(51, 138, 231, 0.35);
  font-family: inherit;
  letter-spacing: 0.2px;
  margin-top: 16px;
}

.complete-order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(51, 138, 231, 0.45);
}

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

.complete-order-btn.loading {
  opacity: 0.75;
  cursor: not-allowed;
  pointer-events: none;
}

#button-total {
  background: rgba(255, 255, 255, 0.22);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 15px;
}

/* ── Showcase badge ─────────────────────────────────────── */
.showcase-badge {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

/* ── Loading spinner ─────────────────────────────────────── */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  gap: 8px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.02); }
}

.order-totals.updated { animation: pulse 0.3s ease; }

/* ── Success Popup ─────────────────────────────────────── */
.checkout-success-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 99999;
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}

.checkout-success-popup {
  background: var(--card);
  border-radius: 20px;
  max-width: 580px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.popup-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 20px 24px;
  border-radius: 20px 20px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popup-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.popup-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.popup-close:hover {
  background: rgba(255,255,255,0.3);
  transform: rotate(90deg);
}

.popup-content { padding: 24px; }

.order-summary-popup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.order-info,
.customer-info {
  background: var(--bg);
  padding: 16px;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}

.order-info h3,
.customer-info h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.order-info p,
.customer-info p {
  margin: 6px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.order-items-popup h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.popup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.item-image {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--card);
  flex-shrink: 0;
}

.item-quantity {
  color: var(--text-secondary);
  font-size: 13px;
}

.order-totals-popup {
  background: var(--primary-light);
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.total-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text);
}

.total-line.total {
  border-top: 2px solid var(--primary);
  padding-top: 12px;
  margin-top: 8px;
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
}

.popup-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.popup-btn {
  flex: 1;
  padding: 13px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  min-width: 130px;
  letter-spacing: 0.3px;
  font-family: inherit;
}

.popup-btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
}

.popup-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,114,152,0.35);
}

.popup-btn.secondary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.popup-btn.secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(51,138,231,0.35);
}

.popup-message {
  background: #dcfce7;
  padding: 16px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--success);
  text-align: center;
}

.popup-message p {
  margin: 0;
  color: #166534;
  font-size: 14px;
  line-height: 1.6;
}

body.popup-open { overflow: hidden; }

/* ── Related Products / You May Also Like ────────────────── */
.you-may-also-like {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  margin-top: 16px;
}

.you-may-also-like h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.you-may-also-like h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.related-product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.related-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.related-product-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.related-product-image { overflow: hidden; }

.related-product-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-product-card:hover .related-product-image img {
  transform: scale(1.04);
}

.related-product-info { padding: 10px; }

.related-product-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  height: 34px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.related-product-btn {
  display: block;
  width: 100%;
  padding: 7px 0;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.related-product-btn:hover {
  background: var(--primary-dark);
}

/* Focus styles */
input:focus,
button:focus,
select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================================
   RESPONSIVE — Mobile First
   ============================================================ */

/* Tablet */
@media (max-width: 900px) {
  .checkout-wrapper {
    grid-template-columns: 1fr;
  }

  .coupon-section { grid-column: 1; }

  .billing-section { grid-column: 1; }

  .order-summary {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }

  .payment-section { margin-top: 0; }
}

/* Mobile */
@media (max-width: 640px) {
  .custom-checkout-widget {
    padding: 16px 12px;
  }

  .product-selection,
  #custom-checkout-form,
  .shipping-section,
  .payment-section,
  .order-summary {
    padding: 18px 16px;
  }

  .product-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .product-info img { width: 48px; height: 48px; }

  .deselect-controls { flex-direction: column; }
  .deselect-all-btn,
  .select-all-btn { width: 100%; text-align: center; }

  .order-summary-popup { grid-template-columns: 1fr; }

  .popup-actions { flex-direction: column; }
  .popup-btn { width: 100%; }

  .related-products-grid { grid-template-columns: 1fr; }

  .coupon-field-wrapper { flex-direction: column; }
  .coupon-field-wrapper input,
  .apply-coupon-btn { width: 100%; }

  .shipping-method label,
  .payment-method label {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .complete-order-btn { font-size: 15px; padding: 14px 16px; }

  #button-total { font-size: 14px; }

  .order-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .item-price { align-self: flex-end; }
}

@media (max-width: 380px) {
  .checkout-title { font-size: 18px; }
  .product-name { font-size: 14px; }
  .product-price { font-size: 15px; }
}

/* ============================================================
   CHECKOUT COLUMN LAYOUT (col-left / col-right)
   ============================================================ */
.checkout-wrapper {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: start;
}

.checkout-col-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checkout-col-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 20px;
}

/* billing-section inside col-left is just the form card */


.checkout-col-left .billing-section h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-col-left .billing-section h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

/* order-summary inside col-right: not sticky itself, parent col-right is sticky */
.checkout-col-right .order-summary {
  position: static;
}

/* payment section inside col-right */
.checkout-col-right .payment-section {
  margin-top: 0;
}

@media (max-width: 900px) {
  .checkout-wrapper {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .checkout-col-right {
    position: static;
  }
}
