/* Estilos del Contador */
.alert-bar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
    /* Debe estar por encima del navbar */
    /* Altura fija para que el navbar pueda posicionarse debajo en escritorio */
    overflow: hidden;
    /* Asegura que el contenido interno no se salga */
}

.alert-bar-gradient {
    width: 100%;
    height: 100%;
    /* Ocupa el 100% de la altura de .alert-bar-wrapper */
    background: linear-gradient(to bottom, #e58b34, #f7ca46);
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-content-container {
    width: 100%;
    max-width: 1300px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 60px;
    box-sizing: border-box;
    color: white;
}

.alert-text {
    font-weight: 750;
    max-width: 45%;
    font-family: 'Arial', sans-serif;
}

.alert-text p {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
}

.alert-text strong {
    font-size: 24px;
    font-weight: 700;
}

.countdown-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.countdown {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.countdown div {
    background-color: #648d00;
    color: #ffca01;
    text-align: center;
    border-radius: 5px;
    font-weight: bold;
    box-sizing: border-box;
    width: 70px;
    /* Ancho fijo para escritorio */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
}

.countdown span#days,
.countdown span#hours,
.countdown span#minutes,
.countdown span#seconds {
    font-family: 'Tallica', sans-serif;
    font-size: 26px;
    letter-spacing: 0.9px;
    display: block;
}

.countdown .label {
    display: block;
    font-size: 10px;
    font-weight: 400;
    font-family: 'Arial', sans-serif;
    letter-spacing: 0.7px;
    margin-top: 0;
}

.alert-button {
    background-color: black;
    color: rgb(255, 200, 0);
    border: 1px solid black;
    padding: 8px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s;
    text-decoration: none;
}

.alert-button:hover {
    box-shadow: 0 0 5px black;
}

/* Estilo general del Navbar */
.custom-navbar {
    background-color: #648d00;
    padding: 0;
    position: fixed;
    /* Asegura que el navbar sea fijo */
    top: 85px;
    /* Valor inicial, JS lo ajustará */
    width: 100%;
    z-index: 1040;
    /* Ligeramente menor que el contador para que este quede encima */
    height: 90px;
    /* Altura fija para escritorio */
}

.navbar-container {
    padding: 40px 60px;
}

.navbar-logo-container {
    display: flex;
    align-items: center;
    height: 60px;
    max-width: 200px;
}

.navbar-logo {
    width: auto;
    height: 100%;
    margin-right: 15px;
    position: relative;
    padding: 8px 10px;
}

.navbar-brand {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffca01;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: #f18500;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

/* Enlaces del navbar */
.nav-link {
    font-family: 'Arial', sans-serif;
    font-size: 1rem;
    color: #ffca01;
    margin-right: 15px;
    text-transform: capitalize;
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-link:hover {
    color: #f18500;
    transform: scale(1.05);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-offer-mobile,
.btn-offer {
    background-color: black;
    color: white;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 10px 24px;
    border-radius: 5px;
    text-transform: uppercase;
    margin: auto;
    text-decoration: none;
}

.btn-offer-mobile {
    display: none;
}

.btn-offer {
    display: inline-block;
}

@media(max-width: 493px) {

    /* Contador */
    .alert-content-container {
        padding: 10px;
    }

    .alert-text strong {
        font-size: 15px;
    }

    .alert-text p {
        font-size: 11px;
    }

    .countdown div {
        width: 50px;
        padding-top: 2px;
        padding-bottom: 2px;
    }

    .countdown span#days,
    .countdown span#hours,
    .countdown span#minutes,
    .countdown span#seconds {
        font-size: 20px;
    }

    .countdown .label {
        font-size: 10px;
    }

    .alert-button {
        padding: 6px 18px;
        font-size: 12px;
    }

    /* Navbar */
    .custom-navbar {
        height: auto;
        /* Se ajusta a su contenido */
        top: auto;
        /* JS lo posicionará dinámicamente */
        position: fixed;
        /* Asegura que el navbar sea fijo */
        width: 100%;

        z-index: 1040;
    }

    .navbar-container {
        padding: 0;
        flex-wrap: wrap;
    }

    .navbar-logo-container {
        max-width: 150px;
        height: 50px;
    }

    .btn-offer-mobile {
        display: inline-block;
        margin-right: 10px;
    }

    .btn-offer {
        display: none;
    }
}

@media(max-width: 992px) {

    /* Contador */
    .alert-content-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 10px 20px;
        height: auto;
    }

    .alert-text {
        max-width: 100%;
    }

    /* Aseguramos que la barra del contador tenga una altura mínima en móviles */
    .alert-bar-wrapper {
        height: auto;
        /* Permite que el contenido determine la altura */
        min-height: 85px;
        /* Pero asegúrate de que no se haga demasiado pequeño */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1050;
    }

    .alert-bar-gradient {
        height: 100%;
        /* Ocupa el 100% de la altura de .alert-bar-wrapper */
    }

    .countdown-container {
        align-items: center;
    }

    .countdown div {
        width: 60px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .countdown span#days,
    .countdown span#hours,
    .countdown span#minutes,
    .countdown span#seconds {
        font-family: 'Tallica', sans-serif;
        font-size: 28px;
        margin-bottom: 1px;
    }

    .countdown .label {
        font-size: 9px;
        margin-top: 0px;
    }

    .alert-text strong {
        font-size: 16px;
    }

    .alert-text p {
        font-size: 12px;
    }

    /* Navbar */
    .custom-navbar {
        height: auto;
        /* Se ajusta a su contenido */
        top: auto;
        /* JS lo posicionará dinámicamente */
        position: fixed;
        /* Asegura que el navbar sea fijo */
        width: 100%;

        z-index: 1040;
    }

    .navbar-container {
        padding: 0;
        flex-wrap: wrap;
    }

    .navbar-logo-container {
        max-width: 150px;
        height: 50px;
    }

    .btn-offer-mobile {
        display: inline-block;
        margin-right: 10px;
    }

    .btn-offer {
        display: none;
    }

    /* Para el menú desplegable de Bootstrap en móvil */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #648d00;
        z-index: 1000;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        /* Importante: Ajustar max-height para que quepa en el viewport debajo del contador y navbar */
        /* calc(100vh - (altura contador + altura navbar)) */
        max-height: calc(100vh - var(--fixed-header-height));
        /* Usaremos una variable CSS si es posible, o JS */
        overflow-y: auto;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    .nav-item {
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 10px 0;
        display: block;
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        border: none;
        box-shadow: none;
        padding: 0;
        margin-top: 0;
        background-color: inherit;
        width: 100%;
    }

    .dropdown-item {
        /* ELIMINAR O AJUSTAR ESTAS PROPIEDADES PARA CENTRAR */
        padding-left: 0;
        /* Eliminar el padding a la izquierda para que no empuje el texto */
        text-align: center;
        /* Cambiar a center para alinear el texto al centro */
        color: #ffca01;
        display: block;
        /* Asegurarse de que sea un bloque para que text-align funcione correctamente */
        padding: 10px 0;
    }

    .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #f18500;
    }
}