/* =======================
   RESET + BASE
======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #1c1c1c;
}

/* =======================
   HEADER
======================= */
.topbar {
  background: #ffffff;
  padding: 1.2rem 1rem;
  text-align: center;
  border-bottom: 1px solid #eaeaea;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.6px;
}

/* =======================
   SEARCH
======================= */
.search-bar {
  padding: 1rem;
  background: #f5f5f5;
}

.search-bar input {
  width: 100%;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #ffffff;
  font-size: 0.95rem;
  outline: none;
}

.search-bar input:focus {
  border-color: #000;
}

/* =======================
   HERO
======================= */
.hero {
  background: linear-gradient(180deg, #ffffff, #f3f3f3);
  padding: 2.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  max-width: 520px;
}

.hero p {
  font-size: 0.95rem;
  color: #666;
  max-width: 520px;
}

/* =======================
   LIQUIDACION
======================= */
#liquidacion-section {
  background: #ffffff;
  padding: 1.4rem 1.2rem;
  margin-bottom: 0.8rem;
}

#liquidacion-section h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#liquidacion-section h2::after {
  content: "OFERTAS";
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: #000;
  color: #fff;
}

/* Carrusel */
.carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
}

.carousel::-webkit-scrollbar {
  display: none;
}

/* =======================
   CATEGORIAS
======================= */
.categories {
  display: flex;
  gap: 0.8rem;
  padding: 1rem;
  overflow-x: auto;
  background: #f5f5f5;
}

.categories::-webkit-scrollbar {
  display: none;
}

.category-btn {
  flex: 0 0 auto;
  font-size: 0.75rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* =======================
   GRID PRODUCTOS
======================= */
.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  padding: 1.4rem;
  background: #f5f5f5;
}

/* =======================
   PRODUCT CARD (GENERAL)
======================= */
.product-card {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #eaeaea;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.product-name {
  padding: 0.8rem 0.9rem 0.2rem;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.25;
}

.product-price {
  padding: 0 0.9rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0a7d3b;
}

/* =======================
   LIQUIDACION CARD (ESPECIAL)
======================= */
.carousel .product-card.liquidacion {
  flex: 0 0 160px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

.product-card.liquidacion img {
  aspect-ratio: 1 / 1;
}

.product-card.liquidacion .product-name {
  font-size: 0.82rem;
}

.product-card.liquidacion .product-price {
  font-size: 0.95rem;
  color: #0a7d3b;
  padding-bottom: 0.2rem;
}

.product-card.liquidacion .product-price-old {
  padding: 0 0.9rem 0.9rem;
  font-size: 0.78rem;
  color: #b00020;
  text-decoration: line-through;
  font-weight: 500;
}

/* =======================
   RESULTADOS
======================= */
.results-count {
  padding: 0.6rem 1.4rem 0;
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

/* =======================
   MODAL
======================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #ffffff;
  width: 90%;
  max-width: 420px;
  border-radius: 22px;
  padding: 1rem;
  text-align: center;
  position: relative;
}

.modal-content img {
  width: 100%;
  border-radius: 18px;
  margin-bottom: 0.6rem;
}

.modal-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.modal-content p {
  margin-bottom: 0.4rem;
}

.close {
  position: absolute;
  right: 1rem;
  top: 0.7rem;
  font-size: 1.6rem;
  cursor: pointer;
}

/* =======================
   INFO + WHATSAPP
======================= */
.shipping {
  font-size: 0.85rem;
  color: #555;
  margin: 0.6rem 0;
}

.whatsapp-btn {
  display: block;
  margin-top: 0.8rem;
  background: #000000;
  color: #ffffff;
  padding: 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}