:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --ink: #0d1b2a;
  --ink-soft: #566173;
  --line: #e3e8ef;
  --brand: #004899;
  --brand-dark: #00346e;
  --brand-soft: #e8f0f9;
  --accent: #70a72e;
  --accent-dark: #5b8a24;
  --accent-2: #66a6d7;
  --ok: #4c8c1f;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(13, 27, 42, .06), 0 8px 24px -12px rgba(13, 27, 42, .18);
  --shadow-lg: 0 24px 60px -24px rgba(13, 27, 42, .35);
  --max: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.topbar { background: var(--ink); color: #cfd6e6; font-size: 12.5px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; height: 34px; align-items: center; }
.topbar strong { color: #fff; font-weight: 600; }
.header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header .wrap { display: flex; align-items: center; gap: 20px; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 19px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent-2)); color: #fff; font-size: 17px; font-weight: 800;
}
.searchbar { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; }
.searchbar input { flex: 1; border: 0; background: transparent; outline: none; font-size: 14px; color: var(--ink); }
.searchbar button { border: 0; background: var(--brand); color: #fff; border-radius: 999px; padding: 6px 16px; font-size: 13px; font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); border: 1px solid transparent; background: transparent; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.cart-btn { background: var(--brand-soft); color: var(--brand-dark); border-color: #d8dffe; }
.cart-count { background: var(--brand); color: #fff; border-radius: 999px; font-size: 11px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; }
.catnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.catnav .wrap { display: flex; gap: 4px; overflow-x: auto; height: 46px; align-items: center; }
.catnav a { padding: 6px 12px; border-radius: 8px; font-size: 13.5px; color: var(--ink-soft); white-space: nowrap; font-weight: 500; }
.catnav a:hover { background: var(--bg); color: var(--ink); }
.catnav a.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { padding: 28px 0 8px; }
.hero-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.hero-main {
  position: relative; overflow: hidden; border-radius: 22px; padding: 42px 44px; color: #fff;
  background: radial-gradient(900px 400px at 90% -10%, rgba(102, 166, 215, .55) 0%, transparent 62%), linear-gradient(135deg, #06213f, #0a3b6d 60%, #0a5cb8);
  box-shadow: var(--shadow-lg);
}
.hero-main h1 { font-size: 38px; line-height: 1.1; margin: 0 0 12px; letter-spacing: -.03em; max-width: 15ch; }
.hero-main p { color: #c6dcf2; max-width: 42ch; margin: 0 0 22px; font-size: 15px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 11px; padding: 11px 20px; font-weight: 650; font-size: 14px; border: 1px solid transparent; transition: .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-light { background: #fff; color: var(--ink); }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-block { width: 100%; justify-content: center; }
.hero-side { display: grid; gap: 18px; }
.promo-tile { border-radius: 18px; padding: 22px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.promo-tile.hot { background: linear-gradient(135deg, #f2f7fc, #e3eefa); border-color: #c9dcf2; }
.promo-tile h3 { margin: 0 0 4px; font-size: 17px; letter-spacing: -.01em; }
.promo-tile p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 34px 0 6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { font-size: 22px; margin: 0; letter-spacing: -.02em; }
.section-head a { font-size: 13.5px; color: var(--brand); font-weight: 600; }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .18s; }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: #d7dcec; }
.card-media { position: relative; aspect-ratio: 4/3; background: #f3f5fb; display: grid; place-items: center; padding: 14px; }
.card-media img { width: 100%; height: 100%; object-fit: contain; }
.badge { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; letter-spacing: .02em; }
.badge-off { background: var(--accent); color: #fff; }
.badge-out { background: #eef0f6; color: #6b7488; }
.badge-new { background: var(--brand); color: #fff; }
.card-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.brand-line { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.card-title { font-size: 14px; font-weight: 600; line-height: 1.35; margin: 0; min-height: 2.7em; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.price-old { font-size: 12.5px; color: #98a1b3; text-decoration: line-through; }
.price-note { font-size: 11px; color: var(--ink-soft); }
.stock-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ok); }
.stock-chip.low { color: #c47f00; }
.stock-chip.out { color: #98a1b3; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Trust strip ---------- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.trust-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
.trust-item strong { display: block; font-size: 13.5px; }
.trust-item span { font-size: 12.5px; color: var(--ink-soft); }
.trust-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-size: 16px; flex: none; }

/* ---------- Catalog layout ---------- */
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 24px; padding: 26px 0 40px; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; height: fit-content; position: sticky; top: 130px; }
.filters h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.filter-group { padding: 14px 0; border-top: 1px solid var(--line); }
.filter-group:first-of-type { border-top: 0; padding-top: 0; }
.filter-list { display: flex; flex-direction: column; gap: 2px; }
.filter-list a { font-size: 13.5px; padding: 6px 9px; border-radius: 8px; color: var(--ink-soft); display: flex; justify-content: space-between; }
.filter-list a:hover { background: var(--bg); color: var(--ink); }
.filter-list a.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.filter-list em { font-style: normal; font-size: 11.5px; color: #9aa3b5; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.results-head h1 { font-size: 20px; margin: 0; }
.results-head p { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 48px; text-align: center; color: var(--ink-soft); }

/* ---------- Product detail ---------- */
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 34px; padding: 28px 0 40px; }
.gallery-main { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; aspect-ratio: 4/3; display: grid; place-items: center; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.gallery-thumbs div { width: 74px; height: 60px; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: grid; place-items: center; padding: 6px; }
.pdp-brand { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.pdp h1 { font-size: 27px; line-height: 1.22; margin: 8px 0 14px; letter-spacing: -.02em; }
.pdp-price { display: flex; align-items: baseline; gap: 10px; }
.pdp-price .price { font-size: 32px; }
.pdp-igv { font-size: 12px; color: var(--ink-soft); margin: 2px 0 18px; }
.buybox { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; width: fit-content; }
.qty button { width: 36px; height: 38px; border: 0; background: #fff; font-size: 16px; color: var(--ink); }
.qty span { width: 42px; text-align: center; font-weight: 650; font-size: 14px; }
.specs { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-top: 22px; }
.specs h3 { margin: 0 0 14px; font-size: 16px; }
.specs table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.specs td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs td:first-child { color: var(--ink-soft); width: 40%; }
.warehouse { display: flex; justify-content: space-between; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.warehouse:last-child { border-bottom: 0; }

/* ---------- Cart / checkout ---------- */
.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; padding: 28px 0 48px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.panel h2 { font-size: 17px; margin: 0 0 16px; }
.line-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line-item:last-child { border-bottom: 0; }
.line-item img { width: 84px; height: 68px; object-fit: contain; background: #f3f5fb; border-radius: 10px; padding: 6px; }
.totals { display: flex; justify-content: space-between; font-size: 13.5px; padding: 7px 0; color: var(--ink-soft); }
.totals.total { font-size: 18px; font-weight: 800; color: var(--ink); border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; background: #fff; color: var(--ink); outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-cards { display: grid; gap: 10px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 13px; cursor: pointer; }
.radio-card:hover { border-color: var(--brand); }

/* ---------- Confirmation ---------- */
.confirm { max-width: 760px; margin: 40px auto 60px; }
.confirm-hero { background: linear-gradient(135deg, #06213f, #0a5cb8); color: #fff; border-radius: 20px; padding: 34px; text-align: center; box-shadow: var(--shadow-lg); }
.confirm-hero h1 { margin: 10px 0 6px; font-size: 26px; }
.confirm-hero p { color: #c6dcf2; margin: 0; }
.pickup { background: #fff; border: 2px dashed var(--brand); border-radius: 16px; padding: 20px; text-align: center; margin: 22px 0; }
.pickup span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.pickup strong { display: block; font-size: 34px; letter-spacing: .12em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.timeline { display: flex; gap: 0; margin: 26px 0; }
.step { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--ink-soft); }
.step::before { content: ""; position: absolute; top: 9px; left: 50%; width: 100%; height: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step i { width: 20px; height: 20px; border-radius: 50%; background: var(--line); display: block; margin: 0 auto 8px; position: relative; z-index: 1; }
.step.done i { background: var(--brand); }
.step.done { color: var(--ink); font-weight: 600; }

.footer { background: var(--surface); border-top: 1px solid var(--line); color: var(--ink-soft); margin-top: 50px; padding: 40px 0 26px; font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer h5 { color: var(--ink); font-size: 12px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .07em; }
.footer a { display: block; padding: 3px 0; color: var(--ink-soft); }
.footer a:hover { color: var(--brand); }
.footer span { display: block; padding: 3px 0; }
.footer-logo { background: #fff; display: inline-block; padding: 4px 0 10px; }
.footer-logo img { height: 56px; width: auto; }
.footer-about { margin: 0 0 12px; max-width: 34ch; }
.footer-hours { font-size: 12px; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; flex-wrap: wrap; }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .pdp, .two-col, .catalog { grid-template-columns: 1fr; }
  .filters { position: static; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .searchbar { display: none; }
}

/* ---------- v2: moneda, formularios, admin ---------- */
.currency-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.currency-switch a { padding: 6px 12px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); background: #fff; }
.currency-switch a.on { background: var(--brand); color: #fff; }
.muted { color: var(--ink-soft); }
.muted-sm { font-size: 12.5px; color: var(--ink-soft); }
.center { text-align: center; }
.ok { color: var(--ok); }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form select, .inline-form input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; background: #fff; }
.breadcrumb { font-size: 12.5px; color: var(--ink-soft); padding-top: 18px; }
.breadcrumb a { color: var(--ink-soft); }
.pdp-igv { font-size: 12px; color: var(--ink-soft); margin: 2px 0 18px; }
.buybox-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.qty-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.qty-row label { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.qty-row input { width: 84px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.warehouse-list { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.panel-soft { margin-top: 16px; font-size: 13px; color: var(--ink-soft); background: #fbfcff; }
.rich { font-size: 14px; color: var(--ink-soft); }
.rich p { margin: 0 0 10px; }
.line-title { font-weight: 600; font-size: 14px; }
.line-actions { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.line-actions input { width: 66px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }
.btn.disabled { opacity: .5; pointer-events: none; }
.pager { display: flex; gap: 6px; margin-top: 22px; }
.pager a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fff; }
.pager a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.auth-box { max-width: 440px; margin: 40px auto 60px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--ink-soft); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.table td { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.alert { border-radius: 12px; padding: 12px 16px; font-size: 13.5px; margin: 14px 0; border: 1px solid; }
.alert-ok { background: #eaf8ef; border-color: #bfe8cf; color: #0b6b3a; }
.alert-error { background: #fff5f5; border-color: #f3c2c2; color: #a52020; }
.alert-info { background: #eef3ff; border-color: #cfdbfb; color: #1c3aa9; }
.code { background: #0f1729; color: #d6e0ff; padding: 12px; border-radius: 10px; font-size: 11.5px; overflow-x: auto; line-height: 1.7; }

/* Admin */
.admin-body { background: #f3f5fa; }
.admin-bar { background: #0f1729; color: #cfd6e6; }
.admin-bar-in { display: flex; align-items: center; gap: 12px; height: 60px; }
.admin-logo { color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; }
.admin-version { white-space: nowrap; }
.admin-nav { display: flex; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a { padding: 7px 10px; border-radius: 8px; font-size: 13px; color: #b9c3da; white-space: nowrap; }
.admin-nav a:hover { background: #1b2540; color: #fff; }
.admin-bar .btn { white-space: nowrap; flex: 0 0 auto; }
.admin-main { padding: 26px 20px 60px; }
.admin-h1 { font-size: 22px; margin: 0 0 16px; letter-spacing: -.02em; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 700; }
.stat strong { display: block; font-size: 24px; margin: 4px 0 2px; letter-spacing: -.02em; }
.stat em { font-style: normal; font-size: 12px; color: var(--ink-soft); }
.admin-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-filters { display: flex; gap: 6px; }
.chip { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.row-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.row-line:last-child { border-bottom: 0; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.pill-ok { background: #e6f7ee; color: #0b6b3a; }
.pill-warn { background: #fff4e0; color: #8a5a00; }
.pill-late { background: #ffe9e9; color: #a11c1c; }
.pill-neutral { background: #eef0f6; color: #4b5568; }
.row-late { background: #fff7f7; }
.row-warn { background: #fffdf5; }
.order-card { margin-bottom: 16px; }
.order-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.order-number { font-size: 15px; }
.order-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.order-grid h4 { margin: 0 0 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.order-grid p { margin: 0 0 4px; font-size: 13px; }
.order-form { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 14px; align-items: end; }
.order-form .field { margin: 0; }
.field-submit button { width: 100%; }
.admin-foot { border-top: 1px solid var(--line); padding: 16px 0; font-size: 12px; color: var(--ink-soft); }
@media (max-width: 1000px) {
  .admin-stats, .admin-two, .order-grid, .order-form { grid-template-columns: 1fr 1fr; }
  .admin-bar-in { flex-wrap: wrap; height: auto; padding: 10px 0; }
}

/* Publicacion masiva de productos */
.bulk-form { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 12px; }
.bulk-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bulk-row label { font-weight: 600; }
.bulk-row select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; background: #fff; min-width: 260px; }
.bulk-row select:disabled { opacity: .55; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tab { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); background: #fff; }
.tab-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager { align-items: center; }
.admin-version { font-size: 11.5px; font-weight: 700; color: #a9b6d4; background: #1b2540; padding: 3px 8px; border-radius: 999px; flex: 0 0 auto; }

/* ---------- v19: identidad ITSN, menú desplegable, facetas, contenido ---------- */
.logo-img { padding: 4px 0; flex: 0 0 auto; }
.logo-img img { height: 54px; width: auto; max-width: none; flex: 0 0 auto; }
.topbar a { color: inherit; }
.topbar a:hover { color: #fff; }
.topbar-wa { font-weight: 600; color: #fff; }

.menubar { background: var(--brand); position: relative; z-index: 45; }
.menubar-in { display: flex; align-items: center; gap: 4px; height: 48px; position: relative; }
.menu-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  color: #fff; font-size: 13.5px; font-weight: 700;
}
.menu-toggle:hover, .menu-toggle[aria-expanded="true"] { background: rgba(255, 255, 255, .22); }
.menu-icon { font-size: 15px; line-height: 1; }
.menubar-link { padding: 8px 12px; border-radius: 9px; color: #e7eefa; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.menubar-link:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.menu-panel {
  position: absolute; top: calc(100% + 8px); left: 0; width: min(880px, calc(100vw - 40px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 20px; z-index: 60;
}
.menu-panel[hidden] { display: none; }
.menu-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.menu-cols h5 { margin: 0 0 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); }
.menu-cols a { display: block; padding: 5px 0; font-size: 13.5px; color: var(--ink); border-radius: 6px; }
.menu-cols a:hover { color: var(--brand); }
.menu-cols > div { max-height: 340px; overflow-y: auto; padding-right: 4px; }
.menu-cols > div::-webkit-scrollbar { width: 6px; }
.menu-cols > div::-webkit-scrollbar-thumb { background: #cfd8e6; border-radius: 999px; }
.menu-contact span { display: block; padding: 4px 0; font-size: 13px; color: var(--ink-soft); }
.menu-contact a { color: var(--ink); }
.menu-wa { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; background: #25d366; color: #08351a !important; font-weight: 700; padding: 8px 12px !important; border-radius: 9px; font-size: 12.5px !important; }

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff;
  box-shadow: 0 10px 24px -8px rgba(18, 140, 70, .7); transition: transform .15s ease;
}
.wa-float:hover { transform: translateY(-2px) scale(1.03); }

.social { display: flex; gap: 8px; margin-top: 4px; }
.social-btn {
  width: 34px; height: 34px; border-radius: 9px; display: grid !important; place-items: center;
  background: var(--brand-soft); color: var(--brand) !important; padding: 0 !important;
}
.social-btn:hover { background: var(--brand); color: #fff !important; }
.social-wa { background: #e7f8ee; color: #128c46 !important; }
.social-wa:hover { background: #25d366; color: #fff !important; }

/* Catálogo con filtros */
.catalog-layout { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }
.facets { position: sticky; top: 128px; max-height: calc(100vh - 150px); overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
.facets::-webkit-scrollbar { width: 8px; }
.facets::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
.facets.facets-fluid { position: static; max-height: none; overflow: visible; }
.facet-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.facet-card h4 { margin: 0 0 4px; font-size: 14px; }
.facet-group { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.facet-group:first-of-type { border-top: 0; }
.facet-group summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 2px 0; border-radius: 6px; scroll-margin-top: 140px; }
.facet-group summary:hover { color: var(--brand); }
.facet-group[open] summary { color: var(--brand); margin-bottom: 2px; }
.facet-group { scroll-margin-top: 140px; }
.facet-group summary::-webkit-details-marker { display: none; }
.facet-group summary::after { content: "+"; color: var(--ink-soft); font-weight: 700; }
.facet-group[open] summary::after { content: "–"; }
.facet-values { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.facet-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; color: var(--ink-soft); background: #fff; line-height: 1.25; }
.facet-chip:hover { border-color: var(--brand); color: var(--brand); }
.facet-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.facet-chip b { font-weight: 600; opacity: .7; font-size: 11px; }
.facet-clear { display: inline-block; margin-top: 10px; font-size: 12.5px; color: var(--brand); font-weight: 600; }

/* Filtros: los grupos se quedan abiertos y en su sitio al marcar opciones. */
.facet-n { background: var(--brand); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; font-weight: 700; }
.facet-values.facet-scroll { max-height: 300px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.facet-values.facet-scroll::-webkit-scrollbar { width: 6px; }
.facet-values.facet-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
.facet-chip.on::before { content: "\2713"; font-size: 11px; font-weight: 700; }
.facet-clear-sm { display: inline-block; margin-top: 7px; font-size: 11.5px; color: var(--ink-soft); text-decoration: underline; }
.facet-clear-sm:hover { color: var(--brand); }
.facets-active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.facets-active .tag { background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: 4px 9px; font-size: 11.5px; font-weight: 600; }
.facets-active .tag:hover { background: var(--brand); color: #fff; }
.facets-clear-all { font-size: 11.5px; font-weight: 700; color: var(--brand); }
#resultados.cargando { opacity: .45; pointer-events: none; transition: opacity .12s ease; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.active-filters .tag { background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 600; }
.filters-toggle { display: none; }

/* Páginas de contenido */
.page-hero { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; padding: 34px 0; }
.page-hero h1 { margin: 0 0 6px; font-size: 27px; letter-spacing: -.02em; }
.page-hero p { margin: 0; color: #d6e4f5; font-size: 14px; }
.page-content { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; margin-top: 20px; font-size: 14.5px; line-height: 1.7; color: #33404f; }
.page-content h2 { font-size: 19px; margin: 24px 0 8px; color: var(--ink); }
.page-content h2:first-child { margin-top: 0; }
.page-content h3 { font-size: 15.5px; margin: 18px 0 6px; color: var(--ink); }
.page-content p { margin: 0 0 12px; }
.page-content ul, .page-content ol { margin: 0 0 14px; padding-left: 22px; }
.page-content li { margin-bottom: 6px; }
.page-content a { color: var(--brand); text-decoration: underline; }
.page-content table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 13.5px; }
.page-content th, .page-content td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.page-content th { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.page-content blockquote { margin: 0 0 14px; padding: 12px 16px; background: var(--brand-soft); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; }

/* Formulario de reclamos */
.claim-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.claim-form .full { grid-column: 1 / -1; }
.claim-form label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.claim-form input, .claim-form select, .claim-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 13.5px; background: #fff; color: var(--ink);
}
.claim-form textarea { min-height: 110px; resize: vertical; }
.claim-form input:focus, .claim-form select:focus, .claim-form textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.claim-check { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--ink-soft); }
.claim-check input { width: auto; margin-top: 2px; }
.claim-note { font-size: 12.5px; color: var(--ink-soft); background: #f8fafc; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; }
.claim-ok { background: #eaf7ef; border: 1px solid #bfe6cd; color: #14653a; border-radius: 12px; padding: 16px 18px; font-size: 14px; }

/* Editor de producto (admin) */
.prod-form { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.prod-form .field { margin-bottom: 14px; }
.prod-form label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 5px; }
.prod-form input[type="text"], .prod-form input[type="number"], .prod-form select, .prod-form textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 13.5px; background: #fff;
}
.prod-form textarea { min-height: 90px; resize: vertical; }
.prod-form .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prod-side { position: sticky; top: 20px; }
.img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.img-tile { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.img-tile img { aspect-ratio: 1 / 1; object-fit: contain; width: 100%; background: #fbfcfe; }
.img-tile form { padding: 6px; }
.img-tile button { width: 100%; }
.img-empty { border: 1px dashed var(--line); border-radius: 10px; padding: 18px; text-align: center; color: var(--ink-soft); font-size: 13px; }
.file-drop { border: 1px dashed #c3cede; border-radius: 12px; padding: 16px; background: #fbfcfe; }
.file-drop input[type="file"] { width: 100%; font-size: 12.5px; }

/* Contenido editable (admin) */
.content-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.content-form .full { grid-column: 1 / -1; }
.content-form label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 5px; }
.content-form input[type="text"], .content-form input[type="number"], .content-form textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 13.5px; background: #fff;
}
.content-form textarea { min-height: 220px; font-family: ui-monospace, "Consolas", monospace; font-size: 12.5px; line-height: 1.6; }
.content-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.content-hint { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

@media (max-width: 1000px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .facets { position: static; }
  .menu-cols { grid-template-columns: 1fr 1fr; }
  .prod-form, .content-form, .claim-form { grid-template-columns: 1fr; }
  .prod-side { position: static; }
  .menubar-hide-sm { display: none; }
  .logo-img img { height: 40px; }
  .page-content { padding: 20px 18px; }
}
@media (max-width: 640px) {
  .menu-cols { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .facet-values { max-height: none; }
}

/* Producto sin foto: marcador neutro con la marca, en vez del texto "Sin imagen". */
.card-ph { width: 100%; height: 100%; border-radius: 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(160deg, #eef3fb, #e0e9f7); }
.card-ph strong { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand); text-align: center; padding: 0 10px; }
.card-ph span { font-size: 11px; color: var(--ink-soft); }

/* ---------- Pasarela Izipay (formulario embebido Krypton) ----------
   Los campos de la tarjeta viven dentro de iframes que Krypton dimensiona solo.
   No se les pone alto ni relleno: si el contenedor crece mas que el iframe, la
   parte de abajo deja de responder al clic y el campo parece no editable. */
.kr-embedded { font-family: inherit; width: 100% !important; max-width: 520px; }
.kr-embedded .kr-field-wrapper { margin-bottom: 10px; }
.kr-embedded .kr-label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.kr-embedded .kr-iframe-wrapper { border: 1px solid var(--line); border-radius: 11px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.kr-embedded .kr-iframe-wrapper:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.kr-embedded select { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 14px; color: var(--ink); }
.kr-embedded .kr-payment-button,
.kr-embedded button { background: var(--brand) !important; color: #fff !important; border: 0 !important; border-radius: 11px; padding: 13px 20px; font-weight: 700; font-size: 14px; width: 100%; cursor: pointer; transition: .15s; }
.kr-embedded .kr-payment-button:hover,
.kr-embedded button:hover { background: var(--brand-dark) !important; }
.kr-embedded .kr-form-error { color: #a52020; font-size: 13px; margin-top: 10px; }
