/* ============================================================
   Bazario — Design System
   Paleta pastel cálida (conservas / madera / cocina de campo) — en variables
   para poder recolorear en minutos si hace falta.
   ============================================================ */

:root {
  /* Paleta base — cálida, terracota / arcilla / salvia */
  --color-bg: #FBF5EC;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F7EEE0;
  --color-primary: #C97C5D;
  --color-primary-dark: #A85D40;
  --color-primary-light: #F0D9C9;
  --color-secondary: #8FA888;
  --color-secondary-dark: #6E8768;
  --color-accent: #E3A857;
  --color-text: #4A3B31;
  --color-text-muted: #8C7C6D;
  --color-border: #E9DDCB;
  --color-success: #6E8768;
  --color-success-bg: #E8EEE4;
  --color-warning: #C97C5D;
  --color-warning-bg: #F6E4D8;
  --color-danger: #B6543D;
  --color-danger-bg: #F5E1DB;
  --color-info-bg: #F1E6D3;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 3px rgba(74, 59, 49, 0.08);
  --shadow-md: 0 6px 20px rgba(74, 59, 49, 0.10);
  --shadow-lg: 0 12px 36px rgba(74, 59, 49, 0.14);

  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Íconos SVG inline ---------- */
svg { display: inline-block; vertical-align: -0.15em; flex-shrink: 0; }
.icon-slot, .icon-inline {
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: -3px;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 .5em;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Top banner (demo notice) ---------- */
.demo-banner {
  background: var(--color-text);
  color: #fff;
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
}
.demo-banner strong { color: var(--color-accent); }
.demo-banner button {
  background: none;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 3px 12px;
  font-size: 12px;
  margin-left: 10px;
  cursor: pointer;
}
.demo-banner button:hover { background: rgba(255,255,255,.12); }

/* ---------- Header ---------- */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
}
.brand .logo-mark {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-weight: 700;
  flex-shrink: 0;
}
nav.main-nav { display: flex; align-items: center; gap: 26px; }
nav.main-nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 15px;
}
nav.main-nav a.active { color: var(--color-primary-dark); }

.cart-link {
  display: flex; align-items: center; gap: 6px;
  background: var(--color-surface-alt);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-weight: 600;
  position: relative;
}
.cart-count {
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 11px;
  min-width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-full);
  padding: 12px 26px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: var(--shadow-sm); }
.btn-secondary { background: var(--color-surface); color: var(--color-text); border: 1.5px solid var(--color-border); }
.btn-secondary:hover { border-color: var(--color-primary); }
.btn-ghost { background: transparent; color: var(--color-primary-dark); padding: 12px 8px; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-danger { background: var(--color-danger); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-surface-alt), var(--color-bg));
  padding: 56px 0 40px;
  text-align: center;
}
.hero h1 { font-size: 40px; max-width: 700px; margin: 0 auto .3em; }
.hero p { color: var(--color-text-muted); font-size: 17px; max-width: 560px; margin: 0 auto 22px; }
.hero .tags { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.pill {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ---------- Catalog toolbar ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  margin: 28px 0 22px;
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  min-width: 260px;
  flex: 1;
  max-width: 380px;
}
.search-box input {
  border: none; outline: none; background: none; font-size: 15px; width: 100%;
  font-family: var(--font-body); color: var(--color-text);
}
.category-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.category-filters button {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text);
  font-family: var(--font-body);
}
.category-filters button.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  margin: 24px 0 60px;
}
.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card .thumb {
  aspect-ratio: 1 / 1;
  background: var(--color-surface-alt);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .cat { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--color-secondary-dark); font-weight: 600; }
.product-card h3 { font-size: 17px; margin: 0; }
.product-card .price { font-weight: 700; color: var(--color-primary-dark); font-size: 16px; margin-top: auto; }
.product-card .add-row { padding: 0 16px 16px; }
.no-results { text-align: center; padding: 60px 20px; color: var(--color-text-muted); }

/* ---------- Product detail ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px;
  margin: 40px 0 70px;
  align-items: start;
}
.product-detail .gallery {
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: sticky;
  top: 96px;
}
.product-detail .gallery img { width: 100%; height: 100%; object-fit: cover; }
.product-detail .info .cat { color: var(--color-secondary-dark); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
.product-detail .info h1 { font-size: 30px; margin-top: 6px; }
.product-detail .info .price { font-size: 26px; font-weight: 700; color: var(--color-primary-dark); margin: 10px 0 18px; }
.product-detail .info p.desc { color: var(--color-text-muted); font-size: 15.5px; margin-bottom: 22px; }
.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.qty-stepper { display: flex; align-items: center; border: 1.5px solid var(--color-border); border-radius: var(--radius-full); overflow: hidden; }
.qty-stepper button { background: var(--color-surface-alt); border: none; width: 38px; height: 38px; font-size: 18px; cursor: pointer; color: var(--color-text); }
.qty-stepper span { width: 40px; text-align: center; font-weight: 600; }
.info-box {
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--color-text-muted);
  margin-top: 18px;
  display: flex; gap: 10px;
}

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; margin: 36px 0 70px; align-items: start; }
.cart-item {
  display: flex; gap: 16px; align-items: center;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 14px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.cart-item .thumb { width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-surface-alt); flex-shrink: 0; }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .grow { flex: 1; }
.cart-item h4 { margin: 0 0 4px; font-size: 15.5px; }
.cart-item .unit-price { color: var(--color-text-muted); font-size: 13px; }
.cart-item .line-price { font-weight: 700; color: var(--color-primary-dark); min-width: 90px; text-align: right; }
.remove-link { color: var(--color-danger); font-size: 12.5px; cursor: pointer; background: none; border: none; font-family: var(--font-body); padding: 0; margin-top: 4px; }

.summary-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  position: sticky; top: 96px;
}
.summary-card .row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14.5px; color: var(--color-text-muted); }
.summary-card .row.total { font-size: 19px; font-weight: 700; color: var(--color-text); border-top: 1px solid var(--color-border); padding-top: 14px; margin-top: 14px; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--color-text-muted); }
.empty-state .icon { font-size: 48px; margin-bottom: 14px; }

/* ---------- Steps ---------- */
.steps { display: flex; justify-content: center; gap: 6px; margin: 30px 0 10px; }
.step-dot {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--color-text-muted); font-weight: 600;
}
.step-dot .num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--color-surface-alt);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px;
}
.step-dot.active .num { background: var(--color-primary); color: #fff; }
.step-dot.done .num { background: var(--color-secondary); color: #fff; }
.step-sep { width: 30px; height: 1.5px; background: var(--color-border); align-self: center; margin-top: 13px; }

.checkout-layout { max-width: 640px; margin: 20px auto 80px; }
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--color-text); }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--color-bg);
  color: var(--color-text);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--color-primary); }
.field .hint { font-size: 12px; color: var(--color-text-muted); margin-top: 5px; }

.delivery-option {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer;
}
.delivery-option.selected { border-color: var(--color-primary); background: var(--color-primary-light); }
.delivery-option.disabled { opacity: .55; cursor: not-allowed; }
.delivery-option input { margin-top: 3px; }
.delivery-option .title { font-weight: 700; font-size: 15px; }
.delivery-option .desc { font-size: 13px; color: var(--color-text-muted); margin-top: 2px; }
.badge-soon { background: var(--color-info-bg); color: var(--color-text-muted); font-size: 10.5px; padding: 2px 8px; border-radius: var(--radius-full); margin-left: 8px; font-weight: 600; }

/* ---------- Método de pago ---------- */
.method-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.method-tab {
  flex: 1; padding: 14px; text-align: center; cursor: pointer;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); font-weight: 700; font-size: 14.5px; color: var(--color-text);
}
.method-tab.active { border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary-dark); }

.card-brand-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.card-brand-chip {
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  padding: 12px 14px; cursor: pointer; background: var(--color-surface);
}
.card-brand-chip.selected { border-color: var(--color-primary); background: var(--color-primary-light); }
.card-brand-chip .label { font-weight: 700; font-size: 13.5px; }
.card-brand-chip .fee { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.card-brand-chip .fee.free { color: var(--color-secondary-dark); font-weight: 700; }

.card-visual {
  background: linear-gradient(135deg, var(--color-text), #6b584a);
  color: #fff; border-radius: var(--radius-md); padding: 20px; margin-bottom: 18px;
}
.card-visual .top-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.card-visual .num { font-family: var(--font-display); font-size: 19px; letter-spacing: 2px; margin: 22px 0 16px; }
.card-visual .bottom-row { display: flex; justify-content: space-between; font-size: 11.5px; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }

.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.payment-summary { background: var(--color-surface-alt); border-radius: var(--radius-md); padding: 16px 18px; margin: 4px 0 18px; }
.payment-summary .row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; color: var(--color-text-muted); }
.payment-summary .row.total { font-weight: 700; color: var(--color-text); font-size: 16.5px; border-top: 1px solid var(--color-border); margin-top: 8px; padding-top: 8px; }

.processing-overlay { text-align: center; padding: 50px 20px; }
.spinner {
  width: 44px; height: 44px; border: 4px solid var(--color-border);
  border-top-color: var(--color-primary); border-radius: 50%;
  margin: 0 auto 18px; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.transfer-box {
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}
.transfer-box .alias {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary-dark);
  background: var(--color-surface);
  border: 1.5px dashed var(--color-primary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 10px 0;
  display: inline-block;
}
.transfer-box .amount { font-size: 30px; font-weight: 700; margin: 10px 0; font-family: var(--font-display); }
.copy-btn { font-size: 12px; margin-left: 8px; }
.countdown {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--color-warning-bg); color: var(--color-danger);
  padding: 8px 16px; border-radius: var(--radius-full);
  font-weight: 700; font-size: 14px; margin-top: 14px;
}

.upload-box {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--color-bg);
}
.upload-box:hover { border-color: var(--color-primary); }
.upload-box.has-file { border-style: solid; border-color: var(--color-secondary); }
.upload-preview { max-width: 220px; margin: 14px auto 0; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); }

/* ---------- Status / confirmation screens ---------- */
.status-screen { max-width: 560px; margin: 60px auto; text-align: center; padding: 0 20px 80px; }
.status-icon {
  width: 84px; height: 84px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; margin: 0 auto 22px;
}
.status-icon.pending { background: var(--color-warning-bg); color: var(--color-danger); }
.status-icon.confirmed { background: var(--color-success-bg); color: var(--color-secondary-dark); }
.status-icon.cancelled { background: var(--color-danger-bg); color: var(--color-text-muted); }
.status-order-box {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: left;
  margin-top: 26px;
  box-shadow: var(--shadow-sm);
}
.status-order-box .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.status-order-box .row:last-child { border-bottom: none; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700;
}
.badge-pendiente_pago { background: var(--color-warning-bg); color: var(--color-danger); }
.badge-pendiente_confirmar { background: var(--color-info-bg); color: var(--color-text); }
.badge-pagado_confirmado { background: var(--color-success-bg); color: var(--color-secondary-dark); }
.badge-cancelado { background: #EEE; color: #888; }

/* ---------- Admin ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 230px; background: var(--color-text); color: #fff;
  padding: 24px 18px; flex-shrink: 0;
}
.admin-sidebar .brand { color: #fff; margin-bottom: 34px; }
.admin-sidebar a {
  display: block; color: #E9DDCB; padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 500; margin-bottom: 4px;
}
.admin-sidebar a.active, .admin-sidebar a:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  background: var(--color-accent); color: var(--color-text);
  border-radius: var(--radius-full); font-size: 11px; font-weight: 700;
}
.admin-main { flex: 1; padding: 34px 40px; max-width: 1100px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--color-surface-alt); }
.admin-login-card { background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 40px; width: 100%; max-width: 380px; text-align: center; }

.order-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 18px;
  align-items: center;
}
.order-card .receipt-thumb {
  width: 90px; height: 90px; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--color-surface-alt); cursor: pointer;
  border: 1.5px solid var(--color-border);
}
.order-card .receipt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-card h4 { margin: 0 0 4px; font-size: 16px; }
.order-card .meta { font-size: 13px; color: var(--color-text-muted); margin-bottom: 6px; }
.order-card .items-list { font-size: 13px; color: var(--color-text-muted); }
.order-card .actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.order-card .amount { font-weight: 700; color: var(--color-primary-dark); font-size: 17px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
.stat-card { background: var(--color-surface); border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat-card .num { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.stat-card .label { font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; }

.category-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--color-surface-alt);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 6px 6px 6px 14px;
  font-size: 13px;
  margin: 0 8px 8px 0;
}
.category-chip .count { color: var(--color-text-muted); }
.category-chip button {
  background: none; border: none; cursor: pointer; font-size: 13px;
  padding: 4px 6px; border-radius: 50%; line-height: 1;
}
.category-chip button:hover { background: var(--color-surface); }
.add-category-form { display: inline-flex; gap: 8px; align-items: center; }
.add-category-form input {
  border: 1.5px solid var(--color-border); border-radius: var(--radius-full);
  padding: 8px 14px; font-size: 13.5px; width: 220px;
  font-family: var(--font-body); background: var(--color-bg); color: var(--color-text);
}

.admin-product-card {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.admin-product-card .thumb { width: 70px; height: 70px; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-surface-alt); }
.admin-product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-product-card h4 { margin: 0 0 4px; font-size: 15px; }
.admin-product-card .meta { font-size: 12.5px; color: var(--color-text-muted); }
.admin-product-card .actions { display: flex; gap: 8px; }

table.history { width: 100%; border-collapse: collapse; background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
table.history th { text-align: left; background: var(--color-surface-alt); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); padding: 12px 16px; }
table.history td { padding: 13px 16px; border-top: 1px solid var(--color-border); font-size: 14px; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(74,59,49,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.modal-box {
  background: var(--color-surface); border-radius: var(--radius-lg);
  max-width: 480px; width: 100%; max-height: 86vh; overflow-y: auto;
  padding: 28px; box-shadow: var(--shadow-lg); position: relative;
}
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--color-text-muted); }
.email-preview {
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  overflow: hidden; margin-top: 14px;
}
.email-preview .email-head { background: var(--color-surface-alt); padding: 10px 14px; font-size: 12.5px; color: var(--color-text-muted); }
.email-preview .email-body { padding: 20px; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-text); color: #E9DDCB;
  padding: 40px 0 26px; margin-top: 40px; font-size: 13.5px;
}
.site-footer .cols { display: flex; gap: 60px; flex-wrap: wrap; margin-bottom: 24px; }
.site-footer h5 { color: #fff; font-family: var(--font-body); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.site-footer a { color: #E9DDCB; }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; opacity: .75; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--color-text); color: #fff; padding: 13px 24px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 500; z-index: 300; opacity: 0; transition: all .25s ease;
  box-shadow: var(--shadow-lg); pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Contacto rápido (widget flotante) ---------- */
.contact-widget { position: fixed; right: 20px; bottom: 20px; z-index: 250; }
.contact-fab {
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--color-primary); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform .15s ease, background .15s ease;
}
.contact-fab:hover { background: var(--color-primary-dark); transform: scale(1.06); }
.contact-panel {
  position: absolute; right: 0; bottom: 68px;
  width: 300px; max-width: calc(100vw - 40px);
  background: var(--color-surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 18px;
}
.contact-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.contact-panel-close { background: none; border: none; cursor: pointer; color: var(--color-text-muted); font-size: 15px; }
.contact-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-radius: var(--radius-sm);
  color: var(--color-text); font-size: 13.5px;
}
.contact-row:hover { background: var(--color-surface-alt); text-decoration: none; }
.contact-row strong { font-size: 13.5px; }
.contact-divider {
  text-align: center; font-size: 11.5px; color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin: 12px 0 10px; position: relative;
}
.contact-divider::before, .contact-divider::after {
  content: ''; position: absolute; top: 50%; width: 28%; height: 1px; background: var(--color-border);
}
.contact-divider::before { left: 0; }
.contact-divider::after { right: 0; }
#contact-form .field { margin-bottom: 8px; }
#contact-form input, #contact-form textarea {
  width: 100%; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  padding: 8px 11px; font-family: var(--font-body); font-size: 13.5px;
  background: var(--color-bg); color: var(--color-text); resize: none;
}
#contact-form input:focus, #contact-form textarea:focus { outline: none; border-color: var(--color-primary); }

/* ---------- Utility ---------- */
.flex { display: flex; }
.gap-8 { gap: 8px; }
.text-muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0; }
.center { text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .product-detail { grid-template-columns: 1fr; }
  .product-detail .gallery { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
  .admin-sidebar .brand { margin-bottom: 0; font-size: 17px; }
  .admin-sidebar nav { display: flex; gap: 4px; flex-wrap: wrap; }
  .admin-sidebar a { padding: 7px 10px; font-size: 13px; white-space: nowrap; }
  .admin-main { padding: 24px 18px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .order-card { grid-template-columns: 60px 1fr; gap: 12px; }
  .order-card .actions { grid-column: 1 / -1; flex-direction: row; }
  .admin-product-card { grid-template-columns: 56px 1fr; gap: 12px; }
  .admin-product-card .actions { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .site-header .inner { padding: 12px 16px; gap: 10px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand .logo-mark { width: 32px; height: 32px; font-size: 13px; }
  nav.main-nav { gap: 10px; }
  nav.main-nav .nav-labels { display: none; }
  .cart-link { padding: 7px 11px; font-size: 14px; }
  .demo-banner { font-size: 11.5px; padding: 7px 10px; line-height: 1.4; }
  .demo-banner button { font-size: 11px; padding: 2px 9px; margin-left: 6px; }
  .hero { padding: 32px 0 26px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 14.5px; }
  .hero .tags { gap: 6px; }
  .pill { font-size: 11.5px; padding: 5px 11px; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card .body { padding: 11px; gap: 4px; }
  .product-card h3 { font-size: 14px; }
  .product-card .price { font-size: 14.5px; }
  .product-card .add-row { padding: 0 11px 11px; }
  .product-card .add-row .btn { font-size: 12px; padding: 8px 10px; }
  .toolbar { margin: 18px 0 14px; gap: 10px; }
  .search-box { min-width: 0; width: 100%; max-width: none; padding: 9px 14px; }
  .category-filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .category-filters button { flex-shrink: 0; }

  .card { padding: 18px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .transfer-box { padding: 16px; }
  .transfer-box .alias { font-size: 19px; padding: 10px 12px; }
  .transfer-box .amount { font-size: 25px; }
  .countdown { font-size: 13px; padding: 7px 13px; }

  .steps { gap: 2px; margin: 20px 0 6px; }
  .step-sep { width: 14px; margin-top: 12px; }
  .step-dot { font-size: 11px; gap: 5px; }
  .step-dot .num { width: 23px; height: 23px; font-size: 11px; }
  .step-dot .step-label { display: none; }

  .cart-item { padding: 11px; gap: 11px; }
  .cart-item .thumb { width: 58px; height: 58px; }
  .cart-item h4 { font-size: 14px; }
  .cart-item .line-price { min-width: 64px; font-size: 14px; }
  .qty-stepper button { width: 32px; height: 32px; }

  .status-screen { margin: 30px auto; padding: 0 14px 60px; }
  .status-icon { width: 68px; height: 68px; font-size: 30px; }
  .status-screen h1 { font-size: 22px; }

  .modal-box { padding: 18px; }

  .order-card { grid-template-columns: 52px 1fr; gap: 10px; padding: 14px; }
  .order-card .receipt-thumb { width: 52px; height: 52px; }
  .order-card h4 { font-size: 14px; }
  .order-card .actions { flex-wrap: wrap; }
  .order-card .actions .btn { flex: 1; min-width: 120px; }
  .stat-card { padding: 14px; }
  .stat-card .num { font-size: 21px; }

  .admin-product-card { grid-template-columns: 48px 1fr; gap: 10px; padding: 12px; }
  .admin-product-card .thumb { width: 48px; height: 48px; }
  .admin-product-card h4 { font-size: 13.5px; }
  .admin-product-card .actions { flex-wrap: wrap; }
  .admin-product-card .actions .btn { flex: 1; min-width: 90px; }
  .add-category-form { width: 100%; }
  .add-category-form input { width: 100%; flex: 1; }
  .category-chip { font-size: 12px; padding: 5px 5px 5px 11px; }
}
