/* Base & Theme Variables */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --chip-bg: rgba(2, 8, 23, 0.06);

  /* Accent Colors */
  --brand-1: #0ea5e9;
  --brand-2: #a855f7;
  --brand-3: #f59e0b;
  --success: #16a34a;
  --danger: #ef4444;

  /* UI Props */
  --radius: 14px;
  --shadow-1: 0 8px 30px rgba(2, 8, 23, 0.08);
  --shadow-2: 0 20px 55px rgba(2, 8, 23, 0.12);
  --gradient: linear-gradient(100deg, var(--brand-1), var(--brand-2), var(--brand-3));
  --gradient-cart: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --gradient-whatsapp: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
}

/* Dark theme */
:root[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #0f172a;
  --border: #192235;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --chip-bg: rgba(255, 255, 255, 0.08);
  --shadow-1: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 20px 55px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% -10%, rgba(14, 165, 233, 0.12), transparent),
    radial-gradient(1000px 700px at 90% 10%, rgba(168, 85, 247, 0.12), transparent),
    var(--bg);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1400px, 95vw);
  margin-inline: auto;
}

.section__title {
  font-size: clamp(1.5rem, 2.2vw + 1rem, 2.25rem);
  margin: 0 0 0.5rem;
}

.section__subtitle {
  color: var(--muted);
  margin: 0 0 1.25rem;
}

/* Anchor offset so targets are not hidden behind header on smooth scroll */
[id] {
  scroll-margin-top: 80px;
}

/* Nav */
.nav {
  position: relative;
  z-index: 100;
  /* Ensure above hero content */
  transition: all 0.3s ease;
}

.nav--sticky {
  position: sticky;
  top: 0;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(15, 23, 42, 0.75);
  /* Deep premium dark glass */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

:root[data-theme="light"] .nav--sticky {
  background: rgba(255, 255, 255, 0.85);
  /* Frosty light glass */
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  position: relative;
}

.nav--sticky .nav__inner {
  padding: 12px 0;
  /* Simular shrink effect */
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand__logo {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s;
}

.brand:hover .brand__logo {
  transform: rotate(-5deg) scale(1.05);
}

.menu {
  margin-left: auto;
  display: flex;
  gap: 8px;
  /* Use pill spacing */
  align-items: center;
}

.menu a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 99px;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.menu a:hover,
.menu a.is-active {
  color: var(--text);
  background: var(--chip-bg);
  transform: translateY(-1px);
}

/* Premium CTA in Nav */
.nav .btn {
  margin-left: 12px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 10px 24px;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
  filter: brightness(1.1);
}

/* Dynamic pages dropdown */
.menu__dropdown {
  display: inline-block;
}

.menu__dropdown>summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  padding: 0;
}

.menu__dropdown-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 6px 0 0;
}

.menu__dropdown-list a {
  display: block;
  padding: 0;
}

.menu__empty {
  color: var(--muted);
  opacity: 0.85;
  padding: 2px 0;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  margin-left: auto;
  height: 36px;
  width: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  font-size: 1.1rem;
  cursor: pointer;
}

/* Theme toggle (site-wide) */
.theme-toggle {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9999;
  height: 40px;
  width: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

.theme-toggle:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.theme-toggle[aria-pressed="true"] {
  outline: 2px solid transparent;
}

/* Cart Badge */
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 4px;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--brand-1);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
  line-height: 1;
}

/* Buttons */
.btn {
  --_bg: var(--surface);
  --_fg: var(--text);
  --_bd: var(--border);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--_bd);
  background: var(--_bg);
  color: var(--_fg);
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

.btn--primary {
  --_bg: var(--text);
  --_fg: #fff;
  --_bd: transparent;
  background-image: var(--gradient);
  border: none;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn--whatsapp {
  --_bg: #25d366;
  --_fg: #fff;
  border: none;
}

.btn--gmail {
  --_bg: #ea4335;
  --_fg: #fff;
  border: none;
}

.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.email-link .btn__icon svg {
  width: 18px;
  height: 18px;
}

.badge {
  display: inline-block;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(24px, 3vw, 36px) 0 48px;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 30px;
  align-items: center;
}

.hero__title {
  font-weight: 800;
  font-size: clamp(2rem, 3.4vw + 1rem, 3rem);
  margin: 0 0 0.5rem;
}

.hero__subtitle {
  color: var(--muted);
  margin: 0 0 1rem;
}

.hero__actions {
  display: flex;
  gap: 10px;
  margin: 12px 0 16px;
}

.hero__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero__media {
  position: relative;
}

.hero__bg {
  position: absolute;
  inset: -8px;
  background: radial-gradient(800px 400px at 10% 10%, rgba(14, 165, 233, 0.15), transparent),
    radial-gradient(700px 400px at 90% 0%, rgba(168, 85, 247, 0.15), transparent);
  z-index: -1;
}

.mockup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  /* Ensure mockups adapt to wider screens without becoming enormous */
  max-width: 800px;
  margin-left: auto;
}

.mockup__card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.mockup__card img {
  aspect-ratio: 4/3;
  -o-object-fit: cover;
  object-fit: cover;
}

.mockup__label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Features */
.features {
  padding: 36px 0 24px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid--features {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-1);
}

.feature__icon {
  font-size: 1.3rem;
}

.cta-line {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

/* About */
.about {
  padding: 36px 0 36px;
}

.about__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
}

.about__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-1);
}

.stat__num {
  font-weight: 800;
  font-size: 1.6rem;
}

.stat__label {
  color: var(--muted);
}

/* Contact */
.contact {
  padding: 32px 0 48px;
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.contact__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-1);
}

.contact__title {
  font-weight: 700;
  margin-bottom: 10px;
}

.logos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.logo-chip {
  background: var(--chip-bg);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
}

/* Clients */
.clients {
  padding: 24px 0 16px;
}

.clients__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.clients__note {
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}

.client {
  background: #222;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 0;
  padding-bottom: 66%;
  box-shadow: var(--shadow-1);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-color: #2b2b2b;
}

.client--musmanni {
  background-image: url('../img/clients/musmanni-1024x1024.jpg');
}

.client--femsa {
  background-image: url('../img/clients/cocacola.jpg');
}

.client--delitop {
  background-image: url('../img/clients/delitop.jpg');
}

.client--ccss {
  background-image: url('../img/clients/logo-ccss-1.png');
}

.client--brenes {
  background-image: url('../img/clients/10930860_785862521506042_8833618798982652078_n-1.png');
}

.client--radio963 {
  background-image: url('../img/clients/169591738_3849209305126229_462764761695971822_n.jpg');
}

/* Catalog */
.catalog__controls {
  position: sticky;
  top: 68px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  backdrop-filter: saturate(140%) blur(8px);
}

.search input {
  width: min(420px, 85vw);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-1);
}

.filters {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.filters select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.grid--products {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 14px 0 26px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
}

.card__media {
  position: relative;
}

.card__media img {
  width: 100%;
  aspect-ratio: 1/1;
  -o-object-fit: cover;
  object-fit: cover;
}

.card__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card__title {
  font-weight: 700;
  margin: 0;
  font-size: 1.05rem;
}

.card__meta {
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
}

.card__price {
  font-weight: 800;
}

.card__actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.card__link {
  text-decoration: none;
}

.taglist {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.tag {
  font-size: 0.75rem;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(2, 8, 23, 0.04);
}

.empty-state {
  text-align: center;
  padding: 36px 0;
}

.empty-state__icon {
  font-size: 2rem;
}

/* Downloads */
.downloads {
  padding: 10px 0 6px;
}

.downloads__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.download-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-1);
}

.download-card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.download-card__icon {
  font-size: 1.4rem;
}

.download-card__body h3 {
  margin: 0;
  font-size: 1.05rem;
}

.download-card__meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.download-card__actions {
  grid-column: 2 / -1;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.92rem;
  margin-top: 4px;
}

.download-card__actions .link {
  color: inherit;
  opacity: 0.8;
  text-decoration: none;
}

.download-card__actions .link:hover {
  opacity: 1;
  text-decoration: underline;
}

.download-card__actions .sep {
  color: var(--muted);
}

/* Product Detail Premium Redesign */
.product {
  padding: 24px 0 64px;
}

.product .backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.product .backlink:hover {
  color: var(--brand-1);
}

.product__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
  position: relative;
  /* Eliminamos min-height fijo que puede causar saltos */
}

.product__inner>* {
  min-height: 0;
  /* Fix para cálculos de altura en Grid */
}

@media (max-width: 980px) {
  .product__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Gallery Style */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
  height: fit-content;
  /* Crítico para Chrome: define altura exacta */
  z-index: 10;
}

@media (min-width: 981px) {
  .gallery {
    position: sticky;
    top: 100px;
    will-change: transform, top;
  }
}

.gallery__main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow-2);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
}

.gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery__main:hover img {
  transform: scale(1.05);
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
}

.gallery__thumb {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.gallery__thumb:hover {
  border-color: var(--brand-1);
  transform: translateY(-2px);
}

.gallery__thumb.active {
  border-color: var(--brand-1);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* Product Info */
.product__info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product__header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.product__title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.product__price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.product__price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-1);
}

.product__price-note {
  font-size: 0.9rem;
  color: var(--muted);
}

.product__benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 500;
}

.benefit-item i {
  color: var(--success);
  font-size: 0.9rem;
}

.product__description {
  line-height: 1.7;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Actions */
.product__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 12px;
}

.btn--premium {
  padding: 16px 24px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff;
  text-decoration: none;
}

.btn--cart {
  background: var(--gradient-cart);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.btn--cart:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

.btn--whatsapp {
  background: var(--gradient-whatsapp);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.btn--whatsapp:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.4);
}

.whatsapp-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: -8px;
}

.related-products {
  margin-top: 120px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 100px 0;
  position: relative;
  /* Fondo galáctico con estrellas mediante gradientes */
  background:
    radial-gradient(1px 1px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
    radial-gradient(1.5px 1.5px at 150px 150px, #fff, rgba(0, 0, 0, 0)),
    radial-gradient(1px 1px at 280px 500px, #fff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 450px 200px, #fff, rgba(0, 0, 0, 0)),
    radial-gradient(1px 1px at 600px 400px, #fff, rgba(0, 0, 0, 0)),
    linear-gradient(180deg, #0b1220 0%, #161b2e 100%);
  background-size: 800px 800px, 900px 900px, 1000px 1000px, 1200px 1200px, 1100px 1100px, 100% 100%;
  overflow: hidden;
}

.related-products::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.5), transparent);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.related-products .section__title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.related-products .section__subtitle {
  text-align: center;
  margin-bottom: 48px;
  font-size: 1.1rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 32px;
}

.related-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 16px;
  text-decoration: none;
  color: #fff;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.related-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.related-card__img {
  aspect-ratio: 1.25 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.related-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(245, 158, 11, 0.9);
  /* Gold for 'Regalo' */
}

.related-card__badge--green {
  background: rgba(16, 185, 129, 0.9);
  /* Green for 'Personalizable' */
}

.related-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.related-card:hover .related-card__img img {
  transform: scale(1.1);
}

.related-card__info {
  padding: 4px 4px 0;
}

.related-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}

.related-card__price {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f59e0b;
  /* Golden price */
}

.related-card__btn {
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, #f59e0b 0%, #d946ef 100%);
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
}

.related-card__btn--purple {
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
}

.related-footer {
  margin-top: 80px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.related-footer__text {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}

.related-footer__btn {
  background: linear-gradient(90deg, #166534 0%, #22c55e 100%);
  padding: 14px 32px;
  border-radius: 99px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
  transition: transform 0.3s;
}

.related-footer__btn:hover {
  transform: scale(1.05);
}

/* Pages (Markdown) */
.page {
  padding: 18px 0 36px;
}

.page__title,
.page .section__title {
  font-size: 1.8rem;
  margin: 0 0 10px;
}

/* Support both page__content (admin preview) and page__body (runtime page.html) */
.page__content,
.page__body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-1);
}

.page__content h1,
.page__content h2,
.page__content h3,
.page__body h1,
.page__body h2,
.page__body h3 {
  margin: 14px 0 8px;
}

.page__content p,
.page__body p {
  margin: 10px 0;
  line-height: 1.65;
}

.page__content ul,
.page__content ol,
.page__body ul,
.page__body ol {
  margin: 10px 0 10px 22px;
}

.page__content a,
.page__body a {
  color: inherit;
  text-decoration: underline;
}

.page__content blockquote,
.page__body blockquote {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(8px);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__links {
  display: flex;
  gap: 12px;
}

.footer__links a {
  color: inherit;
  opacity: 0.8;
  text-decoration: none;
}

.footer__copy {
  color: var(--muted);
}

/* Notice Board (Glassmorphism) */
.notice-board {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
  margin-bottom: 2rem;
  max-width: 320px;
  flex-shrink: 0;
  align-self: flex-start;
  position: relative;
  overflow: hidden;
}

/* Subtle gradient overlay */
.notice-board::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

[data-theme="dark"] .notice-board {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

.notice-board__title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

.notice-board__items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notice-item {
  background: rgba(255, 255, 255, 0.07);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.2s, background 0.2s;
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .notice-item {
  background: rgba(255, 255, 255, 0.03);
}

.notice-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.notice-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.notice-item__tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  letter-spacing: 0.5px;
}

.notice-item__content {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.notice-item__body {
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.9;
  margin-bottom: 0.8rem;
}

.notice-item__link {
  font-size: 0.8rem;
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
  cursor: pointer;
}

.notice-item__link:hover {
  background: var(--brand-1);
  color: #fff;
  border-color: transparent;
}

/* Type variants */
.notice-item--alerta {
  border-left-color: #ef4444;
}

.notice-item--alerta .notice-item__tag {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.notice-item--idea {
  border-left-color: #f59e0b;
}

.notice-item--idea .notice-item__tag {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.notice-item--producto-nuevo {
  border-left-color: #10b981;
}

.notice-item--producto-nuevo .notice-item__tag {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

/* Responsive: On mobile, notice board goes to top or bottom */
@media (max-width: 768px) {
  .notice-board {
    max-width: 100%;
    margin-bottom: 2rem;
  }
}

/* Adjust Hero to accommodate Notice Board */
@media (min-width: 769px) {
  .hero__inner {
    display: flex;
    gap: 3rem;
    align-items: center;
  }

  .notice-board {
    width: 300px;
    margin-bottom: 0;
  }

  .hero__copy {
    flex: 1;
  }
}

/* Responsive */
@media (max-width: 980px) {

  .hero__inner,
  .about__inner,
  .product__inner {
    grid-template-columns: 1fr;
  }

  .grid--features {
    grid-template-columns: 1fr;
  }

  .clients__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .downloads__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {

  /* Place toggle inline inside sticky header on mobile */
  .nav .theme-toggle {
    position: static;
    top: auto;
    left: auto;
    bottom: auto;
    height: 32px;
    width: 32px;
    margin-left: 6px;
  }

  .theme-toggle {
    top: 10px;
    left: 10px;
    bottom: auto;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .menu {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-2);
    max-height: 70vh;
    overflow: auto;
  }

  .menu.is-open {
    display: flex;
  }

  .menu a {
    padding: 8px 10px;
    border-radius: 8px;
  }

  .menu a:hover {
    background: rgba(2, 8, 23, 0.05);
  }

  .menu__dropdown {
    border-top: 1px dashed var(--border);
    margin-top: 6px;
    padding-top: 8px;
  }

  .menu__dropdown>summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 8px;
  }

  .menu__dropdown[open]>summary {
    background: rgba(2, 8, 23, 0.05);
  }

  .menu__dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 4px 4px;
  }

  .mockup {
    grid-template-columns: 1fr;
  }

  .grid--products {
    grid-template-columns: 1fr;
  }

  .catalog__controls {
    top: 56px;
  }

  .nav .btn.btn--primary {
    display: none;
  }
}

/* WhatsApp Float Button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  color: #fff;
}

/* Ensure theme toggle and whatsapp don't overlap */
.theme-toggle {
  z-index: 10000;
  /* Above whatsapp */
}

/* News Modal (Premium Design) */
.news-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 10, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  padding: 20px;
}

.news-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.news-modal {
  background: linear-gradient(145deg, rgba(30, 30, 40, 0.95) 0%, rgba(20, 20, 30, 0.98) 100%);
  color: #fff;
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  border-radius: 24px;
  box-shadow:
    0 20px 60px -10px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  /* Subtle inner border */
  position: relative;
  overflow-y: auto;
  transform: scale(0.94) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

/* Custom Scrollbar for modal */
.news-modal::-webkit-scrollbar {
  width: 8px;
}

.news-modal::-webkit-scrollbar-track {
  background: transparent;
}

.news-modal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.news-modal-backdrop.is-open .news-modal {
  transform: scale(1) translateY(0);
}

.news-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  font-size: 1rem;
}

.news-modal__close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: rotate(90deg);
}

.news-modal__body {
  padding: 40px;
}

/* Typography Enhancements */
.news-modal__tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--brand-1), #8b5cf6);
  /* Brand gradient */
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.news-modal__date {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
  font-family: inherit;
}

.news-modal__title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.2;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.news-modal__content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.news-modal__content p {
  margin-bottom: 1.2em;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .news-modal__body {
    padding: 24px;
  }

  .news-modal__title {
    font-size: 1.5rem;
  }
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader__content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  position: relative;
  width: min(300px, 80vw);
}

.preloader__logo {
  width: 250px;
  /* Increased from 180px */
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
  animation: float 3s ease-in-out infinite;
}

/* Loading Bar */
.preloader__spinner {
  width: 100%;
  height: 8px;
  /* Slightly thicker */
  background: rgba(148, 163, 184, 0.2);
  border-radius: 99px;
  position: relative;
  overflow: hidden;
  border: none;
  animation: none;
}

.preloader__spinner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--progress, 0%);
  /* Use CSS variable for progress */
  background: var(--gradient);
  border-radius: 99px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

.preloader__content p {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 1.1rem;
  /* Increased font size */
  text-transform: uppercase;
  animation: pulseText 1.5s ease-in-out infinite;
  margin: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

/* Utility */
.hidden {
  display: none !important;
}

/* News Section */
#news-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 24px;
}

@media (min-width: 768px) {
  #news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  #news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

.news-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--chip-bg);
}

.news-card-content {
  padding: 16px;
}

.news-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

.news-card-excerpt {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-category {
  display: inline-block;
  font-size: 0.75rem;
}

/* News Modal */
.news-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.news-modal-container {
  background: var(--surface);
  color: var(--text);
  max-width: 600px;
  width: 100%;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.news-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text);
  line-height: 1;
  z-index: 1;
}

.news-modal-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
}

.news-modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.3;
}

.news-modal-category {
  margin-bottom: 16px;
  display: inline-block;
}

.news-modal-text {
  line-height: 1.7;
  color: var(--text);
  opacity: 0.9;
  white-space: pre-wrap;
}
/* Dual Price Styles */
.product__price-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.price-block { display: flex; flex-direction: column; }
.product__price-label { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em; }
.product__price { font-weight: 800; font-size: 1.8rem; color: var(--text); line-height: 1.2; }
.price-separator { width: 1px; height: 40px; background: var(--border); }
.price-block.wholesale .product__price { color: var(--brand-1); }
.wholesale-price { color: var(--brand-1); }
.product__price-note { font-size: 0.85rem; color: var(--muted); }

/* Product Selection UI */
.product__selection { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 20px 0; }
.price-selector { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.radio-option { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: all 0.2s; position: relative; }
.radio-option:hover { background: var(--chip-bg); }
.radio-option.selected { border-color: var(--brand-1); background: rgba(14, 165, 233, 0.05); box-shadow: 0 0 0 1px var(--brand-1); }
.radio-option input { display: none; }
.radio-circle { width: 20px; height: 20px; border: 2px solid var(--muted); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.radio-option.selected .radio-circle { border-color: var(--brand-1); }
.radio-option.selected .radio-circle::after { content: ''; width: 10px; height: 10px; background: var(--brand-1); border-radius: 50%; }
.radio-info { flex: 1; display: flex; flex-direction: column; }
.radio-label { font-weight: 600; }
.radio-sub { font-size: 0.8rem; color: var(--muted); }
.radio-price { font-weight: 700; font-size: 1.1rem; }
.quantity-selector { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--border); }
.qty-label { font-weight: 600; }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.qty-btn:hover { background: var(--chip-bg); }
#quantity { width: 60px; text-align: center; font-size: 1.1rem; border: 1px solid var(--border); border-radius: 8px; padding: 6px; background: var(--surface); color: var(--text); }

/* Floating Back to Top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 99px;
  background: var(--gradient);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.4);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.6);
  filter: brightness(1.1);
}

/* Load More Container */
.load-more-container {
  display: flex;
  justify-content: center;
  padding: 40px 0;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.load-more-container .btn {
  padding: 14px 40px;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

@media (max-width: 640px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}
