/* ============ RESET BÁSICO ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Utilidad de accesibilidad: oculta visualmente el contenido
   pero lo mantiene disponible para lectores de pantalla y SEO */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #2b2b2b;
  padding-top: 96px; /* deja espacio para el header fijo */
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 12px 40px;
  background: linear-gradient(90deg, #ffffff 0%, #f4ce9a 100%);
}

/* Cada mitad ocupa el 50% del header:
   - header__left centra el logo entre el margen izquierdo y la mitad de la página
   - header__right centra el menú entre la mitad de la página y el margen derecho */
.header__left,
.header__right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__right {
  gap: 32px;
}

.header__brand {
  display: flex;
  align-items: center;
}

.header__logo-img {
  height: 64px;      /* ajusta este valor si tu logo se ve muy grande o pequeño */
  width: auto;        /* mantiene la proporción original del SVG */
  display: block;
}

.header__nav {
  display: flex;
  gap: 32px;
  font-weight: 500;
}

.header__nav a {
  transition: color 0.2s;
}

.header__nav a:hover,
.header__nav a:focus-visible {
  color: #6e1f24;
}

.header__cart {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
}

/* ============ SUBMENÚ PRODUCTOS ============ */
.header__dropdown {
  position: relative;
}

.header__dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.header__dropdown-toggle:hover,
.header__dropdown-toggle:focus-visible {
  color: #6e1f24;
}

.header__caret {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.header__dropdown.is-open .header__caret {
  transform: rotate(180deg);
}

.header__submenu {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  min-width: 170px;
  padding: 10px 0;
  z-index: 1001;
}

.header__dropdown.is-open .header__submenu {
  display: flex;
  flex-direction: column;
}

.header__submenu a {
  padding: 8px 20px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.header__submenu a:hover,
.header__submenu a:focus-visible {
  background: #f4ce9a33;
  color: #6e1f24;
}

/* Botón hamburguesa: oculto en escritorio, visible solo en móvil */
.header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 26px;
  background: none;
  border: none;
  cursor: pointer;
}

.header__toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: #5a1620;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.header__toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.header__toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.header__toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============ GALERÍA / IMAGEN DE CUERPO ============ */
.gallery {
  width: 100%;
  line-height: 0; /* evita espacio fantasma debajo de la imagen */
}

.gallery__img {
  width: 100%;
  height: auto;   /* mantiene proporción 1330 x 540 */
  display: block;
  object-fit: cover;
}

/* ============ PROMO ============ */
.promo {
  background: #1a1a1a; /* el fondo negro ocupa todo el ancho */
  color: #f4e9d8;
  display: flex;
  align-items: center;
  justify-content: center; /* centra todo el bloque texto + botón */
  gap: 8px;
  padding: 28px 10%; /* margen para que no quede pegado a los bordes externos */
  flex-wrap: wrap;
  text-align: center;
}

.promo__texto {
  flex: 0 1 auto;
  max-width: 640px;
}

.promo__highlight {
  color: #f4ce9a; /* mismo color de fondo del menú */
  font-weight: 700;
}

.promo__texto p {
  font-size: 1rem;
}

.promo__texto small {
  opacity: 0.7;
  font-size: 0.75rem;
}

.promo__boton {
  background: transparent;
  border: 1px solid #d9a441;
  color: #d9a441;
  padding: 10px 28px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.promo__boton:hover,
.promo__boton:focus-visible {
  background: #d9a441;
  color: #1a1a1a;
}

/* ============ WHATSAPP FLOTANTE ============ */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  border-radius: 50%;
  transition: transform 0.2s;
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  transform: scale(1.08);
}

.whatsapp-float img {
  width: 52px;
  height: 52px;
  display: block;
}

/* ============ FOOTER ============ */
.footer {
  background: #5a1620;
  color: #f4e9d8;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.8fr;
  gap: 24px;
  padding: 40px;
}

.footer h2 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: #f4e9d8;
}

.footer p,
.footer li {
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.9;
}

.footer ul {
  list-style: none;
}

.footer__redes {
  margin-top: 16px;
}

.footer__ig {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.85rem;
}

.footer__ig-icon {
  width: 18px;
  height: 18px;    /* escalado desde el original 1000 x 1000 px */
  object-fit: contain;
  border-radius: 4px;
}

.footer__badges {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.footer__badge {
  font-size: 0.7rem;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px;
}

/* ============ SOBRE NOSOTROS ============ */
.nosotros {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 60px;
  padding: 50px 10%;
}

.nosotros__texto {
  flex: 1;
  text-align: center;
}

.nosotros__texto h2 {
  font-family: 'Playfair Display', serif;
  color: #6e1f24;
  font-size: 1.4rem;
  margin: 24px 0 8px;
}

.nosotros__texto h2:first-child {
  margin-top: 0;
}

.nosotros__texto p {
  line-height: 1.6;
}

.nosotros__imagen {
  flex: 0 0 267px;
}

.nosotros__imagen img {
  width: 267px;
  height: 498px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* ============ PÁGINAS INTERNAS ============ */
.page-hero {
  background: linear-gradient(160deg, #7a1f2b 0%, #4c1016 100%);
  color: #f4e9d8;
  text-align: center;
  padding: 60px 20px;
}

.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.page-hero p {
  opacity: 0.9;
}

.categoria {
  padding: 50px 10%;
}

.categoria--alt {
  background: #f8f1e4;
}

.categoria h2 {
  font-family: 'Playfair Display', serif;
  color: #6e1f24;
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.categoria p {
  margin-bottom: 24px;
  max-width: 700px;
}

.categoria__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.categoria__item {
  background: #fff;
  border: 1px solid #e8dcc8;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100%; /* junto con el grid, iguala la altura de todas las tarjetas de la fila */
}

.categoria__item img {
  width: 100%;
  aspect-ratio: 4 / 5; /* mismo formato de exportación sugerido: 1000 x 1250 px */
  object-fit: cover;
  display: block;
}

.categoria__item figcaption {
  padding: 14px 16px 18px;
  text-align: left;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.categoria__nombre {
  font-size: 1rem;
  color: #2b2b2b;
  margin-bottom: 4px;
}

.categoria__desc {
  font-size: 0.82rem;
  color: #757575;
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1; /* ocupa el espacio disponible y empuja precio + botón al fondo de la tarjeta */
}

.categoria__precio {
  display: block;
  font-weight: 700;
  color: #6e1f24;
  margin-bottom: 12px;
}

.categoria__boton {
  width: 100%;
  background: #6e1f24;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.categoria__boton:hover,
.categoria__boton:focus-visible {
  background: #4c1016;
}

.contenido-simple {
  padding: 50px 10%;
  max-width: 800px;
  margin: 0 auto;
}

.contenido-simple h2 {
  font-family: 'Playfair Display', serif;
  color: #6e1f24;
  font-size: 1.4rem;
  margin: 24px 0 8px;
}

.contenido-simple h2:first-child {
  margin-top: 0;
}

/* ============ FORMULARIO DE CONTACTO ============ */
.formulario {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 480px;
}

.formulario label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 10px;
}

.formulario input,
.formulario textarea {
  font-family: inherit;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
}

.formulario .promo__boton {
  align-self: flex-start;
  margin-top: 16px;
  color: #6e1f24;
  border-color: #6e1f24;
}

.formulario .promo__boton:hover {
  background: #6e1f24;
  color: #fff;
}

.formulario__aviso {
  margin-top: 10px;
  color: #2e7d32;
  font-weight: 600;
}

/* ============ BARRA DE COPYRIGHT ============ */
.rectangle-div {
  width: 100%;
  height: 28px;
  position: relative;
  background-color: #555;
  color: #f4e9d8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .footer {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  /* Menú tipo desplegable (hamburguesa) */
  .header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: #f4ce9a;
    padding: 20px 24px;
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
  }

  .header__nav.is-open {
    display: flex;
  }

  .header__dropdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .header__submenu {
    position: static;
    transform: none;
    box-shadow: none;
    background: rgba(255,255,255,0.5);
    width: 100%;
    align-items: center;
    margin-top: 8px;
    border-radius: 6px;
  }

  .header__toggle {
    display: flex;
  }

  .header__right {
    justify-content: flex-end;
    gap: 18px;
  }

  .promo {
    flex-direction: column;
    text-align: center;
    padding: 24px 8%; /* en pantallas pequeñas se reduce el margen para que no quede muy apretado */
  }

  .nosotros {
    flex-direction: column;
    padding: 40px 8%;
  }

  .nosotros__imagen {
    display: none; /* la imagen no se muestra en versión móvil */
  }

  .footer {
    grid-template-columns: 1fr;
  }
}


/* ============ CARRITO DE COMPRAS (simulación para presentación) ============ */
.header__cart {
  position: relative;
}

.header__cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #6e1f24;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 1100;
}

.cart-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(380px, 100%);
  background: #fff;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1200;
  display: flex;
  flex-direction: column;
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.cart-drawer__header h2 {
  font-family: 'Playfair Display', serif;
  color: #6e1f24;
  font-size: 1.2rem;
}

.cart-drawer__close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #6e1f24;
  line-height: 1;
  padding: 4px 8px;
}

.cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-drawer__empty {
  color: #8a8a8a;
  font-size: 0.9rem;
  text-align: center;
  margin-top: 40px;
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.cart-item__img {
  width: 56px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.cart-item__info {
  flex: 1;
}

.cart-item__nombre {
  font-size: 0.85rem;
  color: #2b2b2b;
  margin-bottom: 2px;
}

.cart-item__precio {
  font-size: 0.8rem;
  color: #6e1f24;
  font-weight: 600;
}

.cart-item__cantidad {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.cart-item__qty-btn {
  width: 22px;
  height: 22px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
}

.cart-item__qty-btn:hover {
  background: #f4ce9a33;
}

.cart-item__remove {
  background: none;
  border: none;
  color: #b23a3a;
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-top: 2px;
}

.cart-drawer__footer {
  padding: 18px 20px;
  border-top: 1px solid #eee;
}

.cart-drawer__total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: #2b2b2b;
  margin-bottom: 14px;
}

.cart-drawer__checkout {
  width: 100%;
}
