/* Importar CSS de FontAwesome */
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css");

/* Importar fuente Gilroy */
@import url('https://solargentinotv.com.ar/assets/fonts/Gilroy/Gilroy.css');

@font-face {
    font-family: 'GilroyMonoNums';
    src: url('Gilroy Bold MonoNums 2025.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

/* Reset */
* {
    font-family: 'Gilroy';
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#cantidad-visual,
.total {
    font-family: 'GilroyMonoNums';
}

/* Botón agregar carrito */
.agregar-carrito {
    background: #ff7600;
    color: #fff;
    padding: 0.8em 1.2em;
    border: none;
    border-radius: 0.3em;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    z-index: 1;
    margin-top: 1.3em;
    transition: all 0.3s ease-out;
}

.agregar-carrito:hover {
    background: #ffc52f;
    color: #000;
}

html,
body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Asegura que el contenido principal crezca y empuje el footer hacia abajo */
main {
    flex: 1 0 auto;
    /* mantiene el footer al fondo */
}

footer {
    flex-shrink: 0;
}

/* Contenedores */
.container,
.container-footer {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: #fff;
    border-bottom: 3px solid #ff7600;
    padding: 15px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: #ff7600;
    margin-bottom: 10px;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 25px;
    flex-wrap: wrap;
}

nav ul li a {
    color: #ff7600;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: #d75a00;
}

/* Producto */
.producto {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem;
}

.producto-contenido {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    padding: 25px;
    border: 3px solid #ff7600;
    border-radius: 0.3em;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 1200px;
    margin-top: 1.44em;
}

.producto-contenido h2 {
    width: 100%;
    text-align: center;
    color: #ff7600;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    margin-bottom: 15px;
}

.producto-contenido img {
    flex: 1 1 350px;
    border-radius: 0.3em;
    object-fit: contain;
    width: 100%;
    max-width: 485px;
    height: 28.2em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.producto-info {
    flex: 1 1 350px;
    overflow-y: auto;
    padding-right: 10px;
    width: 100%;
    padding-left: 1em;
}

/* Dropdown */
.dropdown {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.dropdown-btn {
    width: 100%;
    max-width: 14.85em;
    background-color: #fff;
    border: 2px solid #ff7600;
    padding: 5px 16px;
    border-radius: 0.3em;
    font-size: 1rem;
    font-weight: 600;
    color: #ff7600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropdown-btn:hover {
    background-color: #ff7600;
    color: #fff;
}

.dropdown-menu {
    position: absolute;
    top: 107%;
    left: 0;
    width: 100%;
    max-width: 14.85em;
    max-height: 12em;
    overflow-y: auto;
    background-color: #fff;
    border: 2px solid #ff7600;
    border-radius: 0.3em;
    display: none;
    z-index: 10;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-menu.active {
    display: block;
}

.dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    color: #ff7600;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.dropdown-item:hover,
.dropdown-item.selected {
    background-color: #ff7600;
    color: #fff;
}

/* Cantidad */
.cantidad-container,
.agregar-carrito-cantidad {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.cantidad-container label {
    font-weight: 700;
    min-width: 80px;
    color: #ff7600;
}

.dropdown-btn:hover .arrow {
    color: white;
}

.cantidad-container button,
.agregar-carrito-cantidad button {
    background-color: #ff7600;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cantidad-container button:hover,
.agregar-carrito-cantidad button:hover {
    background-color: #fff;
    color: #ff7600;
}

/* Visualización cantidad */
#cantidad-visual {
    font-weight: 700;
    font-size: 1.3rem;
    color: #ff7600;
    min-width: 40px;
    text-align: center;
}

/* Total */
.total {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ff7600;
    margin-bottom: 25px;
}

/* Listas y descripción */
h3 {
    color: #ff7600;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

ul {
    margin-left: 20px;
    color: #ff7600;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Footer fijo al final pero responsivo */
footer {
    background-color: #fff;
    color: #ff7600;
    padding: 25px 0;
    text-align: center;
    border-top: 3px solid #ff7600;
    font-weight: 600;

    /* --- ELIMINADO ---
    position: absolute;
    top: 90%;
    */

    width: 100%;
    flex-shrink: 0;
    /* evita que el footer se colapse */
}

/* Scrollbars */
.producto-info::-webkit-scrollbar,
.dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.producto-info::-webkit-scrollbar-thumb,
.dropdown-menu::-webkit-scrollbar-thumb {
    background-color: #ff7600;
}

@-moz-document url-prefix() {

    .producto-info,
    .dropdown-menu {
        scrollbar-width: thin;
        scrollbar-color: #ff7600 #fff;
    }
}

/* Flecha */
.dropdown-btn .arrow {
    display: inline-block;
    margin-left: 1em;
    transition: transform 0.3s ease;
    font-size: 24px;
}

.dropdown-btn.active .arrow {
    transform: rotate(180deg);
}

#tipo-dropdown {
    display: none;
}

/* --- RESPONSIVIDAD --- */
@media (max-width: 1024px) {
    .producto-contenido {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }

    .producto-info {
        width: 100%;
        max-height: none;
    }
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .agregar-carrito-cantidad {
        flex-direction: row;
        /* ← lo importante */
        justify-content: center;
        align-items: center;
        gap: 10px;
    }

    .agregar-carrito-cantidad button {
        width: auto;
        /* evita que ocupen todo el ancho */
    }

    .dropdown-btn {
        width: 100%;
    }

    .producto-contenido {
        align-items: center;
    }

    .producto-contenido img {
        flex: none;
        /* evita que el flexbox altere su tamaño */
        width: auto;
        /* que se ajuste proporcionalmente */
        height: 19em !important;
        /* ← tu altura custom (ajustá libremente) */
        max-height: none;
        /* elimina límites heredados */
        object-fit: contain;
        box-shadow: none;
        display: block;
        margin: 0 auto;
        /* centrado horizontal */
        background: #000;
        margin-left: -0.0em;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
    }

    .producto-contenido {
        padding: 15px;
    }

    .producto-contenido h2 {
        font-size: 1.3rem;
    }

    .dropdown-btn {
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    .total {
        font-size: 1.1rem;
    }

    .agregar-carrito {
        width: 100%;
        text-align: center;
    }

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

    /* 🔧 Ajuste para nav */
    nav ul {
        display: flex;
        flex-direction: row;
        /* ← aquí el cambio clave */
        flex-wrap: nowrap;
        align-items: center;
        gap: 15px;
        margin-top: 0em;
        margin-bottom: 0em;
    }

    nav li {
        display: inline-block;
        margin: 0 5px;
    }
}

@media (max-width: 768px) {
    .producto-info {
        overflow-y: visible;
        /* elimina el scroll */
        max-height: none;
        /* permite que crezca naturalmente */
        width: 19.7em;
    }
}

@media (min-width: 1025px) {
    .producto-contenido {
        min-height: 59vh;
        /* ocupa el 80% del alto de la pantalla */
    }
}

@media (max-width: 768px) {
    footer {
        position: relative;
        display: block !important;
        bottom: -2em;
    }
}

@media (max-width: 768px) {
    header {
        position: relative;
    }
}

/* Todos los items: borde inferior */
.checkout-item {
    border-bottom: 1px solid #ff7600;
}

/* El primero mantiene siempre borde superior */
.checkout-item:first-child {
    border-top: 1px solid #ff7600;
}

/* El item anterior al hover pierde border-bottom */
.checkout-item:hover.prev {
    border-bottom: none;
}

/* El item en hover gana borde superior */
.checkout-item:hover {
    border-top: 1px solid #ff7600;
    color: #fff
}