body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: white;
    background: black; /* color de respaldo */
}

/* Detecta soporte WebP */
@supports (background-image: url("../img/azpea/fondo_azpea.webp")) {
    body {
        background-image:
            linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
            url("../img/azpea/fondo_azpea.webp");
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        overflow-x: hidden; /* En caso extremo, para prevenir scroll horizontal */
    }
}

/* Fallback para navegadores sin WebP */
body.no-webp {
    background-image:
        linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
        url("../img/azpea/fondo_azpea.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow-x: hidden; /* En caso extremo, para prevenir scroll horizontal */
}

/* GENERAL BARRA */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px;
    background-color: #222;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.navbar .logo {
    height: 60px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.navbar .logo a img {
    height: 100px;
    width: auto;
    object-fit: contain;
}

/* Menú navegación */
.menu-central {
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .menu-central ul {
        flex-wrap: wrap; /* Permite que el menú se acomode mejor */
        justify-content: center;
    }
}

nav ul {
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin: 0 5px;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    padding: 10px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: #5A1E29;
    border-radius: 5px;
}

/* CARRITO */
.carrito_logo {
    position: absolute;
    right: 60px;
    width: 38px;
    height: 38px;
    cursor: pointer;
}

.navbar .carrito_logo a img {
    height: 38px;
    width: auto;
}

.contador-carrito {
    position: absolute;
    top: -16px;
    right: -9px;
    background-color: #5A1E29;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    padding: 4px 6px;
    min-width: 18px;
    text-align: center;
}

/* Cambio visual al hacer scroll */
.navbar.scrolled {
    background-color: #3a3a3a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

/* Menú hamburguesa */
.menu-toggle {
    display: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
}
/* IDIOMAS */
.language-switch a {
    text-decoration: none;
    color: #bbb;
    font-weight: bold;
    margin: 0 5px;
    transition: color 0.3s ease;
    margin-right: 25px;
}
.language-switch a.active {
    color: white !important;
    font-weight: bold;
}

.language-switch a:first-child {
    margin-right: 2px;
}

.language-switch a:last-child {
    margin-left: 2px;
}

.language-switch a:hover {
    color: #5A1E29;
}

/* Responsive hasta 1100px */
@media (max-width: 1100px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 70px;
        padding: 0 10px;
        background-color: #222;
        z-index: 1000;
    }

/*MENÚ HAMBURGUESA INICIO*/
    .menu-toggle {
        display: block;
        position: absolute;
        left: 10px;
        font-size: 26px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1101;
    }

    nav.menu-central {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    background-color: #222;
    flex-direction: column;
    z-index: 999;
    }

    nav.menu-central.active {
        display: flex;
    }

    nav.menu-central.active ul {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 100px);
    align-items: center;
    padding: 15px 0;
}

nav.menu-central.active ul li {
    margin: 15px 0;
    text-align: center;
    }

nav.menu-central.active ul li a {
    display: block;
    padding: 15px 30px;
    font-size: 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    }

nav.menu-central.active ul li a:hover {
    background-color: #5A1E29;
    color: white;
    box-shadow: 0 4px 8px rgba(90, 30, 41, 0.4);
    }

/*Switch de Idioma*/
.language-switch {
    margin-top: auto;
    padding-top: 20px;
    width: 80%;
    border-top: 1px solid #444;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.language-switch a {
    font-size: 16px !important;
    color: #bbb !important;
    text-decoration: none;
    padding: 10px !important;
}
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        height: 50px;
    }

    .logo a img {
        height: 50px;
        width: auto;
    }

    .carrito_logo {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1101;
    }

    .carrito_logo a img {
        height: 32px;
        width: auto;
    }

    .contador-carrito {
        position: absolute;
        top: -10px;
        right: -10px;
        font-size: 10px;
        padding: 2px 5px;
    }
}

/*BARRA SUPERIOR*/
main {
    padding-top: 4rem;
}
/* RESPONSIVE para el contenido principal */
.container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    width: 90%;
    align-items: center;
    justify-content: center;
    margin: 40px auto;
    gap: 20px;
}

.logo_bodega {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.logo_bodega img {
    width: 200px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 15px; /* Bordes redondeados */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Sombra suave */
    background-color: white; /* Fondo blanco */
    padding: 15px;
}

.texto {
    flex: 2;
    background: rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    text-align: justify;
}

.texto h1 {
    font-size: 2em;
    margin-bottom: 10px;
    text-align: left;
}

p {
    font-size: 1.1em;
}

.etiquetas-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: right;
    flex-wrap: wrap;
    max-width: 100%;
    gap: 10px;
    padding: 0;
    overflow-x: hidden;
}

.etiquetas-container img {
    max-width: 100%;
    height: auto;
    width: 120px;
}

#eurohoja {
    max-width: 100px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Sombra suave */
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
        padding: 20px 0;
    }
    .texto {
        font-size: 1em;
    }

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

    .etiquetas-container img {
        width: 120px;
    }
}

/*CATÁLOGO DE PRODUCTOS*/
.catalogo {
    background-color: #f8f8f8;
    padding: 60px 20px;
    text-align: center;
}

.catalogo h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: #333;
    font-weight: 700;
}

.productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.producto {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.producto img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
    min-height: 200px; /* nuevo */
    justify-content: space-between; /* nuevo */
    height: 100%; /* nuevo */
}

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

.producto h3 {
    font-size: 1.3em;
    font-family: 'Roboto', sans-serif; /* Cambia la tipografía */
    color: #2a2a2a; /* Un tono más oscuro para mayor contraste */
    margin: 20px 0; /* Aumenta el espacio alrededor */
    min-height: 40px; /* Aumenta la altura mínima */
    letter-spacing: 1px; /* Añade un pequeño espacio entre las letras */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); /* Añade una sombra sutil */
}

.producto p {
    font-size: 1.3em;
    color: #333;
    margin: 5px 0;
    min-height: 24px;
}

.producto p a {
    text-decoration: none;
    color: #2f855a;
    font-weight: 600;
    transition: color 0.3s;
}

.producto p a:hover {
    color: #2f855a;
}

.producto button {
    margin-top: 10px;
    padding: 10px 20px;
    font-size: 1em;
    color: #fff;
    background-color: #2f855a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.producto button:hover {
    background-color: #005f6b;
}

.control-cantidad {
    display: flex;
    align-items: center;
    gap: 10px; /* espacio entre el input y el botón */
    margin-top: 10px;
    margin-top: auto; /* nuevo */
}

.control-cantidad button {
    margin-top: 0; /* quitar margen superior para que esté alineado */
}

.inputcantidad {
    width: 40px;
    height: 30px;
    text-align: center;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    height: 36px; /* un poco más alto para igualar el input */
    padding: 0 12px;
    font-size: 16px;
    border: none;
    background-color: #2c7a7b;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #285e61;
}

.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;
}
/*ESTILO MODAL*/
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

.modal-content {
    background: #fff;
    color: #333;
    position: relative;
    margin: 10% auto;
    max-width: 600px;
    padding: 18px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.4;
  }

  .modal-content h3 {
    font-size: 1.4rem;  /* antes 1.8rem */
    margin-bottom: 10px;
    color: #5A1E29; /* color vino */
  }

  .modal-content p {
    font-size: 0.875rem;  /* antes 1rem */
    margin-bottom: 10px;
  }

/* Botón de cerrar (X) */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #444;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.close-btn:hover {
  color: #000;
  cursor: pointer;
}

.btn-detalle {
  background-color: #ffffff;
  color: #000000;
  padding: 0.75rem 1.25rem;
  border: 2px solid #000000;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-detalle:hover {
  background-color: #000000;
  color: #ffffff;
}

.producto .openModalBtn {
  background-color: #ffffff;
  color: #2f855a; /* Verde */
  border: 2px solid #2f855a;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease, transform 0.2s ease;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  display: inline-block;
  margin-bottom: 1rem;
}

.producto .openModalBtn:hover {
  background-color: #2f855a;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.producto .openModalBtn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}


@media (max-width: 480px) {
  .btn-detalle {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
  }
}


/* Adaptación para pantallas pequeñas */
@media screen and (max-width: 480px) {
  .openModalBtn {
    width: 100%;
    font-size: 1rem;
    padding: 1rem;
  }
}


@media screen and (max-width: 480px) {
  .modal-content {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .close-btn {
    font-size: 2rem;
    top: 8px;
    right: 10px;
  }
}


/* RESPONSIVE del catálogo */
@media (max-width: 480px) {
    .producto p {
        font-size: 1em;
    }

    .producto button {
        font-size: 0.9em;
        padding: 8px 16px;
    }

    .producto img {
        max-height: 180px;
    }
}

/*FOOTER*/
footer {
    background-color: #5A1E29;
    color: #D4AF37;
    padding: 10px;
    margin-top: 0px;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 14.5px;
}
footer a {
    color: #fff; /* Un color oscuro para mejorar el contraste */
    text-decoration: underline; /* Subrayado */
}