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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

:root {
  --header-height: 86px;
  --header-height-mobile: 104px;
  --header-height-compact: 82px;
}

/* TIPOGRAFÍA */
body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding-top: var(--header-height);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 2500;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff6ea;
  color: #3e2a1f;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 18px 30px rgba(31, 20, 13, 0.16);
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid #e7c493;
  outline-offset: 3px;
}

a,
button,
input,
textarea,
select,
summary,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.producto,
.producto *,
.galeria-post,
.galeria-post *,
.miniaturas img,
.producto-img-principal,
.producto-flecha,
.lightbox-nav,
.lightbox-cerrar {
  -webkit-tap-highlight-color: transparent;
}

body.lightbox-abierto,
body.modal-disponibilidad-abierta,
body.menu-movil-abierto {
  overflow: hidden;
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #4a3124;
  color: white;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 30px;
  z-index: 1000;
  min-height: var(--header-height);
  overflow: visible;
  box-shadow: 0 10px 30px rgba(31, 20, 13, 0.14);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  position: relative;
  z-index: 3;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.header h1 {
  font-size: 20px;
  flex: 0 0 auto;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.header.menu-abierto .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header.menu-abierto .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.header.menu-abierto .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header-panel {
  margin-left: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex: 1 1 auto;
}

/* NAV */
.header nav {
  min-width: 0;
  position: relative;
  z-index: 3;
}

.header nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  flex-wrap: nowrap;
}

.header nav a {
  text-decoration: none;
  color: white;
  font-size: 14px;
  transition: color 0.2s, background 0.2s;
}

.header nav a:hover {
  color: #e0be90;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  position: relative;
  z-index: 4;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 40px 0;
  color: #7a6d65;
  font-size: 13px;
}

.breadcrumbs a {
  color: #5f5148;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #3e2a1f;
}

/* HERO (INICIO) */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 20px;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(20, 15, 10, 0.35), rgba(20, 15, 10, 0.28)),
    url("PANORAMICA de la tienda entera optimizada.jpg");
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-position: left center;
  transform: scale(1.02);
  animation: mover-panorama 32s ease-in-out infinite alternate;
  z-index: -1;
}

.hero-content {
  max-width: 760px;
  padding: 40px 30px;
  background: rgba(35, 23, 16, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(3px);
  border-radius: 24px;
}

.contador-hero-link {
  display: none;
  text-decoration: none;
  z-index: 1;
}

.contador-hero {
  padding: 8px 16px;
  font-size: 12px;
  line-height: 1.1;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px rgba(28, 18, 12, 0.28);
}

.contador.contador-hero.abierto {
  background: rgba(24, 101, 61, 0.9);
  color: #f3fff6;
  border: 1px solid rgba(196, 239, 208, 0.44);
  border-color: rgba(196, 239, 208, 0.44);
}

.contador.contador-hero.cerrado {
  background: rgba(112, 33, 33, 0.9);
  color: #fff1f1;
  border: 1px solid rgba(255, 214, 214, 0.4);
  border-color: rgba(255, 214, 214, 0.4);
  box-shadow: 0 14px 30px rgba(28, 18, 12, 0.2);
}

@keyframes mover-panorama {
  from {
    background-position: left center;
  }

  to {
    background-position: right center;
  }
}

.hero-content h2 {
  font-size: 48px;
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-content h2 em {
  font-style: italic;
  color: #c9a87c;
}

.hero-content p {
  font-size: 18px;
  color: #ddd;
  margin-bottom: 25px;
}

/* BOTONES */
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn {
  background-color: #c9a87c;
  color: black;
  padding: 10px 20px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background 0.2s;
}

.btn:hover {
  background-color: #e0be90;
}

.btn-outline {
  background: transparent;
  border: 2px solid #c9a87c;
  color: white;
}

.btn-outline:hover {
  background: #c9a87c;
  color: black;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-content h2 {
    font-size: 28px;
  }

  .hero {
    min-height: calc(100vh - var(--header-height-mobile));
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }

  .hero::before {
    background-size: cover;
    animation-duration: 22s;
  }

  .hero-content {
    padding: 28px 18px;
    border-radius: 18px;
  }

  .breadcrumbs {
    justify-content: center;
    flex-wrap: wrap;
    padding: 12px 16px 0;
  }

  .footer-superior {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 22px;
    padding: 28px 20px 20px;
  }

  .footer-columna {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    text-align: left;
  }

  .footer-nav-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    row-gap: 12px;
  }

  .footer-brand {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .footer {
    margin-top: 12px;
    overflow: hidden;
  }

  .footer-superior {
    padding: 24px 16px 18px;
  }

  .footer-columna + .footer-columna {
    margin-top: 18px;
  }

  .footer-columna p,
  .footer-columna a,
  .footer-columna span,
  .footer-columna h3 {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .footer-nav-grid {
    row-gap: 10px;
  }
}

/* PRODUCTOS */
.productos {
  padding: 60px 40px;
  background-color: #fff;
  scroll-margin-top: 100px;
}

.catalogo-productos {
  min-height: calc(100vh - 190px);
}

.titulo-seccion {
  text-align: center;
  font-size: 28px;
  margin-bottom: 30px;
  font-weight: 300;
}

.seccion-intro {
  max-width: 760px;
  margin: 0 auto 30px;
  text-align: center;
  color: #5f5148;
  line-height: 1.6;
}

.productos-cta {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

.btn-outline-dark {
  background: transparent;
  border: 2px solid #3e2a1f;
  color: #3e2a1f;
}

.btn-outline-dark:hover {
  background: #3e2a1f;
  color: white;
}

/* FILTROS */
.filtros {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filtro, .filtro-btn {
  border: none;
  background: #f1f1f1;
  padding: 12px 22px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 25px;
  transition: all 0.2s;
  font-weight: 500;
}

.filtro:hover, .filtro-btn:hover {
  background: #e0be90;
  color: black;
}

.filtro.activo, .filtro-btn.active {
  background: #3e2a1f;
  color: white;
}

/* GRID PRODUCTOS */
.grid-productos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

@media (max-width: 1180px) {
  .grid-productos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
}

/* TARJETA PRODUCTO */
.producto {
  position: relative;
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s;
  cursor: pointer;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(62, 42, 31, 0.08);
}

.producto img {
  width: 100%;
  height: 390px;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
  transition: transform 0.4s ease;
}

.producto:hover img {
  transform: scale(1.05);
}

.producto:hover {
  transform: translateY(-5px);
}

.producto h3 {
  font-size: 14px;
  margin-bottom: 5px;
  font-weight: 400;
  padding: 0 14px;
}

.precio {
  font-size: 14px;
  color: #555;
  padding: 0 14px 16px;
}

.producto-meta-superior {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  z-index: 2;
  pointer-events: none;
}

.producto-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.producto-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: white;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.badge-nuevo {
  background: #1e7f56;
}

.badge-oferta-card {
  background: #b33a2f;
}

.badge-agotado {
  background: #6f625a;
}

.producto-like {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: transform 0.2s ease, background 0.2s ease;
}

.producto-like:hover {
  transform: scale(1.06);
}

.producto-like.activo {
  background: #fff1f1;
}

.producto-like i {
  color: #b33a2f;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .productos,
  .ofertas,
  .galeria {
    padding: 52px 16px;
  }

  .filtros {
    gap: 10px;
    margin-bottom: 28px;
  }

  .filtro,
  .filtro-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .grid-productos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .producto {
    border-radius: 16px;
  }

  .producto img {
    height: auto;
    aspect-ratio: 4 / 5;
    margin-bottom: 8px;
  }

  .producto h3 {
    font-size: 13px;
    padding: 0 10px;
  }

  .precio {
    font-size: 13px;
    padding: 0 10px 14px;
  }

  .producto-meta-superior {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .producto-badge {
    padding: 5px 8px;
    font-size: 11px;
  }

  .producto-like {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
}

/* CONTACTO */
.contacto {
  position: relative;
  padding: 78px 40px;
  background:
    radial-gradient(circle at top left, rgba(201, 168, 124, 0.2), transparent 34%),
    linear-gradient(180deg, #fbf4ee 0%, #f5f1ec 100%);
  scroll-margin-top: 100px;
  overflow: hidden;
}

.contacto::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(201, 168, 124, 0.09);
}

.contenedor-contacto {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.45fr) minmax(320px, 0.55fr);
  gap: 34px;
  align-items: stretch;
}

/* INFO CONTACTO */
.info-contacto h3 {
  margin-bottom: 14px;
  font-size: 20px;
  font-weight: 600;
  color: #3e2a1f;
}

.info-contacto p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: #54463e;
  background: #fffaf6;
  border: 1px solid #ead9ca;
  padding: 12px 14px;
  border-radius: 16px;
  overflow-wrap: anywhere;
}

.info-contacto p i {
  width: 18px;
  color: #3e2a1f;
  text-align: center;
  flex: 0 0 auto;
}

.contacto-mapa-link {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #3e2a1f;
  color: #fff6ea;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 14px 30px rgba(62, 42, 31, 0.14);
  transition: transform 0.2s ease, background 0.2s ease;
}

.contacto-mapa-link:hover {
  transform: translateY(-1px);
  background: #5a3d2c;
}

.info-contacto {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  padding: 30px;
  border-radius: 28px;
  border: 1px solid rgba(101, 75, 57, 0.09);
  box-shadow: 0 22px 50px rgba(62, 42, 31, 0.09);
  min-width: 0;
}

/* TABLA HORARIO */
.tabla-horario {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  background: #faf7f3;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px #ead9ca;
}

.tabla-horario th,
.tabla-horario td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
}

.tabla-horario th {
  font-weight: 500;
  background-color: #3e2a1f;
  color: white;
}

.tabla-horario td {
  background: white;
}

/* MAPA */
.mapa {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  width: 100%;
  height: auto;
  min-height: 440px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(101, 75, 57, 0.09);
  box-shadow: 0 22px 50px rgba(62, 42, 31, 0.09);
  padding: 16px;
  min-width: 0;
}

.mapa iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 20px;
}

.mapa[data-mapa-externo] {
  display: flex;
  align-items: stretch;
}

.mapa-placeholder {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(201, 168, 124, 0.28), transparent 30%),
    linear-gradient(180deg, #fffaf6 0%, #f4ede6 100%);
  color: #4c3a2f;
}

.mapa-eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8c6c52;
}

.mapa-placeholder h3 {
  font-size: 24px;
  color: #2f2119;
}

.mapa-placeholder p {
  line-height: 1.7;
}

.mapa-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.btn-mapa-cargar,
.btn-mapa-externo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-mapa-cargar {
  border: none;
  background: #3e2a1f;
  color: #fff6ea;
  cursor: pointer;
}

.btn-mapa-cargar:hover,
.btn-mapa-externo:hover {
  transform: translateY(-1px);
}

.btn-mapa-externo {
  border: 1px solid rgba(62, 42, 31, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: #3e2a1f;
}

@media (max-width: 980px) {
  .contenedor-contacto {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .info-contacto {
    order: 1;
  }

  .mapa {
    order: 2;
    min-height: 360px;
  }
}

/* RESPONSIVE CONTACTO */
@media (max-width: 768px) {
  .contacto {
    padding: 42px 16px 22px;
  }

  .contenedor-contacto {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .info-contacto {
    order: 1;
    padding: 20px;
  }

  .info-contacto p {
    align-items: flex-start;
  }

  .mapa {
    order: 2;
    min-height: 240px;
    padding: 12px;
  }

  .mapa iframe {
    height: 240px;
  }

  .mapa-placeholder {
    padding: 22px 18px;
  }

  .mapa-placeholder h3 {
    font-size: 21px;
  }

  .mapa-acciones {
    flex-direction: column;
  }

  .tabla-horario th,
  .tabla-horario td {
    font-size: 13px;
  }
}

/* OFERTAS */
.ofertas {
  padding: 60px 40px;
  background-color: #fff7f2;
}

.precio-antiguo {
  text-decoration: line-through;
  color: #999;
  margin-right: 8px;
  font-size: 13px;
}

.precio-nuevo {
  color: #c0392b;
  font-weight: bold;
  font-size: 15px;
}

/* GALERIA */
.galeria {
  padding: 60px 40px;
  background-color: #ffffff;
}

.galeria-feed {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 180px;
  grid-auto-flow: dense;
  gap: 18px;
}

.galeria-post {
  position: relative;
  border: none;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  background: #eadfd4;
}

.galeria-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.galeria-post:hover img {
  transform: scale(1.05);
}

.galeria-post-grande {
  grid-column: span 2;
  grid-row: span 2;
}

.galeria-post-ancha {
  grid-column: span 2;
}

.galeria-post-vertical {
  grid-row: span 2;
}

.galeria-post-vertical img {
  object-position: center top;
}

.galeria-post-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px;
  color: white;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.58));
  opacity: 0;
  transition: opacity 0.25s ease;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
}

.galeria-post:hover .galeria-post-overlay {
  opacity: 1;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(16, 11, 8, 0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figura {
  max-width: min(1100px, 82vw);
  max-height: 88vh;
  margin: 0;
  text-align: center;
  color: white;
}

.lightbox-figura img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 18px;
}

.lightbox-figura figcaption {
  margin-top: 14px;
  font-size: 15px;
  color: #f1e7df;
}

.lightbox-nav,
.lightbox-cerrar {
  position: absolute;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.lightbox-cerrar {
  top: 24px;
  right: 24px;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

@media (max-width: 768px) {
  .legal-hero {
    padding: 18px 16px 12px;
  }

  .legal-hero-inner {
    padding: 28px 20px;
    border-radius: 24px;
  }

  .legal-hero-inner h2 {
    font-size: 30px;
  }

  .legal-content {
    padding: 8px 16px 42px;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .legal-sidebar {
    position: static;
  }

  .legal-section {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .legal-section h3 {
    font-size: 22px;
  }
}

/* RESPONSIVE GALERIA */
@media (max-width: 768px) {
  .galeria-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 136px;
    gap: 12px;
  }

  .galeria-post-grande,
  .galeria-post-ancha,
  .galeria-post-horizontal {
    grid-column: span 2;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-prev {
    left: 12px;
  }

  .lightbox-next {
    right: 12px;
  }

  .lightbox-cerrar {
    top: 12px;
    right: 12px;
  }
}

/* REDES SOCIALES HEADER */
.redes {
  display: flex;
  gap: 2px;
  margin-left: 0;
}

.redes a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  min-width: 24px;
  min-height: 24px;
  color: white;
  text-decoration: none;
  transition: transform 0.2s, color 0.2s;
}

.redes a:hover {
  color: #e0be90;
  transform: scale(1.2);
}

.favoritos-menu {
  position: relative;
}

.favoritos-toggle {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-radius: 999px;
  padding: 8px 14px;
  min-width: 68px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.favoritos-icono {
  font-size: 15px;
}

.favoritos-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 320px;
  max-height: 420px;
  background: white;
  color: #3e2a1f;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 20px 40px rgba(26, 18, 13, 0.2);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.favoritos-panel[hidden] {
  display: none;
}

.favoritos-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: 250px;
}

.favoritos-vacio {
  color: #6f625a;
  font-size: 14px;
  line-height: 1.5;
}

.favorito-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 10px;
  align-items: center;
}

.favorito-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
}

.favorito-item-info {
  cursor: pointer;
}

.favorito-item-info h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.favorito-item-info p {
  font-size: 13px;
  color: #7a6d65;
}

.favorito-item-remove {
  border: none;
  background: #f7efe7;
  color: #7f3c32;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
}

.favoritos-resumen {
  margin-top: auto;
  border-top: 1px solid #eadfd4;
  padding: 16px 4px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.favoritos-resumen span {
  font-size: 13px;
  color: #7a6d65;
}

.favoritos-resumen strong {
  font-size: 28px;
  font-weight: 600;
  color: #3e2a1f;
}

.favoritos-destacado {
  animation: favoritos-bump 0.38s ease;
}

.favorito-volador {
  position: fixed;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 3000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b33a2f;
  text-shadow: 0 8px 18px rgba(179, 58, 47, 0.28);
}

.favorito-volador i {
  font-size: 22px;
}

@keyframes favoritos-bump {
  0% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.12);
  }

  100% {
    transform: scale(1);
  }
}

.buscador-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 46px;
  color: white;
  flex: 0 0 auto;
}

.buscador-toggle,
.buscador-cerrar {
  width: 46px;
  min-width: 46px;
  height: 46px;
  flex: 0 0 46px;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.buscador-toggle:hover,
.buscador-cerrar:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.buscador-campo {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 46px;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  transition: width 0.28s ease, opacity 0.18s ease, padding 0.28s ease, box-shadow 0.2s ease;
}

.buscador-cerrar {
  align-self: center;
  margin-right: -2px;
}

.buscador-header.abierto {
  width: min(185px, calc(100vw - 32px));
}

.buscador-header.abierto .buscador-toggle {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.buscador-header.abierto .buscador-campo {
  width: min(185px, calc(100vw - 32px));
  padding: 0 6px 0 16px;
  opacity: 1;
  pointer-events: auto;
  box-shadow: 0 16px 32px rgba(24, 16, 11, 0.22);
}

.buscador-input {
  width: 100%;
  border: none;
  background: transparent;
  color: white;
  outline: none;
  font-size: 14px;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}

.buscador-input:focus,
.buscador-input:focus-visible {
  outline: none;
  box-shadow: none;
}

.buscador-campo:focus-within {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 16px 32px rgba(24, 16, 11, 0.22);
}

.buscador-input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.buscador-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.buscador-resultados {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-height: 360px;
  overflow-y: auto;
  background: white;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(26, 18, 13, 0.22);
  padding: 10px;
  z-index: 20;
}

.buscador-item {
  width: 100%;
  border: none;
  background: white;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 8px;
  border-radius: 14px;
  cursor: pointer;
  min-width: 0;
}

.buscador-item:hover {
  background: #f8f1eb;
}

.buscador-item img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
}

.buscador-item-texto {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: #3e2a1f;
}

.buscador-item-texto strong,
.buscador-item-texto small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.buscador-item-texto small {
  color: #7a6d65;
}

.buscador-vacio {
  padding: 14px 10px;
  color: #6f625a;
  font-size: 14px;
}

.contador-link {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-decoration: none;
  z-index: 1;
  transition: left 0.25s ease, transform 0.25s ease;
}

.header.buscador-activo .contador-link {
  left: 390px;
  transform: translateY(-50%);
}

/* FOOTER */
.footer {
  flex: 0 0 auto;
  margin-top: 56px;
  background: #3e2a1f;
  color: #fff6ea;
}

.footer-superior {
  max-width: 1320px;
  margin: 0 auto;
  padding: 38px 42px 24px;
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(220px, 1.1fr);
  gap: 34px;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
}

.footer-logo {
  width: 128px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.footer-brand-texto {
  max-width: 220px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-columna {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav-grid {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 34px;
  row-gap: 12px;
  align-items: start;
}

.footer-nav-grid a:nth-child(5) {
  grid-column: 1;
}

.footer-columna h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-columna p,
.footer-columna a,
.footer-columna span {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: inherit;
  text-decoration: none;
}

.footer-columna a:hover {
  color: #e7c493;
}

.footer-columna-placeholder a {
  opacity: 0.96;
}

.footer-copy {
  padding: 0 24px 22px;
  text-align: center;
  font-size: 15px;
}

.footer-copy p {
  margin: 0;
}

/* EMPUJA FOOTER ABAJO */
html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.legal-page {
  background:
    radial-gradient(circle at top left, rgba(201, 168, 124, 0.18), transparent 28%),
    linear-gradient(180deg, #fbf6f1 0%, #f6f1eb 100%);
}

.legal-hero {
  padding: 30px 40px 20px;
}

.legal-hero-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 38px 42px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(62, 42, 31, 0.96), rgba(88, 59, 42, 0.94)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  color: #fff6ea;
  box-shadow: 0 28px 60px rgba(62, 42, 31, 0.12);
}

.legal-eyebrow {
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d9bd95;
}

.legal-hero-inner h2 {
  font-size: 42px;
  font-weight: 400;
  margin-bottom: 14px;
}

.legal-hero-inner p:last-child {
  max-width: 760px;
  line-height: 1.7;
  color: rgba(255, 246, 234, 0.9);
}

.legal-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 40px 60px;
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
  gap: 28px;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  display: grid;
  gap: 18px;
}

.legal-card {
  padding: 22px 22px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(101, 75, 57, 0.08);
  box-shadow: 0 20px 40px rgba(62, 42, 31, 0.08);
}

.legal-card h3 {
  margin-bottom: 10px;
  color: #2f2119;
}

.legal-card p,
.legal-card a {
  color: #5b4c43;
  line-height: 1.65;
}

.legal-card-warning {
  background: linear-gradient(180deg, #fff9f3 0%, #f7eee2 100%);
  border-color: rgba(201, 168, 124, 0.26);
}

.legal-article {
  display: grid;
  gap: 18px;
}

.legal-section {
  padding: 28px 30px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(101, 75, 57, 0.08);
  box-shadow: 0 20px 46px rgba(62, 42, 31, 0.08);
}

.legal-section h3 {
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: 500;
  color: #2f2119;
}

.legal-section p,
.legal-section li {
  color: #5b4c43;
  line-height: 1.78;
}

.legal-section p + p,
.legal-section ul + p,
.legal-section p + ul {
  margin-top: 14px;
}

.legal-list,
.legal-data-list {
  padding-left: 22px;
}

.legal-section code {
  padding: 2px 6px;
  border-radius: 8px;
  background: #f2ebe4;
  color: #3e2a1f;
  font-size: 0.95em;
}

@media (max-width: 1180px) {
  .legal-content {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .legal-sidebar {
    position: static;
    top: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .legal-card,
  .legal-section {
    min-width: 0;
  }

  .legal-card p,
  .legal-card a,
  .legal-section p,
  .legal-section li {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 760px) {
  .legal-hero {
    padding: 22px 16px 14px;
  }

  .legal-hero-inner {
    padding: 26px 20px;
    border-radius: 24px;
  }

  .legal-hero-inner h2 {
    font-size: 32px;
  }

  .legal-content {
    padding: 10px 16px 44px;
  }

  .legal-sidebar {
    grid-template-columns: 1fr;
  }

  .legal-card {
    padding: 18px 18px 16px;
    border-radius: 20px;
  }

  .legal-section {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .legal-section h3 {
    font-size: 22px;
  }
}
/* PRODUCTO INDIVIDUAL */
.producto-individual {
  padding: 18px 40px 60px;
  background-color: #ffffff;
}

.producto-container {
  max-width: 1040px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(320px, 1fr);
  gap: 48px;
  align-items: start;
}

/* IMAGEN */
.producto-img {
  max-width: 390px;
}

.producto-img-principal {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.producto-img img {
  width: 100%;
  max-width: 360px;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  margin: 0;
}

.producto-info {
  padding-top: 4px;
}

.producto-acciones {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.producto-etiquetas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

/* INFO */
.producto-info h2 {
  font-size: 28px;
  margin-bottom: 15px;
  font-weight: 400;
}

.producto-info p {
  font-size: 20px;
  margin-bottom: 20px;
  color: #333;
}

.precio-producto .precio-antiguo,
.precio-producto .precio-nuevo {
  font-size: 20px;
}

.producto-reciente-lista {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 14px 18px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f0e6da;
  color: #5a483c;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.producto-descripcion {
  font-size: 16px;
  line-height: 1.7;
  color: #5f5148;
}

.producto-capacidades {
  display: flex;
  align-items: flex-end;
  gap: 44px;
  margin: 0 0 28px;
}

.producto-capacidades[hidden] {
  display: none;
}

.producto-capacidades button {
  min-width: 92px;
  padding: 0 16px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #151515;
  cursor: pointer;
  font-size: 28px;
  font-weight: 300;
  line-height: 1.1;
  text-align: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.producto-capacidades button:hover,
.producto-capacidades button.activo {
  border-bottom-color: #333333;
  color: #000000;
}

.relacionados {
  padding: 0 40px 50px;
}

.relacionados > h3 {
  text-align: center;
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 30px;
}

.relacionados .grid-productos {
  max-width: 1200px;
  margin: 0 auto;
}

.relacionado-item h3 {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
  padding: 0 14px;
  overflow-wrap: anywhere;
}

.producto-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(62, 42, 31, 0.75);
  color: white;
  cursor: pointer;
  z-index: 2;
}

.producto-flecha-prev {
  left: 14px;
}

.producto-flecha-next {
  right: 14px;
}

/* BOTÓN */
.btn-comprar {
  background-color: #3e2a1f;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.btn-comprar:hover {
  background-color: #5a3d2c;
}

.disponibilidad-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(34, 23, 16, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  z-index: 2200;
}

.disponibilidad-backdrop[hidden] {
  display: none;
}

.disponibilidad-modal {
  position: relative;
  width: min(640px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  background:
    radial-gradient(circle at top left, rgba(201, 168, 124, 0.2), transparent 34%),
    linear-gradient(180deg, #fffaf6 0%, #f7f1eb 100%);
  color: #3e2a1f;
  border-radius: 28px;
  border: 1px solid rgba(101, 75, 57, 0.12);
  box-shadow: 0 28px 60px rgba(30, 21, 15, 0.28);
  padding: 26px;
}

.disponibilidad-cerrar {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(62, 42, 31, 0.08);
  color: #3e2a1f;
  cursor: pointer;
  font-size: 18px;
}

.disponibilidad-cerrar:hover {
  background: rgba(62, 42, 31, 0.14);
}

.disponibilidad-estado {
  display: grid;
  gap: 14px;
  text-align: center;
  margin-bottom: 24px;
  padding: 12px 10px 0;
}

.disponibilidad-estado h3 {
  font-size: 28px;
  font-weight: 400;
}

.disponibilidad-icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin: 0 auto;
  border-radius: 50%;
  font-size: 42px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.disponibilidad-icono.disponible {
  background: rgba(30, 127, 86, 0.14);
  color: #1e7f56;
}

.disponibilidad-icono.no-disponible {
  background: rgba(179, 58, 47, 0.14);
  color: #b33a2f;
}

.disponibilidad-estado-principal {
  font-size: 22px;
  font-weight: 600;
  color: #3e2a1f;
}

.disponibilidad-estado-secundario {
  font-size: 15px;
  line-height: 1.6;
  color: #6a5b50;
}

.disponibilidad-estado-actualizacion {
  font-size: 13px;
  color: #8a7b71;
}

.disponibilidad-contenido {
  display: grid;
  gap: 18px;
}

.disponibilidad-mensaje {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(101, 75, 57, 0.1);
  border-radius: 22px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 18px 36px rgba(62, 42, 31, 0.08);
}

.disponibilidad-mensaje p {
  color: #5b4a40;
  font-size: 15px;
  line-height: 1.7;
}

.disponibilidad-frase-animada {
  display: inline-block;
  margin-top: 10px;
  color: #3e2a1f;
  font-weight: 600;
  animation: disponibilidad-latido 2.8s ease-in-out infinite;
}

.disponibilidad-mapa {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(101, 75, 57, 0.1);
  border-radius: 24px;
  padding: 12px;
  box-shadow: 0 20px 40px rgba(62, 42, 31, 0.08);
}

.disponibilidad-mapa iframe {
  width: 100%;
  height: 250px;
  border: 0;
  border-radius: 18px;
}

.disponibilidad-mapa[data-mapa-externo] {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #fffaf6 0%, #f1e8df 100%);
}

.mapa-placeholder-modal {
  min-height: 250px;
  padding: 24px;
}

@keyframes disponibilidad-latido {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.88;
  }

  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

.btn-favorito-producto {
  border: 1px solid #d8c5b5;
  background: #fff7f1;
  color: #7f3c32;
  padding: 12px 18px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-favorito-producto:hover {
  transform: translateY(-1px);
  background: #fcefe7;
}

.btn-favorito-producto.activo {
  background: #fff1f1;
  border-color: #d8a4a1;
}

.btn-favorito-producto i {
  color: #b33a2f;
}

/* RESPONSIVE PRODUCTO */
@media (max-width: 768px) {
  .producto-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .producto-img {
    max-width: 100%;
    margin: 0 auto;
  }

  .producto-img img {
    max-width: 100%;
  }

  .producto-info {
    padding-top: 0;
  }

  .producto-etiquetas {
    justify-content: center;
  }

  .producto-acciones {
    justify-content: center;
  }

  .producto-capacidades {
    justify-content: center;
    gap: 18px;
    margin-bottom: 24px;
  }

  .producto-capacidades button {
    min-width: 76px;
    padding: 0 10px 10px;
    font-size: 22px;
  }

  .disponibilidad-backdrop {
    padding: 16px;
  }

  .disponibilidad-modal {
    width: min(100vw - 32px, 640px);
    padding: 22px 18px 18px;
    border-radius: 22px;
  }

  .disponibilidad-estado h3 {
    font-size: 24px;
  }

  .disponibilidad-estado-principal {
    font-size: 19px;
  }

  .disponibilidad-mapa iframe {
    height: 220px;
  }

  .relacionados {
    padding: 0 16px 40px;
  }
}

/* CONTADOR HORARIO (EN HEADER ARRIBA CENTRADO) */
.contador {
  font-size: 13px;
  font-weight: bold;
  padding: 5px 12px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contador-link:hover .contador {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* ABIERTO */
.contador.abierto {
  background-color: rgba(0, 128, 0, 0.25);
  color: #d4ffd4;
  border: 1px solid rgba(0, 128, 0, 0.4);
}

.contador.cerrado {
  background-color: rgba(120, 18, 18, 0.25);
  color: #ffe0e0;
  border: 1px solid rgba(120, 18, 18, 0.4);
}

.miniaturas {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.miniaturas img {
  width: 74px;
  height: 92px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: border-color 0.2s, transform 0.2s, opacity 0.2s;
}

.miniaturas img:hover,
.miniaturas img.activa {
  border-color: #3e2a1f;
  transform: translateY(-2px);
}

.estado-vacio {
  grid-column: 1 / -1;
  text-align: center;
  padding: 28px 24px;
  border: 1px dashed #c9b7a5;
  border-radius: 16px;
  background: #fffaf6;
  color: #5f5148;
}

/* AJUSTES FINALES HEADER RESPONSIVE */
@media (max-width: 1380px) {
  .header.buscador-activo h1 {
    display: none;
  }
}

@media (max-width: 1210px) {
  .header h1 {
    display: none;
  }

  .header-brand {
    gap: 12px;
  }

  .brand-link {
    gap: 0;
  }

  .contador-link {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    margin-left: 6px;
    margin-right: auto;
    z-index: 3;
  }

  .header.buscador-activo .contador-link {
    left: auto;
    transform: none;
  }
}

@media (max-width: 1020px) {
  body {
    padding-top: var(--header-height-compact);
  }

  .header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    min-height: var(--header-height-compact);
  }

  .hero {
    min-height: calc(100vh - var(--header-height-compact));
  }

  .header-brand {
    flex: 0 1 auto;
    min-width: 0;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .brand-link {
    min-width: 0;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .header-panel {
    order: 3;
    margin-left: auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
  }

  .menu-toggle {
    display: inline-flex;
    order: 5;
    margin-left: 0;
    flex: 0 0 auto;
    z-index: 5;
  }

  .header > .favoritos-menu {
    order: 4;
    flex: 0 0 auto;
  }

  .contador-link {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    margin: 0;
    flex: 0 0 auto;
    z-index: 3;
  }

  .contador {
    max-width: none;
    min-width: 0;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
  }

  .header nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 14px;
    width: min(300px, calc(100vw - 28px));
    padding: 18px;
    background: linear-gradient(180deg, rgba(68, 46, 34, 0.98) 0%, rgba(50, 33, 24, 0.98) 100%);
    border: 1px solid rgba(224, 190, 144, 0.18);
    border-radius: 28px;
    box-shadow: 0 28px 60px rgba(24, 15, 10, 0.32);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 6;
  }

  .header.menu-abierto nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .header nav ul {
    flex-direction: column;
    gap: 12px;
  }

  .header nav a {
    display: block;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  }

  .header-tools {
    width: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
  }

  .redes {
    gap: 8px;
    flex-wrap: nowrap;
  }

  .redes a {
    font-size: 16px;
  }

  .favoritos-menu {
    width: auto;
  }

  .favoritos-toggle {
    min-height: 46px;
    padding: 8px 14px;
  }

  .favoritos-panel {
    position: absolute;
    right: 0;
    width: min(320px, calc(100vw - 28px));
    max-width: min(320px, calc(100vw - 28px));
    margin-top: 12px;
  }

  .buscador-header {
    width: 46px;
    justify-content: flex-end;
  }

  .buscador-toggle {
    width: 46px;
    min-width: 46px;
    flex: 0 0 46px;
    gap: 0;
    border-radius: 50%;
  }

  .buscador-cerrar {
    border-radius: 50%;
  }

  .buscador-header.abierto {
    width: clamp(180px, 22vw, 230px);
  }

  .buscador-header.abierto .buscador-campo {
    width: clamp(180px, 22vw, 230px);
  }

  .buscador-resultados {
    left: auto;
    right: 0;
    width: min(320px, calc(100vw - 28px));
  }
}

@media (max-width: 640px) {
  .header {
    gap: 8px;
    padding: 10px;
    min-height: var(--header-height-compact);
  }

  .header-brand {
    flex: 1 1 auto;
    gap: 8px;
    min-width: 0;
    margin-right: auto;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .redes {
    gap: 1px;
  }

  .redes a {
    font-size: 16px;
    min-width: 25px;
    min-height: 25px;
  }

  .contador-link {
    flex: 1 1 160px;
    min-width: 0;
    max-width: 220px;
    margin-right: auto;
  }

  .contador {
    width: auto;
    max-width: 100%;
    padding: 6px 8px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 10px;
    left: auto;
    width: min(240px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    display: none;
    gap: 12px;
    padding: 14px;
    margin-left: 0;
    background: linear-gradient(180deg, rgba(68, 46, 34, 0.98) 0%, rgba(50, 33, 24, 0.98) 100%);
    border: 1px solid rgba(224, 190, 144, 0.18);
    border-radius: 24px;
    box-shadow: 0 24px 50px rgba(24, 15, 10, 0.28);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 6;
  }

  .header.menu-abierto .header-panel {
    display: grid;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .header nav {
    position: static;
    width: 100%;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .header nav ul {
    gap: 10px;
  }

  .header nav a {
    padding: 12px 14px;
    font-size: 14px;
  }

  .header-tools {
    order: -1;
    width: 100%;
    display: block;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .header-tools .buscador-header {
    width: 100%;
    justify-content: stretch;
  }

  .header-tools .buscador-toggle {
    display: none;
  }

  .header-tools .buscador-cerrar {
    border-radius: 50%;
    background: transparent;
    pointer-events: none;
    transform: none;
  }

  .header-tools .buscador-cerrar:hover {
    background: transparent;
    transform: none;
  }

  .header-tools .buscador-cerrar i {
    display: none;
  }

  .header-tools .buscador-cerrar::before {
    content: "\f002";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 16px;
  }

  .header-tools .buscador-campo {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
    height: 52px;
    opacity: 1;
    pointer-events: auto;
    gap: 8px;
    padding: 0 10px 0 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  }

  .header-tools .buscador-header.abierto {
    width: 100%;
  }

  .header-tools .buscador-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 18px;
    height: 18px;
    cursor: pointer;
    background:
      linear-gradient(45deg, transparent 43%, #ffffff 43%, #ffffff 57%, transparent 57%),
      linear-gradient(-45deg, transparent 43%, #ffffff 43%, #ffffff 57%, transparent 57%);
    opacity: 0.92;
  }

  .header-tools .buscador-header.abierto .buscador-campo {
    width: 100%;
  }

  .header-tools .buscador-resultados {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .header-tools .buscador-item {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px;
  }

  .header-tools .buscador-item-texto strong {
    font-size: 13px;
    line-height: 1.28;
  }

  .header-tools .buscador-item-texto small {
    font-size: 12px;
  }

  .header.buscador-activo .header-panel {
    gap: 0;
  }

  .header.buscador-activo nav {
    display: none;
  }

  .header > .favoritos-menu {
    order: 4;
    margin-left: auto;
  }

  .favoritos-toggle {
    min-width: 68px;
    min-height: 46px;
    padding: 8px 14px;
    gap: 6px;
    font-size: 13px;
  }

  .favoritos-panel {
    right: -10px;
    width: min(300px, calc(100vw - 20px));
    max-width: min(300px, calc(100vw - 20px));
  }

  .menu-toggle {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    flex: 0 0 auto;
  }

  .contacto {
    padding: 36px 14px 14px;
  }

  .info-contacto {
    padding: 16px;
  }

  .contacto-mapa-link {
    display: inline-flex;
    width: 100%;
    margin: 2px 0 16px;
  }

  .mapa {
    display: flex;
    min-height: 300px;
  }

  .mapa iframe {
    display: block;
    height: 300px;
  }
}

@media (max-width: 768px) {
  .footer {
    display: block;
    height: auto;
    margin-top: 12px;
    overflow: hidden;
  }

  .footer-superior {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    max-width: 100%;
    gap: 18px;
    padding: 20px 16px 18px;
  }

  .footer-brand,
  .footer-copy {
    display: none !important;
  }

  .footer-brand + .footer-columna {
    display: none !important;
  }

  .footer-columna {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 10px;
    text-align: left;
  }

  .footer-columna + .footer-columna {
    margin-top: 0;
  }

  .footer-columna h3,
  .footer-columna p,
  .footer-columna a,
  .footer-columna span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .footer-nav-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    gap: 10px;
  }

  .footer-nav-grid a[href*="#Contacto"] {
    display: none;
  }
}

@media (max-width: 660px) {
  .contador-link {
    display: none !important;
  }

  .contador-hero-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
