/* ===== Tienda en línea · estilos propios (sobre Bootstrap 5) ===== */
:root {
  --tp: #0f766e;          /* color primario (se sobreescribe desde configuración) */
  --tp-dark: #0b5a54;
  --ts: #f59e0b;          /* color secundario / acento */
  --ink: #1f2937;
  --muted: #6b7280;
  --bg: #f7f7f5;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 8px 24px -12px rgba(16,24,40,.12);
}
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--tp); text-decoration: none; }
a:hover { color: var(--tp-dark); }
.btn-primary, .btn-primary:disabled { background: var(--tp); border-color: var(--tp); }
.btn-primary:hover, .btn-primary:focus { background: var(--tp-dark); border-color: var(--tp-dark); }
.btn-outline-primary { color: var(--tp); border-color: var(--tp); }
.btn-outline-primary:hover { background: var(--tp); border-color: var(--tp); color: #fff; }
.btn-accent { background: var(--ts); border-color: var(--ts); color: #1f1300; font-weight: 600; }
.btn-accent:hover { filter: brightness(.95); color: #1f1300; }
.text-primary { color: var(--tp) !important; }
.bg-primary { background: var(--tp) !important; }
.form-control:focus, .form-select:focus { border-color: var(--tp); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--tp) 20%, transparent); }
.form-check-input:checked { background-color: var(--tp); border-color: var(--tp); }
.badge.bg-primary { background: var(--tp) !important; }
.page-link { color: var(--tp); }
.page-item.active .page-link { background: var(--tp); border-color: var(--tp); }

/* Barra superior */
.topbar { background: var(--ink); color: #d1d5db; font-size: .82rem; }
.topbar a { color: #e5e7eb; }
.topbar .bi { color: var(--ts); }

/* Cabecera */
.site-header { background: var(--card); border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 1030; }
.brand img { height: 46px; width: auto; max-width: 180px; object-fit: contain; }
.brand .brand-name { font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-size: 1.25rem; }
.search-form .form-control { border-radius: 999px 0 0 999px; border-right: 0; }
.search-form .btn { border-radius: 0 999px 999px 0; }
.header-icon { color: var(--ink); position: relative; display: inline-flex; flex-direction: column; align-items: center; font-size: .72rem; min-width: 54px; }
.header-icon .bi { font-size: 1.35rem; }
.header-icon .count { position: absolute; top: -4px; right: 6px; background: var(--ts); color: #1f1300; border-radius: 999px; font-size: .68rem; font-weight: 700; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 4px; }
.cat-nav { background: var(--card); border-bottom: 1px solid #e5e7eb; }
.cat-nav a { color: var(--ink); font-weight: 500; font-size: .92rem; padding: .6rem .9rem; display: inline-block; white-space: nowrap; border-bottom: 2px solid transparent; }
.cat-nav a:hover, .cat-nav a.active { color: var(--tp); border-bottom-color: var(--tp); }

/* Portada */
.hero { border-radius: var(--radius); overflow: hidden; min-height: 320px; position: relative; background: linear-gradient(120deg, var(--tp), var(--tp-dark)); color: #fff; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .hero-body { position: relative; z-index: 1; padding: 3rem 2rem; max-width: 560px; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,0)); min-height: 320px; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { font-weight: 800; letter-spacing: -.02em; }
.carousel-indicators [data-bs-target] { width: 10px; height: 10px; border-radius: 50%; }
.benefits .item { background: var(--card); border-radius: var(--radius); padding: 1rem; display: flex; gap: .8rem; align-items: center; box-shadow: var(--shadow); height: 100%; }
.benefits .bi { font-size: 1.6rem; color: var(--tp); }
.section-title { font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-title small a { font-weight: 500; font-size: .9rem; }
.cat-card { display: block; background: var(--card); border-radius: var(--radius); padding: 1rem; text-align: center; box-shadow: var(--shadow); color: var(--ink); transition: transform .15s; height: 100%; }
.cat-card:hover { transform: translateY(-3px); color: var(--tp); }
.cat-card .ico { width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--tp) 12%, #fff); display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--tp); margin-bottom: .5rem; overflow: hidden; }
.cat-card .ico img { width: 100%; height: 100%; object-fit: cover; }

/* Tarjeta de producto */
.product-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; position: relative; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -12px rgba(16,24,40,.25); }
.product-card .img { aspect-ratio: 1 / 1; background: #f3f4f6; display: block; overflow: hidden; }
.product-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product-card:hover .img img { transform: scale(1.04); }
.product-card .body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.product-card .name { font-weight: 600; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.product-card .cat { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.price { font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .9rem; margin-left: .4rem; font-weight: 500; }
.badge-off { position: absolute; top: 10px; left: 10px; background: #dc2626; color: #fff; font-weight: 700; border-radius: 8px; padding: .25rem .5rem; font-size: .78rem; z-index: 2; }
.badge-new { position: absolute; top: 10px; left: 10px; background: var(--tp); color: #fff; font-weight: 700; border-radius: 8px; padding: .25rem .5rem; font-size: .78rem; z-index: 2; }
.badge-out { position: absolute; top: 10px; left: 10px; background: #374151; color: #fff; font-weight: 700; border-radius: 8px; padding: .25rem .5rem; font-size: .78rem; z-index: 2; }
.fav-btn { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.9); border: 0; color: #9ca3af; display: inline-flex; align-items: center; justify-content: center; }
.fav-btn.active, .fav-btn:hover { color: #e11d48; }
.stars { color: #f59e0b; font-size: .85rem; }
.stars .bi { margin-right: -2px; }

/* Ficha de producto */
.gallery-main { background: #fff; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.gallery-thumbs img { width: 68px; height: 68px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; background: #fff; }
.gallery-thumbs img.active, .gallery-thumbs img:hover { border-color: var(--tp); }
.variant-btn { border: 2px solid #e5e7eb; background: #fff; border-radius: 10px; padding: .45rem .9rem; font-weight: 600; }
.variant-btn.active { border-color: var(--tp); color: var(--tp); background: color-mix(in srgb, var(--tp) 8%, #fff); }
.variant-btn:disabled { opacity: .45; text-decoration: line-through; }
.qty { display: inline-flex; border: 1px solid #d1d5db; border-radius: 10px; overflow: hidden; }
.qty button { border: 0; background: #f3f4f6; width: 40px; font-size: 1.1rem; }
.qty input { width: 54px; border: 0; text-align: center; font-weight: 600; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.trust li { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--muted); margin-bottom: .4rem; }
.trust .bi { color: var(--tp); }
.desc img { max-width: 100%; }

/* Carrito y checkout */
.cart-img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: #f3f4f6; }
.summary { position: sticky; top: 90px; }
.pay-option { border: 2px solid #e5e7eb; border-radius: 12px; padding: .9rem 1rem; cursor: pointer; display: flex; gap: .8rem; align-items: flex-start; background: #fff; }
.pay-option:hover { border-color: #cbd5e1; }
.pay-option.active { border-color: var(--tp); background: color-mix(in srgb, var(--tp) 6%, #fff); }
.pay-option .bi { font-size: 1.4rem; color: var(--tp); }
.steps { display: flex; gap: 0; counter-reset: s; margin-bottom: 1.5rem; }
.steps span { flex: 1; text-align: center; font-size: .85rem; color: var(--muted); position: relative; padding-top: 28px; }
.steps span::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; background: #e5e7eb; color: #374151; font-weight: 700; font-size: .75rem; line-height: 24px; }
.steps span.done::before, .steps span.active::before { background: var(--tp); color: #fff; }
.steps span.active { color: var(--tp); font-weight: 600; }
.qr-box { background: #fff; border: 2px dashed #d1d5db; border-radius: var(--radius); padding: 1rem; text-align: center; }
.qr-box img { max-width: 240px; width: 100%; }
.timeline { list-style: none; padding: 0; margin: 0; display: flex; gap: 0; }
.timeline li { flex: 1; text-align: center; font-size: .78rem; color: var(--muted); position: relative; padding-top: 26px; }
.timeline li::before { content: ""; position: absolute; top: 8px; left: 50%; width: 14px; height: 14px; border-radius: 50%; background: #e5e7eb; transform: translateX(-50%); z-index: 1; }
.timeline li::after { content: ""; position: absolute; top: 14px; left: 50%; right: -50%; height: 2px; background: #e5e7eb; }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--tp); font-weight: 600; }
.timeline li.done::before, .timeline li.done::after { background: var(--tp); }

/* Pie */
.site-footer { background: #111827; color: #9ca3af; margin-top: 3rem; font-size: .92rem; }
.site-footer h6 { color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; }
.site-footer a { color: #d1d5db; }
.site-footer a:hover { color: #fff; }
.site-footer .pay-logos span { background: #fff; color: #111827; border-radius: 6px; padding: .2rem .5rem; font-size: .75rem; font-weight: 700; margin-right: .3rem; display: inline-block; margin-bottom: .3rem; }
.footer-bottom { border-top: 1px solid #1f2937; padding: 1rem 0; font-size: .8rem; }
.site-footer a.libro, .libro { display: inline-flex; align-items: center; gap: .5rem; background: #fff; color: #111827; border-radius: 8px; padding: .4rem .7rem; font-weight: 700; font-size: .8rem; }
.libro .bi { color: #dc2626; font-size: 1.1rem; }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 1040; }
.wa-float:hover { color: #fff; transform: scale(1.05); }

/* Utilidades */
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty .bi { font-size: 3rem; opacity: .4; }
.toast-container { z-index: 1080; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--tp); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.auth-card { max-width: 440px; margin: 2rem auto; }
.sticky-buy { display: none; }
@media (max-width: 767px) {
  .hero .hero-body { padding: 1.6rem 1.2rem; min-height: 260px; }
  .hero { min-height: 260px; }
  .sticky-buy { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid #e5e7eb; padding: .6rem 1rem; gap: .8rem; align-items: center; z-index: 1035; }
  body.has-sticky { padding-bottom: 72px; }
  .wa-float { bottom: 84px; }
  .summary { position: static; }
}
@media print {
  .topbar, .site-header, .cat-nav, .site-footer, .wa-float, .no-print { display: none !important; }
  body { background: #fff; }
}
