/* ============================================
   LA TIENDA DE ALEX — Portada
   Estilo: moderno y limpio (usa los tokens de styles.css)
   ============================================ */

/* ---------- Navegación principal ---------- */
.main-nav {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}

.main-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.main-nav a:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.main-nav a.active {
  background: var(--ink);
  color: #fff;
}

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.45rem;
  cursor: pointer;
  color: var(--ink);
}

.hamburger:hover {
  background: var(--bg);
}

.mobile-nav {
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid var(--line-soft);
  background: #fff;
}

.mobile-nav a {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--brand-soft);
  color: var(--brand);
}

.mobile-search {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line-soft);
  background: #fff;
}

.mobile-search .search {
  display: flex;
  max-width: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(79, 70, 229, 0.12) 0%, transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 4.5rem 0 5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.7rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
  animation: fadeInUp 0.6s var(--ease-out) both;
}

.hero-content h1 span {
  background: linear-gradient(90deg, var(--brand), #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 48ch;
  animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s var(--ease-out) 0.2s both;
}

/* Hero visual: tarjetas de productos reales */
.hero-visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  animation: fadeInUp 0.6s var(--ease-out) 0.25s both;
}

.hero-product {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.hero-product:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hero-product img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, #fbfcfe 0%, #f2f4f9 100%);
  margin-bottom: 0.65rem;
}

.hero-product .hero-product-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-product .hero-product-price {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brand);
  margin-top: 0.15rem;
}

/* ---------- Categorías ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.cat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out),
    border-color 0.2s ease;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.cat-icon {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--brand-soft);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
  transition: transform 0.2s var(--ease-spring);
}

.cat-card:hover .cat-icon {
  transform: scale(1.1);
}

.cat-card b {
  font-family: var(--display);
  font-size: 1rem;
}

.cat-card span {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ---------- Ofertas ---------- */
.section-offers {
  background: linear-gradient(180deg, #fffdf6 0%, var(--bg) 100%);
}

.offers-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.offer-main {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease-out);
}

.offer-main:hover {
  box-shadow: var(--shadow-lg);
}

.offer-main .offer-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--danger);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  z-index: 2;
  box-shadow: var(--shadow);
}

.offer-main img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  padding: 2rem;
  background: linear-gradient(160deg, #fbfcfe 0%, #f2f4f9 100%);
}

.offer-main-info {
  padding: 1.25rem 1.5rem 1.5rem;
}

.offer-main-info .offer-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.offer-main-info .offer-prices {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.offer-main-info .offer-price-old {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: line-through;
}

.offer-main-info .offer-price-new {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--danger);
}

.offer-main-info .offer-stock {
  font-size: 0.82rem;
  color: var(--ok);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.offer-main-info .offer-stock::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

.offers-side {
  display: grid;
  gap: 0.75rem;
}

.offer-small {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  display: flex;
  gap: 0.8rem;
  align-items: center;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out),
    border-color 0.18s ease;
}

.offer-small:hover {
  transform: translateX(4px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.offer-small img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 0.3rem;
  flex-shrink: 0;
}

.offer-small .offer-small-info {
  flex: 1;
  min-width: 0;
}

.offer-small .offer-small-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-small .offer-small-price {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--danger);
  margin-top: 0.1rem;
}

.offer-small .offer-small-old {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: line-through;
}

/* ---------- El Diferencial ---------- */
.section-differential {
  background: linear-gradient(135deg, var(--brand-soft) 0%, #f5f3ff 100%);
  border: 1px solid #e0e7ff;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin: 0 1rem;
}

.differential {
  display: grid;
  gap: 1.5rem;
}

.diff-step h4 {
  font-family: var(--display);
  font-size: 1rem;
  margin-bottom: 0.65rem;
}

.diff-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.diff-btn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.diff-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
}

.diff-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.diff-result {
  border-top: 1px solid #e0e7ff;
  padding-top: 1.5rem;
}

.diff-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
}

/* ---------- Alex Recomienda ---------- */
.section-alex {
  background:
    radial-gradient(700px 400px at 90% 0%, rgba(124, 58, 237, 0.45) 0%, transparent 60%),
    linear-gradient(135deg, #312e81 0%, var(--brand) 100%);
  color: #fff;
}

.section-alex .eyebrow {
  color: #fde68a;
  background: rgba(255, 255, 255, 0.1);
}

.section-alex h2 {
  color: #fff;
}

.alex-recommendation {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.alex-recommendation img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: var(--radius);
  background: #fff;
  padding: 0.75rem;
}

.alex-rec-content .alex-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent);
  color: #3b2f04;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.alex-rec-content h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.alex-rec-content .alex-quote {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.alex-rec-content .alex-price {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fde68a;
  margin-bottom: 1rem;
}

/* ---------- Servicio Técnico ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}

.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out),
    border-color 0.2s ease;
  font-family: inherit;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.service-card b {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- Confianza ---------- */
.section-trust {
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.trust-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.trust-icon {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.trust-item b {
  font-size: 0.95rem;
}

.trust-item p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 22ch;
  margin: 0;
}

/* ---------- Tienda Física ---------- */
.section-store {
  background: #fff;
  border-top: 1px solid var(--line);
}

.store-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.store-info h2 {
  font-size: 1.7rem;
  margin-bottom: 0.75rem;
}

.store-address {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.store-hours {
  margin-bottom: 1.5rem;
}

.store-hours b {
  font-family: var(--display);
  font-size: 0.9rem;
}

.store-hours p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

.store-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.store-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.25s var(--ease-out) both;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--bg);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-close:hover {
  background: var(--line);
  color: var(--ink);
}

.modal h3 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

/* ---------- Responsive ---------- */
@media (min-width: 769px) {
  .mobile-nav,
  .mobile-search {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .hero-visual {
    max-width: 520px;
  }

  .offers-layout {
    grid-template-columns: 1fr;
  }

  .store-grid {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .alex-recommendation {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .alex-recommendation img {
    max-width: 200px;
    margin: 0 auto;
  }

  .alex-rec-content .alex-badge {
    margin-inline: auto;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .hero {
    padding: 3.25rem 0 3.75rem;
  }

  .hero-cta .btn {
    flex: 1;
  }

  .section-differential {
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 2rem 1rem;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 480px) {
  .cat-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .diff-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}
