:root {
  --burgundy: #6B1D28;
  --burgundy-dark: #52151e;
  --burgundy-light: #8a2f3b;
  --olive: #5A6B3A;
  --olive-dark: #46542e;
  --olive-light: #71814e;
  --cream: #FAF5EB;
  --cream-dark: #f1e8d6;
  --white: #FFFFFF;
  --dark: #2B221E;
  --gray: #6b5f58;
  --gray-light: #e8e0d3;
  --danger: #b3342b;
  --success: #5A6B3A;
  --warning: #b07d2b;
  --shadow-sm: 0 1px 2px rgba(43, 34, 30, 0.06), 0 1px 3px rgba(43, 34, 30, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(43, 34, 30, 0.1), 0 2px 4px -2px rgba(43, 34, 30, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(43, 34, 30, 0.15), 0 4px 6px -4px rgba(43, 34, 30, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--dark);
  min-height: 100vh;
}

h1, h2, h3, h4 { line-height: 1.2; }
a { color: var(--burgundy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 1.25rem; }

.topbar {
  background: var(--burgundy);
  color: #FEF4E4;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar .LogoHeader { display: flex; align-items: center; gap: 0.7rem; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; color: #FAF5EB; font-size: 1.75rem;}
.topbar .LogoHeader img { height: 55px; border-radius: 10px; }
.topbar .brand span{  color: #FEF4E4; font-size: 1.75rem; }
.topbar .brand { display: flex; align-items: center; gap: 0.7rem; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; }
.topbar .brand small { display: block; font-weight: 400; font-size: 0.7rem; opacity: 0.85; letter-spacing: 0.18em; text-transform: uppercase; }
.topbar .nav { display: flex; align-items: center; gap: 0.5rem; }
.topbar .nav a, .topbar .nav button {
  color: #FEF4E4; background: transparent; border: 1px solid rgba(255,255,255,0.25);
  padding: 0.45rem 0.9rem; border-radius: 0.5rem; font-size: 0.85rem; cursor: pointer;
  font-weight: 600; text-decoration: none;
}
.topbar .nav a:hover, .topbar .nav button:hover { background: rgba(255,255,255,0.12); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-dark) 60%, #3d0f16 100%);
  color: #FEF4E4;
  padding: 3.5rem 1.25rem 3rem;
  text-align: center;
}
.hero img {height: 100px; border-radius: 6px;}
.hero h1 { font-size: 2.4rem; margin-bottom: 0.5rem; }
.hero p { opacity: 0.9; font-size: 1.05rem; max-width: 640px; margin: 0 auto; }
.hero .badges { margin-top: 1rem; display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: 0.9rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cream-dark);
  overflow: hidden;
}
.card-pad { padding: 1.25rem; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.55rem 1.1rem; border-radius: 0.6rem; border: 1px solid transparent;
  font-size: 0.9rem; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: all 0.15s ease; line-height: 1.2;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--burgundy); color: #FEF4E4; }
.btn-primary:hover { background: var(--burgundy-dark); }
.btn-olive { background: var(--olive); color: #FEF4E4; }
.btn-olive:hover { background: var(--olive-dark); }
.btn-outline { background: #fff; color: var(--burgundy); border-color: var(--burgundy); }
.btn-outline:hover { background: var(--burgundy); color: #FEF4E4; }
.btn-ghost { background: transparent; color: var(--dark); border-color: var(--gray-light); }
.btn-ghost:hover { background: var(--cream); }
.btn-danger { background: var(--danger); color: #FEF4E4; }
.btn-danger:hover { background: #94251d; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; border-radius: 0.45rem; }
.btn-lg { padding: 0.7rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.tipo-sort-handle { cursor: grab; touch-action: none; }
.tipo-sort-handle:active { cursor: grabbing; }
.tipo-arrastrando { opacity: 0.45; }
.tipo-drop-target { outline: 2px dashed var(--olive); outline-offset: 2px; }

/* ---------- Badges / Estado ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.02em; white-space: wrap;
  font-size: 0.8rem
}
.badge-burgundy { background: var(--burgundy); color: #FEF4E4; }
.badge-olive { background: var(--olive); color:  #FAF5EB; }
.badge-amber { background: #f3d9a4; color: #7a5410; }
.badge-gray { background: var(--gray-light); color: var(--gray); }
.badge-red { background: #f3c6c2; color: #7c1d16; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 0.9rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--gray); margin-bottom: 0.3rem; }
.input, select.input, textarea.input {
  width: 100%; padding: 0.55rem 0.75rem; border-radius: 0.55rem;
  border: 1px solid var(--gray-light); background: #fff; font-size: 0.9rem; color: var(--dark);
}
.input:focus { outline: 2px solid var(--burgundy); outline-offset: -1px; border-color: transparent; }

.password-wrapper { position: relative; }
.password-wrapper .input { padding-right: 42px; }
.btn-toggle-password {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; cursor: pointer; font-size: 1.1rem;
  padding: 0.2rem 0.4rem; line-height: 1; color: var(--gray);
  border-radius: 0.35rem; transition: color 0.15s, background 0.15s;
}
.btn-toggle-password:hover { color: var(--burgundy); background: var(--cream); }
.btn-toggle-password:focus { outline: 2px solid var(--burgundy); outline-offset: 2px; }
.input-sm { padding: 0.35rem 0.6rem; font-size: 0.85rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }

/* ---------- Tabla ---------- */
.table-wrap { overflow-x: auto; border-radius: 0.9rem; scrollbar-width: thin; scrollbar-color: var(--gray-light) transparent; }
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 999px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; background: #fff; }
th {
  text-align: left; padding: 0.7rem 0.9rem; background: var(--burgundy); color: #FEF4E4;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}
td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--cream-dark); vertical-align: middle; }
tr:hover td { background: var(--cream); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(43,34,30,0.55); z-index: 60;
  display: flex; align-items: flex-start; justify-content: center; padding: 3rem 1rem;
  overflow-y: auto;
}
.modal {
  background: #fff; border-radius: 1rem; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 540px; animation: pop 0.18s ease;
}
.modal-lg { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--cream-dark); }
.modal-head h3 { font-size: 1.05rem; color: var(--burgundy); }
.modal-body { padding: 1.25rem; }
.modal-foot { padding: 1rem 1.25rem; border-top: 1px solid var(--cream-dark); display: flex; justify-content: flex-end; gap: 0.6rem; }
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Barra de progreso Club Melo ---------- */
.progress { height: 10px; background: var(--cream-dark); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--olive), var(--olive-light)); border-radius: 999px; transition: width 0.3s ease; }

/* ---------- Producto ---------- */
.product-img {
  width: 100%; height: 220px; background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center; color: var(--gray); font-size: 0.8rem;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 0.9rem 1rem; }
.product-name { font-weight: 700; font-size: 0.95rem; }
.product-meta { color: var(--gray); font-size: 0.8rem; margin-top: 0.15rem; }
.product-price { font-weight: 800; color: var(--burgundy); font-size: 1.05rem; margin-top: 0.4rem; }
.stock-low { color: var(--danger); font-size: 0.72rem; font-weight: 700; }
.stock-ok { color: var(--olive); font-size: 0.72rem; font-weight: 700; }

/* ---------- Carrito ---------- */
.cart-item { display: flex; gap: 0.8rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px dashed var(--cream-dark); }
.cart-item .qty { display: flex; align-items: center; gap: 0.4rem; }
.qty-btn { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--gray-light); background: #fff; font-weight: 700; cursor: pointer; }
.qty-btn:hover { background: var(--cream); }

/* ---------- Sidebar Admin ---------- */
.admin-shell { display: flex; min-height: calc(100vh - 61px); }
.sidebar {
  width: 230px; background: var(--dark); color: #FEF4E4; padding: 1rem 0.6rem;
  flex-shrink: 0; position: sticky; top: 61px; height: calc(100vh - 61px); overflow-y: auto;
}
.sidebar .item {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.85rem; border-radius: 0.6rem;
  color: #e8e0d3; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; background: transparent; width: 100%; text-align: left;
}
.sidebar .item:hover { background: rgba(255,255,255,0.08); }
.sidebar .item.active { background: var(--burgundy); color: #FEF4E4; }
.admin-main { flex: 1; padding: 1.5rem; min-width: 0; }

/* ---------- KPI cards ---------- */
.kpi { background: #fff; border-radius: 0.9rem; box-shadow: var(--shadow-sm); padding: 1.1rem 1.25rem; border: 1px solid var(--cream-dark); }
.kpi .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray); font-weight: 700; }
.kpi .value { font-size: 1.7rem; font-weight: 800; color: var(--burgundy); margin-top: 0.2rem; }
.kpi .sub { font-size: 0.8rem; color: var(--gray); }

/* ---------- Misc ---------- */
.muted { color: var(--gray); font-size: 0.85rem; }
.small { font-size: 0.8rem; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; }
.flex { display: flex; } .flex-1 { flex: 1; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; }
.text-center { text-align: center; }
.section-title { font-size: 1.3rem; font-weight: 800; color: var(--burgundy); margin-bottom: 1rem; }
.alert {
  padding: 0.75rem 1rem; border-radius: 0.6rem; font-size: 0.88rem; margin-bottom: 1rem;
}
.alert-warning { background: #f7ecd2; color: #7a5410; border: 1px solid #e8d5a2; }
.alert-success { background: #e7f0dd; color: var(--olive-dark); border: 1px solid #c9dcb3; }
.alert-danger { background: #f8dfdc; color: #7c1d16; border: 1px solid #ecc7c2; }
.hidden { display: none !important; }
.bar-chart { display: flex; align-items: flex-end; gap: 0.7rem; height: 140px; padding-top: 0.5rem; }
.bar { flex: 1; background: var(--burgundy); border-radius: 0.4rem 0.4rem 0 0; position: relative; min-width: 0; }
.bar span { position: absolute; bottom: -1.4rem; left: 0; right: 0; text-align: center; font-size: 0.68rem; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.divider { border: none; border-top: 1px solid var(--cream-dark); margin: 1rem 0; }

/* ---------- Estética moderna ---------- */
.card-title { font-size: 1rem; font-weight: 800; color: var(--burgundy); margin: 0; }
.card { border: 1px solid var(--cream-dark); box-shadow: 0 1px 2px rgba(43,33,30,0.04); }
.card-pad { padding: 1.1rem 1.25rem; }

.badge-soft { background: var(--cream); color: var(--burgundy); border: 1px solid var(--cream-dark); font-weight: 700; }

.rank-filtros {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
  align-items: end;
  margin-bottom: 1rem;
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  border-radius: 0.7rem;
  padding: 0.7rem 0.8rem;
}
.rank-filtros .input {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 38px;
  background-color: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rank-filtros select.input { cursor: pointer; padding-right: 1.8rem; }
.rank-filtros .input:hover { border-color: #d8c9a8; }
.rank-filtros .input:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px rgba(90, 107, 58, 0.15); }
.rank-filtros .btn { min-height: 38px; white-space: nowrap; justify-self: start; }
/* El informe usa la tarjeta a ancho completo: permite columnas algo más amplias */
#informeFiltros { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
#informeFiltros .btn { justify-self: stretch; }
/* Etiquetas visibles sobre cada filtro: se lee qué es y qué valor tiene */
.filtro-campo { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.filtro-campo > span { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray); line-height: 1; }
.filtro-campo .input { font-weight: 600; }
.filtro-accion { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.filtro-accion > span { font-size: 0.7rem; line-height: 1; user-select: none; }
.filtro-accion .btn { width: 100%; }
.rank-fila { padding: 0.55rem 0; border-bottom: 1px dashed var(--cream-dark); }
.rank-fila:last-child { border-bottom: none; }
.rank-fila .progress { margin-top: 0.4rem; height: 7px; }

.bar-chart { gap: 0.9rem; height: 130px; }
.bar { background: linear-gradient(180deg, var(--burgundy), #8d2f3d); }

.ped-filtros { background: #fff; border: 1px solid var(--cream-dark); border-radius: 0.9rem; padding: 0.9rem 1rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.ped-filtros .flex { gap: 0.6rem; }
.ped-filtros .form-group { margin-bottom: 0; }
.ped-filtros .form-group label { display: block; font-size: 0.75rem; font-weight: 700; color: var(--gray); margin-bottom: 0.3rem; }
.ped-filtros .input { min-height: 38px; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.ped-filtros select.input { cursor: pointer; }
.ped-filtros .input:hover { border-color: #d8c9a8; }
.ped-filtros .input:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px rgba(90, 107, 58, 0.15); }
.ped-filtros .btn { min-height: 38px; }

.cc-sugerencias { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50; background: #fff; border: 1px solid var(--cream-dark); border-radius: 0.6rem; box-shadow: var(--shadow-sm); max-height: 240px; overflow-y: auto; }
.cc-sug-item { padding: 0.5rem 0.75rem; cursor: pointer; border-bottom: 1px dashed var(--cream-dark); display: flex; flex-direction: column; gap: 0.1rem; }
.cc-sug-item:last-child { border-bottom: none; }
.cc-sug-item:hover { background: var(--cream); }
.cc-sug-sub { font-size: 0.75rem; color: var(--gray); }

.mapa-marco { position: relative; }

.mapa-widget { height: 220px; border: 1px solid var(--cream-dark); border-radius: 0.6rem; overflow: hidden; background: var(--cream); position: relative; z-index: 0; }

/* Herramientas sobre el mapa */
.mapa-herramientas { position: absolute; top: 0.55rem; right: 0.55rem; z-index: 500; }
.mapa-btn-ubicacion {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--cream-dark);
  box-shadow: var(--shadow-sm);
  font-size: 0.78rem;
  padding: 0.35rem 0.6rem;
  backdrop-filter: blur(4px);
}
.mapa-btn-ubicacion:hover { background: #fff; border-color: #d8c9a8; }
.mapa-btn-ubicacion:disabled { opacity: 0.6; cursor: wait; }
.mapa-btn-ubicacion svg { flex-shrink: 0; }

/* Pin propio en borgoña/crema */
.mapa-pin { background: transparent; border: none; }
.mapa-pin svg { display: block; filter: drop-shadow(0 6px 8px rgba(43, 34, 30, 0.35)); }

/* Estado del geocodificador */
.mapa-estado { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.4rem; line-height: 1.4; min-height: 1.2em; }
.mapa-estado a { font-weight: 600; }
.mapa-estado.is-loading { color: var(--olive-dark); }
.mapa-estado.is-error { color: #7c1d16; }
.mapa-detectada { flex-basis: 100%; margin-top: 0.1rem; color: var(--gray); }
.mapa-spinner {
  flex-shrink: 0;
  width: 12px; height: 12px; margin-top: 0.18rem;
  border-radius: 50%;
  border: 2px solid rgba(90, 107, 58, 0.25);
  border-top-color: var(--olive);
  animation: mapaGiro 0.7s linear infinite;
}
@keyframes mapaGiro { to { transform: rotate(360deg); } }

.search-box { position: relative; flex: 1; min-width: 200px; max-width: 300px; }
.search-box::before { content: "🔍"; position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); font-size: 0.85rem; opacity: 0.6; }
.search-box .input { padding-left: 2.1rem; }

.entrega-a-definir {
  background: var(--cream); border: 1px dashed #d8c9a8; border-radius: 0.7rem;
  padding: 0.7rem 0.9rem; display: flex; flex-direction: column; gap: 0.3rem;
}
.entrega-a-definir .badge { align-self: flex-start; }
.mb-0 { margin-bottom: 0; }

/* ---------- Footer ---------- */
.footer {
  background: var(--burgundy);
  color: #FAF5EB;
  margin-top: 3rem;
  padding: 2.5rem 0 1.25rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
}
.footer h4 {
  color: #FEF4E4;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer p { margin-bottom: 0.4rem; }
.footer .muted { color: rgba(250, 245, 235, 0.75); }
.footer-brand img { height: 60px; border-radius: 10px; margin-bottom: 0.6rem; }
.footer-brand h4 { margin: 0 0 0.4rem; }
.footer-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #FAF5EB;
  padding: 0.35rem 0;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-link svg { flex-shrink: 0; }
.footer-link:hover { color: #FEF4E4; text-decoration: underline; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(250, 245, 235, 0.2);
  text-align: center;
  color: rgba(250, 245, 235, 0.7);
}
.footer-bottom p { margin: 0; }

/* ---------- Pulido visual dashboard: jerarquía + estados (solo estética) ---------- */
.section-title { display: flex; align-items: center; gap: 0.6rem; }
.section-title::before { content: ""; width: 6px; height: 1.3em; border-radius: 999px; background: var(--burgundy); flex-shrink: 0; }
.card-pad .card-title { letter-spacing: 0.01em; }
.card { transition: box-shadow 0.2s ease; }
.grid .card:hover { box-shadow: var(--shadow-md); }
.kpi .value { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.badge { box-shadow: inset 0 0 0 1px rgba(43, 34, 30, 0.06); }
/* Estados vacíos / carga: caja punteada legible en vez de texto suelto */
#rankContenido > p.muted, #informeContenido > p.muted, #pedLista > p.muted,
#ccContenido > p.muted, #cliLista > p.muted {
  border: 1px dashed #d8c9a8;
  background: var(--cream);
  border-radius: 0.7rem;
  padding: 1rem 1.1rem;
  text-align: center;
  font-size: 0.88rem;
}
#rankContenido > p.muted:first-child, #informeContenido > p.muted:first-child { animation: estadoPulse 1.6s ease-in-out infinite; }
@keyframes estadoPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } }
.table-wrap table { border-radius: 0.9rem; overflow: hidden; }
.bar span { font-weight: 600; }

/* ---------- Filtros admin en PC / notebook: grilla aireada y combos alineados ---------- */
@media (min-width: 801px) {
  .admin-main { max-width: 1400px; margin: 0 auto; width: 100%; }
  /* Ranking a ancho completo: filtros en fila, aireados y legibles */
  #rankCard .rank-filtros { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.6rem; }
  #rankCard .rank-filtros .input { width: 100%; min-height: 42px; font-size: 0.9rem; }
  #rankCard .rank-filtros .btn { justify-self: stretch; }
  /* Informe a ancho completo: hasta 3-4 columnas prolijas */
  #informeFiltros { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  #informeFiltros .btn { grid-column: auto; }
  /* Fila de 3 tarjetas: ocupa todo el ancho con 3 columnas iguales */
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ped-filtros .flex { align-items: flex-end; }
}
/* Intermedio (tablet horizontal / notebook chica): apila para no apretar */
@media (min-width: 801px) and (max-width: 1050px) {
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .admin-shell { flex-direction: column; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .rank-filtros { grid-template-columns: 1fr; padding: 0.6rem; }
  .rank-filtros .btn { justify-self: stretch; }
  .filtro-accion > span { display: none; }
  .ped-filtros { padding: 0.75rem; }
  .search-box { max-width: none; }
}

/* ---------- Mobile / Responsive UX ---------- */
@media (max-width: 800px) {
  .admin-main { padding: 1rem; }
  .container, .container-wide { padding: 0 0.85rem; }
  table { font-size: 0.82rem; }
  th, td { padding: 0.55rem 0.6rem; }
  .kpi .value { font-size: 1.35rem; }
  .section-title { font-size: 1.15rem; }
  .grid { gap: 0.85rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .bar-chart { gap: 0.5rem; height: 110px; }
}

@media (max-width: 640px) {
  .topbar { padding: 0.6rem 0.85rem; gap: 0.5rem; }
  .topbar .LogoHeader { display: none; }
  .topbar .brand span { font-size: 1.15rem; }
  .topbar .nav { gap: 0.35rem; }
  .topbar .nav a, .topbar .nav button { padding: 0.4rem 0.6rem; font-size: 0.78rem; }

  .hero { padding: 2.25rem 1rem 2rem; }
  .hero img { height: 70px; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 0.95rem; }

  .modal-backdrop { padding: 1rem 0.6rem; align-items: flex-start; }
  .modal { border-radius: 0.8rem; }
  .modal-head { padding: 0.85rem 1rem; }
  .modal-head h3 { font-size: 0.95rem; }
  .modal-body { padding: 1rem; }
  .modal-foot { padding: 0.85rem 1rem; flex-wrap: wrap; }

  .product-img { height: 170px; }
  .qty-btn { width: 34px; height: 34px; }

  /* 16px evita el zoom automático de iOS al enfocar campos */
  .input, select.input, textarea.input { font-size: 16px; }

  .footer { padding: 2rem 0 1rem; }
}

@media (max-width: 480px) {
  .topbar .brand span small { display: none; }
  .cart-item { gap: 0.5rem; }
  .btn-lg { padding: 0.7rem 1rem; }
}

/* Touch targets: botones cómodos para pantallas táctiles */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .qty-btn { min-width: 36px; min-height: 36px; }
  .sidebar .item { min-height: 48px; }
}

/* ---------- FAQ / Preguntas frecuentes ---------- */
.faq-section { padding: 3rem 0 0.5rem; }
.faq-container { max-width: 880px; }
.faq-section .section-title { margin-bottom: 0.35rem; }
.faq-intro { color: var(--gray); font-size: 0.92rem; margin-bottom: 1.25rem; }
.faq { display: grid; gap: 0.75rem; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: 0.9rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item[open] { border-color: var(--olive-light); box-shadow: var(--shadow-md); }
.faq-question {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--burgundy);
  user-select: none;
  transition: background 0.15s ease;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { background: var(--cream); }
.faq-question:focus-visible { outline: 2px solid var(--olive); outline-offset: -2px; border-radius: 0.5rem; }
.faq-icon { position: relative; width: 1.05rem; height: 1.05rem; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--olive);
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.faq-icon::before { top: 50%; left: 0; width: 100%; height: 2px; transform: translateY(-50%); }
.faq-icon::after { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); }
.faq-item[open] .faq-icon::before { transform: translateY(-50%) rotate(180deg); }
.faq-item[open] .faq-icon::after { transform: translateX(-50%) scaleY(0); opacity: 0; }
.faq-answer { overflow: hidden; }
.faq-answer-inner {
  padding: 0.9rem 1.1rem 1.1rem;
  border-top: 1px solid var(--cream-dark);
  color: var(--dark);
  font-size: 0.92rem;
  line-height: 1.55;
}
.faq-answer-inner > p { margin-bottom: 0.6rem; }
.faq-answer-inner > p:last-child { margin-bottom: 0; }
.faq-sub { font-weight: 700; color: var(--olive-dark); margin: 0.5rem 0 0.4rem; }
.faq-sub:first-child { margin-top: 0; }
.faq-list { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.35rem; }
.faq-list li { position: relative; padding-left: 1.1rem; }
.faq-list li::before { content: "•"; position: absolute; left: 0.15rem; color: var(--burgundy); font-weight: 800; }
.faq-steps { margin: 0 0 0.6rem; padding-left: 1.3rem; display: grid; gap: 0.5rem; }
.faq-steps > li::marker { color: var(--burgundy); font-weight: 800; }
.faq-steps .faq-list { margin: 0.4rem 0 0; }
.faq-ig { margin-top: 0.7rem; }
.faq-ig a { font-weight: 700; text-decoration: underline; }
.faq-tip {
  margin-top: 0.7rem;
  background: var(--cream);
  border: 1px dashed #d8c9a8;
  border-radius: 0.7rem;
  padding: 0.7rem 0.9rem;
}
.faq-tip strong { color: var(--olive-dark); }

@media (max-width: 640px) {
  .faq-section { padding: 2.25rem 0 0.25rem; }
  .faq-question { padding: 0.85rem 0.95rem; font-size: 0.92rem; }
  .faq-answer-inner { padding: 0.8rem 0.95rem 0.95rem; }
}

/* ==========================================================================
   Landing pública — rediseño visual (hero, catálogo, cómo comprar, club)
   Solo estética: no altera lógica, ids funcionales ni endpoints.
   Todo lo de esta sección está scopeado a body.landing para no tocar el CRM.
   ========================================================================== */

.landing {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}
.landing h1, .landing h2, .landing h3, .landing h4 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.landing .topbar .brand span {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 0.45rem;
}

/* ---------- Botones nuevos ---------- */
.btn-cream {
  background: var(--cream);
  color: var(--burgundy);
  border-color: var(--cream);
}
.btn-cream:hover { background: #fff; color: var(--burgundy-dark); }
.btn-ghost-light {
  background: transparent;
  color: #FEF4E4;
  border-color: rgba(254, 244, 228, 0.45);
}
.btn-ghost-light:hover {
  background: rgba(254, 244, 228, 0.12);
  border-color: rgba(254, 244, 228, 0.8);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: left;
  padding: 3rem 1.25rem 3.5rem;
  background:
    radial-gradient(70% 90% at 88% 8%, rgba(254, 244, 228, 0.12), transparent 62%),
    linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-dark) 58%, #3b0e15 100%);
}
.hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  left: -180px;
  bottom: -300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90, 107, 58, 0.35), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 2.75rem;
  align-items: center;
}
.hero .hero-logo {
  display: block;
  height: clamp(84px, 8vw, 112px);
  width: auto;
  max-width: 100%;
  margin-bottom: 1.25rem;
  border-radius: 0;
}
.landing .section-title {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 600;
}
.landing .section-title::before { display: none; }
.hero-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d9c8a4;
  margin-bottom: 0.65rem;
}
.hero .hero-title {
  font-size: clamp(2rem, 4.4vw, 3.15rem);
  line-height: 1.06;
  color: #FEF4E4;
  margin: 0 0 0.85rem;
  max-width: 18ch;
}
.hero .hero-sub {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(254, 244, 228, 0.86);
  max-width: 46ch;
  margin: 0;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.6rem;
}
.hero-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.6rem 0 0;
  padding: 0;
}
.hero-chips li {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(254, 244, 228, 0.9);
  border: 1px solid rgba(254, 244, 228, 0.24);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}
.hero-media { position: relative; }
.hero-media img {
  display: block;
  width: 100%;
  height: clamp(300px, 46vw, 440px);
  object-fit: cover;
  border-radius: 1.25rem;
  border: 6px solid rgba(250, 245, 235, 0.1);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  transform: rotate(-1.2deg);
}
.hero-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: var(--cream);
  color: var(--burgundy);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.5);
}

/* ---------- Catálogo ---------- */
#catalogo { scroll-margin-top: 90px; }
.catalogo { display: grid; gap: 2.75rem; }

.tipo-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--cream-dark);
  padding-bottom: 0.55rem;
  margin-bottom: 1.15rem;
}
.tipo-titulo {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  font-weight: 600;
  color: var(--burgundy);
  letter-spacing: 0.03em;
}
.tipo-count {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  white-space: nowrap;
}
.grid-productos {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--cream-dark);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(43, 33, 30, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #e2d3b5;
}
.product-card .product-img {
  height: 200px;
  overflow: hidden;
  padding: 0 1.1rem;
  text-align: center;
  background-color: var(--cream-dark);
  background-image: radial-gradient(rgba(107, 29, 40, 0.08) 1px, transparent 1px);
  background-size: 15px 15px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--burgundy);
  line-height: 1.35;
}
.product-card .product-img img { transition: transform 0.6s ease; }
.product-card:hover .product-img img { transform: scale(1.06); }
.product-card .product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.95rem 1rem 1.1rem;
}
.product-card .product-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--dark);
}
.product-card .product-meta {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--gray);
}
.product-card .product-price {
  margin-top: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--burgundy);
}
.product-stock {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  background: rgba(250, 245, 235, 0.94);
  box-shadow: 0 1px 4px rgba(43, 33, 30, 0.18);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.product-stock::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.product-stock.stock-ok { color: var(--olive-dark); }
.product-stock.stock-low { color: #a1651a; }
.product-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.9rem;
}
.product-actions .btn { flex: 1; }
.product-actions .input-sm {
  width: 46px;
  text-align: center;
  padding: 0.2rem;
}

/* ---------- Cómo comprar ---------- */
.pasos-section { padding: 3.5rem 0 0; }
.pasos-section .section-title { margin-bottom: 0; }
.pasos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.paso {
  background: #fff;
  border: 1px solid var(--cream-dark);
  border-radius: 1rem;
  padding: 1.35rem 1.4rem;
  box-shadow: 0 1px 2px rgba(43, 33, 30, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.paso:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.paso-num {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--olive);
  margin-bottom: 0.45rem;
}
.paso h3 {
  font-size: 1.05rem;
  color: var(--burgundy);
  margin-bottom: 0.35rem;
}
.paso p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--gray);
}

/* ---------- Club Melo ---------- */
.club-section { padding: 3.5rem 0 0.5rem; }
.club-banda {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2rem;
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: 1.5rem;
  color: #FEF4E4;
  background:
    radial-gradient(60% 80% at 92% 6%, rgba(254, 244, 228, 0.14), transparent 60%),
    linear-gradient(140deg, var(--burgundy) 0%, var(--burgundy-dark) 68%, #3b0e15 100%);
  box-shadow: var(--shadow-lg);
}
.club-banda::after {
  content: "";
  position: absolute;
  top: -140px;
  right: -90px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90, 107, 58, 0.45), transparent 70%);
  pointer-events: none;
}
.club-copy { position: relative; z-index: 1; }
.club-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d9c8a4;
  margin-bottom: 0.5rem;
}
.club-copy h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: #FEF4E4;
  margin-bottom: 0.65rem;
  max-width: 20ch;
}
.club-copy p {
  font-size: 0.94rem;
  line-height: 1.6;
  color: rgba(254, 244, 228, 0.86);
  max-width: 46ch;
  margin-bottom: 1.35rem;
}
.club-pasos {
  position: relative;
  z-index: 1;
  list-style: none;
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
}
.club-pasos li {
  background: rgba(254, 244, 228, 0.08);
  border: 1px solid rgba(254, 244, 228, 0.16);
  border-radius: 0.9rem;
  padding: 0.75rem 0.95rem;
  display: grid;
  gap: 0.1rem;
}
.club-pasos strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.02rem;
  color: #FEF4E4;
}
.club-pasos span {
  font-size: 0.82rem;
  color: rgba(254, 244, 228, 0.8);
}

/* ---------- Ajustes responsive del rediseño ---------- */
@media (max-width: 860px) {
  .hero { padding: 2.25rem 1rem 2.75rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 1.9rem; }
  .hero .hero-title { max-width: none; }
  .hero-media img { height: 280px; transform: none; }
  .hero .hero-logo { height: 72px; margin-bottom: 0.9rem; }
  .pasos-grid { grid-template-columns: 1fr; }
  .club-banda { grid-template-columns: 1fr; gap: 1.5rem; }
  .catalogo { gap: 2.25rem; }
  .grid-productos { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 640px) {
  .landing .topbar .brand span { font-size: 1.05rem; }
  .hero-title { font-size: 1.9rem; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-media img { height: 230px; }
  .product-card .product-img { height: 170px; }
  .tipo-head { align-items: flex-end; }
  .pasos-section, .club-section { padding-top: 2.5rem; }
}

/* ==========================================================================
   Landing — FAQ editorial y footer en dos niveles
   Solo estética: se conservan <details>/<summary>, ids y el acordeón actual.
   ========================================================================== */

/* ---------- FAQ: cabecera en dos columnas ---------- */
.faq-section { padding: 3.75rem 0 1rem; }
.faq-container { max-width: 1120px; }
.faq-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 1.75rem;
  align-items: center;
  margin-bottom: 1.75rem;
}
.faq-head-copy .section-title { margin-bottom: 0.35rem; }
.faq-head-copy .faq-intro {
  margin-bottom: 0;
  font-size: 0.95rem;
  max-width: 46ch;
}
.faq-contacto {
  background: #fff;
  border: 1px solid var(--cream-dark);
  border-radius: 1rem;
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-sm);
}
.faq-contacto-titulo {
  font-size: 1.02rem;
  color: var(--burgundy);
  margin-bottom: 0.3rem;
}
.faq-contacto p {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--gray);
  margin-bottom: 0.9rem;
}
.faq-contacto .btn { width: 100%; }

/* ---------- FAQ: lista editorial (sin tarjetas) ---------- */
.faq { display: grid; gap: 0; border-top: 1px solid var(--cream-dark); }
.faq-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--cream-dark);
  border-radius: 0;
  box-shadow: none;
  transition: background 0.2s ease;
}
.faq-item:hover { background: rgba(255, 255, 255, 0.55); }
.faq-item[open] { background: #fff; box-shadow: none; }
.faq-question {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1.15rem 0.9rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0;
}
.faq-num {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--olive);
  font-variant-numeric: tabular-nums;
}
.faq-text { display: block; }
.faq-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.faq-icon::before,
.faq-icon::after { background: var(--olive); }
.faq-icon::before {
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  transform: translate(-50%, -50%);
}
.faq-icon::after {
  top: 50%;
  left: 50%;
  width: 2px;
  height: 12px;
  transform: translate(-50%, -50%);
}
.faq-item[open] .faq-icon {
  background: var(--olive);
  border-color: var(--olive);
}
.faq-item[open] .faq-icon::before,
.faq-item[open] .faq-icon::after { background: var(--cream); }
.faq-item[open] .faq-icon::before { transform: translate(-50%, -50%) rotate(180deg); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }

.faq-answer-inner {
  padding: 0 1.5rem 1.4rem 3.85rem;
  border-top: none;
  font-size: 0.93rem;
  line-height: 1.65;
}

/* ---------- Footer: dos niveles ---------- */
.footer {
  background: linear-gradient(180deg, var(--burgundy) 0%, var(--burgundy-dark) 100%);
  border-top: 3px solid var(--olive);
  padding: 2.75rem 0 1.5rem;
}
.footer-grid {
  grid-template-columns: 1.3fr 0.9fr 1fr 0.8fr;
  gap: 1.75rem;
  align-items: start;
}
.footer-brand img { height: 56px; margin-bottom: 0.5rem; }
.footer-tagline {
  color: rgba(250, 245, 235, 0.8);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 30ch;
  margin-bottom: 1.1rem;
}
.footer-cta { font-size: 0.85rem; padding: 0.55rem 1rem; }
.footer-col + .footer-col {
  border-left: 1px solid rgba(250, 245, 235, 0.14);
  padding-left: 1.6rem;
}
.footer-col h4 {
  color: #FEF4E4;
  margin-bottom: 0.85rem;
}
.footer-link-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.footer-link-txt small {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 245, 235, 0.58);
}
.footer-link:hover { text-decoration: none; }
.footer-link:hover .footer-link-txt { text-decoration: underline; text-underline-offset: 3px; }

/* Ubicaciones como mini-tarjetas */
.footer-lugar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.1rem 0.6rem;
  align-items: center;
  background: rgba(250, 245, 235, 0.07);
  border: 1px solid rgba(250, 245, 235, 0.16);
  border-radius: 0.8rem;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.55rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.footer-lugar:hover {
  background: rgba(250, 245, 235, 0.12);
  border-color: rgba(250, 245, 235, 0.34);
  text-decoration: none;
}
.footer-lugar svg {
  color: rgba(250, 245, 235, 0.78);
  grid-row: 1 / span 2;
  align-self: start;
  margin-top: 0.15rem;
}
.footer-lugar-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.footer-lugar-zona { font-weight: 700; font-size: 0.92rem; color: #FAF5EB; }
.footer-lugar-ciudad { font-size: 0.78rem; color: rgba(250, 245, 235, 0.7); }
.footer-lugar-accion {
  grid-column: 2;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d9c8a4;
}

/* Barra legal en una fila */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  text-align: left;
}
.footer-bottom p { margin: 0; }
.footer-legal {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
}
.footer-legal a {
  color: rgba(250, 245, 235, 0.72);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-legal a:hover { color: #FEF4E4; text-decoration: underline; }
.footer-legal span { color: rgba(250, 245, 235, 0.4); }

@media (max-width: 900px) {
  .faq-head { grid-template-columns: 1fr; gap: 1.25rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col + .footer-col { border-left: none; padding-left: 0; }
}

@media (max-width: 640px) {
  .faq-section { padding: 2.5rem 0 1rem; }
  .faq-question {
    grid-template-columns: 1.7rem minmax(0, 1fr) auto;
    gap: 0.6rem;
    padding: 1rem 0.35rem;
    font-size: 0.98rem;
  }
  .faq-icon { width: 26px; height: 26px; }
  .faq-answer-inner { padding: 0 0.6rem 1.2rem 2.65rem; font-size: 0.9rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: flex-start; }
}

/* ==========================================================================
   Checkout — rediseño visual (layout, jerarquía y resumen tipo ticket)
   Solo estética: conserva ids, formularios y flujo de confirmación.
   ========================================================================== */
#view-checkout {
  max-width: 1020px;
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}
.checkout-head { margin-bottom: 1.25rem; }
.checkout-head .section-title { font-size: clamp(1.6rem, 3vw, 2.05rem); margin-bottom: 0.15rem; }
.checkout-sub { color: var(--gray); font-size: 0.92rem; line-height: 1.5; margin-bottom: 1rem; max-width: 52ch; }

/* Stepper decorativo */
.checkout-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0; margin: 0; }
.checkout-steps li {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.28rem 0.8rem 0.28rem 0.32rem;
  border-radius: 999px; border: 1px solid var(--cream-dark);
  background: #fff; color: var(--gray);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.checkout-steps li span {
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cream-dark); color: var(--gray);
  font-size: 0.68rem; letter-spacing: 0;
}
.checkout-steps li.is-done { color: var(--olive-dark); border-color: #c9dcb3; background: #f3f7ee; }
.checkout-steps li.is-done span { background: var(--olive); color: #fff; }
.checkout-steps li.is-active { color: var(--burgundy); border-color: rgba(107, 29, 40, 0.3); box-shadow: var(--shadow-sm); }
.checkout-steps li.is-active span { background: var(--burgundy); color: #FEF4E4; }

/* Grilla: formulario más ancho, resumen acompañando el scroll */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.25rem;
  align-items: start;
}
.checkout-col { display: grid; gap: 1.25rem; min-width: 0; }

.checkout-card { padding: 1.35rem 1.4rem; }
.checkout-card-head {
  display: flex; align-items: flex-start; gap: 0.8rem;
  margin-bottom: 1.1rem; padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--cream-dark);
}
.checkout-card-head h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem; font-weight: 600; color: var(--burgundy);
  margin-bottom: 0.15rem;
}
.checkout-card-head p { margin: 0; line-height: 1.4; }

.checkout-step {
  flex-shrink: 0;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cream); border: 1px solid var(--cream-dark);
  color: var(--burgundy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.95rem; font-weight: 700; line-height: 1;
}

/* Resumen tipo ticket */
.checkout-summary {
  position: sticky; top: 96px;
  border-top: 4px solid var(--burgundy);
  border-radius: 0.9rem;
  overflow: hidden;
}
.checkout-summary-head {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 1.1rem 1.35rem 0.95rem;
  border-bottom: 1px solid var(--cream-dark);
}
.checkout-summary-head h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem; font-weight: 600; color: var(--burgundy);
  margin: 0 0 0.1rem;
}
.checkout-summary-head p { margin: 0; line-height: 1.35; }
.checkout-summary-body { padding: 0.35rem 1.35rem 1.25rem; }

.checkout-items { padding-top: 0.35rem; }
.checkout-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas:
    "thumb info total"
    "thumb info qty";
  column-gap: 0.7rem;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--cream-dark);
}
.checkout-item:last-child { border-bottom: none; }
.checkout-item-thumb {
  grid-area: thumb;
  position: relative;
  width: 44px; height: 44px; border-radius: 0.6rem;
  overflow: hidden; display: grid; place-items: center;
  background: var(--cream-dark);
  color: var(--burgundy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.05rem; font-weight: 700;
}
.checkout-item-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.checkout-item-info { grid-area: info; min-width: 0; }
.checkout-item-info strong { display: block; font-size: 0.9rem; font-weight: 700; line-height: 1.3; }
.checkout-item-info .small { display: block; margin-top: 0.1rem; line-height: 1.3; }
.checkout-item-qty {
  grid-area: qty; justify-self: end;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--cream); border: 1px solid var(--cream-dark);
  color: var(--gray); font-size: 0.72rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.checkout-item-total {
  grid-area: total; justify-self: end;
  font-size: 0.92rem; font-variant-numeric: tabular-nums;
}

.checkout-divider { margin: 0.85rem 0; }
.checkout-line {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; font-variant-numeric: tabular-nums;
}
.checkout-grand-total {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem; padding-top: 0.8rem;
  border-top: 1px solid var(--cream-dark);
  font-size: 1.05rem; font-weight: 700;
}
.checkout-grand-total strong {
  color: var(--burgundy);
  font-size: 1.5rem; font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.checkout-coupon {
  margin-top: 1rem;
  padding: 0.8rem 0.85rem 0.75rem;
  border-radius: 0.8rem;
  background: var(--cream);
  border: 1px solid var(--cream-dark);
}
.checkout-coupon label {
  display: block;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--gray); margin-bottom: 0.35rem;
}
.checkout-coupon .input { background: #fff; }
.checkout-coupon .btn { flex-shrink: 0; }

#view-checkout #btnConfirmar {
  margin-top: 1rem;
  padding: 0.85rem 1.4rem;
  box-shadow: 0 10px 22px -12px rgba(107, 29, 40, 0.7);
}

/* Responsive */
@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
}
@media (max-width: 640px) {
  .checkout-head { margin-bottom: 1rem; }
  .checkout-steps li { font-size: 0.66rem; padding: 0.26rem 0.65rem 0.26rem 0.3rem; }
  .checkout-card { padding: 1rem; }
  .checkout-card-head { padding-bottom: 0.75rem; margin-bottom: 0.9rem; }
  .checkout-card-head h3 { font-size: 1.05rem; }
  .checkout-summary-head { padding: 1rem; }
  .checkout-summary-body { padding: 0.3rem 1rem 1.1rem; }
  .checkout-grand-total strong { font-size: 1.3rem; }
}

/* ---------- Pulido visual del administrador ---------- */
#appShell .topbar {
  background: linear-gradient(110deg, var(--burgundy) 0%, var(--burgundy-dark) 100%);
  padding: 0.75rem 1.5rem;
  box-shadow: 0 2px 12px rgba(43, 34, 30, 0.16);
}
#appShell .topbar .brand span { font-size: 1.4rem; letter-spacing: -0.02em; }
#appShell .topbar .brand small { font-size: 0.65rem; letter-spacing: 0.14em; }
#appShell .admin-shell { background: #f7f6f2; }
#appShell .sidebar {
  width: 248px;
  background: #302622;
  padding: 1.15rem 0.75rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
#appShell .sidebar .item {
  position: relative;
  margin-bottom: 0.2rem;
  padding: 0.72rem 0.9rem;
  border-radius: 0.65rem;
  transition: background 0.16s ease, color 0.16s ease;
}
#appShell .sidebar .item.active {
  background: var(--burgundy);
  box-shadow: inset 3px 0 #e7c99d;
}
#appShell .sidebar .item:focus-visible,
#appShell .topbar .nav button:focus-visible {
  outline: 2px solid #e7c99d;
  outline-offset: 2px;
}
#appShell .admin-main {
  padding: clamp(1.25rem, 2.4vw, 2rem);
  background: #f7f6f2;
}
#appShell .section-title {
  margin-bottom: 1.35rem;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}
#appShell .card,
#appShell .kpi {
  border-color: #ece7de;
  box-shadow: 0 2px 8px rgba(43, 34, 30, 0.045);
}
#appShell .card-pad { padding: 1.35rem; }
#appShell .card-pad .card-title { margin-bottom: 0.75rem; }
#appShell .kpi {
  border-top: 3px solid var(--burgundy);
  border-radius: 0.8rem;
  padding: 1.15rem 1.25rem;
}
#appShell .kpi .value { font-size: 1.8rem; }
#appShell .table-wrap {
  border: 1px solid #ece7de;
  box-shadow: 0 2px 8px rgba(43, 34, 30, 0.04);
  background: #fff;
}
#appShell th {
  background: #f1ece4;
  color: var(--burgundy);
  border-bottom: 1px solid #e7dfd3;
}
#appShell tr:hover td { background: #fcf9f4; }

@media (max-width: 800px) {
  #appShell .sidebar {
    display: flex;
    gap: 0.25rem;
    width: 100%;
    height: auto;
    position: static;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.55rem;
  }
  #appShell .sidebar .item {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
    margin-bottom: 0;
  }
  #appShell .admin-main { padding: 1.1rem; }
  #appShell .card-pad { padding: 1.1rem; }
}

@media (max-width: 640px) {
  #appShell .topbar { padding: 0.65rem 0.85rem; }
  #appShell .topbar .brand span { font-size: 1.1rem; }
  #appShell .topbar .brand small { display: block; font-size: 0.58rem; letter-spacing: 0.1em; }
  #appShell .section-title { font-size: 1.25rem; margin-bottom: 1rem; }
  #appShell .kpi .value { font-size: 1.45rem; }
}

/* ---------- Presentación visual de productos en el administrador ---------- */
#appShell [data-tipo-card] {
  padding: 1.35rem;
  border-color: #e8e1d6;
  box-shadow: 0 3px 12px rgba(43, 34, 30, 0.055);
}
#appShell [data-tipo-card] > .flex:first-child {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--cream-dark);
}
#appShell [data-tipo-card] h3 {
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}
#appShell [data-tipo-card] > .small {
  margin-top: 0.85rem;
  color: var(--gray);
  line-height: 1.7;
}
#appShell [data-tipo-card] .table-wrap {
  margin-top: 1rem;
  border-radius: 0.7rem;
}
#appShell [data-tipo-card] table {
  font-size: 0.86rem;
}
#appShell [data-tipo-card] th {
  padding: 0.75rem 0.8rem;
  font-size: 0.7rem;
  letter-spacing: 0.045em;
  white-space: nowrap;
}
#appShell [data-tipo-card] td {
  padding: 0.7rem 0.8rem;
}
#appShell [data-tipo-card] tbody tr:nth-child(even) td {
  background: #fcfaf7;
}
#appShell [data-tipo-card] tbody tr:hover td {
  background: #f7f1e8;
}
#appShell [data-tipo-card] tbody td:first-child strong {
  color: var(--dark);
}
#appShell [data-tipo-card] tbody td:nth-child(3),
#appShell [data-tipo-card] tbody td:nth-child(4) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#appShell [data-tipo-card] tbody td:nth-child(6) img {
  width: 42px;
  height: 42px !important;
  object-fit: cover;
  border: 1px solid var(--cream-dark);
  border-radius: 0.55rem !important;
  background: var(--cream);
}
#appShell [data-tipo-card] tbody td:last-child {
  white-space: nowrap;
}
#appShell [data-tipo-card] tbody td:last-child .btn + .btn {
  margin-left: 0.2rem;
}

@media (max-width: 800px) {
  #appShell [data-tipo-card] { padding: 1rem; }
  #appShell [data-tipo-card] > .flex:first-child { align-items: flex-start; }
  #appShell [data-tipo-card] th,
  #appShell [data-tipo-card] td { padding: 0.6rem 0.65rem; }
}
