/* ═══════════════════════════════════════════════════════
   QcPDV — Punto de Venta · Estilos
   Paleta: artesanal cálida para hotel boutique
═══════════════════════════════════════════════════════ */

/* ─── Variables ─────────────────────────────────── */
:root {
  --bg:            #faf8f5;
  --bg-warm:       #f2ede5;
  --surface:       #ffffff;
  --surface-warm:  #fdf9f4;

  --primary:       #b5743a;
  --primary-light: #d4924f;
  --primary-dark:  #8a5520;
  --primary-bg:    rgba(181,116,58,0.09);
  --primary-border:rgba(181,116,58,0.25);

  --accent:        #6b9c7e;
  --accent-light:  #8ab89e;
  --accent-bg:     rgba(107,156,126,0.08);
  --accent-border: rgba(107,156,126,0.3);

  --text:          #2d1f14;
  --text-muted:    #7a6555;
  --text-light:    #b0998a;

  --success:       #3e8e57;
  --success-bg:    rgba(62,142,87,0.09);
  --success-border:rgba(62,142,87,0.28);
  --error:         #b03030;
  --error-bg:      rgba(176,48,48,0.09);
  --warning:       #c07a10;
  --warning-bg:    rgba(192,122,16,0.09);

  --border:        #e5ddd3;
  --border-warm:   #d4c5b0;

  --shadow-sm:  0 1px 4px rgba(45,31,20,0.07);
  --shadow-md:  0 4px 16px rgba(45,31,20,0.11);
  --shadow-lg:  0 8px 32px rgba(45,31,20,0.15);

  /* Cart sidebar (dark) */
  --cart-bg:     #2a1d12;
  --cart-surf:   #3a2718;
  --cart-text:   #f5ede3;
  --cart-muted:  #a08070;
  --cart-border: rgba(255,255,255,0.09);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --cart-width: 340px;
  --appbar-h:   60px;
}

/* ─── Reset & base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

[v-cloak] { display: none !important; }

button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ─── App Shell ─────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100vh;
  overflow: hidden;
}

/* ─── App Bar ───────────────────────────────────── */
.appbar {
  height: var(--appbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  z-index: 300;
}

.appbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.appbar-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}

.appbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.appbar-subtitle {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.appbar-spacer { flex: 1; }

.version-badge {
  font-size: 0.62rem;
  color: var(--text-muted);
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sync-chip {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-warm);
  transition: background 0.15s;
  white-space: nowrap;
}
.sync-chip:hover { background: var(--border); }
.sync-chip.syncing { color: var(--primary); }
.sync-chip.online  { color: var(--success); }
.sync-chip.offline { color: var(--error); }

.install-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--primary-bg);
  border: 1px solid var(--primary-border);
  border-radius: 20px;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
  transition: background 0.15s;
}
.install-btn:hover { background: rgba(181,116,58,0.15); }

/* ─── Offline Bar ───────────────────────────────── */
.offline-bar {
  background: var(--warning-bg);
  border-bottom: 1px solid rgba(192,122,16,0.25);
  padding: 6px 16px;
  font-size: 0.75rem;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ─── Layout Principal ──────────────────────────── */
.pdv-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ─── Panel Productos ───────────────────────────── */
.products-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.search-bar {
  padding: 12px 14px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap .mdi {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 12px 9px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-warm);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--primary); background: var(--surface); }
.search-input::placeholder { color: var(--text-light); }

.clear-search {
  position: absolute;
  right: 8px;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.clear-search:hover { background: var(--border); }

/* Category chips */
.linea-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.linea-chips::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--primary-border); color: var(--primary); }
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

/* Product Grid */
.products-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  overscroll-behavior: contain;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  position: relative;
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}
.product-card:active { transform: scale(0.97); }

.product-card.in-cart {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.product-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bg-warm);
}

.product-img-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--bg-warm), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border-warm, #d4c5b0);
  font-size: 2.5rem;
}

.product-info {
  padding: 8px 10px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-linea {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 2px;
}

/* Cart badge on product */
.product-cart-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* Add button on product */
.product-add-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, transform 0.1s;
}
.product-add-btn:hover { background: var(--primary-dark); }
.product-add-btn:active { transform: scale(0.9); }

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .mdi {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 12px;
  color: var(--border-warm, #d4c5b0);
}
.empty-state p { font-size: 0.9rem; }

/* ─── Cart Panel ────────────────────────────────── */
.cart-panel {
  width: var(--cart-width);
  background: var(--cart-bg);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.cart-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--cart-border);
  flex-shrink: 0;
}

.cart-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cart-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.cart-title .count-badge {
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 800;
}

/* Client selector */
.client-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--cart-surf);
  border-radius: var(--radius-sm);
  border: 1px solid var(--cart-border);
  cursor: pointer;
  transition: border-color 0.15s;
}
.client-selector:hover { border-color: rgba(181,116,58,0.5); }

.client-selector .mdi-account-circle {
  font-size: 1.2rem;
  color: var(--accent-light);
  flex-shrink: 0;
}
.client-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--cart-text);
  font-weight: 500;
}
.client-change {
  font-size: 0.65rem;
  color: var(--cart-muted);
  flex-shrink: 0;
}

/* Cart items */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  overscroll-behavior: contain;
}

.cart-item {
  background: var(--cart-surf);
  border-radius: var(--radius-sm);
  padding: 10px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--cart-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-item-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cart-item-name {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cart-text);
  line-height: 1.3;
}

.cart-item-remove {
  color: var(--cart-muted);
  font-size: 0.85rem;
  padding: 2px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.cart-item-remove:hover { color: var(--error); }

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--cart-bg);
  border-radius: 20px;
  padding: 2px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cart-muted);
  font-size: 1rem;
  transition: background 0.12s, color 0.12s;
}
.qty-btn:hover {
  background: var(--primary);
  color: #fff;
}
.qty-btn:active { transform: scale(0.9); }

.qty-value {
  min-width: 24px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cart-text);
}

.item-subtotal {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-light);
}
.item-unit-price {
  font-size: 0.62rem;
  color: var(--cart-muted);
  text-align: right;
}

/* Cart empty */
.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--cart-muted);
  text-align: center;
  padding: 30px 16px;
  gap: 10px;
}
.cart-empty .mdi { font-size: 3rem; }
.cart-empty p { font-size: 0.82rem; line-height: 1.5; }

/* Cart footer */
.cart-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--cart-border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-total-label {
  font-size: 0.78rem;
  color: var(--cart-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cart-total-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cart-text);
}

.cart-items-count {
  font-size: 0.68rem;
  color: var(--cart-muted);
}

.btn-cobrar {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 4px 12px rgba(181,116,58,0.3);
}
.btn-cobrar:hover { opacity: 0.92; }
.btn-cobrar:active { transform: scale(0.98); }
.btn-cobrar:disabled {
  background: var(--cart-surf);
  color: var(--cart-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-clear-cart {
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--cart-border);
  border-radius: var(--radius-sm);
  color: var(--cart-muted);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.btn-clear-cart:hover { background: var(--error-bg); border-color: rgba(176,48,48,0.3); color: var(--error); }

/* ─── Mobile Cart FAB ───────────────────────────── */
.cart-fab {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 50%;
  font-size: 1.6rem;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(181,116,58,0.4);
  z-index: 200;
  transition: transform 0.15s;
}
.cart-fab:active { transform: scale(0.92); }
.cart-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  background: var(--text);
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Mobile Cart Drawer ────────────────────────── */
.cart-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 400;
  animation: fadeIn 0.2s;
}
.cart-drawer-overlay.open { display: block; }

.cart-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85dvh;
  max-height: 85vh;
  background: var(--cart-bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  z-index: 401;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
}
.cart-drawer.open { transform: translateY(0); }

.cart-drawer-handle {
  width: 40px;
  height: 4px;
  background: var(--cart-border);
  border-radius: 2px;
  margin: 12px auto 4px;
  flex-shrink: 0;
}

/* ─── Dialogs ───────────────────────────────────── */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  padding: 20px;
  animation: fadeIn 0.18s;
}

.dialog-sheet {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.22s cubic-bezier(0.32,0.72,0,1);
  max-height: 90dvh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.dialog-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dialog-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Client search dialog */
.client-search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-warm);
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
  margin-bottom: 12px;
  position: relative;
}
.client-search-input:focus { border-color: var(--primary); }

.client-search-wrap {
  position: relative;
  margin-bottom: 12px;
}
.client-search-wrap .mdi {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.client-search-wrap input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-warm);
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
}
.client-search-wrap input:focus { border-color: var(--primary); background: var(--surface); }

.client-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.client-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.12s;
  background: var(--surface);
}
.client-item:hover { border-color: var(--primary-border); background: var(--primary-bg); }
.client-item.selected { border-color: var(--primary); background: var(--primary-bg); }

.client-item-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.client-item-rfc {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-top: 2px;
}
.client-item-date {
  font-size: 0.62rem;
  color: var(--text-light);
  margin-top: 1px;
}

/* Confirm / ticket dialog */
.ticket-header {
  text-align: center;
  padding: 8px 0 16px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 12px;
}
.ticket-logo {
  font-size: 2rem;
  margin-bottom: 4px;
}
.ticket-shop { font-weight: 700; font-size: 1rem; }
.ticket-date { font-size: 0.72rem; color: var(--text-muted); }

.ticket-rows {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 12px;
}
.ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  gap: 8px;
}
.ticket-row-name { flex: 1; color: var(--text); }
.ticket-row-qty {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}
.ticket-row-total { font-weight: 700; color: var(--text); white-space: nowrap; }

.ticket-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 4px;
  font-size: 1rem;
  font-weight: 800;
}
.ticket-total-row span:last-child { color: var(--primary); }

.ticket-client-row {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

/* ─── Buttons ───────────────────────────────────── */
.btn-row { display: flex; gap: 10px; }

.btn-primary {
  flex: 1;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: opacity 0.15s;
  box-shadow: 0 3px 10px rgba(181,116,58,0.25);
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
  flex: 1;
  padding: 11px 16px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.15s, color 0.15s;
}
.btn-ghost:hover { background: var(--bg-warm); color: var(--text); }

.btn-success {
  flex: 1;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 3px 10px rgba(107,156,126,0.25);
  transition: opacity 0.15s;
}
.btn-success:hover { opacity: 0.9; }

/* ─── Success Screen ────────────────────────────── */
.success-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 700;
  padding: 30px 20px;
  text-align: center;
  animation: fadeIn 0.25s;
}
.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--success);
  background: var(--success-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--success);
  margin-bottom: 20px;
  animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.success-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.success-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}
.success-amount {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 4px;
}
.success-amount-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.success-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; }

/* ─── Snackbar ──────────────────────────────────── */
.snackbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 0.82rem;
  font-weight: 500;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: var(--shadow-lg);
  animation: slideUpFade 0.22s;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
}
.snackbar.success { background: var(--success); }
.snackbar.error   { background: var(--error); }
.snackbar.warning { background: var(--warning); color: #fff; }
.snackbar.info    { background: var(--primary); }

/* ─── Loading ───────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(250,248,245,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 800;
  gap: 14px;
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.loading-text { font-size: 0.85rem; color: var(--text-muted); }

/* ─── Pending badge ─────────────────────────────── */
.pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: var(--warning-bg);
  border: 1px solid rgba(192,122,16,0.3);
  border-radius: 20px;
  font-size: 0.68rem;
  color: var(--warning);
  font-weight: 600;
}

/* ─── Animations ────────────────────────────────── */
@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp   { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideUpFade { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes popIn     { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes spin      { to { transform: rotate(360deg); } }

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 720px) {
  :root { --cart-width: 100%; }

  .cart-panel { display: none; }
  .cart-fab   { display: flex; }
}

@media (min-width: 721px) {
  .cart-drawer-overlay { display: none !important; }
}

@media (min-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  }
}

@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
  :root { --cart-width: 380px; }
}

@media (hover: none) {
  /* Touch devices — hide hover states that can stick */
  .product-card:hover { transform: none; box-shadow: none; border-color: var(--border); }
  .product-card.in-cart:hover { border-color: var(--primary); }
}
