html,
body {
    margin: 0;
    height: 100%;
}

/* --- HEADER Y NAVEGACIÓN --- */
header {
    background: #111;
    padding: 0.5em 1em;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
    justify-content: center;
    height: 130px;
    max-height: 130px;
}

.logo-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 0.5em;
}

.logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 0;
}

a {
    text-decoration: none;
}

.titulo {
    color: #ceae61;
    font-size: 1.5em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    text-align: center;
}

nav {
    display: flex;
    gap: 1.5em;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    padding: 0.3em 0.5em;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:hover,
nav a.active {
    color: #ceae61;
    font-weight: bold;
    border-bottom: 2px solid #ceae61;
}

@media (max-width: 768px) {
    header {
        padding: 0.3em;
    }

    .logo {
        width: 50px;
        height: 50px;
    }

    .titulo {
        font-size: 1.3em;
    }

    nav {
        gap: 1em;
    }

    nav a {
        font-size: 1em;
        padding: 0.2em 0.3em;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 40px;
        height: 40px;
    }

    .titulo {
        font-size: 1.2em;
    }

    nav {
        gap: 0.5em;
    }

    nav a {
        font-size: 0.9em;
        padding: 0.2em;
    }
}

/* --- ESTILOS BASE Y CARTA DE VINOS --- */
html {
    font-size: 18px;
    background: #000;
    box-sizing: border-box;
    height: 100%;
    /* Asegura que el html ocupe toda la altura */
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background: #000;
    margin: 0;
    padding: 0;
    color: #fff;
    line-height: 1.6;
    padding-top: 130px;
    /* Ajustado para la altura del header fijo */
    min-height: 100vh;
    /* Asegura que el body ocupe al menos la altura de la ventana */
}

.carta-container {
    max-width: 900px;
    width: 100vw;
    margin: 2.5em auto;
    background: #111;
    border-radius: 1.2em;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.25);
    padding: 2.5em 2vw 2em 2vw;
    border: none;
}

@media (max-width: 950px) {
    .carta-container {
        max-width: 100vw;
        border-radius: 0;
    }
}

h1 {
    text-align: center;
    color: #fff;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 2.2em;
    margin-bottom: 1.2em;
    letter-spacing: 1px;
    font-weight: 700;
}

.filtros-toggle-btn {
    display: block;
    margin: 0 auto 1.5em auto;
    background: #111;
    color: #fff;
    border: 2px solid #ceae61;
    border-radius: 0.7em;
    padding: 0.7em 2em;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(206, 174, 97, 0.10);
    transition: background 0.2s, color 0.2s;
    filter: drop-shadow(0 0 10px rgba(206, 174, 97, 0.3));
    transition: transform 0.3s ease;
}


.filtros-toggle-btn:hover,
.filtros-toggle-btn:focus {
    background: #ceae61;
    color: #000;
    outline: none;
}

.filtros-panel {
    display: none;
    background: #181818;
    border-radius: 1em;
    box-shadow: 0 2px 8px rgba(206, 174, 97, 0.10);
    padding: 1.5em 1.2em 1em 1.2em;
    margin-bottom: 2em;
    max-width: 35em;
    margin-left: auto;
    margin-right: auto;
    font-size: 1em;
}

.filtros-panel label {
    font-weight: 700;
    color: #ceae61;
    margin-right: 0.7em;
}

.filtros-panel input[type="text"],
.filtros-panel select {
    font-family: 'Roboto', Arial, sans-serif;
    padding: 0.5em 0.7em;
    border-radius: 0.5em;
    border: 1px solid #ceae61;
    background: #111;
    color: #fff;
    margin-right: 1em;
    margin-bottom: 0.7em;
    font-size: 1em;
    min-width: 7em;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    margin-bottom: 1em;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.2em;
}

.slider-labels span {
    font-size: 1em;
    color: #ceae61;
    font-weight: 700;
}

#slider-precio {
    margin: 2.5em auto 1.5em auto;
    max-width: 23em;
    min-width: 15em;
    background: #222;
    border-radius: 1em;
}

.slider-values {
    display: none;
}

.filtro-region {
    margin-bottom: 1em;
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    align-items: center;
    justify-content: center;
}

#borrarFiltros {
    background: #bd6f0f;
    color: #000;
    border: none;
    border-radius: 0.5em;
    padding: 0.7em 1.5em;
    font-weight: 700;
    font-size: 0.8em;
    cursor: pointer;
    margin-top: 0.7em;
    display: flex;
    align-items: center;
    gap: 0.6em;
    box-shadow: 0 2px 8px rgba(206, 174, 97, 0.10);
    transition: background 0.2s, color 0.2s;
}

#borrarFiltros:hover,
#borrarFiltros:focus {
    background: #fff;
    color: #000;
    outline: none;
}

#borrarFiltros svg {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
}

.categoria {
    margin-bottom: 2em;
    background: #181818;
    border-radius: 1em;
    box-shadow: 0 2px 8px rgba(206, 174, 97, 0.08);
    padding: 0.3em;
    transition: margin-bottom 0.2s;
}

.categoria.collapsed {
    margin-bottom: 0 !important;
}

.categoria h2 {
    background: #181818;
    color: #fff;
    padding: 1em 1.5em;
    border-radius: 1em 1em 0 0;
    cursor: pointer;
    margin: 0;
    font-size: 1.1em;
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: none;
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid #222;
}

.categoria h2:hover,
.categoria h2:focus {
    background: #222;
    color: #ceae61;
    outline: none;
}

.categoria h2::after {
    content: '▼';
    font-size: 1em;
    color: #ceae61;
    transition: transform 0.3s;
}

.categoria h2.collapsed::after {
    transform: rotate(-90deg);
}

.regiones {
    margin-left: 0;
    padding: 0 1em 0 1em;
    transition: all 0.3s ease-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.regiones.expanded {
    max-height: none;
    opacity: 1;
    padding: 1em;
    overflow: visible;
}

.region {
    margin-top: 0.5em;
    background: #222;
    border-radius: 0.7em;
    transition: margin-bottom 0.2s;
}

.region.collapsed {
    margin-bottom: 0 !important;
}

.region h3 {
    color: #ceae61;
    margin: 0;
    font-size: 1em;
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #222;
    border-radius: 0.7em 0.7em 0 0;
    padding: 0.7em 1.2em;
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid #181818;
}

.region h3:hover,
.region h3:focus {
    background: #181818;
    color: #ceae61;
    outline: none;
}

.region h3::after {
    content: '▼';
    font-size: 0.9em;
    color: #ceae61;
    transition: transform 0.3s;
}

.region h3.collapsed::after {
    transform: rotate(-90deg);
}

.vinos-list {
    margin-left: 0;
    transition: all 0.3s ease-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.vinos-list.expanded {
    max-height: none;
    opacity: 1;
    padding: 0.5em;
    overflow: visible;
}

.logo-container a img {
    filter: drop-shadow(0 0 10px rgba(206, 174, 97, 0.3));
    transition: transform 0.3s ease;
}

.logo-container a img:hover {
    transform: scale(1.1);
}

.vino {
    padding: 1.1em 1em 1.1em 1em;
    border-bottom: 1.5px solid #ceae61;
    display: flex;
    flex-direction: column;
    gap: 0.3em;
    border-radius: 0.5em;
    margin-bottom: 0.3em;
    font-size: 1.15em;
    transition: background 0.2s;
}

.vino:last-child {
    border-bottom: none;
}

.vino:hover,
.vino:focus {
    background: #191919;
    outline: 1.5px solid #ceae61;
}

.vino-nombre {
    font-weight: 700;
    color: #fff;
    font-size: 1.18em;
    letter-spacing: 0.5px;
}

.vino-precio {
    color: #ceae61;
    font-weight: 700;
    font-size: 1.18em;
    margin-left: auto;
}

.vino-detalle {
    font-size: 0.8em;
    font-style: italic;
    color: #eee;
    margin-top: 0.2em;
}

.categoria h2,
.region h3,
.filtros-toggle-btn,
#borrarFiltros {
    min-height: 2.2em;
}

.noUi-target {
    background: #222;
    border-radius: 1em;
    border: 1px solid #ceae61;
    box-shadow: none;
}

.noUi-connect {
    background: #ceae61;
}

.noUi-handle {
    background: #ceae61;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(206, 174, 97, 0.15);
}

.noUi-handle:after,
.noUi-handle:before {
    background: #fff;
}

.noUi-tooltip {
    background: #ceae61;
    color: #000;
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 700;
    border-radius: 0.5em;
    border: none;
}

@media (max-width: 900px) {
    html {
        font-size: 17px;
    }

    .carta-container {
        padding: 1.2em 1vw;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    .carta-container {
        padding: 0.5em 0.5vw;
        border-radius: 0;
    }

    h1 {
        font-size: 1.2em;
    }

    .categoria h2 {
        font-size: 1.3em;
        padding: 0.7em 0.5em;
    }

    .region h3 {
        font-size: 1.05em;
        padding: 0.6em 0.5em;
    }

    .vino-nombre,
    .vino-precio {
        font-size: 1.1em;
    }

    .filtros-panel {
        font-size: 1.05em;
    }
}

@media (max-width: 400px) {
    html {
        font-size: 15px;
    }
}

.carta-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.categoria h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.producto {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.producto.destacado {
    border: 2px solid var(--accent-color);
    position: relative;
}

.producto.destacado::before {
    content: '⭐';
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--accent-color);
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.producto h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.precio {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.descripcion {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

.back-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

.back-btn:hover {
    background-color: #34495e;
}

/* Responsive Design */
@media (max-width: 768px) {
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .productos-grid {
        grid-template-columns: 1fr;
    }

    .producto {
        padding: 1rem;
    }
}

.hidden-by-filter {
    display: none !important;
}