/* ======== BASE / GENERAL ======== */
html, body{
  height:100%;
  margin:0;
  font-family: Arial, sans-serif;
  background:#f8f8f8;
  color:#333;
}

header{
  background:#003366;
  color:#fff;
  text-align:center;
  padding:20px 0;
}

nav{
  background:#005599;
  padding:10px 0;
  text-align:center;
}

nav a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #aaddff;
}

main {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
}

section {
  margin-bottom: 40px;
  background: transparent;
  border-radius: 8px;
  padding: 0;
  box-shadow: none;
}

section h2 {
  color: #003366;
  padding-bottom: 40px;
  margin-bottom: 0;
  font-size: 1.8rem;
}

/* ======== PRODUCTOS ======== */
.product-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.product-item {
  flex: 1 1 22%;
  max-width: 22%;
  min-width: 200px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}


.product-item:hover{
  transform: translateY(-5px);
  box-shadow:0 5px 15px rgba(0,123,255,.3);
}

.product-item img {
  width: 100%;
  aspect-ratio: 817 / 972;
  object-fit: cover;
  border-bottom: 1px solid #f4ecec;
  display: block;
}

.product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* máximo 2 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
  margin: 15px;
  color: #003366;
}


.product-details {
  flex-grow: 1;
  margin: 0 15px 10px 15px;
  font-size: 0.9rem;
  color: #555;
}

.product-price {
  font-weight: bold;
  color: #007BFF;
  margin: 0 15px 15px 15px;
  font-size: 1rem;
}

.btn-container {
  display: flex;
  gap: 12px;
  margin: 0 15px 15px 15px;
}

.btn {
  flex: 1;
  background-color: #007BFF;
  color: white;
  text-decoration: none;
  text-align: center;
  padding: 10px 0;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.btn:hover {
  background-color: #0056b3;
}


/* === Título sobre la imagen con overlay (sin cambiar HTML) === */
.product-item {
  position: relative;       /* permite posicionar el título encima */
  overflow: hidden;
}

/* la imagen ocupa todo y redondea arriba */
.product-item img {
  width: 100%;
  display: block;
  border-radius: 8px 8px 0 0;
}




/* === CELULAR: 2 productos por fila === */
@media (max-width: 600px) {
  .product-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
  }

  .product-item {
    flex: 1 1 calc(50% - 12px) !important;
    max-width: calc(50% - 12px) !important;
    min-width: unset !important;
  }

  /* Ajuste de imagen */
  .product-item img {
    aspect-ratio: 1/1.25; /* imagen más compacta */
    border-radius: 10px;
  }

  .product-title {
    font-size: 0.85rem;
    margin-bottom: 6px;
  }

  .product-price {
    font-size: 0.9rem;
  }

  .btn-container .btn {
    font-size: 0.75rem;
    padding: 6px 0;
  }
}




.slider {
  position: relative;
  overflow: hidden;
}
.slider-media {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease-in-out; /* fade suave */
}



/* ===== HIDE SHOW HEADER TEXT (desktop / mobile) ===== */
.mobile-only {
  display: none !important;
}
.desktop-only {
  display: block !important;
}

/* ✅ Mostrar versión móvil y ocultar desktop */
@media (max-width: 600px) {
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: block !important;
  }
}

/* ===== NAV RESPONSIVE SCROLL ===== */
nav {
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* scroll suave */
}

nav::-webkit-scrollbar {
  display: none; /* oculta la barra de scroll */
}

nav a {
  display: inline-block;
  padding: 12px 18px;
}








