/* ============================================
   CART PAGE
   ============================================ */

.cart-page {
  padding: var(--space-8) 0 var(--space-16);
}

.cart-page__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-6);
  align-items: start;
}

/* Cart Items */
.cart-items {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cart-items__header {
  display: grid;
  grid-template-columns: 1fr 100px 120px 80px 40px;
  padding: var(--space-3) var(--space-5);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr 100px 120px 80px 40px;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-light);
  gap: var(--space-4);
}

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

.cart-item:hover { background: var(--color-bg); }

.cart-item__product {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.cart-item__image {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-bg);
}

.cart-item__info {}

.cart-item__name {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
  text-decoration: none;
}

.cart-item__name:hover { color: var(--color-primary); }

.cart-item__variant {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.cart-item__sku {
  font-size: var(--text-xs);
  color: var(--color-text-light);
}

.cart-item__price {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}

/* Quantity Selector */
.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 36px;
}

.qty-selector__btn {
  width: 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color var(--ease-fast), background var(--ease-fast);
}

.qty-selector__btn:hover {
  background: var(--color-border-light);
  color: var(--color-text);
}

.qty-selector__input {
  width: 44px;
  height: 100%;
  padding: 0;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  text-align: center;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface);
  outline: none;
}

.cart-item__total {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  text-align: right;
}

.cart-item__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.cart-item__remove-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-text-light);
  border-radius: var(--radius-md);
  transition: color var(--ease-fast), background var(--ease-fast);
}

.cart-item__remove-btn:hover {
  color: var(--color-danger);
  background: #fef2f2;
}

/* Cart Empty State */
.cart-empty {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}

.cart-empty__icon {
  width: 64px;
  height: 64px;
  color: var(--color-border);
  margin: 0 auto var(--space-4);
}

.cart-empty__title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.cart-empty__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* Cart Summary */
.cart-summary {
  position: sticky;
  top: 72px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cart-summary__header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
}

.cart-summary__body { padding: var(--space-5); }

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  font-size: var(--text-base);
  color: var(--color-text);
}

.cart-summary__row--muted { color: var(--color-text-muted); }

.cart-summary__row--total {
  font-size: var(--text-lg);
  font-weight: 700;
  padding-top: var(--space-4);
  margin-top: var(--space-2);
  border-top: 2px solid var(--color-border-light);
  margin-bottom: var(--space-5);
}

.cart-summary__row--discount { color: var(--color-success); }

/* ============================================
   MINI CART (Drawer)
   ============================================ */

.mini-cart-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mini-cart-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border-light);
}

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

.mini-cart-item__image {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg);
}

.mini-cart-item__info {
  flex: 1;
  min-width: 0;
}

.mini-cart-item__name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: var(--space-1);
}

.mini-cart-item__name:hover { color: var(--color-primary); }

.mini-cart-item__variant {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.mini-cart-item__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.mini-cart-item__qty {
  color: var(--color-text-muted);
  min-width: 16px;
  text-align: center;
}

.mini-cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mini-cart-qty-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--color-text);
  transition: background var(--ease-fast);
  flex-shrink: 0;
}

.mini-cart-qty-btn:hover:not(:disabled) { background: var(--color-gray-100); }
.mini-cart-qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.mini-cart-item__price {
  font-weight: 600;
  color: var(--color-text);
}

.mini-cart-item__remove {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-light);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  margin-top: var(--space-1);
  transition: color var(--ease-fast), background var(--ease-fast);
}

.mini-cart-item__remove:hover {
  color: var(--color-danger);
  background: #fef2f2;
}

.mini-cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) 0 var(--space-2);
  border-top: 1px solid var(--color-border-light);
  margin-top: var(--space-2);
}

.mini-cart-subtotal__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.mini-cart-subtotal__amount {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
}

/* ============================================
   COUPON FORM
   ============================================ */

.coupon-form {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.coupon-form input,
.coupon-form__input {
  flex: 1;
  height: 38px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-bg);
  outline: none;
  transition: border-color var(--ease-fast);
}

.coupon-form input:focus,
.coupon-form__input:focus { border-color: var(--color-primary); }

.coupon-form input::placeholder,
.coupon-form__input::placeholder { color: var(--color-text-light); }

.coupon-form__btn {
  height: 38px;
  padding: 0 var(--space-3);
  background: var(--color-text);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--ease-fast);
}

.coupon-form__btn:hover { background: var(--color-gray-700); }

.coupon-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  background: #ecfdf5;
  color: var(--color-success);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.coupon-badge button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-success);
  display: flex;
  align-items: center;
  padding: 0;
  margin-left: var(--space-1);
}

/* ============================================
   CHECKOUT LAYOUT
   ============================================ */

.checkout-wrap {
  min-height: calc(100vh - 56px);
  background: var(--color-bg);
  padding: var(--space-8) 0 var(--space-16);
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-8);
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

/* Checkout Steps */
.checkout-steps {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-8);
}

.checkout-step {
  display: flex;
  align-items: center;
  flex: 1;
}

.checkout-step:last-child { flex: 0; }

.checkout-step__indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  background: var(--color-surface);
  flex-shrink: 0;
  transition: all var(--ease-base);
}

.checkout-step--active .checkout-step__indicator {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.checkout-step--done .checkout-step__indicator {
  border-color: var(--color-success);
  background: var(--color-success);
  color: #fff;
}

.checkout-step__label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  margin-left: var(--space-2);
  white-space: nowrap;
}

.checkout-step--active .checkout-step__label { color: var(--color-text); font-weight: 600; }
.checkout-step--done .checkout-step__label { color: var(--color-success); }

.checkout-step__line {
  flex: 1;
  height: 2px;
  background: var(--color-border-light);
  margin: 0 var(--space-3);
}

.checkout-step__line--done { background: var(--color-success); }

/* Checkout Form Section */
.checkout-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.checkout-section__header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row--full { grid-template-columns: 1fr; }

.form-group { margin-bottom: var(--space-4); }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.form-label span.required { color: var(--color-danger); margin-left: 2px; }

.form-control {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  outline: none;
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
  appearance: none;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-control::placeholder { color: var(--color-text-light); }
.form-control.is-invalid { border-color: var(--color-danger); }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-danger);
  margin-top: var(--space-1);
}

/* Shipping Methods */
.shipping-method {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-bottom: var(--space-3);
  transition: border-color var(--ease-fast), background var(--ease-fast);
}

.shipping-method:last-child { margin-bottom: 0; }

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

.shipping-method input[type="radio"] { display: none; }

.shipping-method--selected {
  border-color: var(--color-primary);
  background: rgba(26, 86, 219, 0.03);
}

.shipping-method__radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--ease-fast);
}

.shipping-method--selected .shipping-method__radio {
  border-color: var(--color-primary);
}

.shipping-method--selected .shipping-method__radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
}

.shipping-method__icon {
  width: 36px;
  height: 36px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.shipping-method__info { flex: 1; }

.shipping-method__name {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 2px;
}

.shipping-method__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.shipping-method__price {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
}

.shipping-method__price--free { color: var(--color-success); }

/* Payment Methods */
.payment-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  overflow-x: auto;
}

.payment-tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: all var(--ease-fast);
  background: var(--color-surface);
}

.payment-tab:hover { border-color: var(--color-primary); color: var(--color-primary); }

.payment-tab--active {
  border-color: var(--color-primary);
  background: rgba(26, 86, 219, 0.05);
  color: var(--color-primary);
}

.card-input-wrap { position: relative; }

.card-input-wrap .card-icons {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
}

.card-icon {
  width: 32px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid var(--color-border-light);
  object-fit: contain;
  background: #fff;
}

/* Checkout Order Summary */
.checkout-summary {
  position: sticky;
  top: 72px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.checkout-summary__toggle {
  display: none;
}

.checkout-summary__header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
}

.checkout-summary__items {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-light);
  max-height: 300px;
  overflow-y: auto;
}

.checkout-summary-item {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-3);
}

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

.checkout-summary-item__image {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-light);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-bg);
  position: relative;
}

.checkout-summary-item__qty {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  background: var(--color-text);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-summary-item__name {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

.checkout-summary-item__variant {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.checkout-summary-item__price {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.checkout-summary__totals { padding: var(--space-4) var(--space-5); }

.checkout-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.checkout-summary__row--muted { color: var(--color-text-muted); }

.checkout-summary__row--total {
  font-size: var(--text-md);
  font-weight: 700;
  padding-top: var(--space-3);
  margin-top: var(--space-1);
  border-top: 2px solid var(--color-border-light);
  margin-bottom: 0;
}

/* Order Review */
.review-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  overflow: hidden;
}

.review-section__header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-section__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.review-section__edit {
  font-size: var(--text-sm);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.review-section__edit:hover { text-decoration: underline; }

.review-section__body {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.7;
}

.review-section__body p { margin: 0; }

.review-section__totals {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  line-height: 1.4;
}

.review-section__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
}

.review-section__row--total {
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-gray-200);
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
}

.review-section__row--success {
  color: var(--color-success);
}

/* Order Confirmation */
.order-confirmation {
  max-width: 600px;
  margin: var(--space-16) auto;
  text-align: center;
  padding: 0 var(--space-5);
}

.order-confirmation__icon {
  width: 72px;
  height: 72px;
  background: #ecfdf5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  color: var(--color-success);
  animation: scaleIn var(--ease-slow) both;
}

.order-confirmation__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.order-confirmation__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.order-confirmation__number {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.order-confirmation__number strong {
  color: var(--color-text);
  font-weight: 600;
}

.order-confirmation__details {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: left;
  margin-bottom: var(--space-6);
}

.order-confirmation__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .checkout-layout {
    grid-template-columns: 1fr 300px;
  }
}

@media (max-width: 768px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-items__header { display: none; }

  .cart-item {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .cart-item__product { grid-column: 1 / -1; }
  .cart-item__price { display: none; }

  .checkout-layout {
    grid-template-columns: 1fr;
  }

  /* Sidebar summary hidden on mobile — it lives in the sticky footer instead */
  .checkout-layout .checkout-summary {
    display: none;
  }

  /* Summary inside sticky footer */
  .checkout-sticky-footer .checkout-summary {
    display: block;
    position: static;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    border-bottom: 1px solid var(--color-border-light);
  }

  .checkout-sticky-footer .checkout-summary__header { display: none; }

  .checkout-sticky-footer .checkout-summary__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
  }

  .checkout-sticky-footer .checkout-summary__body {
    display: none;
    max-height: calc(60vh);
    overflow-y: auto;
    background: var(--color-surface);
  }
  .checkout-sticky-footer .checkout-summary__body--open { display: block; }

  .form-row { grid-template-columns: 1fr; }
  .form-row--3 { grid-template-columns: 1fr; }

  .checkout-steps {
    overflow-x: auto;
    padding-bottom: var(--space-2);
  }

  .checkout-step__label { display: none; }
}

@media (max-width: 480px) {
  .order-confirmation__actions {
    flex-direction: column;
  }
}

/* ============================================
   RESPONSIVE POLISH (Phase 21)
   ============================================ */

.checkout-section__title {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-light);
  margin: 0;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
}

.checkout-section__body {
  padding: var(--space-5);
}

.checkout-section__body .form-row .form-group {
  margin-bottom: 0;
}

.checkout-section__body .form-row:last-child {
  margin-bottom: 0;
}

.shipping-method__content {
  display: flex;
  flex: 1;
  min-width: 0;
}

.shipping-method__description {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

.checkout-steps {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-2);
}

.checkout-steps__step {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.checkout-steps__number {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  background: var(--color-surface);
}

.checkout-steps__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 500;
}

.checkout-steps__line {
  flex: 1;
  min-width: 32px;
  height: 2px;
  background: var(--color-border-light);
}

.checkout-steps__step.is-active .checkout-steps__number,
.checkout-steps__step.is-current .checkout-steps__number {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.checkout-steps__line.is-completed,
.checkout-steps__step.is-completed .checkout-steps__number {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.checkout-steps__step.is-active .checkout-steps__label,
.checkout-steps__step.is-current .checkout-steps__label,
.checkout-steps__step.is-completed .checkout-steps__label {
  color: var(--color-text);
}

.cart-page__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.cart-page__back-link,
.cart-page__clear-btn {
  min-height: 44px;
}

.checkout-page-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.checkout-page-actions > * {
  min-height: 44px;
}

.cart-item__image img,
.mini-cart-item__image img,
.checkout-summary-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 140px;
}

@media (max-width: 768px) {
  .cart-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .cart-item__price {
    display: none;
  }

  .cart-item__quantity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }

  .cart-item__total {
    text-align: left;
    font-size: var(--text-md);
  }

  .cart-item__remove {
    margin-left: 0;
    justify-content: flex-end;
  }

  .cart-page__actions form,
  .checkout-page-actions a,
  .checkout-page-actions button {
    width: 100%;
  }

  .cart-page__actions .cart-page__clear-btn,
  .checkout-page-actions button {
    justify-content: center;
  }

  .checkout-steps {
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
  }

  .checkout-steps__label {
    display: none;
  }

  .checkout-layout .checkout-summary {
    display: none;
  }

  .checkout-section__body {
    padding: var(--space-4);
  }

  .review-section__content > div[style*="display:flex;justify-content:space-between"] {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .checkout-steps__number {
    width: 26px;
    height: 26px;
  }

  .checkout-summary__header,
  .checkout-summary__toggle {
    padding-inline: var(--space-4);
  }

  .checkout-section__body {
    padding: var(--space-3);
  }
}

/* Checkout sticky footer (mobile) */
.checkout-sticky-footer {
  display: none;
}

@media (max-width: 768px) {
  .checkout-sticky-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  }

  .checkout-sticky-footer__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
  }

  .checkout-sticky-footer__back {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-decoration: none;
    white-space: nowrap;
  }

  .checkout-sticky-footer__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
  }

  .checkout-page-actions {
    display: none;
  }

  .checkout-wrap {
    padding-bottom: 90px;
  }
}

/* Cart sticky footer (mobile) */
.cart-sticky-footer {
  display: none;
}

@media (max-width: 768px) {
  .cart-sticky-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
    padding: var(--space-3) var(--space-4);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  }

  .cart-sticky-footer__total {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
  }

  .cart-sticky-footer__total strong {
    font-size: var(--text-md);
    color: var(--color-text);
    font-weight: 600;
  }

  .cart-sticky-footer__btn {
    flex-shrink: 0;
  }

  .cart-page {
    padding-bottom: 80px;
  }
}
