/* =========================================================
   Armeria SCS - Hoja de estilos principal
   Tema: claro (blanco suave), moderno y ligero
   ========================================================= */

:root {
  --bg: #f3f4f7;
  --bg-soft: #e9ebef;
  --surface: #ffffff;
  --surface-2: #eef0f4;
  --border: #d4dae2;
  --border-soft: #e2e6ec;
  --text: #20263a;
  --text-soft: #4d5668;
  --muted: #7d8596;
  --accent: #1f4e79;
  --accent-soft: #dbe7f2;
  --accent-hover: #2a6aa3;
  --accent-dark: #16385c;
  --danger: #d64545;
  --green: #1e9e63;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(31, 41, 55, .12);
  --shadow-sm: 0 4px 14px rgba(31, 41, 55, .08);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.container { width: min(1240px, 92%); margin: 0 auto; }

.hidden { display: none !important; }

/* ---------------- Topbar ---------------- */
.topbar { background: var(--accent); color: #fff; font-size: .8rem; font-weight: 600; }
.topbar-inner { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.topbar-sep { opacity: .5; }
.topbar-phone a { color: inherit; }
@media (max-width: 640px) { .topbar-inner { justify-content: center; } .topbar-phone { display: none; } }

/* ---------------- Header ---------------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 88px; }

.logo {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 12px;
  line-height: 0;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.logo img { height: 60px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; flex: 1; flex-wrap: wrap; }
.nav-link {
  color: var(--text-soft);
  font-size: .9rem; font-weight: 600;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--accent); background: rgba(31, 78, 121, .08); }

.nav-cats { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.search { display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 0 6px 0 12px; }
.search input { background: transparent; border: 0; outline: 0; color: var(--text); padding: 9px 4px; width: 170px; font-size: .88rem; }
.search input::placeholder { color: var(--muted); }
.search-btn { background: transparent; border: 0; color: var(--muted); font-size: 1rem; padding: 8px; border-radius: 8px; transition: color .15s; }
.search-btn:hover { color: var(--accent); }

.icon-btn {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); width: 42px; height: 42px;
  border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.cart-btn { position: relative; }
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--accent); color: #fff;
  font-size: .7rem; font-weight: 800;
  min-width: 19px; height: 19px; padding: 0 4px;
  border-radius: 20px; display: flex; align-items: center; justify-content: center;
}

.nav-toggle { display: none; background: transparent; border: 0; width: 40px; height: 40px; flex-direction: column; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; height: 2px; width: 24px; background: var(--text); border-radius: 2px; transition: all .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero { position: relative; width: 100%; max-width: 1110px; margin: 0 auto; aspect-ratio: 1110 / 340; overflow: hidden; }
.hero-slides, .hero-slide { position: absolute; inset: 0; }
.hero-slide { background-size: cover; background-position: center; background-repeat: no-repeat; opacity: 0; transition: opacity .9s ease; }
.hero-slide.active { opacity: 1; }
.hero-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dots button { width: 9px; height: 9px; border-radius: 20px; border: 0; background: rgba(255,255,255,.35); transition: all .25s; padding: 0; }
.hero-dots button.active { width: 26px; background: var(--accent); }

/* ---------------- Botones ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: .92rem; letter-spacing: .01em;
  padding: 13px 24px; border-radius: 11px; border: 1px solid transparent;
  transition: transform .12s, background .15s, color .15s, border-color .15s;
}
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------------- Secciones ---------------- */
.section { padding: 74px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 34px; gap: 16px; flex-wrap: wrap; }
.section-kicker { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; margin-top: 6px; letter-spacing: -.01em; }
.section-title span { color: var(--accent); }

/* ---------------- Grid de productos ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
@media (max-width: 1080px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  animation: fadeUp .5s ease both;
}
.card:hover { transform: translateY(-5px); border-color: var(--border); box-shadow: var(--shadow); }
.card-img-wrap { position: relative; background: #eef0f4; aspect-ratio: 1; overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img { transform: scale(1.07); }
.card-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.badge { font-size: .75rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; padding: 5px 8px; color: #fff; }
.badge-discount { background: #f39d72; }
.badge-new { background: #24b9d7; }
.badge-featured { background: #f39d72; }

.card-quick { position: absolute; inset: 0; background: rgba(8,11,17,.45); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.card:hover .card-quick { opacity: 1; }
.card-quick button { background: var(--accent); color: #fff; border: 0; font-weight: 700; font-size: .8rem; padding: 10px 18px; border-radius: 9px; transform: translateY(8px); transition: transform .2s; }
.card:hover .card-quick button { transform: translateY(0); }

.qv-fab {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(18,23,34,.92); border: 1px solid var(--border);
  color: var(--text); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s;
}
.qv-fab svg { width: 19px; height: 19px; }
.card:hover .qv-fab, .qv-fab:focus-visible { opacity: 1; }
.qv-fab:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 860px) { .qv-fab { opacity: 1; width: 40px; height: 40px; } }

.sh-fab {
  position: absolute; top: 54px; right: 10px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(18,23,34,.92); border: 1px solid var(--border);
  color: var(--text); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s;
}
.sh-fab svg { width: 18px; height: 18px; }
.card:hover .sh-fab, .sh-fab:focus-visible { opacity: 1; }
.sh-fab:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 860px) { .sh-fab { opacity: 1; width: 40px; height: 40px; top: 56px; } }

.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat { font-size: .72rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.card-name { font-size: .95rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.card-prices { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.card-price { font-size: 1.06rem; font-weight: 800; color: var(--text); }
.card-old { font-size: .82rem; color: var(--muted); text-decoration: line-through; }
.card-add {
  margin-top: 4px; width: 100%;
  background: transparent; border: 1px solid var(--accent); color: var(--accent);
  font-weight: 700; font-size: .86rem; padding: 9px 0; border-radius: 9px;
  transition: all .15s;
}
.card-add:hover { background: var(--accent); color: #fff; }

.empty-note { text-align: center; color: var(--muted); padding: 30px 0; }

/* ---------------- Banner medio ---------------- */
.banner-mid { position: relative; width: 100%; max-width: 1110px; margin: 0 auto; overflow: hidden; }
.banner-mid-link { display: block; position: relative; width: 100%; aspect-ratio: 1110 / 213; }
.banner-mid-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; transition: opacity .18s; }
.banner-mid-link:hover .banner-mid-bg { opacity: .9; }

/* ---------------- Footer ---------------- */
.footer { background: #12161f; border-top: 1px solid var(--border-soft); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1.5fr 1fr; gap: 32px; padding-bottom: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-logo { height: 132px; width: auto; border-radius: 12px; background: #fff; padding: 10px 16px; margin-bottom: 14px; }
.footer-col p, .footer-col span { color: #a5adbd; font-size: .9rem; display: block; }
.footer-col h4 { color: #e8ecf3; font-size: .95rem; margin-bottom: 14px; letter-spacing: .03em; }
.footer-col a { display: block; color: #a5adbd; font-size: .9rem; margin-bottom: 9px; transition: color .15s; }
.footer-col a:hover { color: #7fb3e0; }
.footer-line { margin-bottom: 9px; }
.footer-bottom { border-top: 1px solid #262d3a; padding: 18px 0; }
.footer-bottom .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom span { color: #8e97a9; font-size: .85rem; }
.footer-admin { color: #8e97a9; font-size: .85rem; text-decoration: underline; }
.footer-admin:hover { color: #7fb3e0; }

/* ---------------- Drawer carrito ---------------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 92vw);
  background: var(--surface); z-index: 210;
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .28s cubic-bezier(.22,.8,.3,1);
  box-shadow: -12px 0 40px rgba(0,0,0,.5);
}
.drawer.show { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border-soft); }
.drawer-head h3 { font-size: 1.1rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--border-soft); background: var(--bg-soft); }
.cart-totals { display: grid; gap: 8px; margin-bottom: 14px; }
.cart-row { display: flex; justify-content: space-between; font-size: .92rem; color: var(--text-soft); }
.cart-row-total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; font-size: 1.05rem; color: var(--text); }
.cart-row-total strong { color: var(--accent); }
.drawer-ship { margin-bottom: 14px; }
.discount-box { display: flex; gap: 8px; margin-bottom: 14px; }
.discount-box input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; font-size: .9rem; color: var(--text); background: var(--surface); }
.discount-box input:focus { outline: none; border-color: var(--accent); }
.discount-box button { border: 0; background: var(--accent); color: #fff; font-weight: 700; font-size: .85rem; padding: 0 16px; border-radius: 9px; cursor: pointer; }
.discount-box button:hover { background: var(--accent-hover); }
.ship-drawer-title { font-size: .8rem; font-weight: 700; color: var(--text-soft); margin-bottom: 8px; }
.ship-drawer-note { font-size: .8rem; color: var(--muted); background: rgba(31,78,121,.06); border: 1px dashed rgba(31,78,121,.3); padding: 8px 11px; border-radius: 8px; margin-bottom: 14px; }
.ship-drawer-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; margin-bottom: 6px; transition: border-color .15s; }
.ship-drawer-opt:hover { border-color: var(--accent); }
.ship-drawer-opt.selected { border-color: var(--accent); background: rgba(31,78,121,.05); }
.ship-drawer-opt input { width: auto; accent-color: var(--accent); margin: 0; }
.ship-drawer-opt span { font-size: .85rem; font-weight: 600; flex: 1; }
.ship-drawer-opt strong { font-size: .85rem; }
.ship-drawer-selected { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.ship-drawer-selected span { font-size: .85rem; }
.ship-drawer-selected b { color: var(--text); }
.ship-drawer-change { background: transparent; border: 0; color: var(--accent); font-weight: 700; font-size: .8rem; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.ship-drawer-change:hover { background: rgba(31,78,121,.08); }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 0; }

.cart-item { display: flex; gap: 12px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 12px; padding: 10px; }
.cart-item img { width: 62px; height: 62px; object-fit: cover; border-radius: 8px; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 700; font-size: .88rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item-price { color: var(--accent); font-weight: 700; font-size: .9rem; margin-top: 3px; }
.qty-ctl { display: inline-flex; align-items: center; gap: 2px; margin-top: 8px; }
.qty-ctl button { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-weight: 700; }
.qty-ctl button:hover { border-color: var(--accent); color: var(--accent); }
.qty-ctl span { min-width: 30px; text-align: center; font-weight: 700; font-size: .9rem; }
.cart-item-remove { background: transparent; border: 0; color: var(--muted); font-size: 1rem; align-self: flex-start; padding: 4px; }
.cart-item-remove:hover { color: var(--danger); }

/* ---------------- Modales ---------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 300; opacity: 0; pointer-events: none; transition: opacity .22s; }
.modal-backdrop.show { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; z-index: 310; top: 50%; left: 50%;
  transform: translate(-50%, -46%) scale(.97);
  width: min(560px, 94vw); max-height: 88vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: all .22s ease;
}
.modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-lg { width: min(700px, 94vw); }
.modal-product { width: min(920px, 96vw); }
.modal-close { position: sticky; top: 14px; left: calc(100% - 56px); z-index: 5; }
.modal-content { padding: 24px; }
.modal-content h2 { font-size: 1.3rem; margin-bottom: 18px; }

/* Galería de imagen a pantalla completa (mejor calidad posible) */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.94); z-index: 500; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .2s; }
.lightbox.show { opacity: 1; visibility: visible; }
.lightbox-body { max-width: 100vw; max-height: 100vh; overflow: auto; -webkit-overflow-scrolling: touch; display: flex; align-items: center; justify-content: center; padding: 22px; box-sizing: border-box; width: 100%; height: 100%; }
.lightbox-body img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close { position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #ffffff; color: #1f4e79; font-size: 1.3rem; cursor: pointer; z-index: 501; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.lightbox-close:hover { background: #f0f4f9; }
.lightbox-nav { position: fixed; bottom: 26px; width: 54px; height: 54px; border-radius: 50%; border: 0; background: #ffffff; color: #1f4e79; cursor: pointer; z-index: 501; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 22px rgba(0,0,0,.5); }
.lightbox-nav:hover { background: #f0f4f9; }
.lightbox-nav:active { transform: scale(.94); }
.lightbox-prev { left: calc(50% - 66px); }
.lightbox-next { right: calc(50% - 66px); }

/* Ficha completa de producto */
.pdetail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 640px) { .pdetail { grid-template-columns: 1fr; gap: 16px; } }
.pdetail-gallery { display: grid; gap: 12px; }
.pdetail-main { border-radius: 14px; overflow: hidden; background: #eef0f4; display: flex; align-items: center; justify-content: center; min-height: 220px; }
.pdetail-main img { max-width: 100%; max-height: 60vh; width: auto; height: auto; object-fit: contain; display: block; cursor: zoom-in; }
.pdetail-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-thumb { width: 62px; height: 62px; border-radius: 9px; overflow: hidden; border: 2px solid var(--border); background: #eef0f4; padding: 0; cursor: pointer; transition: border-color .15s; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb.active { border-color: var(--accent); }
.pd-thumb:hover { border-color: var(--accent); }

.pdetail-info .card-cat { margin-bottom: 6px; display: block; }
.pdetail-name { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; letter-spacing: -.01em; }
.pdetail-prices { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.pdetail-price { font-size: 1.7rem; font-weight: 800; color: var(--accent); }
.pdetail-old { font-size: 1.05rem; color: var(--muted); text-decoration: line-through; }
.pdetail-iva-note { font-size: .82rem; color: var(--muted); background: rgba(31,78,121,.06); border: 1px dashed rgba(31,78,121,.3); padding: 8px 11px; border-radius: 8px; margin-bottom: 12px; }
.pdetail-stock { font-size: .9rem; margin-bottom: 8px; font-weight: 700; }
.pdetail-stock.ok { color: var(--green); }
.pdetail-stock.no { color: var(--danger); }
.pdetail-sku { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.pdetail-desc { color: var(--text-soft); font-size: .95rem; line-height: 1.65; margin-bottom: 18px; }
.pdetail-desc h1, .pdetail-desc h2, .pdetail-desc h3, .pdetail-desc h4 { margin: 14px 0 8px; font-size: 1.05rem; color: var(--text); }
.pdetail-desc p { margin: 8px 0; }
.pdetail-desc ul, .pdetail-desc ol { margin: 8px 0 8px 22px; }
.pdetail-desc li { margin: 4px 0; }
.pdetail-desc table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.pdetail-desc td, .pdetail-desc th { border: 1px solid var(--border); padding: 7px 9px; font-size: .88rem; vertical-align: top; }
.pdetail-desc blockquote { border-left: 3px solid var(--accent); margin: 10px 0; padding: 6px 12px; background: var(--surface-2); }
.pdetail-desc hr { border: 0; border-top: 1px solid var(--border-soft); margin: 14px 0; }
.pdetail-desc iframe, .pdetail-desc video { max-width: 100%; border: 0; border-radius: 8px; margin: 10px 0; }
.pdetail-actions { margin: 18px 0 18px; }
.pdetail-actions .btn { color: var(--accent); border-color: var(--accent); }
.pdetail-actions .btn:hover { background: var(--accent); color: #fff; }
.pdetail-qty { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pdetail-qty > span { font-weight: 700; font-size: .92rem; }
.qv-qty { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.qv-qty button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 1.15rem; cursor: pointer; }
.qv-qty button:hover { border-color: var(--accent); color: var(--accent); }
.qv-qty span { font-weight: 800; min-width: 36px; text-align: center; }
.pdetail-meta { display: grid; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: .85rem; }
.pdetail-meta span { display: flex; align-items: center; gap: 7px; }

/* ---------------- Formularios ---------------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.checkout-form { display: grid; gap: 14px; }
.checkout-form label { display: grid; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--text-soft); }
.checkout-form input, .checkout-form select, .checkout-form textarea {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); padding: 11px 13px; font-size: .92rem; outline: 0; width: 100%;
  transition: border-color .15s;
}
.checkout-form input:focus, .checkout-form select:focus, .checkout-form textarea:focus { border-color: var(--accent); }
.pay-note {
  background: rgba(245,166,35,.08); border: 1px solid rgba(245,166,35,.35);
  color: var(--text-soft); font-size: .86rem; line-height: 1.5;
  padding: 12px 14px; border-radius: 10px;
}
.checkout-form .terms-check {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: .86rem; color: var(--text-soft); line-height: 1.4; cursor: pointer;
  padding: 6px 0;
}
.checkout-form .terms-check a { color: var(--accent); text-decoration: underline; }
.checkout-form .terms-check a:hover { color: var(--accent-hover); }
.checkout-form .terms-check input[type=checkbox] { width: auto; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.turnstile-wrap { display: flex; justify-content: center; }
.turnstile-wrap:empty { display: none; }
.checkout-ship-title { font-size: .9rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.ship-options { display: grid; gap: 8px; }
.ship-option {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.ship-option:hover { border-color: var(--accent); }
.ship-option.selected { border-color: var(--accent); background: rgba(31,78,121,.05); }
.ship-option input { width: auto; accent-color: var(--accent); }
.ship-option span { display: grid; gap: 2px; flex: 1; }
.ship-option b { font-size: .9rem; }
.ship-option small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.ship-option strong { font-size: .9rem; white-space: nowrap; }
.checkout-summary { background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: 11px; padding: 14px; display: grid; gap: 7px; font-size: .92rem; }
.checkout-summary .cart-row { color: var(--text); }
.checkout-items { display: grid; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); }
.checkout-item { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .86rem; color: var(--text-soft); }
.checkout-item span { min-width: 0; overflow-wrap: anywhere; }
.checkout-item small { color: var(--muted); white-space: nowrap; }
.checkout-item strong { white-space: nowrap; color: var(--text); }
.form-note { text-align: center; font-size: .85rem; color: var(--muted); min-height: 1.2em; }
.form-note.error { color: var(--danger); }
.form-note.ok { color: var(--green); }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translate(-50%, -80px);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: .92rem;
  box-shadow: var(--shadow); z-index: 400; transition: transform .3s ease;
  display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translate(-50%, 0); }
.toast.ok { border-color: rgba(48,197,132,.5); }
.toast.error { border-color: rgba(229,72,77,.5); }

/* ---------------- PÃ¡ginas informativas ---------------- */
body.is-page .hero,
body.is-page #destacados,
body.is-page #ofertas,
body.is-page #novedades,
body.is-page #catalogo,
body.is-page .banner-mid { display: none; }

.page-back { display: inline-block; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.page-back:hover { color: var(--accent-hover); }
.page-title { font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 800; margin-bottom: 22px; letter-spacing: -.01em; }
.page-content { color: var(--text); line-height: 1.7; }
.page-content h3, .page-content h4, .page-content h5 { margin: 22px 0 10px; color: var(--text); font-weight: 800; }
.page-content p { margin: 10px 0; }
.page-content ul, .page-content ol { margin: 10px 0 10px 22px; }
.page-content li { margin: 6px 0; }
.page-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.page-content td, .page-content th { border: 1px solid var(--border); padding: 8px 10px; vertical-align: top; font-size: .92rem; }
.page-content a { color: var(--accent); text-decoration: underline; }
.page-content a:hover { color: var(--accent-hover); }
.page-content img { max-width: 100%; height: auto; }
.page-content hr { border: 0; border-top: 1px solid var(--border-soft); margin: 18px 0; }

/* ---------------- BotÃ³n flotante WhatsApp ---------------- */
.wa-float {
  position: fixed; right: 18px; bottom: 22px; z-index: 150;
  display: flex; align-items: center; gap: 8px;
  background: #25d366; color: #fff;
  padding: 13px 18px; border-radius: 50px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .4);
  font-weight: 700; font-size: .9rem; text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37, 211, 102, .5); }
.wa-float svg { width: 26px; height: 26px; flex-shrink: 0; }
.wa-label { white-space: nowrap; }

@media (max-width: 640px) {
  .wa-float { right: 12px; bottom: 14px; padding: 13px; border-radius: 50%; }
  .wa-label { display: none; }
}

/* ---------------- Animaciones ---------------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------- Responsive / MÃ³viles ---------------- */

html { -webkit-tap-highlight-color: transparent; }

@media (max-width: 1100px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(255,255,255,.98); padding: 12px;
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 12px 24px rgba(31,41,55,.1);
    transform: translateY(-130%);
    opacity: 0; visibility: hidden;
    transition: transform .25s ease, opacity .25s ease, visibility .25s;
    max-height: calc(100vh - 90px); overflow-y: auto; z-index: 90;
  }
  .nav.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-link { padding: 13px; font-size: 1rem; }
  .header-inner { height: 76px; gap: 10px; }
  .section { padding: 46px 0; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 88px; }

  /* Header de 2 filas: fila 1 = menÃº/logo/carrito, fila 2 = buscador */
  .header-inner { flex-wrap: wrap; height: auto; padding: 7px 4%; row-gap: 8px; }
  .nav-toggle { order: 0; }
  .logo { order: 1; }
  .logo img { height: 44px; }
  .header-actions { order: 2; margin-left: auto; }
  .search { order: 3; flex: 1 0 100%; margin-left: 0; }
  .search input { flex: 1; width: auto; min-width: 0; }
  .search-btn { width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
  .nav { max-height: calc(100vh - 145px); }

  /* Productos: tarjetas compactas a 2 columnas */
  .card-body { padding: 10px 10px 12px; gap: 6px; }
  .card-name { font-size: .84rem; min-height: 2.25em; }
  .card-price { font-size: .95rem; }
  .card-old { font-size: .74rem; }
  .card-add { font-size: .8rem; padding: 8px 0; }
  .badge { font-size: .6rem; padding: 3px 7px; }

  /* Toques tÃ¡ctiles cÃ³modos */
  .icon-btn { width: 44px; height: 44px; }
  .qty-ctl button { width: 32px; height: 32px; font-size: 1.05rem; }
  .qv-qty button { width: 40px; height: 40px; font-size: 1.2rem; }
  .cart-item-remove { padding: 8px; }

  /* Secciones y tipografÃ­a */
  .section-title { font-size: 1.3rem; }
  .section-head { margin-bottom: 22px; }
  .section-kicker { font-size: .7rem; }

  /* Footer a una columna */
  .footer { padding-top: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom .container { justify-content: center; text-align: center; }

  /* Modal y checkout */
  .modal-content { padding: 18px; }
  .toast { width: calc(100vw - 36px); justify-content: center; text-align: center; }

  /* Evita el auto-zoom de iOS al escribir en inputs */
  .search input, .checkout-form input, .checkout-form select, .checkout-form textarea { font-size: 16px; }
}

@media (max-width: 380px) {
  .logo img { height: 38px; }
  .logo { padding: 5px 9px; }
  .nav-toggle, .icon-btn { width: 40px; height: 40px; }
  .card-cat { font-size: .64rem; }
  .card-name { font-size: .8rem; }
}
