/* =============================================================
   nd-client.css — Patient-facing UI
   -------------------------------------------------------------
   Audience: patients 50+, iPhone-first (70%), Android/Samsung
   (30%), MacBook 13-14" desktop (90%).
   Non-technical users. Introduced gradually alongside existing
   Bootstrap + admin-styles.css.

   Design tokens inherited from nd-layout.css:
     --teal, --teal-dark, --brand-dark, --text, --muted,
     --border, --surface, --white
   Typography scale: base 18px (vs 16px for doctors/admin)
   Touch targets: min 48px (Apple HIG) for all interactive el.
   Spacing: 8pt grid, generous whitespace.
   No hover-only states — touch devices have no hover.
============================================================= */

/* ── Token overrides for client context ──────────────────── */
:root {
  --cl-font-base:   18px;
  --cl-font-sm:     15px;
  --cl-font-lg:     22px;
  --cl-font-xl:     28px;
  --cl-line-height: 1.75;
  --cl-touch-min:   48px;
  --cl-radius:      12px;
  --cl-radius-sm:   8px;
}

/* ── Page wrapper ─────────────────────────────────────────── */
.nd-client-page {
  font-size: var(--cl-font-base);
  line-height: var(--cl-line-height);
  color: var(--text, #1a1a1a);
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Page header ──────────────────────────────────────────── */
.nd-cl-header {
  padding: 24px 0 16px;
  border-bottom: 2px solid var(--teal, #00A6A0);
  margin-bottom: 32px;
}

.nd-cl-header__title {
  font-size: var(--cl-font-xl);
  font-weight: 700;
  color: var(--brand-dark, #2c3e50);
  margin: 0 0 4px;
  line-height: 1.3;
}

.nd-cl-header__sub {
  font-size: var(--cl-font-base);
  color: var(--muted, #6c757d);
  margin: 0;
}

/* ── Card ─────────────────────────────────────────────────── */
.nd-cl-card {
  background: var(--white, #fff);
  border: 1px solid var(--border, #d0d5db);
  border-top: 3px solid var(--teal, #00A6A0);
  border-radius: var(--cl-radius);
  margin-bottom: 24px;
}

.nd-cl-card__header {
  background: var(--surface, #f8f9fa);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border, #d0d5db);
  border-radius: var(--cl-radius) var(--cl-radius) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 575px) {
  .nd-cl-card__header {
    flex-direction: column;
    align-items: stretch;
  }

  .nd-cl-card__header .d-flex {
    flex-direction: column;
    align-items: stretch;
  }

  .nd-cl-card__header .nd-cl-btn {
    width: 100%;
    justify-content: center;
  }
}

.nd-cl-card__title {
  font-size: var(--cl-font-lg);
  font-weight: 600;
  color: var(--brand-dark, #2c3e50);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nd-cl-card__body {
  padding: 24px 20px;
}

/* ── Section title ────────────────────────────────────────── */
.nd-cl-section-title {
  font-size: var(--cl-font-lg);
  font-weight: 600;
  color: var(--brand-dark, #2c3e50);
  border-left: 4px solid var(--teal, #00A6A0);
  padding-left: 12px;
  margin: 0 0 20px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.nd-cl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--cl-touch-min);
  padding: 12px 28px;
  font-size: var(--cl-font-base);
  font-weight: 600;
  border-radius: var(--cl-radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.nd-cl-btn--primary {
  background: var(--teal, #00A6A0);
  color: #fff;
  border-color: var(--teal, #00A6A0);
}

.nd-cl-btn--primary:active {
  background: var(--teal-dark, #008a85);
  border-color: var(--teal-dark, #008a85);
}

.nd-cl-btn--outline {
  background: transparent;
  color: var(--brand-dark, #2c3e50);
  border-color: var(--border, #d0d5db);
}

.nd-cl-btn--outline:active {
  background: var(--surface, #f8f9fa);
}

.nd-cl-btn--block {
  width: 100%;
}

.nd-cl-btn--disabled,
.nd-cl-btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ── Form elements ────────────────────────────────────────── */
.nd-cl-form-group {
  margin-bottom: 32px;
}

.nd-cl-label {
  display: block;
  font-size: var(--cl-font-lg);
  font-weight: 600;
  color: var(--brand-dark, #2c3e50);
  margin-bottom: 12px;
}

/* ── Check list (multi-select checkbox group) ────────────── */
/*
   Usage:
   <div class="nd-cl-check-list">
     <div class="nd-cl-check-list__item">
       <input type="checkbox" id="cb_a" name="cb_a">
       <label for="cb_a">Option A</label>
     </div>
   </div>
*/
.nd-cl-check-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nd-cl-check-list__item {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--cl-touch-min);
  cursor: pointer;
}

.nd-cl-check-list__item input[type="checkbox"] {
  width: 26px;
  height: 26px;
  min-width: 26px;
  accent-color: var(--teal, #00A6A0);
  cursor: pointer;
}

.nd-cl-check-list__item label {
  font-size: var(--cl-font-lg);
  font-weight: 500;
  color: var(--brand-dark, #2c3e50);
  cursor: pointer;
  line-height: 1.4;
  margin: 0;
}

/* Override form-wide label reset inside medicalHistoryForm */
#medicalHistoryForm .nd-cl-label {
  font-size: var(--cl-font-lg);
  padding: 0;
}

#medicalHistoryForm .nd-cl-choice-group input[type="radio"] + label {
  font-size: var(--cl-font-lg);
  padding: 12px 22px;
}

#medicalHistoryForm .nd-cl-check-list__item label {
  font-size: var(--cl-font-lg);
  padding: 0;
}

#medicalHistoryForm .nd-cl-input {
  padding: 12px 16px !important;
  font-size: var(--cl-font-base);
  min-height: var(--cl-touch-min);
}

#medicalHistoryForm .nd-cl-input:hover {
  transform: none;
  border: 1.5px solid var(--border, #d0d5db);
}

#medicalHistoryForm .nd-cl-input:focus {
  border-color: var(--teal, #00A6A0);
  box-shadow: 0 0 0 3px rgba(0, 166, 160, 0.15);
}

/* Hints: hidden until field is focused or has been touched (blur) */
.nd-cl-hint {
  display: none;
  font-size: var(--cl-font-sm);
  color: var(--muted, #6c757d);
  margin-top: 6px;
}

.nd-cl-input:focus   + .nd-cl-hint,
.nd-cl-select:focus  + .nd-cl-hint,
.nd-cl-textarea:focus + .nd-cl-hint,
.nd-cl-input.touched   + .nd-cl-hint,
.nd-cl-select.touched  + .nd-cl-hint,
.nd-cl-textarea.touched + .nd-cl-hint {
  display: block;
}

.nd-cl-input,
.nd-cl-select,
.nd-cl-textarea {
  width: 100%;
  min-height: var(--cl-touch-min);
  padding: 12px 16px;
  font-size: var(--cl-font-base);
  line-height: var(--cl-line-height);
  color: var(--text, #1a1a1a);
  background: var(--white, #fff);
  border: 1.5px solid var(--border, #d0d5db);
  border-radius: var(--cl-radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.nd-cl-input:focus,
.nd-cl-select:focus,
.nd-cl-textarea:focus {
  outline: none;
  border-color: var(--teal, #00A6A0);
  box-shadow: 0 0 0 3px rgba(0, 166, 160, 0.15);
}

.nd-cl-input:disabled,
.nd-cl-select:disabled,
.nd-cl-textarea:disabled,
.nd-cl-input[readonly],
.nd-cl-select[readonly],
.nd-cl-textarea[readonly] {
  opacity: 0.5;
  background-color: var(--surface, #f8f9fa);
  cursor: not-allowed;
  pointer-events: none;
}

.nd-cl-input.is-invalid,
.nd-cl-select.is-invalid,
.nd-cl-textarea.is-invalid {
  border-color: #dc3545;
}

.nd-cl-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Hidden by default — mirrors Bootstrap .invalid-feedback behaviour */
.nd-cl-feedback {
  display: none;
  font-size: var(--cl-font-sm);
  color: #dc3545;
  margin-top: 6px;
}

/* Show when form has .was-validated AND the preceding input is invalid */
.was-validated .nd-cl-input:invalid   ~ .nd-cl-feedback,
.was-validated .nd-cl-select:invalid  ~ .nd-cl-feedback,
.was-validated .nd-cl-textarea:invalid ~ .nd-cl-feedback {
  display: block;
}

/* ── Info row (read-only data display) ────────────────────── */
.nd-cl-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border, #d0d5db);
  gap: 16px;
}

.nd-cl-info-row:last-child {
  border-bottom: none;
}

.nd-cl-info-row__label {
  font-size: var(--cl-font-sm);
  color: var(--muted, #6c757d);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  padding-top: 2px;
}

.nd-cl-info-row__value {
  font-size: var(--cl-font-base);
  color: var(--text, #1a1a1a);
  font-weight: 500;
  text-align: right;
}

/* ── Status badge ─────────────────────────────────────────── */
.nd-cl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: var(--cl-font-sm);
  font-weight: 600;
  border-radius: 100px;
  white-space: nowrap;
}

.nd-cl-badge--done {
  background: #e8f8f7;
  color: var(--teal, #00A6A0);
}

.nd-cl-badge--pending {
  background: #fff8e1;
  color: #b77a00;
}

.nd-cl-badge--locked {
  background: var(--surface, #f8f9fa);
  color: var(--muted, #6c757d);
}

/* ── Step / workflow item ─────────────────────────────────── */
.nd-cl-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border, #d0d5db);
}

.nd-cl-step:last-child {
  border-bottom: none;
}

.nd-cl-step__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--surface, #f8f9fa);
  color: var(--muted, #6c757d);
  border: 1px solid var(--border, #d0d5db);
}

.nd-cl-step__icon--done {
  background: #e8f8f7;
  color: var(--teal, #00A6A0);
  border-color: var(--teal, #00A6A0);
}

.nd-cl-step__icon--active {
  background: var(--teal, #00A6A0);
  color: #fff;
  border-color: var(--teal, #00A6A0);
}

.nd-cl-step__body {
  flex: 1;
}

.nd-cl-step__title {
  font-size: var(--cl-font-base);
  font-weight: 600;
  color: var(--brand-dark, #2c3e50);
  margin: 0 0 4px;
}

.nd-cl-step__meta {
  font-size: var(--cl-font-sm);
  color: var(--muted, #6c757d);
}

/* ── Alert / notice box ───────────────────────────────────── */
.nd-cl-alert {
  padding: 16px 20px;
  border-radius: var(--cl-radius-sm);
  font-size: var(--cl-font-base);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.nd-cl-alert--info {
  background: #e8f4fd;
  border-left: 4px solid #3498db;
  color: #1a5276;
}

.nd-cl-alert--success {
  background: #e8f8f7;
  border-left: 4px solid var(--teal, #00A6A0);
  color: #0d6655;
}

.nd-cl-alert--warning {
  background: #fff8e1;
  border-left: 4px solid #f1c40f;
  color: #7d6608;
}

/* ── Choice group (single-select radio toggle) ───────────── */
/*
   Usage:
   <div class="nd-cl-choice-group">
     <input type="radio" id="opt_a" name="group" value="A" required>
     <label for="opt_a">Option A</label>
     <input type="radio" id="opt_b" name="group" value="B" required>
     <label for="opt_b">Option B</label>
   </div>
   Input MUST immediately precede its label (input + label selector).
*/
.nd-cl-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nd-cl-choice-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.nd-cl-choice-group input[type="radio"] + label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 48px;
  font-size: var(--cl-font-lg);
  font-weight: 600;
  border: 2px solid var(--border, #d0d5dd);
  border-radius: var(--cl-radius-sm);
  color: var(--brand-dark, #2c3e50);
  background: var(--white, #fff);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.nd-cl-choice-group input[type="radio"]:checked + label {
  background: var(--teal, #00A6A0);
  border-color: var(--teal, #00A6A0);
  color: #fff;
}

.nd-cl-choice-group input[type="radio"] + label:active {
  background: var(--surface, #f8f9fa);
}

.nd-cl-choice-group input[type="radio"]:checked + label:active {
  background: var(--teal-dark, #008a85);
  border-color: var(--teal-dark, #008a85);
}

/* Warning state — other religion required but not yet selected */
.nd-cl-choice-group--warn input[type="radio"] + label {
  border-color: #dc3545;
}

.nd-cl-choice-group--warn input[type="radio"]:checked + label {
  background: var(--teal, #00A6A0);
  border-color: var(--teal, #00A6A0);
}

@media (max-width: 575px) {
  .nd-cl-choice-group {
    flex-direction: column;
  }

  .nd-cl-choice-group input[type="radio"] + label {
    width: 100%;
  }
}

/* ── Mobile-first responsive ──────────────────────────────── */

/* Stack info rows vertically on small screens */
@media (max-width: 575px) {
  .nd-cl-info-row {
    flex-direction: column;
    gap: 4px;
  }

  .nd-cl-info-row__value {
    text-align: left;
  }

  .nd-cl-card__body {
    padding: 20px 16px;
  }

  /* Full-width buttons on mobile */
  .nd-cl-btn {
    width: 100%;
  }
}

/* Mobile + tablet: side breathing room */
.nd-cl-page-container {
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 576px) {
  .nd-cl-page-container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Mac 13-14" (1280–1440px) */
@media (min-width: 768px) {
  .nd-cl-page-container {
    max-width: 720px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
  }
}

/* Full HD and above (1920×1080+) */
@media (min-width: 1440px) {
  .nd-cl-page-container {
    max-width: 1100px;
  }
}

/* ── Dashboard — extracted from inline <style> ───────────────
   Scoped under .nd-client-page to avoid leaking into other pages.
-------------------------------------------------------------- */
.nd-client-page .payment-status-section { margin-bottom: 30px; }

.nd-client-page .payment-info {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
}

.nd-client-page .form-section-card {
  transition: all 0.3s ease;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.nd-client-page .form-section-card:active {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

@media (hover: hover) {
  .nd-client-page .form-section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
}

.nd-client-page .form-section-header {
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
  background-color: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.nd-client-page .form-section-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.nd-client-page .form-section-footer {
  padding: 15px;
  border-top: 1px solid #e9ecef;
  border-radius: 0 0 8px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nd-client-page .status-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.nd-client-page .status-indicator i { margin-right: 5px; }

.nd-client-page .form-section-disabled {
  opacity: 0.7;
  background-color: #f8f9fa;
}

.nd-client-page .card-header {
  font-weight: bold;
  font-size: 1.25rem;
}

.nd-client-page .card-body p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.nd-client-page p i { margin-right: 10px; }

.nd-client-page hr {
  border: 0;
  border-top: 1px solid #988686;
  margin: 10px 0;
}

.nd-client-page .card-footer {
  font-size: 0.9rem;
  color: #888;
}

.nd-client-page .modal-dialog {
  z-index: 9999;
  margin-top: 3rem;
}

.nd-client-page .text-company { color: #84cc16; }

/* Chat FAB (fixed — not scoped to nd-client-page) */
.chat-icon-container {
  position: fixed;
  bottom: 60px;
  right: 20px;
  z-index: 1000;
}

.chat-icon-container a {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 20px;
  background-color: #25D366;
  color: white;
  border-radius: 28px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.chat-icon-container a i {
  font-size: 22px;
}

.chat-icon-container__label {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.chat-icon-container a:active {
  background-color: #1DA851;
  transform: scale(1.05);
}

@media (hover: hover) {
  .chat-icon-container a:hover {
    background-color: #1DA851;
    transform: scale(1.05);
  }
}

@media (max-width: 768px) {
  .nd-client-page .card-body p { font-size: 1rem; }
}

@media (min-width: 992px) {
  .nd-client-page .col-md-6 { position: relative; }
  .nd-client-page .col-md-6:first-child {
    border-right: 1px solid #ddd;
    padding-right: 20px;
  }
  .nd-client-page .col-md-6:last-child { padding-left: 20px; }

  /* Override global section padding (styles.css applies 3.5rem at lg+) */
  .nd-client-page section {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}


img.upload {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ─── Cart ──────────────────────────────────────────────────────────────── */

/* Sticky summary card */
.nd-cl-card--sticky {
  position: sticky;
  top: 20px;
}

/* Total row — slightly larger */
.nd-cl-info-row--total {
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--border, #d0d5db);
  font-size: 1.1em;
}

/* Secure payment note */
.nd-cl-cart-secure {
  display: block;
  text-align: center;
  margin-top: 10px;
  color: var(--muted, #6b7280);
  font-size: 14px;
}

/* Cart item row */
.nd-cl-cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #d0d5db);
}
.nd-cl-cart-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Thumbnail */
.nd-cl-cart-item__thumb {
  flex-shrink: 0;
}
.nd-cl-cart-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.nd-cl-cart-thumb--placeholder {
  width: 70px;
  height: 70px;
  border-radius: 6px;
  background-color: var(--surface, #f8f9fa);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Item info */
.nd-cl-cart-item__info {
  flex: 1;
  min-width: 0;
}
.nd-cl-cart-item__name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.nd-cl-cart-item__link {
  color: var(--teal, #00A6A0);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--cl-font-base);
}
.nd-cl-cart-item__link:hover {
  text-decoration: underline;
}
.nd-cl-cart-item__price {
  color: var(--muted, #6b7280);
  font-size: 15px;
}

/* Qty stepper */
.nd-cl-cart-item__qty {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.nd-cl-btn--qty {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nd-cl-qty-count {
  min-width: 32px;
  text-align: center;
  font-weight: bold;
  font-size: var(--cl-font-base);
}

/* Line total */
.nd-cl-cart-item__total {
  flex-shrink: 0;
  min-width: 72px;
  text-align: right;
  font-size: var(--cl-font-base);
}

/* Empty state */
.nd-cl-cart-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--muted, #6b7280);
}
.nd-cl-cart-empty i {
  display: block;
  margin-bottom: 16px;
}

/* Product card image */
.nd-cl-product-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px 6px 0 0;
  display: block;
}
.nd-cl-product-img--placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px 6px 0 0;
  background-color: var(--surface, #f8f9fa);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Product card — fixed-height grid layout */
.nd-cl-product-card {
  display: flex;
  flex-direction: column;
  height: 360px;
}
@media (min-width: 768px) {
  .nd-cl-product-card { height: 380px; }
}
@media (min-width: 992px) {
  .nd-cl-product-card { height: 400px; }
}
/* Override aspect-ratio with a fixed image height inside the card */
.nd-cl-product-card .nd-cl-product-img,
.nd-cl-product-card .nd-cl-product-img--placeholder {
  height: 160px;
  aspect-ratio: unset;
  flex-shrink: 0;
  padding: 5px 2px;
}
.nd-cl-product-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
/* Category row — always occupies space so all cards align */
.nd-cl-product-category-slot {
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}
/* Product name — fixed 2-line slot so every card aligns identically */
.nd-cl-product-name {
  flex-shrink: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nd-cl-product-name a {
  display: inline;
}
/* Price row — margin-top:auto pushes price+button to card bottom */
.nd-cl-product-price {
  flex-shrink: 0;
  margin-top: auto;
  margin-bottom: 8px;
}
/* Add to cart form always at bottom */
.nd-cl-product-card__body > form {
  flex-shrink: 0;
}

/* Item detail page image */
.nd-cl-item-detail-img {
  width: 100%;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}
.nd-cl-item-detail-img--placeholder {
  width: 100%;
  height: 260px;
  border-radius: 8px;
  background-color: var(--surface, #f8f9fa);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Badge — cancelled/error state */
.nd-cl-badge--cancelled {
  background-color: rgba(220, 53, 69, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Small thumbnail (purchase history items) */
.nd-cl-cart-thumb--sm {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  flex-shrink: 0;
}
.nd-cl-cart-thumb--sm.nd-cl-cart-thumb--placeholder {
  background-color: var(--surface, #f8f9fa);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Order card footer */
.nd-cl-cart-order__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 24px;
  border-top: 1px solid var(--border, #d0d5db);
  background-color: var(--surface, #f8f9fa);
  border-radius: 0 0 8px 8px;
}
.nd-cl-cart-order__total {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.05em;
}

/* Pagination */
.nd-cl-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding: 8px 0;
}
.nd-cl-pagination__pages {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.nd-cl-pagination__pages .nd-cl-btn {
  min-width: 44px;
  padding: 0 10px;
  text-align: center;
}
.nd-cl-pagination__ellipsis {
  padding: 0 6px;
  color: var(--muted, #6b7280);
  font-size: var(--cl-font-base);
  line-height: var(--cl-touch-min);
}

/* Mobile: stack cart item vertically */
@media (max-width: 575px) {
  .nd-cl-cart-item {
    flex-wrap: wrap;
  }
  .nd-cl-cart-item__info {
    flex: 1 1 calc(100% - 82px); /* full width minus thumb */
  }
  .nd-cl-cart-item__qty,
  .nd-cl-cart-item__total {
    margin-left: 82px; /* align under info, past thumb */
  }
}

/* ── Category badges ──────────────────────────────────────── */
.nd-cl-badge--category {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: capitalize;
}
.nd-cl-badge--supplements {
  background: #e8f0ff;
  color: #2d5fc9;
}
.nd-cl-badge--snacks {
  background: #fff3e0;
  color: #c26a00;
}
.nd-cl-badge--drinks {
  background: #e3f8fb;
  color: #0077a8;
}
.nd-cl-badge--cosmetics {
  background: #fce4f5;
  color: #a0288c;
}
.nd-cl-badge--accessories {
  background: #f0fce4;
  color: #4a7c2a;
}

/* ── Sidebar product list ─────────────────────────────────── */
.nd-cl-sidebar-product {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #d0d5db);
}
.nd-cl-sidebar-product:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.nd-cl-sidebar-product__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nd-cl-sidebar-product__name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}
.nd-cl-sidebar-product__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

/* ── Small button variant ─────────────────────────────────── */
.nd-cl-btn--sm {
  padding: 3px 10px;
  font-size: 13px;
  min-width: unset;
}
