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

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: #1a1a1a;
}

h1 { color: #000000; font-size: 96px; font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }
h2 { color: #000000; font-size: 60px; font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }
h3 { color: #000000; font-size: 40px; font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }
h4 { color: #000000; font-size: 24px; font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }

@media (max-width: 639px) {
  h1 { font-size: 48px; }
  h2 { font-size: 45px; }
  h3 { font-size: 30px; }
  h4 { font-size: 24px; }
}

.font-anton { font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif; }

/* ===== APP SHELL ===== */
#app {
  background: #f4f4f4;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* ===== HEADER ===== */
.app-header {
  flex-shrink: 0;
  background: #f4f4f4;
  z-index: 40;
}

/* ===== MENU OVERLAY ===== */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -100%);
  width: 100%;
  max-width: 900px;
  height: 100%;
  background: #f4f4f4;
  z-index: 50;
  transition: transform 0.3s ease;
}
.menu-overlay.open {
  transform: translate(-50%, 0);
}

/* ===== TIKTOK SCROLL ===== */
.tiktok-scroll {
  flex: 1;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}
.tiktok-slide {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  height: calc(100dvh - 72px);
  min-height: calc(100dvh - 72px);
  display: flex;
  flex-direction: column;
}

/* ===== CATEGORY BTN ===== */
.category-btn {
  border: 2.5px solid #1a1a1a;
  border-radius: 10px;
  padding: 16px 24px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  text-align: center;
  width: 100%;
  display: block;
  text-decoration: none;
  color: #1a1a1a;
}
.category-btn:active {
  background: #1a1a1a;
  color: #f8d2d6;
  transform: scale(0.97);
}

/* ===== STAR ===== */
.star-circle {
  width: 80px;
  height: 80px;
  background: #1a1a1a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.star-circle.sm { width: 50px; height: 50px; }
.star-circle svg { width: 40px; height: 40px; }
.star-circle.sm svg { width: 25px; height: 25px; }

/* ===== PRICE ===== */
.price-old {
  text-decoration: line-through;
  color: #888;
}

/* ===== BUTTONS ===== */
.btn-primary {
  width: 100%;
  background: #1a1a1a;
  color: #f8d2d6;
  font-weight: 700;
  padding: 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: transform 0.1s;
}
.btn-primary:active { transform: scale(0.97); }

.btn-pill {
  background: #1a1a1a;
  color: #f8d2d6;
  font-weight: 700;
  padding: 14px 40px;
  border-radius: 9999px;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: transform 0.1s;
  display: inline-block;
  text-decoration: none;
}
.btn-pill:active { transform: scale(0.95); }

/* ===== CATEGORY SECTION TITLES ===== */
#cocina, #menaje, #belleza, #hogar {
  padding-top: 3rem !important;
  padding-bottom: 1.5rem !important;
}

/* ===== NAV LINKS ===== */
.nav-link {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.875rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-decoration: none;
  color: #1a1a1a;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
  .catalog-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ===== DESKTOP (≥ 768px) ===== */
@media (min-width: 768px) {
  body {
    background: #f4f4f4;
  }

  #app {
    max-width: 1280px;
    margin: 0 auto;
  }

  /* Belleza grid necesita fondo morado */
  #belleza-grid {
    background: #D0BDDB;
  }

  /* Krups card: misma presentación vertical que las demás */
  #krups-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    padding: 28px 40px !important;
    max-width: 320px;
    gap: 8px !important;
  }
  #krups-card > img {
    grid-row: 1;
    grid-column: 1;
    width: 100% !important;
    height: 180px !important;
    object-fit: contain !important;
  }
  #krups-card > div {
    grid-row: 2;
    grid-column: 1;
    width: 100% !important;
  }

  /* Krups card: igual que las demás tarjetas en desktop */
  #krups-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    padding: 28px !important;
    max-width: 25%;
    gap: 8px !important;
  }
  #krups-card > img {
    grid-row: 1;
    grid-column: 1;
    width: 100% !important;
    height: 180px !important;
    object-fit: contain !important;
  }
  #krups-card > div {
    grid-row: 2;
    grid-column: 1;
    width: 100% !important;
  }

  /* Hero banners en columna centrada */
  .hero-banners {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 32px;
    gap: 0;
  }
  .hero-banners > div {
    margin: 0;
    width: 100%;
  }
  .hero-banners > div:nth-child(1) img { width: 42% !important; margin: 0 auto; }
  .hero-banners > div:nth-child(2) img { width: 28% !important; margin: 0 auto; }
  .hero-banners > div:nth-child(3) img { width: 42% !important; margin: 0 auto; }

  /* Section headers más grandes */
  #cocina span,
  #menaje span,
  #belleza span,
  #hogar span {
    font-size: 4.5rem;
  }

  /* Product grids: 3 columnas */
  #app .grid.grid-cols-2 {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* Padding tarjetas producto */
  #app .grid > div {
    padding: 28px !important;
  }

  /* Imágenes de producto más altas */
  #app .grid img.h-32 {
    height: 180px !important;
  }

  /* Sección "Cómo conseguir" con más padding */
  #how-to {
    padding: 48px 80px;
  }
}

/* ===== WIDE DESKTOP (≥ 1200px) ===== */
@media (min-width: 1200px) {
  #app .grid.grid-cols-2 {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* ===== FULL-BLEED fondos (solo cuando viewport > 1280px) ===== */
@media (min-width: 1281px) {
  #cocina,
  #cocina-grid,
  #krups-card,
  #belleza,
  #belleza-grid {
    margin-left:  calc(640px - 50vw);
    margin-right: calc(640px - 50vw);
    padding-left:  calc(50vw - 640px);
    padding-right: calc(50vw - 640px);
  }
}
