/* =============================================
   RUHUNA TECMART — CART & CHECKOUT STYLES
   Cart page, order summary, checkout flow
   ============================================= */

/* ── Cart Page Layout ── */
.cart-page {
  padding-top: calc(var(--nav-h) + var(--sp-12));
  min-height: 100vh;
  background: linear-gradient(180deg, #F8FAFC 0%, #EFF6FF 40%, #F8FAFC 100%);
}

.cart-header {
  text-align: center;
  padding: var(--sp-6) 0 var(--sp-10);
}

.cart-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  color: #0F172A;
  margin-bottom: var(--sp-2);
}

.cart-header h1 span {
  background: var(--blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cart-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--sp-8);
  align-items: flex-start;
  padding-bottom: var(--sp-20);
}

/* ── Cart Items Header ── */
.cart-items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--glass-border);
}

.cart-items-count {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #0F172A;
}

.cart-clear-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}

.cart-clear-btn:hover {
  color: var(--error);
  background: #FEE2E2;
}

/* ── Cart Items List ── */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.cart-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 24px;
  background: #FFFFFF;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  transition: all var(--t-normal);
  animation: slideUp 0.35s var(--ease-out) forwards;
  position: relative;
}

.cart-item:hover {
  border-color: var(--blue-300);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}

.cart-item-delete {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  background: #FEF2F2;
  border: 1px solid #FEE2E2;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #EF4444;
  cursor: pointer;
  transition: all var(--t-fast);
  z-index: 2;
}

.cart-item-delete:hover {
  background: #DC2626;
  color: white;
  border-color: #DC2626;
  transform: scale(1.08);
}

.cart-item-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 36px;
}

.cart-item-image {
  width: 84px;
  height: 84px;
  min-width: 84px;
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
  transition: transform var(--t-normal);
}

.cart-item:hover .cart-item-image img {
  transform: scale(1.03);
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cart-item-category {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
}

.cart-item-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.3;
  margin: 0;
}

.cart-unit-price {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Warranty Selector inside Cart */
.cart-warranty-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F8FAFC;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid #F1F5F9;
  flex-wrap: wrap;
}

.cart-warranty-label {
  font-size: 0.76rem;
  color: #475569;
  font-weight: 600;
}

.cart-warranty-options {
  display: inline-flex;
  gap: 6px;
  background: #E2E8F0;
  padding: 3px;
  border-radius: 100px;
}

.cart-warranty-dropdown-wrapper {
  position: relative;
  display: inline-block;
  flex: 1;
  min-width: 170px;
  max-width: 260px;
}

.cart-warranty-select-dropdown {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 36px;
  padding: 0 32px 0 10px;
  background-color: #FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232563EB' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 10px) center;
  background-size: 13px;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0F172A;
  cursor: pointer;
  transition: all var(--t-fast);
  box-sizing: border-box;
  line-height: 34px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.cart-warranty-select-dropdown:hover {
  border-color: #93C5FD;
}

.cart-warranty-select-dropdown:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cart-warranty-pill {
  padding: 4px 14px;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}

.cart-warranty-pill:hover {
  color: #0F172A;
}

.cart-warranty-pill.active {
  background: #FFFFFF;
  color: var(--blue-700);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Fixed Pre-Assigned Warranty Display for Non-Calculators */
.cart-warranty-fixed {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F8FAFC;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid #F1F5F9;
  flex-wrap: wrap;
}

.cart-warranty-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  color: #1D4ED8;
  border-radius: 100px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.cart-warranty-badge.no-warranty {
  background: #F1F5F9;
  border-color: #E2E8F0;
  color: #64748B;
}

/* Cart Item Footer (Total & Stepper) */
.cart-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed #E2E8F0;
}

.cart-item-total-box {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.cart-item-total-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.cart-item-total {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blue-700);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cart-qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0F172A;
  background: transparent;
  border: none;
  transition: background var(--t-fast);
  cursor: pointer;
}

.cart-qty-btn:hover {
  background: #E2E8F0;
  color: var(--blue-600);
}

.cart-qty-value {
  width: 34px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: #0F172A;
}

/* ── Empty Cart State ── */
.cart-empty {
  text-align: center;
  padding: var(--sp-20) var(--sp-6);
  background: #FFFFFF;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-2xl);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  grid-column: 1 / -1;
  max-width: 580px;
  margin: 0 auto;
}

.cart-empty-icon-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #EFF6FF;
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-6);
  box-shadow: 0 0 0 12px rgba(37, 99, 235, 0.06);
}

.cart-empty h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: var(--sp-2);
  color: #0F172A;
}

.cart-empty p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--sp-8);
}

/* ── Order Summary Sidebar ── */
.order-summary {
  position: sticky;
  top: calc(var(--nav-h) + var(--sp-4));
  background: #FFFFFF;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-2xl);
  padding: var(--sp-8) var(--sp-6);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08);
}

.order-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--glass-border);
}

.order-summary h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
}

.summary-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  background: #EFF6FF;
  color: var(--blue-700);
  border-radius: 100px;
}

/* Free Delivery Progress Card */
.delivery-progress-card {
  padding: var(--sp-4);
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-5);
  transition: all var(--t-normal);
}

.delivery-progress-card.unlocked {
  background: #ECFDF5;
  border-color: #A7F3D0;
}

.delivery-progress-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #92400E;
  margin-bottom: 10px;
  line-height: 1.4;
}

.delivery-progress-card.unlocked .delivery-progress-text {
  color: #065F46;
}

.delivery-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  overflow: hidden;
}

.delivery-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6 0%, #10B981 100%);
  border-radius: 100px;
  transition: width 0.4s var(--ease-out);
}

.delivery-progress-card.unlocked .delivery-progress-bar-fill {
  background: #10B981;
}

/* Promo section */
.promo-section {
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid #F1F5F9;
}

.promo-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
  font-weight: 600;
}

.promo-input-wrapper {
  display: flex;
  gap: 8px;
}

.promo-input {
  flex: 1;
  padding: 10px 14px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: var(--r-md);
  color: #0F172A;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all var(--t-fast);
}

.promo-input:focus {
  border-color: var(--blue-600);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.promo-input::placeholder {
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
}

.promo-apply-btn {
  padding: 10px 18px;
  background: var(--blue-gradient);
  color: white;
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}

.promo-apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.promo-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #ECFDF5;
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--r-md);
  margin-top: 8px;
  font-size: 0.78rem;
}

.promo-applied-code {
  color: #059669;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.promo-remove {
  background: none;
  border: none;
  color: #64748B;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all var(--t-fast);
}

.promo-remove:hover {
  color: #DC2626;
  background: #FEE2E2;
}

/* Summary Rows Breakdown */
.summary-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: var(--sp-6);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #0F172A;
}

.summary-row .summary-label {
  color: var(--text-secondary);
}

.summary-val.free-tag {
  color: #059669;
  font-weight: 700;
  background: #ECFDF5;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.8rem;
}

.summary-row.discount {
  color: #059669;
}

.summary-row.total {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #0F172A;
  padding-top: var(--sp-4);
  border-top: 2px solid #F1F5F9;
  margin-top: 6px;
}

.summary-total-price {
  color: var(--blue-700);
  font-size: 1.35rem;
}

/* Checkout button */
.checkout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: var(--blue-gradient);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: var(--r-lg);
  border: none;
  cursor: pointer;
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}

.checkout-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s ease;
}

.checkout-btn:hover::before {
  left: 100%;
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -4px rgba(37, 99, 235, 0.5);
}

/* Trust Badges */
.checkout-trust {
  display: flex;
  justify-content: space-around;
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid #F1F5F9;
}

.checkout-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
}

/* ── Checkout Modal ── */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-normal);
  padding: 24px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.checkout-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.checkout-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.checkout-modal-content {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  max-width: 600px;
  width: 100%;
  max-height: calc(100vh - 48px);
  margin: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: var(--sp-8);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s var(--ease-spring);
  z-index: 1;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.45);
  color: #0F172A;
}

.checkout-modal-content::-webkit-scrollbar {
  width: 6px;
}
.checkout-modal-content::-webkit-scrollbar-track {
  background: transparent;
}
.checkout-modal-content::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 10px;
}
.checkout-modal-content::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.checkout-modal.active .checkout-modal-content {
  transform: scale(1) translateY(0);
}

.checkout-modal-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 36px;
  height: 36px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--t-fast);
  z-index: 10;
}

.checkout-modal-close:hover {
  background: var(--error);
  border-color: var(--error);
  color: white;
}

.checkout-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--sp-6);
  text-align: center;
  color: #0F172A;
}

.checkout-title span {
  background: var(--blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Payment method selection */
.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.payment-method {
  padding: var(--sp-5);
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-normal);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.payment-method:hover {
  border-color: var(--blue-400);
}

.payment-method.selected {
  border-color: var(--blue-600);
  background: var(--blue-50);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.15);
}

.payment-method-icon {
  font-size: 2rem;
  margin-bottom: var(--sp-2);
}

.payment-method-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: #0F172A;
}

.payment-method-desc {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

/* Checkout form */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.checkout-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.checkout-form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.checkout-form-group label .optional {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.checkout-form-group input,
.checkout-form-group textarea {
  padding: var(--sp-3) var(--sp-4);
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: var(--r-sm);
  color: #0F172A;
  font-size: 0.9rem;
  transition: all var(--t-fast);
}

.checkout-form-group input:focus,
.checkout-form-group textarea:focus {
  border-color: var(--blue-600);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.checkout-form-group input::placeholder,
.checkout-form-group textarea::placeholder {
  color: var(--text-muted);
}

.checkout-form-group textarea {
  resize: vertical;
  min-height: 70px;
}

.checkout-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

/* Order review in checkout */
.checkout-order-review {
  background: var(--glass-bg-light);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.checkout-order-review h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: var(--sp-3);
}

.checkout-review-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  padding: var(--sp-1) 0;
  color: var(--text-secondary);
}

.checkout-review-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  padding-top: var(--sp-3);
  margin-top: var(--sp-2);
  border-top: 1px solid var(--glass-border);
}

.checkout-submit-btn {
  width: 100%;
  padding: var(--sp-4);
  background: var(--blue-gradient);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  border-radius: var(--r-md);
  margin-top: var(--sp-4);
  transition: all var(--t-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
}

.checkout-submit-btn:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #2563eb 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.45);
}

.checkout-submit-btn:active {
  transform: translateY(0);
}

/* Bank details info */
.bank-details-info {
  background: rgba(21,101,192,0.1);
  border: 1px solid rgba(21,101,192,0.2);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-top: var(--sp-4);
  font-size: 0.85rem;
  line-height: 1.6;
}

.bank-details-info h4 {
  font-size: 0.9rem;
  margin-bottom: var(--sp-2);
  color: var(--blue-400);
}

.bank-details-info p {
  color: var(--text-secondary);
}

/* ── Modern Desktop & Responsive Checkout Layout ── */
.checkout-modal-header {
  text-align: center;
  margin-bottom: 22px;
}

.checkout-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1D4ED8;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 8px;
}

.checkout-subtitle {
  font-size: 0.85rem;
  color: #64748B;
  margin: 0;
}

.checkout-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 12px;
}

.checkout-grid-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.checkout-review-items-scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.checkout-review-items-scroll::-webkit-scrollbar {
  width: 5px;
}
.checkout-review-items-scroll::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 10px;
}

.checkout-review-breakdown {
  margin-top: 12px;
  border-top: 1px dashed #E2E8F0;
  padding-top: 4px;
}

.checkout-trust-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #E2E8F0;
}

.checkout-trust-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 820px) {
  .checkout-modal-content {
    max-width: 880px !important;
    padding: 32px 36px !important;
    border-radius: 20px !important;
  }

  .checkout-grid-container {
    display: grid !important;
    grid-template-columns: 1.18fr 0.82fr !important;
    gap: 28px !important;
    align-items: start !important;
  }

  .checkout-grid-right {
    position: sticky !important;
    top: 0 !important;
  }

  .checkout-order-review {
    margin-bottom: 0 !important;
    background: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    padding: 20px !important;
  }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .cart-page {
    padding-top: calc(var(--nav-h) + 12px);
    padding-bottom: 90px;
  }

  .cart-header {
    padding: var(--sp-2) 0 var(--sp-4);
  }

  .cart-header h1 {
    font-size: 1.6rem;
    margin-bottom: 2px;
  }

  .cart-header p {
    font-size: 0.85rem;
  }

  .cart-layout {
    gap: var(--sp-4);
  }

  .cart-items-header {
    padding: 0 4px 8px;
    margin-bottom: 6px;
  }

  .cart-items-count {
    font-size: 0.95rem;
  }

  .cart-item {
    padding: 14px;
    border-radius: 16px;
    gap: 10px;
  }

  .cart-item-delete {
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
  }

  .cart-item-main {
    gap: 12px;
    padding-right: 32px;
  }

  .cart-item-image {
    width: 68px;
    height: 68px;
    min-width: 68px;
    padding: 4px;
    border-radius: 10px;
  }

  .cart-item-name {
    font-size: 0.92rem;
    line-height: 1.25;
  }

  .cart-item-category {
    font-size: 0.68rem;
  }

  .cart-unit-price {
    font-size: 0.76rem;
  }

  /* Cart Warranty Selector & Dropdown */
  .cart-warranty-selector {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 8px 10px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .cart-warranty-label {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
  }

  .cart-warranty-dropdown-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .cart-warranty-select-dropdown {
    width: 100% !important;
    height: 38px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    padding: 0 32px 0 10px !important;
    line-height: 36px !important;
    border: 1.5px solid #CBD5E1 !important;
    border-radius: 8px !important;
    background-color: #FFFFFF !important;
    background-position: calc(100% - 10px) center !important;
    background-size: 13px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  }

  .cart-warranty-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 100%;
    border-radius: 8px;
  }

  .cart-warranty-pill {
    padding: 6px 4px;
    font-size: 0.72rem;
    text-align: center;
    border-radius: 6px;
  }

  .cart-item-footer {
    padding-top: 8px;
  }

  .cart-item-total-label {
    font-size: 0.75rem;
  }

  .cart-item-total {
    font-size: 1.12rem;
  }

  .cart-qty-btn {
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
  }

  .cart-qty-value {
    width: 28px;
    font-size: 0.85rem;
  }

  .order-summary {
    padding: 18px 16px;
    border-radius: 18px;
    margin-top: 8px;
  }

  .order-summary h3 {
    font-size: 1.15rem;
  }

  .delivery-progress-card {
    padding: 10px 12px;
  }

  .delivery-progress-text {
    font-size: 0.78rem;
  }

  .checkout-btn {
    padding: 14px;
    font-size: 0.98rem;
  }

  .payment-methods {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  /* ── Checkout Modal Mobile Optimization (Native Bottom-Sheet & Prevent Auto-Zoom) ── */
  .checkout-modal {
    padding: 0 !important;
    align-items: flex-end !important;
    justify-content: center !important;
    overflow-y: hidden !important;
  }

  .checkout-modal-content {
    padding: 20px 16px max(28px, env(safe-area-inset-bottom, 28px)) !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh !important;
    max-height: 92dvh !important;
    border-radius: 22px 22px 0 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.3) !important;
    border-bottom: none !important;
  }

  .checkout-modal-content::before {
    content: '';
    display: block;
    width: 38px;
    height: 4px;
    background: #CBD5E1;
    border-radius: 99px;
    margin: 0 auto 12px;
  }

  .checkout-modal-close {
    top: 14px !important;
    right: 14px !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 1rem !important;
  }

  .checkout-title {
    font-size: 1.25rem !important;
    margin-bottom: 14px !important;
  }

  .payment-methods {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }

  .payment-method {
    padding: 10px 8px !important;
    border-radius: 12px !important;
  }

  .payment-method-icon {
    font-size: 1.5rem !important;
    margin-bottom: 2px !important;
  }

  .payment-method-name {
    font-size: 0.84rem !important;
  }

  .payment-method-desc {
    font-size: 0.68rem !important;
  }

  .checkout-order-review {
    padding: 12px 14px !important;
    border-radius: 12px !important;
    margin-bottom: 14px !important;
  }

  .checkout-order-review h4 {
    font-size: 0.85rem !important;
    margin-bottom: 8px !important;
  }

  .checkout-review-item {
    font-size: 0.82rem !important;
  }

  .checkout-review-total {
    font-size: 0.95rem !important;
    padding-top: 8px !important;
    margin-top: 6px !important;
  }

  .checkout-form {
    gap: 12px !important;
    width: 100% !important;
  }

  .checkout-form-group {
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 5px !important;
  }

  .checkout-form-group label {
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    color: #1E293B !important;
  }

  /* CRITICAL: 16px font-size prevents mobile Safari & Chrome from zooming in */
  .checkout-form-group input,
  .checkout-form-group textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    padding: 12px 14px !important;
    min-height: 48px !important;
    border-radius: 12px !important;
    border: 1.5px solid #CBD5E1 !important;
    background: #F8FAFC !important;
    color: #0F172A !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
  }

  .checkout-form-group textarea {
    min-height: 74px !important;
    resize: vertical !important;
  }

  .checkout-form-group input:focus,
  .checkout-form-group textarea:focus {
    background: #FFFFFF !important;
    border-color: #2563EB !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
    outline: none !important;
  }

  .checkout-form-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .checkout-submit-btn {
    padding: 14px 20px !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    border-radius: 14px !important;
    min-height: 50px !important;
    margin-top: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35) !important;
  }
}

@media (max-width: 360px) {
  .checkout-modal-content {
    padding: 16px 12px max(24px, env(safe-area-inset-bottom, 24px)) !important;
  }

  .payment-methods {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .checkout-form-group input,
  .checkout-form-group textarea {
    padding: 10px 12px !important;
    font-size: 16px !important; /* Stays 16px on extra small screens too to avoid zoom */
  }

  .cart-warranty-select-dropdown {
    font-size: 0.74rem !important;
  }
}

/* =============================================
   ORDER PROCESSING CIRCULAR ANIMATION STYLES
   ============================================= */

/* ── Processing Container ── */
.op-processing-container {
  text-align: center;
  padding: var(--sp-8) var(--sp-6);
  animation: op-slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.op-processing-container.op-fade-out {
  animation: op-fadeOut 0.35s ease-in forwards;
}

@keyframes op-slideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes op-fadeOut {
  to {
    opacity: 0;
    transform: scale(0.95) translateY(-15px);
  }
}

/* ── Circular Loader Wrap ── */
.op-circular-loader-wrap {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ambient Radial Glow Aura */
.op-circular-aura {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, rgba(139, 92, 246, 0.12) 50%, transparent 75%);
  animation: op-aura-pulse 2s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Outer Gradient Rotating Ring */
.op-spinner-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3.5px solid rgba(226, 232, 240, 0.55);
  border-top-color: #2563eb;
  border-right-color: #7c3aed;
  box-shadow: 0 0 24px rgba(37, 99, 235, 0.22);
  animation: op-spin-clockwise 1.1s cubic-bezier(0.45, 0.05, 0.25, 0.95) infinite;
}

/* Inner Pulsing / Counter-rotating Ring */
.op-spinner-ring-inner {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 2px dashed rgba(59, 130, 246, 0.35);
  border-bottom-color: #10b981;
  animation: op-spin-counter 2s linear infinite;
}

/* Center Icon Badge */
.op-spinner-center {
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  animation: op-center-float 2s ease-in-out infinite alternate;
}

.op-cart-svg {
  animation: op-cart-pulse 2s ease-in-out infinite;
}

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

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

@keyframes op-aura-pulse {
  0% { transform: scale(0.92); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

@keyframes op-center-float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-3px) scale(1.04); }
}

@keyframes op-cart-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ── Title & Subtitle ── */
.op-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 var(--sp-2) 0;
  letter-spacing: -0.02em;
}

.op-subtitle {
  font-size: 0.9rem;
  color: #64748B;
  margin: 0 0 var(--sp-6) 0;
  line-height: 1.5;
}

/* ── 3 Pulsing Animated Dots ── */
.op-dots-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
}

.op-dots-loader span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  animation: op-dot-bounce 1.3s ease-in-out infinite;
}

.op-dots-loader span:nth-child(2) {
  animation-delay: 0.2s;
}

.op-dots-loader span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes op-dot-bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
  }
}

/* ── Responsive adjustments ── */
@media (max-width: 768px) {
  .op-processing-container {
    padding: var(--sp-6) var(--sp-4);
  }
  .op-circular-loader-wrap {
    width: 88px;
    height: 88px;
    margin-bottom: var(--sp-5);
  }
  .op-spinner-center {
    width: 44px;
    height: 44px;
  }
  .op-cart-svg {
    width: 26px;
    height: 26px;
  }
  .op-title {
    font-size: 1.2rem;
  }
  .op-subtitle {
    font-size: 0.82rem;
  }
}

/* =============================================
   ORDER SUCCESS SCREEN STYLES
   ============================================= */

/* ── Animated Checkmark ── */
.os-checkmark-ring {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--sp-5);
}

.os-checkmark-svg {
  width: 72px;
  height: 72px;
}

.os-checkmark-circle {
  stroke: #10b981;
  stroke-width: 2;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: os-circle-draw 0.6s 0.15s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.os-checkmark-path {
  stroke: #10b981;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: os-check-draw 0.35s 0.65s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes os-circle-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes os-check-draw {
  to { stroke-dashoffset: 0; }
}

/* ── Success Container ── */
.os-success-container {
  text-align: center;
  animation: os-fadeUp 0.5s ease-out;
}

@keyframes os-fadeUp {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(24px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ── Title & Subtitle ── */
.os-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 var(--sp-2) 0;
}

.os-subtitle {
  font-size: 0.88rem;
  color: #64748B;
  margin: 0 0 var(--sp-5) 0;
  line-height: 1.5;
}

/* ── Order ID Badge ── */
.os-order-id-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 1.5px solid #93C5FD;
  border-radius: 50px;
  padding: var(--sp-2) var(--sp-5);
  margin-bottom: var(--sp-6);
}

.os-order-id-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #3B82F6;
}

.os-order-id-value {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.92rem;
  font-weight: 800;
  color: #1E40AF;
  letter-spacing: 0.03em;
}

/* ── Details Card ── */
.os-details-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--r-md);
  padding: var(--sp-5);
  margin-bottom: var(--sp-6);
  text-align: left;
}

.os-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748B;
  margin-bottom: var(--sp-3);
}

/* ── Item List ── */
.os-items-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.os-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: #FFFFFF;
  border: 1px solid #F1F5F9;
  border-radius: var(--r-sm);
}

.os-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.os-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.os-item-warranty {
  font-size: 0.72rem;
  color: #3B82F6;
  font-weight: 600;
}

.os-item-qty {
  font-size: 0.82rem;
  color: #94A3B8;
  font-weight: 600;
  white-space: nowrap;
}

.os-item-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
}

/* ── Divider ── */
.os-divider {
  height: 1px;
  background: #E2E8F0;
  margin: var(--sp-4) 0;
}

/* ── Summary Rows ── */
.os-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #475569;
  padding: var(--sp-1) 0;
}

.os-free-delivery span:last-child {
  color: #10B981;
  font-weight: 700;
}

.os-promo-row span:last-child {
  color: #10B981;
  font-weight: 700;
}

/* ── Total Row ── */
.os-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
  padding: var(--sp-2) 0 0;
}

.os-total-row span:last-child {
  background: var(--blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.25rem;
}

/* ── Action Buttons ── */
.os-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.os-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.os-btn-continue {
  background: #F1F5F9;
  color: #475569;
  border: 1.5px solid #E2E8F0;
}

.os-btn-continue:hover {
  background: #E2E8F0;
  color: #0F172A;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.os-btn-whatsapp {
  background: #25D366;
  color: #FFFFFF;
  box-shadow: 0 2px 12px rgba(37, 211, 102, 0.3);
}

.os-btn-whatsapp:hover {
  background: #1ebe57;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
}

.os-btn-whatsapp svg {
  flex-shrink: 0;
}

/* ── Responsive: Order Success ── */
@media (max-width: 768px) {
  .os-title {
    font-size: 1.25rem;
  }

  .os-subtitle {
    font-size: 0.82rem;
  }

  .os-checkmark-ring,
  .os-checkmark-svg {
    width: 60px;
    height: 60px;
  }

  .os-order-id-badge {
    padding: 6px 14px;
    gap: 8px;
  }

  .os-order-id-value {
    font-size: 0.82rem;
  }

  .os-details-card {
    padding: 14px;
  }

  .os-item {
    grid-template-columns: 1fr auto;
    gap: 6px;
  }

  .os-item-qty {
    display: none;
  }

  .os-item-name {
    font-size: 0.82rem;
  }

  .os-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .os-btn {
    padding: 13px 16px;
    font-size: 0.88rem;
  }

  .os-total-row {
    font-size: 1.05rem;
  }

  .os-total-row span:last-child {
    font-size: 1.12rem;
  }
}

@media (max-width: 360px) {
  .os-title {
    font-size: 1.1rem;
  }

  .os-order-id-badge {
    flex-direction: column;
    gap: 2px;
    padding: 8px 14px;
  }

  .os-details-card {
    padding: 10px;
  }

  .os-item {
    padding: 8px;
  }
}
