/* ===== Souz — Tema claro y oscuro adaptable ===== */
:root {
  --brand: #111827;
  --accent: #ef476f;
  --bg: #ffffff;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --ring: 0 12px 32px rgba(17, 24, 39, 0.10);
}
html[data-theme="dark"] {
  --bg: #0f1115;
  --card: #151823;
  --text: #e5e7eb;
  --brand: #e5e7eb;
  --muted: #9ca3af;
  --border: #232633;
  --ring: 0 12px 32px rgba(0, 0, 0, .45);
}

/* ===== Reset básico ===== */
html, body {
  background: var(--bg);
  color: var(--text);
}

/* ===== Navbar ===== */
.navbar {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--border);
}
.navbar-brand span { color: var(--accent); }
.navbar-toggler { border-color: var(--border) !important; border-width: 1px; }
.navbar-toggler-icon {
  background-image: none; width: 1.5rem; height: 1.5rem; position: relative;
}
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--text);
}
.navbar-toggler-icon::before { top: 6px; box-shadow: 0 6px 0 0 var(--text); }
.navbar-toggler-icon::after { display: none; }

/* ===== Botón tema ===== */
.btn-theme-toggle{
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  height: 36px; width: 36px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}
.btn-theme-toggle:hover{ filter: brightness(0.97); }
.btn-theme-toggle:focus{ box-shadow: 0 0 0 .2rem rgba(239, 71, 111, .25); }

/* ===== Hero ===== */
.hero-pro{ position: relative; overflow: hidden; background: var(--bg); }
.hero-pro .halo{
  position: absolute; inset: -30% -20% auto auto; width: 800px; height: 800px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(239, 71, 111, .18), transparent 70%); filter: blur(20px);
}
.hero-pro .badge-tag{
  display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .7rem;
  border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-weight: 600; background: var(--bg);
}

/* ===== Secciones y filtros ===== */
.section-head{
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: 2.2rem 0 1rem; border-bottom: 1px solid var(--border); padding-bottom: .6rem;
}
.section-head h2{ margin: 0; font-weight: 800; letter-spacing: .2px; }
.nav-category .nav-link{ border-radius: 999px; color: var(--text); opacity: .88; }
.nav-category .nav-link:hover{ opacity: 1; }
.nav-category .nav-link.active{ background: var(--accent); color: #fff !important; }

/* ===== Filtro/búsqueda ===== */
.filter-bar{
  display:flex; flex-wrap:wrap; gap:.6rem; align-items:center;
  background:var(--bg); border:1px solid var(--border); border-radius:14px;
  padding:.5rem .75rem; box-shadow: var(--ring);
}
.searchbox{ position:relative; flex:1 1 260px; }
.searchbox input{
  padding-left:2.2rem; border-radius:10px; border:1px solid var(--border);
  background:var(--bg); color:var(--text);
}
.searchbox input::placeholder{ color:var(--muted); }
.searchbox .icon{ position:absolute; left:.65rem; top:50%; transform:translateY(-50%); opacity:.6; }

/* ===== Cards de producto ===== */
.card{
  background:var(--card); border:1px solid var(--border); border-radius:16px;
  box-shadow: var(--ring); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover{ transform: translateY(-3px); box-shadow: 0 18px 40px rgba(17, 24, 39, .16); }
.product-img{ aspect-ratio: 4/5; object-fit: cover; width:100%; border-radius:12px; background:#f3f4f6; }
.title-truncate{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.6em;
}
.badge-accent{ background:var(--accent); color:#fff; border-radius:999px; padding:.35rem .6rem; font-weight:700; }
.price{ font-weight:800; letter-spacing:.2px; color:var(--text); }

/* ===== Botones ===== */
.btn-accent{ background: var(--accent); border:none; color:#fff; }
.btn-accent:hover{ filter: brightness(1.05); }
.btn-outline-theme{ background:transparent; color:var(--text); border:1px solid var(--border); }
.btn-outline-theme:hover{ background:var(--bg); filter: brightness(0.97); }
.btn:focus,.form-control:focus,.form-select:focus{
  box-shadow: 0 0 0 .2rem rgba(239,71,111,.25); border-color: var(--accent);
}

/* ===== Footer ===== */
.footer{ color:var(--muted); border-top:1px solid var(--border); background: var(--bg); }
.small.text-secondary{ color: var(--muted) !important; }

/* ===== Paginación ===== */
.pagination .page-link{ border-radius:10px; border:1px solid var(--border); color:var(--brand); }
.pagination .active .page-link{ background:var(--accent); border-color:var(--accent); color:#fff; }

/* ===== Responsive general ===== */
@media (max-width: 991.98px){
  .nav-category{ padding:.5rem .5rem 1rem; }
  .nav-category .nav-link{ display:block; width:100%; text-align:left; padding:.55rem .85rem; }
  .navbar .btn-theme-toggle{ margin-left:auto; }
}
@media (max-width: 575.98px){
  .section-head{ margin:1.4rem 0 .8rem; }
  .filter-bar{ gap:.5rem; padding:.5rem; border-radius:12px; }
  .searchbox{ flex:1 1 100%; }
  .card{ border-radius:14px; }
  .product-img{ border-radius:10px; }
}

/* ===== Contraste tema oscuro adicional ===== */
html[data-theme="dark"] a,
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .navbar-brand { color: var(--text) !important; }
html[data-theme="dark"] .navbar-brand span{ color: var(--accent) !important; }
html[data-theme="dark"] .nav-category .nav-link{ color: var(--text) !important; }
html[data-theme="dark"] .card{ color:var(--text); }
html[data-theme="dark"] .card .small,
html[data-theme="dark"] .text-secondary{ color: var(--muted) !important; }
.text-bg-secondary{ background-color:#e5e7eb !important; color:#111827 !important; }
html[data-theme="dark"] .text-bg-secondary{ background-color:#384152 !important; color:#e5e7eb !important; }
html[data-theme="dark"] .form-control, html[data-theme="dark"] .form-select{
  background:#0f1115 !important; color:var(--text) !important; border-color:var(--border) !important;
}
html[data-theme="dark"] .form-control::placeholder{ color:#7b8190; }
html[data-theme="dark"] .navbar-toggler{ border-color: var(--border) !important; }
html[data-theme="dark"] .navbar-toggler-icon::before{ box-shadow: 0 6px 0 0 var(--text); background:var(--text); }
html[data-theme="dark"] .btn-outline-theme{ color:var(--text) !important; border-color:var(--border) !important; }

/* ===== Conteos de categorías ===== */
.text-muted { color: var(--muted) !important; }
.nav-category .nav-link{ color: var(--text); }
.nav-category .nav-link .text-muted{ color:var(--muted) !important; margin-left:.25rem; font-weight:600; opacity:.8; }
.nav-category .nav-link.active .text-muted{ color:#fff !important; opacity:.9; }
.nav-category .nav-link:hover .text-muted{ opacity:1; }

/* Navbar toggler visible en oscuro */
html[data-theme="dark"] .navbar .navbar-toggler{ border-color:var(--border); }
html[data-theme="dark"] .navbar .navbar-toggler-icon{ filter: invert(1) brightness(1.2); }

/* ===== ===== MEJORAS MÓVIL / PRODUCTO ===== ===== */

/* Títulos/precio + CTA mobile */
@media (max-width: 576.98px){
  .container { padding-left: 1rem; padding-right: 1rem; }
  h1.h3 { font-size: 1.35rem; }
  .price { font-size: 1.75rem; }
  .btn-add-cart{ width:100%; padding:.8rem; font-weight:700; border-radius:12px; }
}

/* Scroller horizontal de thumbnails */
.thumbs-scroller{
  display:flex; gap:.5rem; flex-wrap:nowrap;
  overflow-x:auto; padding-bottom:.25rem; margin-bottom:.25rem;
  -webkit-overflow-scrolling: touch; scroll-snap-type:x proximity;
}
.thumbs-scroller .thumb{ scroll-snap-align:start; min-width:68px; }
.thumbs-scroller::-webkit-scrollbar{ height:6px; }
.thumbs-scroller::-webkit-scrollbar-thumb{ background:var(--border); border-radius:999px; }

/* Offcanvas (menú) con tema */
.offcanvas{ background: var(--bg); color: var(--text); border-left:1px solid var(--border); }
.offcanvas .offcanvas-title{ font-weight:800; }
.offcanvas .btn-close{ opacity:.8; }
.offcanvas .list-group-item{
  background: var(--card); color: var(--text); border-color: var(--border);
}
.offcanvas .list-group-item:hover{ filter: brightness(0.98); }
.offcanvas .btn-outline-secondary, .offcanvas .btn-outline-dark, .offcanvas .btn{
  border-color: var(--border); color: var(--text); background: var(--card);
}
.offcanvas .btn:hover{ filter: brightness(0.97); }
.offcanvas .menu-actions{
  margin-top:auto; position: sticky; bottom:0; background: var(--bg);
  padding-top:.75rem; border-top:1px solid var(--border);
}

/* Píldoras colores/tallas */
.opt-pill{
  display:inline-flex; align-items:center; justify-content:center;
  padding:.4rem .7rem; border:1px solid var(--border);
  border-radius:999px; background:var(--card); color:var(--text);
  cursor:pointer; transition: all .15s ease;
}
.opt-pill:hover{ filter: brightness(.98); }
.opt-pill.active{ border-color:var(--accent); box-shadow:0 0 0 .15rem rgba(239,71,111,.25); font-weight:600; }
html[data-theme="dark"] .opt-pill{ background:var(--bg); border-color:var(--border); }
html[data-theme="dark"] .opt-pill.active{ box-shadow:0 0 0 .15rem rgba(239,71,111,.35); }

/* Breadcrumb legible en oscuro */
.breadcrumb .breadcrumb-item a{ color: var(--text); }
.breadcrumb .breadcrumb-item+.breadcrumb-item::before{ color: var(--muted); }
/* ===== Botón WhatsApp ===== */
.btn-whatsapp {
  background-color: #25D366;
  border: none;
  color: #fff;
  font-weight: 600;
}
.btn-whatsapp:hover {
  background-color: #1ebe5d;
}
.btn-whatsapp:focus {
  box-shadow: 0 0 0 .2rem rgba(37, 211, 102, .35);
}
html[data-theme="dark"] .btn-whatsapp {
  background-color: #25D366;
  color: #fff;
}
/* Icono SVG dentro del botón WhatsApp */
.btn-whatsapp .icon{
  width: 18px;
  height: 18px;
  margin-right: 8px;
  display: inline-block;
  vertical-align: -2px; /* alinea ópticamente con el texto */
  fill: currentColor;   /* hereda el color del texto */
}
