/* ===================== ROOT / RESET ===================== */
:root{
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #eff6ff;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --text-dim: #6b7280;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  font-size: 16px;
}
*,*::before,*::after{ box-sizing: border-box; margin:0; padding:0; }
html{ scroll-behavior: smooth; }
body{
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; }
button{ font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img{ max-width: 100%; display: block; }
.anchor{ display: block; height: 0; }

/* ===================== BUTTONS ===================== */
.btn{
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.6rem; border-radius: 10px; font-weight: 600; font-size: .95rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn--primary{
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37,99,235,.3);
}
.btn--primary:hover{ background: var(--blue-dark); transform: translateY(-1px); }
.btn--ghost{
  background: #fff; color: var(--text); border: 1px solid var(--border);
}
.btn--ghost:hover{ border-color: var(--blue); color: var(--blue); }
.btn--block{ width: 100%; }

/* ===================== TOP BAR ===================== */
.topbar{ background: var(--blue); color: #fff; font-size: .78rem; }
.topbar__inner{
  max-width: 1200px; margin: 0 auto; padding: .5rem 1.5rem;
  display: flex; gap: 2rem; overflow-x: auto; white-space: nowrap;
}

/* ===================== NAVBAR ===================== */
.navbar{
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.navbar__inner{
  max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem;
  display: flex; align-items: center; gap: 2rem;
}
.brand{ display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.25rem; }
.brand__mark{
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900;
}
.brand__name{ color: var(--text); }

.nav{ flex: 1; }
.nav__list{ display: flex; gap: 2rem; }
.nav__link{
  font-weight: 600; font-size: .92rem; padding: .5rem 0; color: var(--text-dim);
  transition: color .2s ease;
}
.nav__link:hover{ color: var(--blue); }

.navbar__actions{ display: flex; align-items: center; gap: 1rem; }
.search{ position: relative; display: flex; align-items: center; }
.search input{
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px;
  padding: .55rem 2.4rem .55rem 1rem; color: var(--text); font-size: .85rem; width: 200px;
  transition: width .25s ease, border-color .25s ease;
}
.search input:focus{ outline: none; border-color: var(--blue); width: 240px; background: #fff; }
.search svg{ position: absolute; right: 12px; width: 16px; height: 16px; stroke: var(--text-dim); fill: none; stroke-width: 2; pointer-events: none; }

.icon-btn{
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); border: 1px solid var(--border);
  transition: border-color .2s ease, color .2s ease;
}
.icon-btn:hover{ border-color: var(--blue); color: var(--blue); }
.icon-btn svg{ width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.badge{
  position: absolute; top: -4px; right: -4px; background: var(--blue);
  color: #fff; font-size: .65rem; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.burger{ display: none; flex-direction: column; gap: 4px; }
.burger span{ width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

.mobile-nav{
  display: none; flex-direction: column; padding: 0 1.5rem; overflow: hidden; max-height: 0;
  transition: max-height .3s ease;
}
.mobile-nav a{ padding: .8rem 0; border-bottom: 1px solid var(--border); font-weight: 600; color: var(--text); }
.mobile-nav.open{ max-height: 300px; }

/* ===================== HERO: PRODUCTO DESTACADO ===================== */
.hero{
  max-width: 900px; margin: 0 auto; padding: 4rem 1.5rem 2.5rem; text-align: center;
}
.hero__tag{
  display: inline-block; font-size: .8rem; font-weight: 700; color: var(--blue);
  background: var(--blue-light); padding: .35rem .9rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero__blue{ color: var(--blue); }
.hero h1{ font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.hero p{ color: var(--text-dim); font-size: 1.05rem; max-width: 520px; margin: 0 auto 1.8rem; }
.hero__cta{ display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ===================== SPOTLIGHT (CARRUSEL PRODUCTOS ESTRELLA) ===================== */
.spotlight-section{ max-width: 1200px; margin: 0 auto 3.5rem; padding: 0 1.5rem; }
.spotlight-wrap{ display: flex; align-items: center; gap: 1rem; }
.spotlight{
  flex: 1; background: var(--bg-alt); border-radius: 24px; padding: 3rem;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center;
  overflow: hidden;
}
.spotlight__img{
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff;
}
.spotlight__img img{ width: 100%; height: 420px; object-fit: cover; display: block; }
.spotlight__info{ display: flex; flex-direction: column; }
.sp-tag{
  display: inline-block; width: fit-content; font-size: .8rem; font-weight: 700; color: var(--blue);
  background: var(--blue-light); padding: .35rem .9rem; border-radius: 999px; margin-bottom: 1rem;
}
.sp-cat{ font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .4rem; }
.sp-title{ font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: .9rem; line-height: 1.2; }
.sp-desc{ color: var(--text-dim); font-size: 1rem; margin-bottom: 1.4rem; max-width: 440px; }
.sp-price-row{ display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.sp-price{ font-size: 2rem; font-weight: 800; color: var(--blue); }
.sp-old{ font-size: 1.1rem; color: var(--text-dim); text-decoration: line-through; }
.sp-off{ background: #fee2e2; color: #dc2626; font-size: .75rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; }
.sp-stock{ font-size: .85rem; color: #16a34a; font-weight: 600; margin-bottom: 1.6rem; }
.sp-cta{ display: flex; gap: 1rem; flex-wrap: wrap; }

.sp-nav{
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; font-size: 1.4rem; color: var(--text); display: flex; align-items: center; justify-content: center;
  transition: all .2s ease; box-shadow: var(--shadow);
}
.sp-nav:hover{ border-color: var(--blue); color: var(--blue); }
.sp-dots{ display: flex; justify-content: center; gap: .5rem; margin-top: 1.2rem; }
.sp-dot{ width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: all .2s ease; }
.sp-dot.active{ background: var(--blue); width: 22px; border-radius: 5px; }

/* ===================== CATEGORIES ===================== */
.categories{
  max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem 3.5rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem;
}
.cat-card{
  border-radius: var(--radius); overflow: hidden; position: relative; height: 140px;
  border: 1px solid var(--border); transition: transform .2s ease, box-shadow .2s ease;
}
.cat-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-card img{ width: 100%; height: 100%; object-fit: cover; }
.cat-card span{
  position: absolute; bottom: 0; left: 0; right: 0; padding: .8rem;
  background: linear-gradient(0deg, rgba(0,0,0,.55), transparent);
  color: #fff; font-weight: 700; font-size: .95rem;
}

/* ===================== PRODUCTS ===================== */
.products{ max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.offers-section{ max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem 4rem; }
.section-head{ display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.2rem; margin-bottom: 2rem; }
.section-head h2{ font-size: 1.6rem; margin-top: .25rem; }
.section-tag{ font-size: .78rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .05em; }
.section-tag--red{ color: #dc2626; }
.filters{ display: flex; gap: .6rem; flex-wrap: wrap; }
.filter-btn{
  padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--text-dim); font-size: .82rem; font-weight: 600;
  transition: all .2s ease;
}
.filter-btn:hover{ color: var(--blue); border-color: var(--blue); }
.filter-btn.active{ background: var(--blue); color: #fff; border-color: var(--blue); }

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

/* ===================== CAROUSEL ===================== */
.carousel-nav{ display: flex; gap: .6rem; }
.carousel-btn{
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; font-size: 1.2rem; color: var(--text); display: flex; align-items: center; justify-content: center;
  transition: all .2s ease;
}
.carousel-btn:hover{ border-color: var(--blue); color: var(--blue); }
.carousel-btn:disabled{ opacity: .35; cursor: default; }
.carousel-btn:disabled:hover{ border-color: var(--border); color: var(--text); }
.carousel{ overflow: hidden; }
.carousel__track{
  display: flex; gap: 1.4rem; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x mandatory;
  padding-bottom: .5rem; -ms-overflow-style: none; scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar{ display: none; }
.carousel__track .card{ flex: 0 0 260px; scroll-snap-align: start; }

.card{
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover{ transform: translateY(-4px); box-shadow: var(--shadow); }
.card__media{ height: 160px; overflow: hidden; position: relative; background: var(--bg-alt); cursor: pointer; }
.card__media img{ width: 100%; height: 100%; object-fit: cover; }
.card__badge{
  position: absolute; top: 10px; left: 10px; font-size: .68rem; font-weight: 700;
  padding: .25rem .6rem; border-radius: 999px; background: #fee2e2; color: #dc2626;
}
.card__body{ padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card__cat{ font-size: .7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.card__title{ font-size: .95rem; font-weight: 700; cursor: pointer; }
.card__title:hover{ color: var(--blue); }
.card__price-row{ display: flex; align-items: center; gap: .6rem; margin-top: .2rem; }
.card__price{ font-size: 1.1rem; font-weight: 800; color: var(--blue); }
.card__old-price{ font-size: .8rem; color: var(--text-dim); text-decoration: line-through; }
.card__footer{ margin-top: auto; display: flex; gap: .6rem; padding-top: .8rem; }
.card__add{
  flex: 1; padding: .6rem; border-radius: 10px; background: var(--blue);
  color: #fff; font-weight: 700; font-size: .85rem; transition: background .2s ease;
}
.card__add:hover{ background: var(--blue-dark); }

/* ===================== NEWSLETTER ===================== */
.newsletter{ text-align: center; padding: 4rem 1.5rem; max-width: 640px; margin: 0 auto; }
.newsletter h2{ font-size: 1.6rem; margin-bottom: .6rem; }
.newsletter p{ color: var(--text-dim); margin-bottom: 1.5rem; }
.newsletter form{ display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; }
.newsletter input{
  flex: 1; min-width: 220px; padding: .8rem 1.1rem; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-alt); color: var(--text);
}
.newsletter input:focus{ outline: none; border-color: var(--blue); background: #fff; }
.newsletter__msg{ margin-top: 1rem; color: var(--blue); font-size: .85rem; min-height: 1em; font-weight: 600; }

/* ===================== FOOTER ===================== */
.footer{ background: var(--bg-alt); border-top: 1px solid var(--border); padding: 3.5rem 1.5rem 1.5rem; }
.footer__grid{
  max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem;
}
.footer__brand{ display: flex; flex-direction: column; gap: .7rem; }
.footer__brand p{ color: var(--text-dim); font-size: .85rem; max-width: 260px; }
.footer__col h4{ font-size: .82rem; margin-bottom: .9rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.footer__col a{ display: block; font-size: .87rem; padding: .3rem 0; color: var(--text); }
.footer__col a:hover{ color: var(--blue); }
.footer__bottom{
  max-width: 1200px; margin: 2.5rem auto 0; padding-top: 1.4rem; border-top: 1px solid var(--border);
  font-size: .78rem; color: var(--text-dim);
}

/* ===================== CART DRAWER ===================== */
.overlay{
  position: fixed; inset: 0; background: rgba(15,23,42,.4);
  opacity: 0; visibility: hidden; transition: opacity .3s ease; z-index: 199;
}
.overlay.show{ opacity: 1; visibility: visible; }
.cart-drawer{
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 92vw; height: 100%;
  background: #fff; border-left: 1px solid var(--border); z-index: 200;
  display: flex; flex-direction: column; transition: right .35s ease; box-shadow: -20px 0 50px rgba(0,0,0,.15);
}
.cart-drawer.open{ right: 0; }
.cart-drawer__head{ display: flex; justify-content: space-between; align-items: center; padding: 1.4rem; border-bottom: 1px solid var(--border); }
.cart-drawer__items{ flex: 1; overflow-y: auto; padding: 1rem 1.4rem; display: flex; flex-direction: column; gap: 1rem; }
.cart-empty{ color: var(--text-dim); text-align: center; margin-top: 3rem; font-size: .9rem; }
.cart-item{ display: flex; gap: .9rem; align-items: center; }
.cart-item__media{ width: 56px; height: 56px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--bg-alt); }
.cart-item__media img{ width: 100%; height: 100%; object-fit: cover; }
.cart-item__info{ flex: 1; }
.cart-item__title{ font-size: .85rem; font-weight: 700; }
.cart-item__price{ font-size: .8rem; color: var(--blue); font-weight: 700; }
.cart-item__qty{ display: flex; align-items: center; gap: .5rem; margin-top: .3rem; }
.cart-item__qty button{ width: 22px; height: 22px; border-radius: 6px; background: var(--bg-alt); border: 1px solid var(--border); font-size: .8rem; }
.cart-item__remove{ color: #dc2626; font-size: .75rem; margin-left: auto; }
.cart-drawer__footer{ padding: 1.2rem 1.4rem 1.6rem; border-top: 1px solid var(--border); }
.cart-total{ display: flex; justify-content: space-between; margin-bottom: 1rem; font-size: 1rem; }
.cart-total strong{ color: var(--blue); font-size: 1.2rem; }

/* ===================== PRODUCT DETAIL MODAL ===================== */
.modal-overlay{
  position: fixed; inset: 0; background: rgba(15,23,42,.5);
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  opacity: 0; visibility: hidden; transition: opacity .25s ease; z-index: 250;
}
.modal-overlay.show{ opacity: 1; visibility: visible; }
.product-modal{
  background: #fff; border-radius: var(--radius); max-width: 760px; width: 100%;
  max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.25);
  transform: translateY(16px); transition: transform .25s ease;
}
.modal-overlay.show .product-modal{ transform: translateY(0); }
.product-modal__close{
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-alt); border: 1px solid var(--border); font-size: .9rem; z-index: 2;
}
.product-modal__body{ display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.pm-img{ height: 100%; min-height: 320px; background: var(--bg-alt); }
.pm-img img{ width: 100%; height: 100%; object-fit: cover; }
.pm-info{ padding: 2rem; display: flex; flex-direction: column; }
.pm-cat{ font-size: .75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.pm-title{ font-size: 1.4rem; font-weight: 800; margin-bottom: .8rem; }
.pm-desc{ color: var(--text-dim); font-size: .92rem; margin-bottom: 1.4rem; }
.pm-price-row{ display: flex; align-items: center; gap: .7rem; margin-bottom: 1.4rem; }
.pm-price{ font-size: 1.6rem; font-weight: 800; color: var(--blue); }
.pm-old{ font-size: 1rem; color: var(--text-dim); text-decoration: line-through; }
.pm-stock{ font-size: .82rem; color: #16a34a; font-weight: 600; margin-bottom: 1.4rem; }
.pm-qty{ display: flex; align-items: center; gap: .8rem; margin-bottom: 1.4rem; }
.pm-qty button{ width: 34px; height: 34px; border-radius: 8px; background: var(--bg-alt); border: 1px solid var(--border); font-size: 1rem; }
.pm-qty span{ font-weight: 700; min-width: 20px; text-align: center; }

/* ===================== TOAST ===================== */
.toast{
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff;
  padding: .8rem 1.4rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .3s ease; z-index: 300;
}
.toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px){
  .spotlight{ grid-template-columns: 1fr; padding: 2rem; }
  .spotlight__img img{ height: 280px; }
  .categories{ grid-template-columns: repeat(2, 1fr); }
  .grid{ grid-template-columns: repeat(2, 1fr); }
  .footer__grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px){
  .nav, .search{ display: none; }
  .burger{ display: flex; }
  .mobile-nav{ display: flex; }
  .product-modal__body{ grid-template-columns: 1fr; }
  .pm-img{ min-height: 220px; }
  .carousel__track .card{ flex: 0 0 210px; }
  .sp-nav{ width: 34px; height: 34px; font-size: 1.1rem; }
}
@media (max-width: 480px){
  .grid{ grid-template-columns: 1fr; }
  .categories{ grid-template-columns: 1fr; }
  .footer__grid{ grid-template-columns: 1fr; }
}
