/* ══════════════════════════════════════════════════════
   Public Store Styles — Mobile First
   CSS custom properties are injected via /css/tema.php
   ══════════════════════════════════════════════════════ */

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--color-fondo);
  color: var(--color-texto);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--color-primario); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ── Utilities ─────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: .5rem; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.4rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--color-primario);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-acento);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.btn-outline {
  background: transparent;
  color: var(--color-primario);
  border: 2px solid var(--color-primario);
}
.btn-outline:hover {
  background: var(--color-primario);
  color: #fff;
  text-decoration: none;
}
.btn-whatsapp {
  background: #25d366;
  color: #fff;
  font-size: 1rem;
  padding: .8rem 1.8rem;
}
.btn-whatsapp:hover {
  background: #1ebe5d;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37,211,102,.35);
}
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ── Badges ─────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.badge-danger  { background: #ffebee; color: #c62828; }
.badge-warning { background: #fff8e1; color: #e65100; }
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-oferta  { background: var(--color-primario); color: #fff; }

/* ── Navbar ─────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #eee;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-primario);
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}
.navbar-brand:hover { text-decoration: none; color: var(--color-acento); }

.navbar-links {
  display: none;
  list-style: none;
  gap: 1.5rem;
}
.navbar-links a {
  color: var(--color-texto);
  font-weight: 500;
  font-size: .95rem;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.navbar-links a:hover {
  color: var(--color-primario);
  border-color: var(--color-primario);
  text-decoration: none;
}

.navbar-actions { display: flex; align-items: center; gap: .75rem; }

.navbar-search {
  display: none;
  align-items: center;
  background: #f5f5f5;
  border-radius: 8px;
  padding: .4rem .8rem;
  gap: .4rem;
}
.navbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: .9rem;
  width: 160px;
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  font-size: 1.5rem;
  color: var(--color-texto);
  line-height: 1;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 1rem;
  gap: .1rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: .75rem 1rem;
  color: var(--color-texto);
  font-weight: 500;
  border-radius: 8px;
  transition: var(--transition);
}
.mobile-menu a:hover {
  background: var(--color-fondo);
  color: var(--color-primario);
  text-decoration: none;
}
.mobile-search {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 8px;
  padding: .5rem .8rem;
  gap: .4rem;
  margin-bottom: .5rem;
}
.mobile-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: .9rem;
}

/* ── Hero Banner ────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-acento) 100%);
  color: #fff;
  padding: 4rem 1rem 3rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 900;
  margin-bottom: .75rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: .92;
  margin-bottom: 2rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-hero {
  background: #fff;
  color: var(--color-primario);
  font-weight: 700;
  padding: .9rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  transition: var(--transition);
}
.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  color: var(--color-acento);
  text-decoration: none;
}
.btn-hero-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.7);
  font-weight: 700;
  padding: .9rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  transition: var(--transition);
}
.btn-hero-outline:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
  text-decoration: none;
}

/* ── Section titles ─────────────────────────────────── */
.section-title {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 800;
  color: var(--color-acento);
  margin-bottom: .4rem;
}
.section-subtitle {
  color: #757575;
  font-size: .95rem;
  margin-bottom: 2rem;
}
.section-header { margin-bottom: 2rem; }
.section-header .section-title { margin-bottom: .3rem; }

/* ── Product Grid ───────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.product-card-img {
  position: relative;
  padding-top: 75%;
  overflow: hidden;
  background: #f0f0f0;
}
.product-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.product-card:hover .product-card-img img { transform: scale(1.04); }
.product-card-badge {
  position: absolute;
  top: .6rem;
  left: .6rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.product-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-texto);
  margin-bottom: .4rem;
  line-height: 1.35;
}
.product-card-desc {
  font-size: .85rem;
  color: #757575;
  margin-bottom: .75rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price {
  margin-bottom: .75rem;
}
.price-original {
  font-size: .85rem;
  color: #9e9e9e;
  text-decoration: line-through;
  margin-right: .4rem;
}
.price-oferta {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primario);
}
.price-normal {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-texto);
}
.product-card-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.product-card-actions .btn { flex: 1; justify-content: center; font-size: .85rem; padding: .55rem .75rem; }

/* ── Category Cards ─────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-decoration: none;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.category-card:hover img { transform: scale(1.05); }
.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.1) 60%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.category-card-no-img {
  background: linear-gradient(135deg, var(--color-primario), var(--color-acento));
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-card-name {
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
  line-height: 1.2;
}
.category-card-count {
  color: rgba(255,255,255,.8);
  font-size: .8rem;
  display: block;
  margin-top: .15rem;
}

/* ── Page Section wrapper ───────────────────────────── */
.page-section { padding: 3rem 0; }
.page-section-alt { background: #fff; }

/* ── Product Detail ─────────────────────────────────── */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.product-gallery .main-image {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  background: #f5f5f5;
}
.product-gallery .main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumbs {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  flex-shrink: 0;
}
.gallery-thumb.active { border-color: var(--color-primario); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--color-texto);
  margin-bottom: .5rem;
}
.product-info-price { margin: 1rem 0; }
.product-info-price .price-original { font-size: 1rem; }
.product-info-price .price-oferta   { font-size: 1.6rem; }
.product-info-price .price-normal   { font-size: 1.5rem; }
.product-info-desc { color: #555; line-height: 1.7; margin: 1rem 0; }
.product-info-meta { margin: 1rem 0; font-size: .9rem; color: #757575; }
.product-info-meta span { display: block; margin-bottom: .3rem; }
.product-info-actions { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.5rem; }
.product-info-actions .btn { justify-content: center; }

/* ── Breadcrumb ─────────────────────────────────────── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  font-size: .85rem;
  color: #9e9e9e;
  padding: 1rem 0;
  align-items: center;
}
.breadcrumb a { color: #9e9e9e; }
.breadcrumb a:hover { color: var(--color-primario); }
.breadcrumb-sep { color: #ccc; }
.breadcrumb-current { color: var(--color-texto); font-weight: 600; }

/* ── Filters bar ────────────────────────────────────── */
.filters-bar {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: flex-end;
}
.filters-bar .form-group {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  min-width: 140px;
  flex: 1;
}
.filters-bar label { font-size: .8rem; font-weight: 600; color: #757575; }
.filters-bar select,
.filters-bar input {
  padding: .5rem .75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: .9rem;
  outline: none;
  transition: var(--transition);
}
.filters-bar select:focus,
.filters-bar input:focus { border-color: var(--color-primario); }

/* ── Pagination ─────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.page-link {
  padding: .5rem .85rem;
  border-radius: 8px;
  border: 1px solid #ddd;
  color: var(--color-texto);
  font-size: .9rem;
  transition: var(--transition);
  text-decoration: none;
}
.page-link:hover, .page-link.active {
  background: var(--color-primario);
  color: #fff;
  border-color: var(--color-primario);
  text-decoration: none;
}

/* ── Footer ─────────────────────────────────────────── */
.footer {
  background: #1a1a2e;
  color: rgba(255,255,255,.8);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.footer-brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .5rem;
}
.footer-tagline { font-size: .9rem; opacity: .7; }
.footer-title {
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.footer-links a { color: rgba(255,255,255,.7); font-size: .9rem; }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-social { display: flex; gap: .75rem; margin-top: 1rem; }
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  text-decoration: none;
}
.footer-social a:hover { background: var(--color-primario); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 2rem;
  padding-top: 1.2rem;
  font-size: .82rem;
  opacity: .6;
  text-align: center;
}

/* ── Floating WA button ─────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  width: 56px; height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  transition: var(--transition);
  text-decoration: none;
}
.wa-float:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,.5);
  text-decoration: none;
}

/* ── Alert / notices ────────────────────────────────── */
.alert {
  padding: .9rem 1.2rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: .92rem;
}
.alert-success { background: #e8f5e9; border-left: 4px solid #4caf50; color: #2e7d32; }
.alert-danger  { background: #ffebee; border-left: 4px solid #f44336; color: #c62828; }
.alert-info    { background: #e3f2fd; border-left: 4px solid #2196f3; color: #1565c0; }
.alert-warning { background: #fff8e1; border-left: 4px solid #ffc107; color: #e65100; }

/* ── Empty state ────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: #9e9e9e;
}
.empty-state-icon { font-size: 3.5rem; margin-bottom: 1rem; display: block; }
.empty-state h3 { color: #616161; margin-bottom: .5rem; }

/* ── Page header (catalog pages) ───────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--color-primario), var(--color-acento));
  color: #fff;
  padding: 2.5rem 1rem;
  text-align: center;
}
.page-header h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 900; margin-bottom: .4rem; }
.page-header p { opacity: .88; font-size: 1rem; }

/* ═══ RESPONSIVE ════════════════════════════════════ */
@media (min-width: 600px) {
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .categories-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .product-info-actions { flex-direction: row; }
}

@media (min-width: 768px) {
  .navbar-links { display: flex; }
  .navbar-search { display: flex; }
  .hamburger { display: none; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 900px) {
  .product-detail { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Print */
@media print {
  .navbar, .wa-float, .footer { display: none; }
}

/* ── Live search dropdown ───────────────────────────── */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.16);
  z-index: 300;
  overflow: hidden;
  animation: dropIn .15s ease;
  min-width: 320px;
}
@keyframes dropIn {
  from { opacity:0; transform:translateY(-6px); }
  to   { opacity:1; transform:translateY(0); }
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  text-decoration: none;
  color: var(--color-texto);
  transition: background .15s;
  border-bottom: 1px solid #f0f0f0;
}
.search-result-item:last-of-type { border-bottom: none; }
.search-result-item:hover { background: #f9f9f9; text-decoration: none; }
.search-result-item img {
  width: 48px; height: 48px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.sri-nombre { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.sri-meta   { font-size: .78rem; color: #9e9e9e; margin-top: .15rem; }
.sri-meta strong { color: var(--color-primario); }
.search-result-all {
  display: block;
  text-align: center;
  padding: .65rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-primario);
  background: #fafafa;
  text-decoration: none;
}
.search-result-all:hover { background: #f0f0f0; text-decoration: none; }

/* ── Share bar ──────────────────────────────────────── */
.share-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  font-size: .85rem;
  color: #9e9e9e;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.share-wa   { background: #25d366; color: #fff; }
.share-fb   { background: #1877f2; color: #fff; }
.share-copy { background: #f0f0f0; color: #555; }
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.2); text-decoration: none; }

/* ── Magnifier lens ─────────────────────────────────── */
.magnifier-lens {
  display: none;
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 3px solid var(--color-primario);
  box-shadow: 0 4px 24px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.3);
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 10;
  cursor: none;
}
.product-gallery .main-image { cursor: crosshair; }

/* ── Fade-in on scroll ──────────────────────────────── */
.fade-in-ready {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .45s ease, transform .45s ease;
}
.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Lightbox ───────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
#lightbox.lb-open { display: flex; }
#lb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(4px);
}
#lb-img {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 8px 48px rgba(0,0,0,.5);
  animation: lbIn .2s ease;
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(.93); }
  to   { opacity: 1; transform: scale(1); }
}
#lb-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  z-index: 2;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
#lb-close:hover { background: rgba(255,255,255,.3); }

#lb-img { transition: transform .15s ease; transform-origin: center center; }

#lb-controls {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: .5rem;
  background: rgba(0,0,0,.45);
  border-radius: 50px;
  padding: .35rem .6rem;
}
#lb-controls button {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  line-height: 1;
}
#lb-controls button:hover { background: rgba(255,255,255,.35); }

/* ── Back to top ────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  z-index: 199;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-primario);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0,0,0,.2);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
#back-to-top.btt-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-to-top:hover {
  background: var(--color-acento);
  transform: translateY(-2px);
}

/* ── Hero wave ──────────────────────────────────────── */
.hero {
  position: relative;
}
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.hero-wave svg {
  display: block;
  width: 100%;
  height: 48px;
}

/* ── Navbar smooth hide on mobile scroll ────────────── */
.navbar { transition: transform .25s ease; }
