/* --- Catálogo de productos (horizontal + responsive) --- */
.grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  align-items: stretch;
}

/* Cada card ocupa entre 240 y 320px y se adapta al espacio */
.card {
  flex: 1 1 260px;
  min-width: 240px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 15px rgba(0,0,0,.08);
  transition: transform .3s ease, box-shadow .3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0,0,0,.15);
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.card .p {
  flex: 1;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price { font-weight: 700; margin: 8px 0 12px; }

/* Botones */
.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.btn + .btn { margin-left: 8px; }

/* Ajuste fino en pantallas muy anchas (opcional) */
@media (min-width: 1200px) {
  .card { flex-basis: 280px; }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}
.modal-overlay.active { display: flex; }

.modal {
  background: #fff;
  border-radius: 16px;
  width: min(900px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  padding: 32px 28px;
  position: relative;
}
.modal-title { margin: 0 0 16px; font-size: 26px; text-align: left; }
.modal-close { position: absolute; top: 12px; right: 12px; border: none; background: none; font-size: 28px; cursor: pointer; line-height: 1; }
.modal-loading, .modal-error { text-align: center; padding: 40px 0; color: #555; }
.modal-error { color: #b3261e; }
body.modal-open { overflow: hidden; }

/* "Sobre nosotros" */
.sobre-nosotros { margin: 24px 0; }
.titulo-sobre { font-size: 32px; text-align: center; margin: 0 0 8px; }
.intro-sobre { text-align: center; margin: 0 auto 20px; max-width: 800px; }

.cards-sobre {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.cards-sobre .card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.04);
}
.cards-sobre .card h3 { margin: 0 0 8px; font-size: 18px; }
.cards-sobre .card p  { margin: 0; line-height: 1.5; }
.cards-sobre a { text-decoration: none; }
.cards-sobre a:hover { text-decoration: underline; }

/* Contenedor centrado y separación */
.cards-sobre{
  max-width: 1100px;
  margin: 16px auto;
  display: grid;
  gap: 16px;
}
.cards-sobre.layout-1x4{ grid-template-columns: repeat(4, minmax(220px, 1fr)); }
.cards-sobre.layout-2x2{ grid-template-columns: repeat(2, minmax(280px, 1fr)); }
.cards-sobre .card{ background:#fff; border:1px solid #eee; border-radius:12px; padding:16px; box-shadow:0 6px 18px rgba(0,0,0,.04); }

@media (max-width: 1100px){
  .cards-sobre.layout-1x4{ grid-template-columns: repeat(3, minmax(220px,1fr)); }
}
@media (max-width: 900px){
  .cards-sobre.layout-1x4, .cards-sobre.layout-2x2{ grid-template-columns: repeat(2, minmax(220px,1fr)); }
}
@media (max-width: 560px){
  .cards-sobre.layout-1x4, .cards-sobre.layout-2x2{ grid-template-columns: 1fr; }
}

/* Responsivo productos */
@media (max-width: 640px){
  .grid{ flex-direction: column; align-items: center; }
  .card{ width: min(94vw, 420px); max-width: 100%; }
  .card .p .btn{ display: block; width: 100%; }
  .card .p .btn + .btn{ margin-left: 0; margin-top: 8px; }
}

/* Ajustes mínimos mobile */
body { overflow-x: hidden; }
.hero-slider .slider-track { display: flex; }
.hero-slider img { width: 100%; height: auto; display: block; }

@media (max-width: 768px){
  .hero-slider .slider-overlay h1 { font-size: 36px !important; line-height: 1.15 !important; text-align: center; }
  .hero-slider .slider-overlay p  { font-size: 18px !important; line-height: 1.35 !important; text-align: center; }
  .hero-slider .btn { display:inline-block; padding: 10px 16px; }
}

@media (max-width: 900px){
  section[style*="display:flex"]{
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 16px !important;
  }
  section[style*="display:flex"] > div { width: 100% !important; }
  section[style*="display:flex"] img { max-width: 85% !important; height: auto !important; }
  section[style*="display:flex"] h1 { font-size: 32px !important; line-height: 1.2 !important; }
  section[style*="display:flex"] p  { font-size: 18px !important; line-height: 1.6 !important; text-align: justify; }
}

@media (max-width: 480px){
  .modal{ width: calc(100% - 24px); padding: 20px 16px; }
  .modal-title{ font-size: 22px; }
}

/* ======================
   ESTILOS CONTACTO (acotados)
   ====================== */
.contacto {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #fcc2eb, #ededed, #f9bfcc);
}
.titulo-contacto {
  font-size: 48px;
  margin-bottom: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #0f1833;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.1);
}
.intro-contacto { font-size: 18px; color: #444; margin-bottom: 40px; }
.cards-contacto { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }

/* SOLO dentro de .cards-contacto para no pisar las cards del catálogo */
.cards-contacto .card {
  background: #fff;
  border-radius: 16px;
  padding: 30px 20px;
  width: 280px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cards-contacto .card:hover { transform: translateY(-8px); box-shadow: 0 12px 25px rgba(0,0,0,0.15); }
.cards-contacto .card h3 { font-size: 22px; color: #e91e63; margin-bottom: 12px; }
.cards-contacto .card p  { font-size: 16px; color: #151515; }
.cards-contacto .card a  { text-decoration: none; color: #0f1833; font-weight: bold; }
.cards-contacto .card a:hover { color: #e91e63; }

/* === OVERRIDES FINALES: mostrar SIEMPRE precio y botones en el catálogo === */
.grid .card{ overflow: visible !important; }
.grid .card .p{
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 16px !important;
  background: #fff !important;
  color: #111 !important;
  opacity: 1 !important;
  visibility: visible !important;
  max-height: none !important;
  overflow: visible !important;
  position: static !important;
}
.grid .card .p strong,
.grid .card .p small,
.grid .card .p .price,
.grid .card .p .btn{
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.grid .card .p .price{ font-weight: 700 !important; }
.grid .card .p .btn{
  border: 1px solid #d1d5db !important;
  background: #111827 !important;
  color: #fff !important;
  text-decoration: none !important;
  line-height: 1.2 !important;
  pointer-events: auto !important;
}
.grid .card .p .btn.light{
  background: #fff !important;
  color: #111827 !important;
  border: 1px solid #d1d5db !important;
}
@media (max-width: 640px){
  .grid .card .p .btn{ width: 100% !important; }
  .grid .card .p .btn + .btn{ margin-left: 0 !important; margin-top: 8px !important; }
}

/* ======================
   TESTIMONIOS CLIENTAS
   ====================== */
.testimonials {
  margin: 70px auto 40px;
  max-width: 1200px;
  padding: 0 16px;
}

.testimonials__intro {
  text-align: center;
  margin-bottom: 32px;
}

.testimonials__intro h2 {
  font-size: 36px;
  margin-bottom: 12px;
}

.testimonials__intro p {
  color: #4b5563;
  margin: 0 auto;
  max-width: 680px;
}

.testimonial-alert {
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 auto 24px;
  max-width: 640px;
  font-weight: 600;
  text-align: center;
}

.testimonial-alert.success {
  background: #dcfce7;
  color: #14532d;
  border: 1px solid #86efac;
}

.testimonial-alert.error {
  background: #fee2e2;
  color: #7f1d1d;
  border: 1px solid #fca5a5;
}

.testimonials__layout {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
}

.testimonials__list {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.testimonial-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(15, 24, 51, 0.08);
  border: 1px solid rgba(17, 24, 39, 0.05);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.testimonial-card header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.testimonial-card h3 {
  margin: 0;
  font-size: 20px;
  color: #111827;
}

.testimonial-card time {
  font-size: 14px;
  color: #6b7280;
}

.testimonial-card p {
  margin: 0;
  color: #374151;
  line-height: 1.6;
}

.testimonial-stars {
  color: #f59e0b;
  font-size: 20px;
}

.testimonial-stars .star {
  opacity: 0.35;
}

.testimonial-stars .star.filled {
  opacity: 1;
}

.testimonial-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #4b5563;
}

.testimonial-form-wrapper {
  background: linear-gradient(135deg, rgba(249, 168, 212, 0.2), rgba(129, 140, 248, 0.18));
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 10px 35px rgba(148, 163, 184, 0.2);
}

.testimonial-form-wrapper h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 26px;
  color: #0f1833;
}

.testimonial-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rating-group span {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #1f2937;
}

.rating-input {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 6px;
}

.rating-input input {
  position: absolute;
  opacity: 0;
}

.rating-input label {
  cursor: pointer;
  font-size: 26px;
  color: #d1d5db;
  transition: color .2s ease;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
  color: #f59e0b;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group span {
  font-weight: 600;
  color: #1f2937;
}

.input-group input,
.input-group textarea {
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: #ec4899;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
}

.testimonial-help {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1024px) {
  .testimonials__layout {
    grid-template-columns: 1fr;
  }

  .testimonial-form-wrapper {
    order: -1;
  }
}

@media (max-width: 640px) {
  .testimonials {
    margin-top: 50px;
  }

  .testimonials__intro h2 {
    font-size: 28px;
  }

  .testimonial-form-wrapper {
    padding: 22px;
  }
}
