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

:root {
  --color-primario: #E5C100;
  --color-secundario: #333333;
  --color-fondo: #f9f9f9;
  --color-texto: #ffffff;
  --color-background: #000000;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: #222;
  background-color: #f9f9f9;
  font-size: 16px;
  line-height: 1.6;
}

.topbar {
  background-color: var(--color-background);
  padding: 1%;
  font-size: 13.5px;
  color: var(--color-texto);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-bottom: 1px solid #ddd;
  flex-wrap: wrap;
  padding-right: 200px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 25px;
}

.topbar-left span {
  display: flex;
  align-items: center;
  color: var(--color-texto);
}

.topbar-left svg {
  margin-right: 6px;
  flex-shrink: 0;
  fill: var(--color-texto);
  width: 24px;
  height: 24px;
}

.topbar a {
  color: var(--color-texto);
  text-decoration: none;
  margin-left: 4px;
}

.topbar-right a {
  margin-left: 12px;
  display: inline-flex;
  align-items: center;
}

.topbar-right img {
  width: 18px;
  height: 18px;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.topbar-right img:hover {
  filter: grayscale(0%);
}

.idiomas {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 14px;
}

.idioma {
  text-decoration: none;
  color: var(--color-texto);
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.1rem 60px;
  background-color: #ffffff;
  border-bottom: 1px solid #e6e6e6;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo img {
  height: 100px;
  max-width: 100%;
}

#menu {
  padding: 0;
  font-family: sans-serif;
}

#menu ul {
  list-style: none;
  margin-top: 1px;
  padding: 0;
}

#menu > ul > li {
  display: inline-block;
  position: relative;
}

#menu li a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
}

#menu li:hover > a {
  background-color: #ddd;
}

#menu li ul {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 220px;
  z-index: 1000;
}

#menu li:hover ul {
  display: block;
}

#menu li ul li {
  display: block;
}

#menu li ul li a {
  padding: 10px 14px;
  font-weight: normal;
}

#menu-toggle {
  display: none;
  font-size: 30px;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  padding: 10px;
  z-index: 1001;
}

main section {
  position: relative;
  width: 100%;
  max-width: 100%; 
}

main section figure {
  margin: 0;
}

main section figure img {
  width: 100%;
  height: auto;
  display: block;
}

section article.prim {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50%;
  height: 50%;
  background: rgba(255, 255, 255, 0.7);
  padding: 1rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.prim h2, .prim p, .ter h2, .ter p {
  text-align: center;
}

.prim h2, .ter h2 {
  font-size: 2rem;
  text-transform: uppercase;
}

.prim p, .ter p {
  font-size: 1.2rem;
}

.seg {
  display: flex;
  width: 100vw;
  height: 50vh;
}

.seg article {
  width: 50%;
}

.seg article figure {
  margin: 0;
  width: 100%;
  height: 100%;
}

.seg article img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ter {
  display: flex;
  flex-direction: column;
  justify-content: center;     
  align-items: center;       
  height: 100%;                
  padding: 2rem;
  text-align: center;         
}

.reviews-section {
  display: flex;
  gap: 2rem;
  max-width: 900px;  
  margin: 30px auto;
  align-items: stretch; 
}

#contenedor-comercios {
  overflow-x: auto; 
  white-space: nowrap; 
  scroll-behavior: smooth; 
}

.reviews-carousel {
  flex: 1 1 auto;
  background: #fff;
  padding: 1rem 2rem;
  border-radius: 8px;
  box-sizing: border-box;
  max-height: 350px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.directorio-comercios {
  overflow-x: auto;   
  overflow-y: hidden; 
  width: 100%;
  max-width: 1200px;
}

.filtros-comercios {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2rem;
}

.filtro-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
}

.filtro-btn.active, .filtro-btn:hover {
  background: #E5C100;
  color: #0A1F44;
  border-color: #E5C100;
}

.imagen-con-cards {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2rem 1rem;
}

.imagen-fondo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.imagen-fondo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
}

.directorio-comercios {
  overflow-x: auto;   
  overflow-y: hidden;
  width: 100%;
  max-width: 1200px;
}

.grid-comercios {
  display: flex;
  gap: 1rem;
  overflow-x: scroll; 
  overflow-y: hidden;
  flex-wrap: nowrap;
  scroll-behavior: smooth;
  scrollbar-width: auto;
  scrollbar-color: #E5C100 #f1f1f1;
}

.grid-comercios::-webkit-scrollbar {
  height: 12px;
}

.grid-comercios::-webkit-scrollbar {
  height: 8px
}

.grid-comercios::-webkit-scrollbar-track {
  background: transparent;
}

.grid-comercios::-webkit-scrollbar-thumb {
  background-color: #E5C100;
  border-radius: 4px;
}

.grid-comercios::-webkit-scrollbar-thumb:hover {
  background-color: #c4a600;
}

.comercio-link {
  flex: 0 0 calc((100% - 3rem) / 4); 
  margin-right: 1rem;
  text-decoration: none;
}

.comercio-card {
  flex: 0 0 calc((100% - 3rem) / 4); 
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center; 
  text-align: center;
  min-width: 250px; 
}

.comercio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.comercio-card:hover .etiqueta-local {
  opacity: 1;
}

.comercio-imagen {
  position: relative;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  overflow: hidden;
  width: 100%;
  margin-right: 0%;
}

.comercio-imagen img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto; 
  position: relative;
  transition: transform 0.3s ease;
  z-index: 0;
  padding-left: 15px;
}

.etiqueta-local {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: #E5C100;
  color: #0A1F44;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.comercio-info {
  width: 100%;
  padding: 1.5rem;
  background: #ffffff66;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-direction: column;
}

.comercio-info h3 {
  color: #1b248d;
  margin-bottom: 0.5rem;
  text-align: center;
  display: inline-block; 
  width: auto; 
  margin-left: auto;  
  margin-right: auto;  
}

.comercio-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.comercio-meta address.direccion {
  display: block;
  width: 100%;
  font-style: normal; 
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comercio-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.estrellas {
  color: #f00;
  letter-spacing: 2px;
}

.valoracion {
  font-size: 0.9rem;
  color: #1b248d99;
}

.cta-comercio {
  background: #f5f5f5;
  padding: 3rem 1rem;
  text-align: center;
  border-radius: 10px;
  margin-top: 3rem;
}

.cta-comercio h2 {
  color: #0A1F44;
  margin-bottom: 1rem;
}

.cta-button {
  display: inline-block;
  background: #E5C100;
  color: #0A1F44;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  margin-top: 1.5rem;
  transition: all 0.3s;
}

.cta-button:hover {
  background: #0A1F44;
  color: white;
  transform: translateY(-3px);
}

.review-card {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.review-card.active {
  display: flex;
}

.review-card p {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.review-card h4 {
  margin: 0 0 0.4rem 0;
  font-weight: 600;
}

.stars {
  font-size: 1.4rem;
  color: #ffc107;
}

.prev-btn,
.next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #333;
  user-select: none;
  padding: 0 0.5rem;
}

.prev-btn {
  left: 0.5rem;
}

.next-btn {
  right: 0.5rem;
}

.reviews-summary {
  flex: 0 0 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  box-sizing: border-box;
  background: #fff;
  max-height: 450px; 
  border-radius: 4px;
}

.review-logo {
  max-height: 100px;
  width: auto;
  display: block;
}

.rating-overview h3 {
  margin: 0.2rem 0;
  font-size: 2rem;
  text-align: center;
}

.rating-overview p {
  margin: 0 0 0.6rem 0;
  font-size: 1rem;
  color: #555;
  text-align: center;
}

.stars-large {
  font-size: 1.6rem;
  color: #ffc107; 
  text-align: center;
}

#contenedor-comercios {
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  scrollbar-width: thin; 
  scrollbar-color: #E5C100 transparent; 
  padding-bottom: 16px; 
}

#contenedor-comercios::-webkit-scrollbar {
  height: 8px; 
}

#contenedor-comercios::-webkit-scrollbar-track {
  background: transparent; 
}

#contenedor-comercios::-webkit-scrollbar-thumb {
  background-color: #E5C100; 
  border-radius: 4px;
  transition: background-color 0.3s;
}

#contenedor-comercios::-webkit-scrollbar-thumb:hover {
  background-color: #c4a600;
}

.write-review-btn {
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  border: none;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  border-radius: 6px;
  width: 100%;
  max-width: 220px;
  transition: background-color 0.3s ease;
}

.write-review-btn:hover {
  background-color: #d4941f;
}

#cookieBanner, .cookie-banner {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 20px;
  text-align: center;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 10px;
}

.cookie-banner a {
  color: #E5C100;
  text-decoration: underline;
}

.cookie-banner button {
  background-color: #E5C100;
  color: #111;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 5px;
}

.cookie-banner button:hover {
  background-color: #ffd700;
}

#cookieBanner {
  opacity: 1;
  transition: opacity 0.5s ease;
}

#cookieBanner.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.footer-info {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 3rem 10vw;
  background-color: #f3f3f3;
  color: #222;
  border-top: 1px solid #ddd;
}

.footer-column {
  flex: 1 1 calc(33.333% - 2rem); 
  min-width: 250px;
  box-sizing: border-box;
}

.footer-column h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #000;
  text-transform: uppercase;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: 0.6rem;
}

.footer-column a {
  text-decoration: none;
  color: #444;
  transition: color 0.3s;
}

.footer-column a:hover {
  color: #007bff;
}

footer {
  background-color: var(--color-background);
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
  color: var(--color-texto);
  border-top: 1px solid #ddd;
}

.boton-whatsapp {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 999;
  display: inline-block;
  width: 105px;
  height: 105px;
  background-color: transparent;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.boton-whatsapp:hover {
  transform: scale(1.1);
}

.boton-whatsapp img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}

@media (max-width: 1350px) {
  #menu-toggle {
    display: block;
    position: absolute;
    top: 10px;
    right: 15px;
  }

  #menu {
    display: none;
    flex-direction: column;
    background-color: #fff;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }

  #menu.active {
    display: flex;
  }

  #menu ul {
    flex-direction: column;
  }

  #menu > ul > li {
    display: block;
    text-align: center;
    border-bottom: 1px solid #eee;
  }

  #menu li ul {
    position: static;
    background-color: #f1f1f1;
  }

  #menu li:hover ul {
    display: block;
  }
}

@media screen and (max-width: 1024px) {
  section article.prim {
    position: relative;
    width: 100%;
    height: auto;
    padding: 2rem;
  }

  .seg {
    flex-direction: column;
    height: auto;
  }

  .seg article {
    width: 100%;
    height: auto;
  }

  .seg article figure,
  .seg article img {
    height: auto;
  }

  .ter {
    padding: 1.5rem;
  }

  .reviews-section {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 1.5rem;
  }

  .reviews-summary {
    width: 100%;
    max-width: 600px;
  }

  .reviews-carousel {
    width: 100%;
    max-width: 600px;
  }

  .prev-btn,
  .next-btn {
    font-size: 1.5rem;
  }

  .grid-comercios {
    gap: 0.8rem;
  }

  .comercio-link,
  .comercio-card {
    flex: 0 0 calc((100% - 1.6rem) / 2);
}


@media (max-width: 768px) {
  body {
    font-size: 15px;
    padding: 0;
    margin: 0;
    text-align: center;
  }

  .topbar {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
    text-align: center;
  }

  .topbar-left, .topbar-right {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 5px 0;
  }

  .topbar-left {
    flex-direction: column;
    gap: 10px;
  }

  .topbar-left span {
    justify-content: center;
  }

  .idiomas {
    justify-content: center;
    flex-wrap: wrap;
    font-size: 13px;
  }

  header {
    flex-direction: column;
    padding: 0.5rem 20px;
    gap: 10px;
    text-align: center;
  }

  .logo img {
    height: auto;
    max-width: 180px;
  }

  .menu ul {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
  }

 .prim h2, .ter h2 {
    font-size: 1.4rem;
  }

  .prim p, .ter p {
    font-size: 1rem;
  }

  .seg {
    padding: 1rem 0;
  }

  .reviews-summary {
    padding: 1rem;
  }

  .write-review-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  .grid-comercios {
    flex-wrap: wrap; 
    justify-content: center;
  }

  .comercio-link,
  .comercio-card {
    flex: 0 0 100%; 
    margin-right: 0;
  }

  .comercio-imagen {
    height: 180px;
    padding-left: 2px;
}
  }

  .comercio-info {
    padding: 1rem;
  }

  .comercio-info h3 {
    font-size: 1.2rem;
  }

  .comercio-meta {
    flex-direction: column;
    gap: 0.3rem;
  }

  .etiqueta-local {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }


  .review-card p {
    font-size: 1rem;
  }

  .stars, .stars-large {
    font-size: 1.2rem;
  }

  .prev-btn,
  .next-btn {
    top: auto;
    bottom: -2rem;
    transform: none;
  }

  .footer-info {
    flex-direction: column;
    padding: 2rem 5vw;
  }

  .footer-column {
    flex: 1 1 100%;
  }

  .footer-column:not(:last-child) {
    margin-bottom: 2rem;
  }
}
