/* =========================================================
   cart.css — Cart & Checkout page styles
   ========================================================= */

/* ---------------------------------------------------------
   Page Hero (reused for both pages)
   --------------------------------------------------------- */
.ec-page-hero {
  background: linear-gradient(135deg, var(--ec-primary) 0%, #2563eb 100%);
  padding: clamp(1.75rem, 4vw, 3rem) 0;
  color: #fff;
}
.ec-page-hero h1 { font-size: clamp(1.375rem, 3.5vw, 2rem); font-weight: 800; margin: 0; }
.ec-page-hero .ec-breadcrumb { padding: 0; margin-top: .375rem; }
.ec-page-hero .breadcrumb-item,
.ec-page-hero .breadcrumb-item a { color: rgba(255,255,255,.8); }
.ec-page-hero .breadcrumb-item.active { color: #fff; }
.ec-page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }

/* ---------------------------------------------------------
   CART PAGE
   --------------------------------------------------------- */

/* Cart table (desktop) */
.ec-cart-table { width: 100%; border-collapse: collapse; }
.ec-cart-table thead th {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ec-muted);
  padding: .75rem 1rem;
  border-bottom: 2px solid var(--ec-border);
  background: var(--ec-bg);
}
.ec-cart-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--ec-border);
  vertical-align: middle;
}

/* Product cell */
.ec-cart-product { display: flex; align-items: center; gap: 1rem; }
.ec-cart-img {
  width: 80px; height: 80px;
  border-radius: var(--ec-radius-sm);
  object-fit: cover;
  border: 1px solid var(--ec-border);
  flex-shrink: 0;
}
.ec-cart-product-name { font-weight: 600; font-size: .9375rem; color: var(--ec-dark); }
.ec-cart-product-name a { color: inherit; }
.ec-cart-product-name a:hover { color: var(--ec-primary); }
.ec-cart-product-meta { font-size: .8rem; color: var(--ec-muted); margin-top: .2rem; }

/* Remove button */
.ec-cart-remove {
  background: none; border: none; color: var(--ec-muted);
  cursor: pointer; font-size: 1.125rem; padding: .25rem;
  transition: color var(--ec-transition);
  display: inline-flex; align-items: center; justify-content: center;
}
.ec-cart-remove:hover { color: var(--ec-danger); }

/* Mobile cart cards */
@media (max-width: 767.98px) {
  .ec-cart-table thead { display: none; }
  .ec-cart-table, .ec-cart-table tbody, .ec-cart-table tr, .ec-cart-table td { display: block; width: 100%; }
  .ec-cart-table tr {
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    margin-bottom: 1rem;
    padding: .875rem;
    background: var(--ec-white);
  }
  .ec-cart-table td { border: none; padding: .35rem 0; }
  .ec-cart-table td::before {
    content: attr(data-label);
    font-weight: 700; font-size: .78rem;
    text-transform: uppercase; letter-spacing: .05em;
    color: var(--ec-muted);
    display: block; margin-bottom: .25rem;
  }
  .ec-cart-table td:first-child::before { display: none; }
  .ec-cart-img { width: 72px; height: 72px; }
}

/* Qty stepper (cart page) */
.ec-qty-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--ec-border);
  border-radius: var(--ec-radius-sm);
  overflow: hidden;
  width: fit-content;
}
.ec-qty-stepper button {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--ec-bg);
  color: var(--ec-dark);
  font-size: 1.125rem;
  cursor: pointer;
  transition: background var(--ec-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ec-qty-stepper button:hover { background: var(--ec-primary-light); color: var(--ec-primary); }
.ec-qty-stepper input {
  width: 48px;
  height: 40px;
  border: none;
  border-left: 1px solid var(--ec-border);
  border-right: 1px solid var(--ec-border);
  text-align: center;
  font-weight: 700;
  font-size: .9375rem;
  outline: none;
  background: var(--ec-white);
  color: var(--ec-dark);
}
.ec-qty-stepper input::-webkit-inner-spin-button,
.ec-qty-stepper input::-webkit-outer-spin-button { display: none; }
.ec-qty-stepper input[type=number] { -moz-appearance: textfield; }

/* Coupon form */
.ec-coupon-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.ec-coupon-form .form-control { flex: 1 1 180px; }

/* Empty cart state */
.ec-empty-cart {
  text-align: center;
  padding: 4rem 1rem;
}
.ec-empty-cart i { font-size: 5rem; color: var(--ec-border); display: block; margin-bottom: 1.25rem; }
.ec-empty-cart h3 { font-size: 1.25rem; font-weight: 700; color: var(--ec-dark); margin-bottom: .5rem; }
.ec-empty-cart p { color: var(--ec-muted); margin-bottom: 1.5rem; }

/* Order summary card */
.ec-order-summary {
  background: var(--ec-bg);
  border: 1px solid var(--ec-border);
  border-radius: var(--ec-radius);
  padding: 1.5rem;
}
.ec-order-summary h5 {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ec-dark);
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--ec-border);
}
.ec-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .5rem 0; font-size: .9rem;
}
.ec-summary-row.total {
  border-top: 2px solid var(--ec-border);
  margin-top: .5rem;
  padding-top: 1rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ec-dark);
}
.ec-summary-row.discount { color: var(--ec-accent); }
.ec-summary-label { color: var(--ec-body); }
.ec-summary-value { font-weight: 600; }

.ec-secure-note { font-size: .78rem; color: var(--ec-muted); text-align: center; margin-top: .75rem; }

/* ---------------------------------------------------------
   CHECKOUT PAGE
   --------------------------------------------------------- */

/* Step progress indicator */
.ec-checkout-steps {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ec-checkout-steps::-webkit-scrollbar { display: none; }

.ec-step {
  display: flex; align-items: center; gap: .5rem;
  flex-shrink: 0;
  padding: 1.25rem 0;
}
.ec-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--ec-border);
  background: var(--ec-white);
  color: var(--ec-muted);
  font-size: .8125rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--ec-transition);
}
.ec-step-label { font-size: .8rem; font-weight: 600; color: var(--ec-muted); white-space: nowrap; }
.ec-step-divider {
  flex: 1; min-width: 24px;
  height: 2px; background: var(--ec-border);
  margin: 0 .375rem;
}

.ec-step.active .ec-step-num { background: var(--ec-primary); border-color: var(--ec-primary); color: #fff; }
.ec-step.active .ec-step-label { color: var(--ec-primary); }
.ec-step.done .ec-step-num { background: var(--ec-accent); border-color: var(--ec-accent); color: #fff; }
.ec-step.done .ec-step-label { color: var(--ec-accent); }
.ec-step-divider.done { background: var(--ec-accent); }

/* Checkout sections */
.ec-checkout-section {
  background: var(--ec-white);
  border: 1px solid var(--ec-border);
  border-radius: var(--ec-radius);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.ec-checkout-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.125rem 1.5rem;
  background: var(--ec-bg);
  border-bottom: 1px solid var(--ec-border);
}
.ec-checkout-section-header h6 {
  font-weight: 700; font-size: 1rem;
  margin: 0; display: flex; align-items: center; gap: .625rem;
}
.ec-checkout-section-header h6 i { color: var(--ec-primary); font-size: 1.125rem; }
.ec-checkout-section-body { padding: 1.5rem; }

/* Shipping method radio cards */
.ec-shipping-card {
  border: 2px solid var(--ec-border);
  border-radius: var(--ec-radius);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: border-color var(--ec-transition), background var(--ec-transition);
  display: flex; align-items: center; gap: 1rem;
}
.ec-shipping-card:hover { border-color: var(--ec-primary); }
.ec-shipping-card.selected { border-color: var(--ec-primary); background: var(--ec-primary-light); }
.ec-shipping-card input[type=radio] { accent-color: var(--ec-primary); width: 18px; height: 18px; flex-shrink: 0; }
.ec-shipping-card-info { flex: 1; }
.ec-shipping-card-name { font-weight: 700; color: var(--ec-dark); font-size: .9375rem; }
.ec-shipping-card-desc { font-size: .8rem; color: var(--ec-muted); }
.ec-shipping-card-price { font-weight: 700; color: var(--ec-dark); white-space: nowrap; }
.ec-shipping-card-price.free { color: var(--ec-accent); }

/* Payment method tabs */
.ec-payment-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.ec-payment-tab {
  border: 2px solid var(--ec-border);
  border-radius: var(--ec-radius-sm);
  padding: .625rem 1rem;
  font-size: .875rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: .5rem;
  transition: all var(--ec-transition);
  background: none; color: var(--ec-body);
  min-height: 44px;
}
.ec-payment-tab:hover { border-color: var(--ec-primary); color: var(--ec-primary); }
.ec-payment-tab.active { border-color: var(--ec-primary); background: var(--ec-primary-light); color: var(--ec-primary); }

/* Card input fake styling */
.ec-card-input-group { position: relative; }
.ec-card-input-group .form-control { padding-right: 3rem; }
.ec-card-input-icon {
  position: absolute; right: .875rem; top: 50%; transform: translateY(-50%);
  color: var(--ec-muted); font-size: 1.125rem; pointer-events: none;
}

/* Order review item */
.ec-review-item {
  display: flex; align-items: center; gap: 1rem;
  padding: .875rem 0; border-bottom: 1px solid var(--ec-border);
}
.ec-review-item:last-child { border-bottom: none; }
.ec-review-item img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--ec-radius-sm); border: 1px solid var(--ec-border); flex-shrink: 0; }
.ec-review-item-name { font-weight: 600; font-size: .9rem; color: var(--ec-dark); }
.ec-review-item-meta { font-size: .8rem; color: var(--ec-muted); }
.ec-review-item-price { font-weight: 700; color: var(--ec-dark); margin-left: auto; white-space: nowrap; }

/* Checkout summary sidebar */
.ec-checkout-summary {
  background: var(--ec-bg);
  border: 1px solid var(--ec-border);
  border-radius: var(--ec-radius);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--ec-total-header-h) + 1rem);
}
.ec-checkout-summary h5 { font-weight: 700; margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--ec-border); }

/* Form helpers */
.ec-form-label { font-size: .875rem; font-weight: 600; color: var(--ec-dark); margin-bottom: .375rem; }
.ec-field-group { margin-bottom: 1rem; }

/* Place order button */
.ec-place-order-btn { min-height: 56px; font-size: 1.0625rem; font-weight: 700; }
