/* ================================================================
   NUTRIDIDI - PREMIUM CART & CHECKOUT CSS
   ================================================================ */

/* ── Hide mini-cart on checkout page ─────────────────────────── */
.woocommerce-checkout .cart-sidebar,
.woocommerce-checkout #cart-sidebar,
.woocommerce-checkout .mini-cart-sidebar,
.woocommerce-checkout .nd-cart-sidebar,
.woocommerce-checkout .cart-drawer { display: none !important; }

/* ── Hide existing theme checkout steps on our checkout ─────── */
.woocommerce-checkout .woocommerce-checkout-progress-bar,
.woocommerce-checkout .checkout-steps,
.woocommerce-checkout .wc-progress-steps { display: none !important; }

/* ── PROGRESS BAR ────────────────────────────────────────────── */
.nd-progress-bar {
  background: white;
  border-bottom: 1px solid #f0f0f0;
  padding: 1.25rem 0;
  margin-bottom: 2rem;
}
.nd-progress-inner {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}
.nd-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.nd-step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #dee2e6;
  color: #adb5bd;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.nd-step span {
  font-size: 0.65rem; font-weight: 600;
  color: #adb5bd; text-transform: uppercase;
  letter-spacing: 0.05em; white-space: nowrap;
}
.nd-step.done .nd-step-circle  { background: #2D6A4F; color: #fff; }
.nd-step.done span             { color: #2D6A4F; }
.nd-step.active .nd-step-circle {
  background: #2D6A4F; color: #fff;
  box-shadow: 0 4px 14px rgba(45,106,79,.4);
}
.nd-step.active span { color: #2D6A4F; }
.nd-step-line {
  flex: 1; height: 2px; background: #dee2e6;
  min-width: 30px; max-width: 70px;
  margin: 0 4px; margin-bottom: 1.5rem;
  transition: background 0.3s;
}
.nd-step-line.done { background: #2D6A4F; }

/* ── TRUST STRIP ─────────────────────────────────────────────── */
.nd-trust-strip {
  background: linear-gradient(135deg, #1B4332, #2D6A4F);
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 0.4rem 1.5rem;
  padding: 0.8rem 1.25rem; border-radius: 1rem;
  margin-bottom: 2rem;
}
.nd-trust-item {
  display: flex; align-items: center; gap: 0.35rem;
  color: rgba(255,255,255,.92); font-size: 0.78rem; font-weight: 500;
}

/* ── PAGE WRAPPERS ───────────────────────────────────────────── */
.nd-cart-wrap, .nd-checkout-wrap {
  max-width: 1100px; margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ── LAYOUTS ─────────────────────────────────────────────────── */
.nd-cart-layout, .nd-checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem; align-items: start;
}

/* ── CART LEFT ───────────────────────────────────────────────── */
.nd-cart-header-row {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 1.25rem;
}
.nd-cart-title {
  font-size: 1.4rem; font-weight: 700;
  color: #1B4332; display: flex; align-items: center; gap: 0.5rem;
}
.nd-cart-count {
  background: #2D6A4F; color: #fff;
  font-size: 0.72rem; font-weight: 700;
  padding: 0.2rem 0.6rem; border-radius: 50px;
}
.nd-continue-link {
  font-size: 0.82rem; color: #2D6A4F; font-weight: 600;
  text-decoration: none; transition: color 0.2s;
}
.nd-continue-link:hover { color: #1B4332; }

/* ── ITEMS LIST ──────────────────────────────────────────────── */
.nd-items-list {
  display: flex; flex-direction: column;
  gap: 0.875rem; margin-bottom: 1.25rem;
  transition: opacity 0.3s;
}
.nd-cart-item {
  display: flex; gap: 0.875rem;
  background: #fff; border-radius: 1.25rem;
  padding: 1.1rem; position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  border: 1px solid #f0f0f0;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.nd-cart-item:hover {
  box-shadow: 0 4px 20px rgba(45,106,79,.1);
  border-color: rgba(45,106,79,.15);
}

/* Remove button */
.nd-item-remove {
  position: absolute; top: 0.875rem; right: 0.875rem;
}
.nd-remove-btn {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: #f8f9fa; color: #adb5bd;
  font-size: 1.1rem; font-weight: 400;
  text-decoration: none; line-height: 1;
  transition: all 0.2s;
}
.nd-remove-btn:hover { background: #fee2e2; color: #ef4444; }

/* Thumbnail */
.nd-item-thumb { flex-shrink: 0; width: 80px; }
.nd-item-thumb img {
  width: 80px !important; height: 80px !important;
  object-fit: cover; border-radius: 0.75rem;
  border: 1px solid #f0f0f0; display: block;
}

/* Details */
.nd-item-details { flex: 1; min-width: 0; padding-right: 1.5rem; }
.nd-item-name {
  font-size: 0.95rem; font-weight: 700; color: #1B4332;
  margin-bottom: 0.3rem; line-height: 1.3;
}
.nd-item-name a { color: inherit; text-decoration: none; }
.nd-item-name a:hover { color: #2D6A4F; }

.nd-item-meta-row {
  display: flex; align-items: center;
  gap: 0.5rem; margin-bottom: 0.6rem; flex-wrap: wrap;
}
.nd-in-stock {
  font-size: 0.68rem; font-weight: 600; color: #2D6A4F;
  background: rgba(45,106,79,.08); padding: 0.15rem 0.5rem;
  border-radius: 50px;
}
.nd-item-save {
  font-size: 0.68rem; font-weight: 600; color: #16a34a;
  background: rgba(34,197,94,.1); padding: 0.15rem 0.5rem;
  border-radius: 50px;
}

.nd-item-bottom-row {
  display: flex; align-items: center; gap: 0.75rem;
}

/* Quantity Control */
.nd-qty-control {
  display: flex; align-items: center;
  background: #f8f9fa; border: 1.5px solid #dee2e6;
  border-radius: 50px; padding: 2px; gap: 0;
}
.nd-qty-btn {
  width: 28px; height: 28px; border-radius: 50%;
  border: none; background: #fff;
  color: #2D6A4F; font-size: 1rem; font-weight: 700;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  transition: all 0.18s; line-height: 1;
  flex-shrink: 0;
}
.nd-qty-btn:hover { background: #2D6A4F; color: #fff; }
.nd-qty-input {
  width: 32px; text-align: center;
  border: none; background: transparent;
  font-weight: 700; font-size: 0.9rem; color: #1B4332;
  outline: none; -moz-appearance: textfield;
}
.nd-qty-input::-webkit-outer-spin-button,
.nd-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.nd-item-price {
  font-size: 1rem; font-weight: 800; color: #1B4332;
  margin-left: auto;
}

/* Hidden submit */
.nd-hidden-submit { display: none !important; }

/* ── COUPON BOX ──────────────────────────────────────────────── */
.nd-coupon-box {
  background: #fff; border-radius: 1rem;
  border: 1px dashed rgba(45,106,79,.3);
  overflow: hidden; margin-bottom: 1.25rem;
}
.nd-coupon-toggle {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.1rem; cursor: pointer;
  font-size: 0.85rem; font-weight: 600;
  color: #2D6A4F; user-select: none;
}
.nd-coupon-arrow { margin-left: auto; transition: transform 0.25s; }
.nd-coupon-toggle.open .nd-coupon-arrow { transform: rotate(180deg); }
.nd-coupon-form { padding: 0 1.1rem 1.1rem; }
.nd-coupon-inner { display: flex; gap: 0.5rem; }
.nd-coupon-input {
  flex: 1; border: 1.5px solid #dee2e6; border-radius: 50px;
  padding: 0.6rem 0.875rem; font-size: 0.88rem; outline: none;
  transition: border-color 0.2s;
}
.nd-coupon-input:focus { border-color: #2D6A4F; }
.nd-coupon-btn, #nd-co-apply-btn {
  background: #2D6A4F; color: #fff; border: none;
  border-radius: 50px; padding: 0.6rem 1.1rem;
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background 0.2s;
}
.nd-coupon-btn:hover, #nd-co-apply-btn:hover { background: #1B4332; }

/* ── UPSELL BOX ──────────────────────────────────────────────── */
.nd-upsell-box {
  background: #fff; border-radius: 1.25rem;
  padding: 1.25rem; margin-top: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  border: 1px solid #f0f0f0;
}
.nd-upsell-title {
  font-size: 1rem; font-weight: 700;
  color: #1B4332; margin-bottom: 0.875rem;
}
.nd-upsell-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.75rem; }
.nd-upsell-card {
  border: 1px solid #f0f0f0; border-radius: 0.75rem;
  overflow: hidden; transition: box-shadow 0.2s;
}
.nd-upsell-card:hover { box-shadow: 0 4px 16px rgba(45,106,79,.1); }
.nd-upsell-card img { width: 100% !important; height: 90px !important; object-fit: cover; display: block; }
.nd-upsell-info { padding: 0.5rem; }
.nd-upsell-name { font-size: 0.75rem; font-weight: 600; color: #1B4332; margin-bottom: 0.2rem; }
.nd-upsell-name a { text-decoration: none; color: inherit; }
.nd-upsell-price { font-size: 0.78rem; font-weight: 700; color: #2D6A4F; margin-bottom: 0.35rem; }
.nd-upsell-add-btn {
  display: block; width: 100%; text-align: center;
  background: #2D6A4F; color: #fff; border: none;
  border-radius: 50px; padding: 0.35rem;
  font-size: 0.7rem; font-weight: 600;
  text-decoration: none; transition: background 0.2s;
}
.nd-upsell-add-btn:hover { background: #1B4332; }

/* ── ORDER SUMMARY (shared cart + checkout) ──────────────────── */
.nd-order-summary {
  background: #fff; border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 4px 24px rgba(45,106,79,.08);
  border: 1px solid rgba(45,106,79,.08);
  position: sticky; top: 90px;
}
.nd-summary-title {
  font-size: 1.1rem; font-weight: 700; color: #1B4332;
  padding-bottom: 0.875rem;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 1.1rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nd-edit-cart {
  font-size: 0.78rem; color: #2D6A4F;
  font-weight: 600; text-decoration: none;
}
.nd-edit-cart:hover { text-decoration: underline; }

/* Savings Banner */
.nd-savings-banner {
  background: linear-gradient(135deg, #D8F3DC, #b7e4c7);
  border-radius: 0.75rem; padding: 0.7rem 0.875rem;
  font-size: 0.82rem; color: #1B4332;
  font-weight: 500; margin-bottom: 0.875rem;
}
.nd-savings-banner strong { font-weight: 800; }

/* Summary items (checkout sidebar) */
.nd-summary-items { margin-bottom: 0.875rem; }
.nd-summary-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0; border-bottom: 1px solid #f8f9fa;
}
.nd-summary-item:last-child { border-bottom: none; }
.nd-summary-item-img { position: relative; flex-shrink: 0; width: 48px; }
.nd-summary-item-img img {
  width: 48px !important; height: 48px !important;
  object-fit: cover; border-radius: 0.5rem;
  border: 1px solid #f0f0f0; display: block;
}
.nd-summary-qty {
  position: absolute; top: -5px; right: -5px;
  width: 18px; height: 18px; background: #2D6A4F; color: #fff;
  border-radius: 50%; font-size: 0.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.nd-summary-item-name { flex: 1; font-size: 0.8rem; font-weight: 600; color: #1B4332; line-height: 1.3; }
.nd-summary-item-price { font-size: 0.85rem; font-weight: 700; color: #1B4332; white-space: nowrap; }

/* Totals */
.nd-totals-box {
  border-top: 1px solid #f0f0f0;
  padding-top: 0.875rem; margin: 0.875rem 0;
}
.nd-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.35rem 0; font-size: 0.875rem; color: #495057;
}
.nd-total-row span:first-child { font-weight: 500; }
.nd-total-row span:last-child  { font-weight: 600; color: #1B4332; }
.nd-discount-row span:last-child, .nd-green { color: #16a34a !important; }
.nd-remove-coupon {
  margin-left: 0.3rem; color: #adb5bd;
  text-decoration: none; font-size: 0.95rem;
}
.nd-remove-coupon:hover { color: #ef4444; }
.nd-grand-total {
  border-top: 2px solid #dee2e6;
  margin-top: 0.5rem; padding-top: 0.6rem !important;
}
.nd-grand-total span { font-size: 1.1rem !important; font-weight: 800 !important; color: #1B4332 !important; }

/* Pincode */
.nd-pin-check {
  background: #f8fffe; border: 1px solid rgba(45,106,79,.15);
  border-radius: 0.875rem; padding: 0.875rem; margin-bottom: 1.1rem;
}
.nd-pin-label { font-size: 0.78rem; font-weight: 600; color: #1B4332; margin-bottom: 0.5rem; }
.nd-pin-row { display: flex; gap: 0.4rem; }
#nd-pin-input {
  flex: 1; border: 1.5px solid #dee2e6; border-radius: 50px;
  padding: 0.5rem 0.75rem; font-size: 0.85rem; outline: none; transition: border-color 0.2s;
}
#nd-pin-input:focus { border-color: #2D6A4F; }
#nd-pin-btn {
  background: #2D6A4F; color: #fff; border: none;
  border-radius: 50px; padding: 0.5rem 0.875rem;
  font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
#nd-pin-btn:hover { background: #1B4332; }
#nd-pin-result { margin-top: 0.4rem; font-size: 0.75rem; font-weight: 500; min-height: 1rem; }

/* Checkout CTA */
.nd-checkout-cta { margin-bottom: 0.875rem; }
.nd-checkout-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  width: 100%; background: linear-gradient(135deg, #2D6A4F, #1B4332);
  color: #fff !important; border-radius: 50px; padding: 0.95rem 1.5rem;
  font-size: 1rem; font-weight: 700; text-decoration: none !important;
  box-shadow: 0 6px 24px rgba(45,106,79,.35); transition: all 0.25s;
}
.nd-checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(45,106,79,.45);
}
.nd-cod-note {
  text-align: center; font-size: 0.75rem;
  color: #6C757D; margin-top: 0.4rem; font-weight: 500;
}

/* Payment badges */
.nd-pay-methods { margin-bottom: 1rem; }
.nd-pay-label {
  font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: #adb5bd;
  font-weight: 600; margin-bottom: 0.4rem;
}
.nd-pay-icons { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.nd-pay-badge {
  font-size: 0.62rem; font-weight: 600;
  padding: 0.2rem 0.45rem; border: 1px solid #dee2e6;
  border-radius: 4px; color: #6C757D; background: #fff;
}

/* Trust grid */
.nd-summary-trust {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin-bottom: 0.875rem;
}
.nd-strust-item {
  display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.72rem; color: #6C757D; font-weight: 500;
}

/* ── CHECKOUT FORM CARDS ──────────────────────────────────────── */
.nd-form-card {
  background: #fff; border-radius: 1.25rem;
  padding: 1.5rem; margin-bottom: 1.1rem;
  box-shadow: 0 2px 14px rgba(0,0,0,.06);
  border: 1px solid rgba(45,106,79,.06);
}
.nd-form-card-header {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1.25rem; padding-bottom: 0.875rem;
  border-bottom: 2px solid #D8F3DC;
}
.nd-form-card-icon { font-size: 1.2rem; }
.nd-form-card-header h3 {
  font-size: 1.05rem; color: #1B4332; margin: 0; font-weight: 700;
}
.nd-optional { font-size: 0.72rem; color: #adb5bd; font-weight: 400; }

/* WooCommerce fields inside cards */
.nd-form-card .woocommerce-billing-fields__field-wrapper,
.nd-form-card .woocommerce-shipping-fields__field-wrapper {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 0.875rem;
}
.nd-form-card .form-row-wide,
.nd-form-card #billing_address_1_field,
.nd-form-card #billing_address_2_field,
.nd-form-card #billing_country_field,
.nd-form-card #billing_state_field,
.nd-form-card #billing_district_field,
.nd-form-card #billing_city_field,
.nd-form-card #billing_postcode_field,
.nd-form-card #billing_phone_field,
.nd-form-card #billing_email_field,
.nd-form-card #shipping_address_1_field,
.nd-form-card #shipping_address_2_field,
.nd-form-card #shipping_country_field,
.nd-form-card #shipping_state_field,
.nd-form-card #shipping_district_field,
.nd-form-card #shipping_city_field,
.nd-form-card #shipping_postcode_field { grid-column: 1 / -1; }
.nd-form-card .form-row { margin-bottom: 0 !important; }
.nd-form-card .form-row label {
  font-size: 0.72rem !important; font-weight: 600 !important;
  color: #495057 !important; text-transform: uppercase !important;
  letter-spacing: 0.06em !important; margin-bottom: 0.3rem !important; display: block !important;
}
.nd-form-card .form-row label .required { color: #ef4444; }
.nd-form-card .form-row input.input-text,
.nd-form-card .form-row select,
.nd-form-card .form-row textarea {
  width: 100% !important; border: 1.5px solid #dee2e6 !important;
  border-radius: 0.75rem !important; padding: 0.7rem 0.875rem !important;
  font-size: 0.9rem !important; color: #1a1a1a !important;
  background: #fafafa !important; outline: none !important;
  box-shadow: none !important; transition: all 0.2s !important;
}
.nd-form-card .form-row input.input-text:focus,
.nd-form-card .form-row select:focus,
.nd-form-card .form-row textarea:focus {
  border-color: #2D6A4F !important; background: #fff !important;
  box-shadow: 0 0 0 3px rgba(45,106,79,.08) !important;
}
.nd-form-card .form-row.woocommerce-invalid input,
.nd-form-card .form-row.woocommerce-invalid select {
  border-color: #ef4444 !important;
}
.nd-form-card .woocommerce-input-wrapper { width: 100%; }

/* Payment card */
.nd-payment-card #payment { background: none; box-shadow: none; border: none; padding: 0; margin: 0; }
.nd-payment-card #payment ul.payment_methods { list-style: none; margin-bottom: 1rem; padding: 0; }
.nd-payment-card #payment ul.payment_methods li {
  background: #f8fffe; border: 2px solid transparent;
  border-radius: 0.875rem; padding: 0.875rem 1rem;
  margin-bottom: 0.6rem; cursor: pointer;
  transition: all 0.2s; display: flex;
  align-items: flex-start; gap: 0.6rem; flex-wrap: wrap;
}
.nd-payment-card #payment ul.payment_methods li.payment_method_selected,
.nd-payment-card #payment ul.payment_methods li:has(input:checked) {
  border-color: #2D6A4F; background: #f0fdf4;
}
.nd-payment-card #payment ul.payment_methods li input[type="radio"] {
  width: 17px; height: 17px; accent-color: #2D6A4F; flex-shrink: 0; margin-top: 2px;
}
.nd-payment-card #payment ul.payment_methods li label {
  cursor: pointer; font-weight: 600; font-size: 0.9rem; color: #1B4332;
}
.nd-payment-card .payment_box {
  background: #f0fdf4; border-radius: 0.75rem;
  padding: 0.7rem 0.875rem; margin-top: 0.5rem;
  font-size: 0.82rem; color: #6C757D; width: 100%;
}

/* Place order button */
#place_order,
.nd-payment-card #place_order {
  display: block !important; width: 100% !important;
  background: linear-gradient(135deg, #2D6A4F, #1B4332) !important;
  color: #fff !important; border-radius: 50px !important;
  padding: 1rem 2rem !important; font-size: 1rem !important;
  font-weight: 700 !important; border: none !important;
  box-shadow: 0 6px 24px rgba(45,106,79,.35) !important;
  transition: all 0.25s !important; cursor: pointer; margin-top: 1rem !important;
}
#place_order:hover { transform: translateY(-2px) !important; box-shadow: 0 10px 32px rgba(45,106,79,.45) !important; }

/* Secure notice */
.nd-secure-notice {
  display: flex; align-items: center; gap: 0.5rem;
  background: #f0fdf4; border-radius: 0.75rem;
  padding: 0.6rem 0.875rem; font-size: 0.78rem;
  color: #1B4332; font-weight: 500; margin-bottom: 0.875rem;
}

/* WC terms */
.woocommerce-terms-and-conditions-wrapper {
  font-size: 0.75rem; color: #6C757D; margin: 0.6rem 0;
}
.woocommerce-terms-and-conditions-wrapper a { color: #2D6A4F; font-weight: 600; }

/* Select2 override */
.nd-form-card .select2-container--default .select2-selection--single {
  border: 1.5px solid #dee2e6 !important; border-radius: 0.75rem !important;
  height: auto !important; padding: 0.7rem 0.875rem !important; background: #fafafa !important;
}
.nd-form-card .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.5 !important; padding: 0 !important; font-size: 0.9rem !important;
}
.nd-form-card .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #2D6A4F !important; background: #fff !important;
  box-shadow: 0 0 0 3px rgba(45,106,79,.08) !important;
}

/* ── CHECKOUT SUMMARY ─────────────────────────────────────────── */
.nd-checkout-summary { top: 90px; }

/* ── EMPTY CART ───────────────────────────────────────────────── */
.woocommerce-cart .woocommerce-info {
  background: #fff; border-left: 4px solid #2D6A4F;
  border-radius: 1rem; padding: 1.5rem 2rem;
}
.woocommerce-cart .return-to-shop .button {
  background: #2D6A4F !important; color: #fff !important;
  border-radius: 50px !important; padding: 0.8rem 2rem !important; font-weight: 700 !important;
}

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nd-cart-wrap, .nd-checkout-wrap {
    padding: 0.25rem 0.6rem 3rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .nd-cart-layout, .nd-checkout-layout {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 1.5rem !important;
  }
  .nd-cart-left, .nd-cart-right,
  .nd-checkout-left, .nd-checkout-right {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .nd-order-summary, .nd-checkout-summary { position: static !important; width: 100% !important; }
  /* Move summary above on mobile */
  .nd-cart-right { order: -1; }
  .nd-checkout-right { order: -1; }
  .nd-upsell-grid { grid-template-columns: repeat(2,1fr) !important; }
}

@media (max-width: 640px) {
  .nd-cart-wrap, .nd-checkout-wrap {
    padding: 0.2rem 0.5rem 3rem !important;
  }
  .nd-progress-bar {
    padding: 0.15rem 0 !important;
    margin-bottom: 0.6rem !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }
  .nd-progress-inner {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 0.25rem !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .nd-step {
    flex: 0 0 auto !important;
  }
  .nd-step span {
    font-size: 0.55rem !important;
    letter-spacing: 0 !important;
  }
  .nd-step-line {
    flex: 1 1 auto !important;
    min-width: 8px !important;
    max-width: 35px !important;
    margin: 0 2px 1rem !important;
  }
  .nd-step-circle {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.72rem !important;
  }

  .nd-trust-strip {
    gap: 0.35rem 0.6rem !important;
    padding: 0.6rem 0.75rem !important;
    border-radius: 0.75rem !important;
    margin-bottom: 1.25rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .nd-trust-item {
    font-size: 0.68rem !important;
    white-space: normal !important;
  }

  .nd-cart-header-row {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
  .nd-cart-title { font-size: 1.15rem !important; }
  .nd-continue-link { font-size: 0.75rem !important; }

  .nd-cart-item {
    padding: 0.75rem !important;
    gap: 0.5rem !important;
    border-radius: 0.875rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }
  .nd-item-thumb {
    width: 60px !important;
    flex-shrink: 0 !important;
  }
  .nd-item-thumb img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    border-radius: 0.5rem !important;
  }
  .nd-item-details {
    padding-right: 1.25rem !important;
    min-width: 0 !important;
  }
  .nd-item-name {
    font-size: 0.88rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.2rem !important;
  }
  .nd-item-bottom-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.4rem !important;
    flex-wrap: wrap !important;
    margin-top: 0.4rem !important;
  }
  .nd-qty-control {
    padding: 1px !important;
  }
  .nd-qty-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.85rem !important;
  }
  .nd-qty-input {
    width: 26px !important;
    font-size: 0.82rem !important;
  }
  .nd-item-price {
    font-size: 0.95rem !important;
    margin-left: 0 !important;
  }

  .nd-order-summary,
  .nd-form-card {
    border-radius: 0.875rem !important;
    padding: 1rem 0.875rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .nd-summary-title,
  .nd-form-card-header h3 {
    font-size: 1.1rem !important;
  }

  .nd-checkout-btn,
  #place_order,
  .nd-payment-card #place_order {
    width: 100% !important;
    padding: 0.85rem 1rem !important;
    font-size: 0.92rem !important;
    white-space: normal !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .nd-pin-row,
  .nd-coupon-inner {
    display: flex !important;
    gap: 0.4rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  #nd-pin-input,
  .nd-coupon-input,
  #nd-co-coupon-input {
    flex: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    font-size: 0.85rem !important;
    padding: 0.55rem 0.75rem !important;
    box-sizing: border-box !important;
  }
  #nd-pin-btn,
  .nd-coupon-btn,
  #nd-co-apply-btn {
    padding: 0.55rem 0.85rem !important;
    font-size: 0.8rem !important;
    flex-shrink: 0 !important;
  }

  .nd-form-card .woocommerce-billing-fields__field-wrapper,
  .nd-form-card .woocommerce-shipping-fields__field-wrapper {
    grid-template-columns: 1fr !important;
  }
  .nd-upsell-grid {
    grid-template-columns: 1fr !important;
  }
  .nd-summary-trust {
    grid-template-columns: 1fr !important;
  }
  .nd-total-row {
    padding: 0.45rem 0 !important;
    font-size: 0.85rem !important;
  }
}
