/* ===================================================
   EscolarPlus — Estilos principales
   Fuente: Inter (Google Fonts)
   Paleta: navy #0d2e6e | navy-dark #081f4d | red #e63c2f | yellow #ffc94d
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
  --navy:       #0d2e6e;
  --navy-dark:  #081f4d;
  --red:        #e63c2f;
  --yellow:     #ffc94d;
  --bg:         #ffffff;
  --fg:         #1a2035;
  --muted:      #6b7280;
  --border:     #e5e8f0;
  --secondary:  #f4f6fb;
  --radius-pill: 9999px;
  --radius-card: 1rem;
  --radius-xl:   1.5rem;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ---- Utilidades ---- */
.container {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* ===================================================
   TOPBAR
   =================================================== */
.topbar {
  background: var(--navy-dark);
  color: rgba(255,255,255,.85);
  font-size: .75rem;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: .5rem;
}
.topbar__left {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.topbar__icon { color: var(--yellow); flex-shrink: 0; }
.topbar__nav { display: none; align-items: center; gap: 1.25rem; }
.topbar__nav a:hover { color: var(--yellow); }

@media (min-width: 768px) { .topbar__nav { display: flex; } }

/* ===================================================
   NAVBAR
   =================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.navbar__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1rem;
}
.navbar__logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.navbar__logo span:first-child { color: var(--navy); }
.navbar__logo span:last-child  { color: var(--red); }

.navbar__links {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-size: .875rem;
  font-weight: 500;
  color: rgba(26,32,53,.8);
  list-style: none;
}
.navbar__links a:hover { color: var(--navy); }
.navbar__links .ofertas { font-weight: 600; color: var(--red); }
.navbar__links .ofertas:hover { opacity: .8; }

@media (min-width: 1024px) { .navbar__links { display: flex; } }

.navbar__search {
  position: relative;
  flex: 1;
  max-width: 28rem;
  margin-left: auto;
  display: none;
}
.navbar__search svg {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem; height: 1rem;
  color: var(--muted);
  pointer-events: none;
}
.navbar__search input {
  height: 2.5rem;
  width: 100%;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--secondary);
  padding: 0 1rem 0 2.5rem;
  font-size: .875rem;
  color: var(--fg);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.navbar__search input::placeholder { color: var(--muted); }
.navbar__search input:focus {
  border-color: var(--navy);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13,46,110,.12);
}

@media (min-width: 768px) { .navbar__search { display: block; } }

.navbar__actions { display: flex; align-items: center; gap: .5rem; }

.btn-outline-navy {
  display: none;
  height: 2.5rem;
  align-items: center;
  gap: .5rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--navy);
  padding-inline: 1rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--navy);
  background: transparent;
  transition: background .2s, color .2s;
}
.btn-outline-navy:hover { background: var(--navy); color: #fff; }
@media (min-width: 640px) { .btn-outline-navy { display: inline-flex; } }

.btn-cart {
  position: relative;
  display: inline-flex;
  height: 2.5rem;
  align-items: center;
  gap: .5rem;
  border-radius: var(--radius-pill);
  border: none;
  padding-inline: 1rem;
  font-size: .875rem;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  transition: background .2s;
}
.btn-cart:hover { background: var(--navy-dark); }
.btn-cart__label { display: none; }
@media (min-width: 640px) { .btn-cart__label { display: inline; } }

.btn-cart__badge {
  position: absolute;
  top: -.25rem;
  right: -.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--red);
  color: #fff;
  font-size: .6875rem;
  font-weight: 700;
  padding-inline: .25rem;
  outline: 2px solid #fff;
}

/* ===================================================
   HERO
   =================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, #1a4dc4 100%);
  color: #fff;
}
.hero__glow {
  position: absolute;
  inset: 0;
  opacity: .2;
  pointer-events: none;
}
.hero__glow-1 {
  position: absolute;
  top: -6rem; left: -6rem;
  width: 24rem; height: 24rem;
  border-radius: 50%;
  background: var(--yellow);
  filter: blur(80px);
}
.hero__glow-2 {
  position: absolute;
  bottom: -8rem;
  right: 33%;
  width: 24rem; height: 24rem;
  border-radius: 50%;
  background: var(--red);
  filter: blur(80px);
}
.hero__inner {
  position: relative;
  display: grid;
  align-items: center;
  gap: 2.5rem;
  padding-block: 5rem;
}
@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr 1fr; padding-block: 7rem; }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.1);
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 500;
  ring: 1px solid rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.2);
}
.hero__badge-dot {
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: var(--yellow);
  flex-shrink: 0;
}

.hero__title {
  margin-top: 1.25rem;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
}
.hero__title-year { color: var(--yellow); }

.hero__desc {
  margin-top: 1.25rem;
  max-width: 36rem;
  font-size: 1rem;
  color: rgba(255,255,255,.8);
  line-height: 1.6;
}
@media (min-width: 640px) { .hero__desc { font-size: 1.125rem; } }

.hero__ctas {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.btn-hero-primary {
  display: inline-flex;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: none;
  padding-inline: 1.75rem;
  font-size: .875rem;
  font-weight: 600;
  color: #fff;
  background: var(--red);
  box-shadow: 0 8px 24px rgba(230,60,47,.35);
  transition: transform .2s, background .2s;
  text-decoration: none;
}
.btn-hero-primary:hover { transform: translateY(-2px); background: #cc2f24; }

.btn-hero-ghost {
  display: inline-flex;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.3);
  padding-inline: 1.75rem;
  font-size: .875rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(4px);
  transition: background .2s;
  text-decoration: none;
}
.btn-hero-ghost:hover { background: rgba(255,255,255,.15); }

.hero__stats {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: .75rem;
  max-width: 36rem;
}
.hero__stat {
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.05);
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.hero__stat svg { color: var(--yellow); width: 1.25rem; height: 1.25rem; }
.hero__stat-num {
  margin-top: .5rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
}
.hero__stat-label {
  margin-top: .25rem;
  font-size: .75rem;
  color: rgba(255,255,255,.7);
}

.hero__img-wrap {
  display: none;
  position: relative;
}
@media (min-width: 1024px) { .hero__img-wrap { display: block; } }

.hero__img-glow {
  position: absolute;
  inset: -2.5rem;
  border-radius: 3rem;
  background: linear-gradient(135deg, rgba(255,255,255,.1), transparent);
  filter: blur(32px);
}
.hero__img {
  position: relative;
  margin-inline: auto;
  max-width: 32rem;
  width: 100%;
  filter: drop-shadow(0 32px 64px rgba(0,0,0,.4));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

/* ===================================================
   BENEFITS STRIP
   =================================================== */
.benefits {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.benefits__inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding-block: 1.5rem;
}
@media (min-width: 640px) { .benefits__inner { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .benefits__inner { grid-template-columns: repeat(5, 1fr); } }

.benefit {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.benefit__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.benefit__title {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--navy);
}
.benefit__desc {
  font-size: .75rem;
  color: var(--muted);
}

/* ===================================================
   CATEGORÍAS
   =================================================== */
.section { padding-block: 4rem; }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.section-header__text h2 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--navy);
}
.section-header__text p {
  margin-top: .5rem;
  font-size: .875rem;
  color: var(--muted);
}
.section-header__link {
  display: none;
  font-size: .875rem;
  font-weight: 600;
  color: var(--red);
}
.section-header__link:hover { text-decoration: underline; }
@media (min-width: 640px) { .section-header__link { display: block; } }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) { .categories-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .categories-grid { grid-template-columns: repeat(6, 1fr); } }

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: #fff;
  padding: 1.25rem;
  text-align: center;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  text-decoration: none;
}
.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--navy);
  box-shadow: 0 8px 24px rgba(13,46,110,.1);
}
.category-card__emoji {
  font-size: 2.25rem;
  transition: transform .2s;
}
.category-card:hover .category-card__emoji { transform: scale(1.1); }
.category-card__name {
  margin-top: .75rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--navy);
}
.category-card__count {
  margin-top: .25rem;
  font-size: .75rem;
  color: var(--muted);
}

/* ===================================================
   BANNER OFERTA FLASH
   =================================================== */
.flash-banner {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: linear-gradient(90deg, var(--red) 0%, #ef5b34 60%, #f59345 100%);
  padding: 1.5rem;
  color: #fff;
  box-shadow: 0 16px 40px rgba(230,60,47,.25);
}
@media (min-width: 640px) { .flash-banner { padding: 2.5rem; } }
.flash-banner__glow {
  position: absolute;
  top: -2.5rem; right: -2.5rem;
  width: 12rem; height: 12rem;
  border-radius: 50%;
  background: var(--yellow);
  filter: blur(48px);
  opacity: .25;
  pointer-events: none;
}
.flash-banner__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}
@media (min-width: 640px) { .flash-banner__inner { flex-direction: row; align-items: center; } }

.flash-banner__tag {
  display: inline-flex;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.15);
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  backdrop-filter: blur(4px);
}
.flash-banner h3 {
  margin-top: .75rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.025em;
}
.flash-banner p {
  margin-top: .5rem;
  max-width: 28rem;
  font-size: .875rem;
  color: rgba(255,255,255,.9);
}
@media (min-width: 640px) { .flash-banner p { font-size: 1rem; } }

.countdown {
  display: flex;
  gap: .75rem;
}
.countdown__block {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 5rem;
  border-radius: 1rem;
  background: rgba(255,255,255,.15);
  padding: .75rem;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
}
.countdown__num {
  font-family: ui-monospace, monospace;
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1;
}
.countdown__label {
  margin-top: .25rem;
  font-size: .625rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.8);
}

/* ===================================================
   PRODUCTOS
   =================================================== */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: #fff;
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(13,46,110,.1);
}

.product-card__img {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
}
.product-card__img span { transition: transform .5s; }
.product-card:hover .product-card__img span { transform: scale(1.1); }
.product-card__photo{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:1rem;
}

.product-card__badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  border-radius: var(--radius-pill);
  padding: .25rem .625rem;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
}
.product-card__badge--red  { background: var(--red); }
.product-card__badge--navy { background: var(--navy); }

.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem;
}
.product-card__brand {
  font-size: .6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.product-card__name {
  margin-top: .25rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.75rem;
}
.product-card__prices {
  margin-top: .75rem;
  display: flex;
  align-items: baseline;
  gap: .5rem;
}
.product-card__price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
}
.product-card__old {
  font-size: .75rem;
  color: var(--muted);
  text-decoration: line-through;
}

.btn-add-cart {
  margin-top: 1rem;
  display: inline-flex;
  height: 2.5rem;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: var(--radius-pill);
  border: none;
  font-size: .875rem;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  transition: background .2s;
}
.btn-add-cart:hover { background: var(--navy-dark); }

/* ===================================================
   FAQ
   =================================================== */
.faq-section { background: #fff; }
.faq-section .section-header { justify-content: center; text-align: center; flex-direction: column; align-items: center; }

.faq-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) { .faq-grid { grid-template-columns: repeat(2, 1fr); } }

.faq-item {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: #fff;
  padding: 1.25rem;
  transition: box-shadow .2s;
}
.faq-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); }

.faq-item__btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  font-size: .875rem;
  font-weight: 600;
  color: var(--navy);
}
@media (min-width: 640px) { .faq-item__btn { font-size: 1rem; } }

.faq-item__chevron {
  flex-shrink: 0;
  width: 1.25rem; height: 1.25rem;
  color: var(--red);
  transition: transform .3s;
}
.faq-item.open .faq-item__chevron { transform: rotate(180deg); }

.faq-item__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s, opacity .3s;
  opacity: 0;
}
.faq-item.open .faq-item__body {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: .75rem;
}
.faq-item__body-inner {
  overflow: hidden;
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.8);
}
.footer__grid {
  display: grid;
  gap: 2.5rem;
  padding-block: 3.5rem;
}
@media (min-width: 640px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: repeat(4, 1fr); } }

.footer__logo {
  font-size: 1.5rem;
  font-weight: 800;
}
.footer__logo span:first-child { color: #fff; }
.footer__logo span:last-child  { color: var(--red); }

.footer__desc {
  margin-top: .75rem;
  font-size: .875rem;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
}

.footer__socials {
  margin-top: 1.25rem;
  display: flex;
  gap: .5rem;
}
.footer__social {
  display: grid;
  place-items: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  font-size: .75rem;
  font-weight: 700;
  transition: background .2s;
  text-decoration: none;
  color: #fff;
}
.footer__social:hover { background: var(--red); }

.footer__heading {
  font-size: .875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fff;
}
.footer__links {
  margin-top: 1rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: .875rem;
}
.footer__links a:hover { color: var(--yellow); }

.footer__contact {
  margin-top: 1rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  font-size: .875rem;
}
.footer__contact li { display: flex; align-items: flex-start; gap: .5rem; }
.footer__contact-icon { color: var(--yellow); flex-shrink: 0; margin-top: .1rem; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer__bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-block: 1.25rem;
  font-size: .75rem;
  color: rgba(255,255,255,.5);
}
@media (min-width: 640px) { .footer__bottom-inner { flex-direction: row; } }

/* ===================================================
   NOTIFICACIÓN CARRITO
   =================================================== */
.cart-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--navy);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: var(--radius-card);
  font-size: .875rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  transform: translateY(4rem);
  opacity: 0;
  transition: transform .3s, opacity .3s;
  z-index: 100;
  pointer-events: none;
}
.cart-toast.show { transform: translateY(0); opacity: 1; }
