*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1e1e1e;
  --primary-light: #333;
  --accent: #00bfa5;
  --accent-light: #1de9b6;
  --accent-soft: rgba(0,191,165,.08);
  --bg: #f7f8fa;
  --surface: #fff;
  --surface-alt: #fafbfc;
  --text: #1e1e1e;
  --text-secondary: #555;
  --text-muted: #999;
  --border: #eaedf0;
  --border-light: #f0f1f3;
  --green: #00bfa5;
  --orange: #fb8c00;
  --red: #ef5350;
  --row-hover: #f4fffe;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.1);
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  padding-bottom: 72px;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
  background: var(--surface);
  color: var(--text);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.88);
}
.logo { font-size: 22px; font-weight: 800; letter-spacing: -.3px; color: var(--primary); }
.logo span { font-weight: 400; color: var(--accent); }
.logo-img { height: 22px; display: block; }
.header-left { display: flex; align-items: center; }
/* Aviso discreto de actualización (junto al logo) */
.update-note {
  margin-left: 12px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 230px;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.update-note.visible { opacity: 1; }
.cart-summary {
  background: var(--accent-soft);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  border: 1px solid rgba(0,191,165,.15);
}
.cart-icon { font-size: 16px; }

/* Category Tabs */
.tabs {
  display: flex;
  gap: 0;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
}
.tab-btn {
  padding: 12px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all .2s;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.tab-btn:hover { color: var(--accent); background: var(--row-hover); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.btn-download {
  margin-left: auto;
  padding: 7px 16px;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn-download:hover { background: var(--accent); color: #fff; }
.filter-group label { font-weight: 600; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.filter-group select,
.filter-group input {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  transition: all .2s;
  background: var(--surface-alt);
}
.filter-group select:focus,
.filter-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,191,165,.1); }
.filter-group select { min-width: 180px; }
.filter-group input { min-width: 240px; }
.result-count { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* Table */
.table-wrapper { padding: 16px 20px; }
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.data-table thead { background: var(--surface-alt); }
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  font-weight: 600;
  user-select: none;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.data-table th.sortable { cursor: pointer; }
.data-table th.sortable:hover { color: var(--accent); background: var(--row-hover); }
.data-table th .sort-arrow { margin-left: 4px; font-size: 10px; opacity: .4; }
.data-table th.sort-asc .sort-arrow,
.data-table th.sort-desc .sort-arrow { opacity: 1; color: var(--accent); }

.data-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  vertical-align: middle;
}
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--row-hover); }
.data-table tbody tr.in-cart { background: var(--accent-soft); }
.data-table tbody tr.in-cart:hover { background: rgba(0,191,165,.12); }

/* Catálogo: anchos de columna (SKU/Cod.Barra angostos, Nombre ancho) + redimensionables */
#productTable { table-layout: fixed; }
#productTable th[data-col="brand"]     { width: 13%; }
#productTable th[data-col="name"]      { width: 35%; }
#productTable th[data-col="ean"]       { width: 12%; }
#productTable th[data-col="sku"]       { width: 10%; }
#productTable th[data-col="stock"]     { width: 8%; }
#productTable th[data-col="qty"]       { width: 13%; }
#productTable th[data-col="salePrice"] { width: 9%; }
#productTable td.col-sku {
  font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Cod. Barra: mostrar completo (sin recortar con ...), envolviendo si hace falta */
#productTable td.col-ean {
  font-size: 11px; white-space: normal; word-break: break-all; overflow: visible; text-overflow: clip;
}
#productTable td.col-name { white-space: normal; }
/* SKU bajo el EAN: solo visible en la columna fusionada (móvil/tablet) */
#productTable .col-ean .sku-sub { display: none; }

/* Móvil / tablet horizontal: fusionar Cod. Barra + SKU en una sola columna
   para ganar espacio horizontal y no perderlo a los costados. */
@media (max-width: 1200px) {
  #productTable th[data-col="sku"],
  #productTable td.col-sku { display: none; }
  #productTable th[data-col="ean"]::after {
    content: " / SKU";
    color: var(--text-muted);
    font-weight: 600;
  }
  #productTable td.col-ean { white-space: nowrap; word-break: normal; }
  #productTable .col-ean .sku-sub {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Redistribuir anchos (sin la columna SKU): el espacio va a Nombre */
  #productTable th[data-col="brand"]     { width: 15%; }
  #productTable th[data-col="name"]      { width: 40%; }
  #productTable th[data-col="ean"]       { width: 16%; }
  #productTable th[data-col="stock"]     { width: 8%; }
  #productTable th[data-col="qty"]       { width: 12%; }
  #productTable th[data-col="salePrice"] { width: 9%; }
}
#productTable th.sortable { position: relative; }
.col-resizer {
  position: absolute; top: 0; right: 0; width: 7px; height: 100%;
  cursor: col-resize; user-select: none; z-index: 3;
}
.col-resizer:hover { background: rgba(0,191,165,.4); }

.col-brand { font-weight: 600; min-width: 110px; color: var(--primary); }
.col-name {
  max-width: 350px;
  cursor: pointer;
  position: relative;
  color: var(--text-secondary);
}
.col-name:hover { color: var(--accent); text-decoration: underline; }
.col-ean { font-family: 'Cascadia Code', 'Consolas', monospace; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.col-sku { font-family: 'Cascadia Code', 'Consolas', monospace; font-size: 12px; color: var(--text-muted); }
.col-stock { text-align: center; font-weight: 600; }
.stock-ok { color: var(--green); }
.stock-low { color: var(--orange); }
.stock-out { color: var(--red); }
.col-price {
  font-weight: 700;
  color: var(--primary);
  text-align: right;
  white-space: nowrap;
  font-size: 14px;
}
.price-original {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
  display: block;
}
.badge-no-dcto {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* ── Precio tachado + badge de % (consistente en todas las vistas) ── */
/* Buscador (dropdown de sugerencias) */
.sg-old { color: var(--text-muted); text-decoration: line-through; font-size: 11px; font-weight: 400; }
.sg-badge { color: #b45309; background: #fef3c7; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; }

/* Mis Pedidos: badge de descuento por línea + ahorro en el resumen */
.op-badge { display: inline-block; color: #b45309; background: #fef3c7; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; margin-top: 2px; }
.order-summary-row .os-old { text-decoration: line-through; color: var(--text-muted); }
.order-summary-row.os-save span { color: #b45309; font-weight: 700; }

/* Carrito: filas "Precio normal" (tachado) y "Ahorro" en el total */
.cart-subtotal-row td, .cart-save-row td { padding-top: 4px; padding-bottom: 0; border: 0; }
.cart-subtotal-label, .cart-save-label { text-align: right; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.cart-subtotal-value { text-align: right; font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.cart-save-label { color: #b45309; }
.cart-save-value { text-align: right; font-size: 13px; font-weight: 700; color: #b45309; }

/* Confirmación: resumen de precios (normal tachado + ahorro + total) */
.confirm-summary { max-width: 320px; margin: 16px auto 4px; text-align: left; }
.confirm-summary .cs-row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--text-secondary); padding: 3px 0; }
.confirm-summary .cs-row s { color: var(--text-muted); }
.confirm-summary .cs-save span { color: #b45309; font-weight: 700; }
.confirm-summary .cs-total { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 16px; font-weight: 800; color: var(--primary); }
.confirm-summary .cs-total strong { color: var(--accent); }

/* Toast de notificación */
.refresh-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 9999;
}
.refresh-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Quantity Selector */
.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-alt);
}
.qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.qty-btn:hover { background: var(--accent-soft); color: var(--accent); }
.qty-btn:active { background: rgba(0,191,165,.15); }
.qty-btn.minus { border-right: 1px solid var(--border-light); }
.qty-btn.plus { border-left: 1px solid var(--border-light); }
.qty-btn:disabled { opacity: .25; cursor: not-allowed; }
.qty-value {
  width: 40px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 0 4px;
  color: var(--text-muted);
}
.qty-value.has-qty { color: var(--accent); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 20px;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.page-btn:hover { background: var(--row-hover); border-color: var(--accent); color: var(--accent); }
.page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,191,165,.25);
}
.page-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 500;
  pointer-events: none;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  max-width: 280px;
  max-height: 280px;
  border: 1px solid var(--border);
}
.image-modal.visible { display: block; }
.image-modal img {
  max-width: 260px;
  max-height: 260px;
  display: block;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

/* Loading */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(247,248,250,.95);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.loading-overlay.hidden { display: none; }
.loading-overlay p { color: var(--text-muted); font-weight: 500; }
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Cart Bar */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  color: var(--text);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
  transform: translateY(100%);
  transition: transform .25s ease;
}
.cart-bar.visible { transform: translateY(0); }
.cart-bar-info { display: flex; gap: 24px; align-items: center; font-size: 14px; color: var(--text-secondary); }
.cart-bar-total { font-size: 17px; color: var(--primary); }
.btn-cart {
  padding: 10px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(0,191,165,.25);
}
.btn-cart:hover:not(:disabled) { background: #00a896; box-shadow: 0 4px 12px rgba(0,191,165,.35); }
.btn-cart:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
  font-size: 15px;
}

/* User header */
.header-right { display: flex; align-items: center; gap: 12px; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.btn-logout {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

/* ── Login Page ── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  padding: 20px;
}
.login-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.login-logo { font-size: 28px; font-weight: 800; color: var(--primary); letter-spacing: -.3px; }
.login-logo span { font-weight: 400; color: var(--accent); }
.login-logo-img { height: 29px; display: block; margin: 0 auto 8px; }
.login-subtitle { color: var(--text-muted); font-size: 14px; margin: 8px 0 32px; }
.form-field { text-align: left; margin-bottom: 20px; }
.form-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.form-field input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  transition: all .2s;
  background: var(--surface-alt);
}
.form-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,191,165,.1); }
.captcha-wrapper { display: flex; justify-content: center; margin-bottom: 24px; }
.btn-login {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(0,191,165,.25);
}
.btn-login:hover:not(:disabled) { background: #00a896; }
.btn-login:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.login-error {
  margin-top: 16px;
  padding: 10px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--red);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}
/* Correo no registrado → invitar a crear cuenta */
.login-register {
  margin-top: 16px;
  padding: 18px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  text-align: center;
}
.login-register-text {
  font-size: 13px;
  line-height: 1.5;
  color: #92400e;
  margin: 0 0 14px;
}
.btn-register {
  display: block;
  width: 100%;
  padding: 12px;
  background: #1e1e1e;
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s;
  box-sizing: border-box;
}
.btn-register:hover { opacity: .88; }

/* Aviso: iniciar sesión en sairam.cl antes de ingresar (para que apliquen descuentos) */
.login-notice {
  margin: 0 0 28px;
  padding: 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(0, 191, 165, .3);
  border-radius: var(--radius-sm);
  text-align: center;
}
.login-notice.hidden { display: none; }
.login-notice-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--primary);
  margin: 0 0 14px;
}
.btn-sairam-login {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 191, 165, .25);
}
.btn-sairam-login:hover { background: #00a896; }

/* Admin detected step */
.admin-detected {
  text-align: center;
  margin-bottom: 20px;
}
.admin-detected-text {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(0,191,165,.08);
  border: 1px solid rgba(0,191,165,.2);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.admin-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.admin-divider::before, .admin-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.btn-client-login {
  background: var(--surface) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}
.btn-client-login:hover:not(:disabled) {
  background: var(--bg) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

.hidden { display: none !important; }

/* ── Cart Page ── */
.cart-page { padding: 24px 28px; max-width: 1200px; margin: 0 auto; }
.cart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.cart-header h2 { font-size: 22px; font-weight: 700; color: var(--primary); }
.btn-back {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: opacity .15s;
}
.btn-back:hover { opacity: .7; }

.cart-table { width: 100%; }
.cart-table-wrapper { overflow-x: auto; }
.cart-product-name { font-weight: 500; max-width: 300px; }
.cart-total-row td { border-top: 2px solid var(--border); padding-top: 14px; }
.cart-total-label { text-align: right; font-size: 16px; font-weight: 700; color: var(--primary); }
.cart-total-value { font-size: 18px; font-weight: 800; color: var(--accent); text-align: right; }

.btn-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.btn-remove:hover { color: var(--red); background: #fef2f2; }

/* Cart info bar */
.cart-info-bar {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(0,191,165,.05);
  border: 1px solid rgba(0,191,165,.15);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}
.cart-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.cart-info-icon { font-size: 16px; }
.cart-info-item strong { color: var(--accent); }

.cart-confirm-wrap { text-align: right; }
.cart-min-warning {
  margin-top: 8px;
  font-size: 12px;
  color: var(--orange);
  font-weight: 500;
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 16px;
}

/* ── Dirección de envío (checkout) ── */
.shipping-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
  margin: 22px 0 0;
}
.shipping-title { font-size: 18px; font-weight: 700; color: var(--primary); margin: 0 0 18px; }
.shipping-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.ship-field { display: flex; flex-direction: column; text-align: left; }
.ship-field-full { grid-column: 1 / -1; }
.ship-field label {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px;
}
.ship-field .req { color: var(--red); }
.ship-field input, .ship-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--surface-alt);
  outline: none;
  transition: all .15s;
  box-sizing: border-box;
}
.ship-field input:focus, .ship-field select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,191,165,.1);
}
.ship-field select:disabled { opacity: .55; cursor: not-allowed; }
.ship-factura {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px; font-size: 14px; color: var(--text-secondary); cursor: pointer; user-select: none;
}
.ship-factura input { width: 16px; height: 16px; cursor: pointer; }
.ship-field label .opt { text-transform: none; font-weight: 400; color: var(--text-muted); font-size: 11px; letter-spacing: 0; }
.ship-hint { color: var(--text-muted); font-weight: 400; }
.factura-fields { margin-top: 14px; }
.shipping-disabled-note { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 16px 18px; margin-top: 18px; color: var(--text-secondary); font-size: 14px; }
.shipping-disabled-note .cart-info-icon { font-size: 18px; }
.ship-error {
  margin-top: 16px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--red);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}
@media (max-width: 620px) {
  .shipping-card { padding: 18px 16px; }
  .shipping-grid { grid-template-columns: 1fr; }
}
.btn-primary {
  padding: 12px 32px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(0,191,165,.25);
}
.btn-primary:hover { background: #00a896; }
.btn-primary:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; box-shadow: none; opacity: .6; }
.btn-secondary {
  padding: 12px 32px;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.cart-empty p { font-size: 18px; margin-bottom: 20px; }

/* Alerts */
.stock-alerts { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.alert {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* Order Confirmation */
.order-confirmation {
  position: fixed;
  inset: 0;
  background: rgba(247,248,250,.97);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  padding: 48px 40px;
  text-align: center;
  max-width: 480px;
}
.confirm-icon { font-size: 48px; color: var(--accent); margin-bottom: 16px; }
.confirm-card h2 { font-size: 22px; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.confirm-card p { color: var(--text-secondary); font-size: 15px; margin-bottom: 28px; line-height: 1.5; }

/* Cuenta regresiva en la pantalla de confirmación */
.confirm-countdown {
  margin: 0 0 24px;
  padding: 12px 16px;
  background: #fff8e1;
  border: 1px solid #ffe0a3;
  border-radius: 10px;
  font-size: 14px;
  color: #8a5a00;
  line-height: 1.5;
}
.confirm-countdown.hidden { display: none; }
.confirm-countdown .cc-ico { margin-right: 2px; }
.confirm-countdown strong { color: #5d3c00; }
.confirm-countdown .cc-rem { font-weight: 700; color: #c0392b; font-variant-numeric: tabular-nums; }
.confirm-countdown.expired { background: #fdecec; border-color: #f5c2c2; color: #a93226; }
.confirm-countdown.expired .cc-rem { color: #a93226; }

/* Chip de pago pendiente en el header (menú del usuario) */
.pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 100px;
  background: #fff3e0;
  border: 1px solid #ffcc80;
  color: #b45309;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s;
}
.pay-chip:hover { background: #ffe0b2; border-color: #ffb74d; }
.pay-chip strong { color: #c0392b; font-variant-numeric: tabular-nums; }
.pay-chip.expired { background: #fdecec; border-color: #f5c2c2; color: #c0392b; }
.pay-chip.hidden { display: none; }
.pay-chip-ico { font-size: 13px; }

/* ── Orders Button ── */
.btn-orders {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-orders:hover { border-color: var(--accent); color: var(--accent); }

/* ── Orders Page ── */
.orders-page { padding: 24px 28px; max-width: 900px; margin: 0 auto; }
.orders-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.orders-header h2 { font-size: 22px; font-weight: 700; color: var(--primary); }

.orders-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.orders-empty p { font-size: 18px; margin-bottom: 20px; }

.orders-error {
  text-align: center;
  padding: 40px 20px;
  color: var(--red);
  font-size: 14px;
}
.orders-error button { margin-top: 16px; }

.orders-list { display: flex; flex-direction: column; gap: 12px; }

.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.order-card:hover { box-shadow: var(--shadow-md); }

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  transition: background .15s;
  gap: 12px;
}
.order-card-header:hover { background: var(--surface-alt); }

.order-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.order-id { font-size: 15px; font-weight: 700; color: var(--primary); }
.order-date { font-size: 12px; color: var(--text-muted); }

.order-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.order-items { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.order-total { font-size: 16px; font-weight: 700; color: var(--primary); white-space: nowrap; }

.order-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap;
}
.status-paid { background: #dcfce7; color: #166534; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-cancelled { background: #fef2f2; color: #991b1b; }
.status-shipped { background: #dbeafe; color: #1e40af; }
.status-delivered { background: #dcfce7; color: #166534; }
.status-other { background: #f3f4f6; color: #4b5563; }
.status-unknown { background: #f3f4f6; color: #9ca3af; }

.order-toggle {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform .2s;
}
.order-card.expanded .order-toggle { transform: rotate(180deg); }

.order-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.order-card.expanded .order-card-body {
  max-height: 800px;
}

/* Cuenta regresiva de pago (pedidos pendientes) — siempre visible */
.pay-countdown {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 11px 18px;
  background: #fff8e1;
  border-top: 1px solid #ffe0a3;
  font-size: 13px;
  color: #8a5a00;
}
.pay-countdown .pc-icon { font-size: 15px; line-height: 1; }
.pay-countdown .pc-main strong { color: #5d3c00; white-space: nowrap; }
.pay-countdown .pc-sep { color: #c9a23a; }
.pay-countdown .pc-remaining {
  font-weight: 700;
  color: #c0392b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pay-countdown.expired {
  background: #fdecec;
  border-top-color: #f5c2c2;
  color: #a93226;
}
.pay-countdown.expired .pc-main strong { color: #a93226; }

.order-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.order-products-table thead {
  background: var(--surface-alt);
}
.order-products-table th {
  padding: 8px 16px;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  font-weight: 600;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.order-products-table td {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.order-products-table tbody tr:last-child td { border-bottom: none; }
.op-name { font-weight: 500; color: var(--text-secondary); max-width: 300px; }
.op-sku { font-family: 'Cascadia Code', 'Consolas', monospace; font-size: 11px; color: var(--text-muted); }
.op-qty { text-align: center; font-weight: 600; }
.op-price { text-align: right; white-space: nowrap; }
.op-original-price {
  display: block;
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 400;
}
.op-subtotal { text-align: right; font-weight: 600; white-space: nowrap; }

.order-summary {
  padding: 12px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  border-top: 1px solid var(--border-light);
}
.order-summary-row {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}
.order-summary-row span:last-child { min-width: 80px; text-align: right; }
.order-summary-total {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.order-pay-action { margin-top: 12px; }
.btn-pay {
  display: inline-block;
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(0,191,165,.25);
}
.btn-pay:hover { background: #00a896; }

/* ── Smart Search Autocomplete ── */
.search-group { position: relative; }
.search-wrapper { position: relative; }
.search-wrapper input { min-width: 300px; }
.search-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 480px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 300;
}
.search-dropdown.hidden { display: none; }
.search-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background .1s;
  gap: 16px;
}
.search-suggestion:hover,
.search-suggestion.active { background: var(--accent-soft); }
.sg-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.sg-brand {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .3px;
}
.sg-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sg-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sg-sku {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Cascadia Code', 'Consolas', monospace;
}
.sg-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.sg-stock {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.search-suggestion mark {
  background: rgba(0,191,165,.25);
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}
.search-footer {
  padding: 6px 14px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  background: var(--surface-alt);
  border-top: 1px solid var(--border-light);
}

/* Scrollbar */
::-webkit-scrollbar { height: 5px; width: 5px; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ───────── Bloqueo de orientación vertical (solo móvil) ───────── */
.orientation-lock { display: none; }

@media only screen and (max-width: 920px) and (orientation: portrait) {
  html, body { overflow: hidden; }
  .orientation-lock {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: #000;
    color: #fff;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 24px;
    overflow-y: auto;
  }
}

.orientation-lock .ol-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 360px;
  width: 100%;
}
.orientation-lock .ol-logo {
  width: 168px;
  max-width: 62%;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: .92;
}
.orientation-lock .ol-rotate { margin: 2px 0; }
@keyframes ol-rotate-phone {
  0%, 35%   { transform: rotate(0deg); }
  55%, 100% { transform: rotate(-90deg); }
}
.orientation-lock .ol-phone {
  transform-box: fill-box;
  transform-origin: center;
  animation: ol-rotate-phone 2.2s ease-in-out infinite;
}
.orientation-lock .ol-title {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .3px;
}
.orientation-lock .ol-msg {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #b9b9b9;
}
.orientation-lock .ol-msg strong { color: #00bfa5; }

.orientation-lock .ol-order {
  margin-top: 4px;
  width: 100%;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  padding: 12px 12px 14px;
  text-align: left;
}
.orientation-lock .ol-order-empty {
  margin: 0;
  text-align: center;
  color: #9a9a9a;
  font-size: 13px;
}
.orientation-lock .ol-order-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8a8a8a;
  margin: 0 2px 2px;
}
.orientation-lock .ol-order-count {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 0 2px 8px;
}

/* Lista scrollable de items */
.orientation-lock .ol-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 42vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.orientation-lock .ol-loading { color: #9a9a9a; font-size: 13px; padding: 6px 2px; }
.orientation-lock .ol-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.orientation-lock .ol-item:first-child { border-top: none; }

.orientation-lock .ol-thumb-wrap {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.orientation-lock .ol-thumb-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f2a28;
  color: #00bfa5;
  font-weight: 800;
  font-size: 18px;
}
.orientation-lock .ol-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.orientation-lock .ol-it-main { flex: 1 1 auto; min-width: 0; }
.orientation-lock .ol-it-name {
  font-size: 13px;
  color: #f0f0f0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.orientation-lock .ol-it-qty { color: #00bfa5; font-weight: 700; }
.orientation-lock .ol-it-price {
  margin-top: 3px;
  font-size: 12.5px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.orientation-lock .ol-it-sale { color: #fff; font-weight: 700; }
.orientation-lock .ol-it-old { color: #8a8a8a; font-size: 11px; }
.orientation-lock .ol-it-badge {
  color: #00bfa5;
  font-weight: 700;
  font-size: 11px;
  background: rgba(0, 191, 165, .14);
  border-radius: 5px;
  padding: 1px 5px;
}
.orientation-lock .ol-it-sub {
  flex: none;
  align-self: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

/* Total + envío */
.orientation-lock .ol-order-foot { margin-top: 10px; }
.orientation-lock .ol-save-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12px;
  color: #b9b9b9;
  padding: 2px 0;
}
.orientation-lock .ol-save-row s { color: #8a8a8a; }
.orientation-lock .ol-save span:last-child { color: #ffd27a; font-weight: 700; }
.orientation-lock .ol-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 2px solid rgba(255, 255, 255, .18);
}
.orientation-lock .ol-total-row span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #b9b9b9;
}
.orientation-lock .ol-total-row strong { font-size: 19px; color: #00bfa5; }
.orientation-lock .ol-ship {
  margin-top: 8px;
  font-size: 12px;
  color: #cfcfcf;
  background: rgba(0, 191, 165, .1);
  border: 1px solid rgba(0, 191, 165, .25);
  border-radius: 8px;
  padding: 7px 10px;
}
.orientation-lock .ol-ship strong { color: #00bfa5; }
.orientation-lock .ol-ship-ico { margin-right: 2px; }

/* Pedido pendiente de pago: cuenta regresiva (urgente) */
.orientation-lock .ol-pending {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.orientation-lock .ol-pay {
  width: 100%;
  text-align: left;
  background: rgba(231, 76, 60, .12);
  border: 1px solid rgba(231, 76, 60, .42);
  border-radius: 12px;
  padding: 12px 14px;
}
.orientation-lock .ol-pay-top {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #ff8a80;
  margin-bottom: 5px;
}
.orientation-lock .ol-pay-ico { margin-right: 2px; }
.orientation-lock .ol-pay-line { font-size: 13px; color: #e6e6e6; line-height: 1.4; }
.orientation-lock .ol-pay-line strong { color: #fff; }
.orientation-lock .ol-pay-rem {
  margin-top: 5px;
  font-size: 16px;
  font-weight: 800;
  color: #ff5252;
  font-variant-numeric: tabular-nums;
}
.orientation-lock .ol-pay.expired .ol-pay-rem { color: #ff8a80; }
.orientation-lock .ol-pay-btn {
  display: inline-block;
  margin-top: 10px;
  background: #00bfa5;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 20px;
  border-radius: 8px;
}

/* ───────── Móvil horizontal: compactar para ganar espacio ───────── */
@media (max-width: 940px) {
  /* Header */
  .header { padding: 7px 12px; }
  .logo-img { height: 17px; }
  .header-right { gap: 6px; }
  .user-name { display: none; }
  .cart-summary { padding: 5px 10px; font-size: 11px; gap: 5px; }
  .cart-icon { font-size: 13px; }
  .btn-orders { padding: 6px 10px; font-size: 11px; }
  .btn-logout { padding: 5px 9px; font-size: 11px; }
  .pay-chip { padding: 4px 9px; font-size: 11px; }
  .update-note { max-width: 96px; margin-left: 8px; font-size: 10px; }

  /* Tabs de categoría */
  .tabs { padding: 0 6px; }
  .tab-btn { padding: 7px 11px; font-size: 11px; letter-spacing: .3px; }

  /* Toolbar en UNA fila (sin envolver) */
  .toolbar { padding: 7px 10px; gap: 7px; flex-wrap: nowrap; overflow-x: auto; }
  .toolbar .filter-group label { display: none; }
  .filter-group { gap: 0; }
  .filter-group select { min-width: 0; max-width: 130px; padding: 6px 8px; font-size: 12px; }
  .search-group { flex: 1 1 auto; min-width: 90px; }
  .search-group .search-wrapper { width: 100%; }
  .search-wrapper input,
  .filter-group input { min-width: 0; width: 100%; padding: 6px 10px; font-size: 12px; }
  .result-count { display: none; }
  .btn-download { padding: 6px 9px; font-size: 11px; margin-left: 0; }

  /* Tabla: densa y a ancho completo */
  .table-wrapper { padding: 6px 8px; }
  .data-table { border-radius: 8px; }
  .data-table th { padding: 6px 8px; font-size: 9.5px; letter-spacing: .3px; }
  .data-table td { padding: 5px 8px; font-size: 12px; }

  /* Menos ancho a Nombre y más a Cantidad para que el stepper +/- se vea completo */
  #productTable th[data-col="name"] { width: 30%; }
  #productTable th[data-col="qty"]  { width: 22%; }
  #productTable td.col-qty { padding-left: 2px; padding-right: 2px; }

  /* Footer del carrito */
  .cart-bar { padding: 8px 12px; }
  .cart-bar-info { gap: 10px; font-size: 11px; }
  .cart-bar-total { font-size: 14px; }
  .btn-cart { padding: 8px 16px; font-size: 13px; }

  /* Paginación */
  .pagination { padding: 6px 8px 12px; gap: 4px; }
  .page-btn { min-width: 30px; height: 30px; font-size: 12px; }

  /* Dejar aire bajo el contenido cuando el footer del carrito está visible */
  body:has(.cart-bar.visible) { padding-bottom: 56px; }

  /* Carrito / Mis Pedidos */
  .cart-page, .orders-page { padding: 12px 12px 70px; }
  .cart-header h2, .orders-header h2 { font-size: 18px; }
  .cart-table th, .cart-table td { padding: 7px 9px; font-size: 12px; }
}
