/* Media queries unificados para todos los tamaños de pantalla */
@media (min-width: 769px) {
    .logo img {
        height: 120px !important;
        max-height: none !important;
        width: auto;
        transition: transform 0.3s ease;
    }
}

@media (max-width: 992px) {
    .main-image {
        max-width: 80%;
    }
    
    .product-grid > div {
        width: calc(33.33% - 20px);
    }
    
    footer {
        padding: 15px 4%;
        width: 92%;
    }
    
    .footer-column {
        width: 48%;
    }
    
    .footer-column:last-child {
        width: 100%;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    /* Menú hamburguesa */
    .hamburger {
        display: flex;
    }
    
    .nav-container {
        width: 100%;
        position: relative;
        z-index: 250;
        margin-bottom: 0;
    }
    
    nav {
        border-radius: 0;
        padding: 0;
        margin-bottom: 0;
    }
    
    nav ul {
        flex-direction: column;
        opacity: 1;
        padding: 0;
        margin: 0;
    }
    
    nav ul.active {
        max-height: 1000px;
        opacity: 1;
    }
    
    nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
        opacity: 1;
    }
    
    nav ul.active li {
        transform: translateY(0);
        opacity: 1;
        transition-delay: 0.1s;
    }
    
    nav ul.active li:nth-child(2) {
        transition-delay: 0.15s;
    }
    
    nav ul.active li:nth-child(3) {
        transition-delay: 0.2s;
    }
    
    nav ul.active li:nth-child(4) {
        transition-delay: 0.25s;
    }
    
    nav ul.active li:nth-child(5) {
        transition-delay: 0.3s;
    }
    
    nav ul li a {
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: block;
    }
    
    /* Menú desplegable */
    .dropdown-menu {
        position: static;
        transform: none !important;
        box-shadow: none;
        width: 100%;
        opacity: 1;
        visibility: visible;
        display: block;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.4s ease-in-out;
        border-top: none;
        padding: 0;
        margin: 0;
        border-radius: 0;
        background-color: #00558a;
    }
    
    .dropdown-menu::before {
        display: none;
    }
    
    .dropdown-menu.active {
        max-height: 500px;
        padding: 5px 0;
    }
    
    .dropdown-menu li {
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .dropdown-menu li a {
        color: white;
        padding: 12px 30px;
        text-align: left;
        background-color: rgba(0, 0, 0, 0.1);
    }
    
    .dropdown-menu li a:hover {
        background-color: rgba(0, 0, 0, 0.2);
        color: #cce5ff;
    }
    
    .dropdown-toggle.active::after {
        content: '-' !important;
    }
    
    nav ul li .dropdown-toggle::after {
        content: '+';
        font-size: 18px;
        margin-left: 5px;
        transition: transform 0.3s ease;
    }
    
    nav ul li .dropdown-toggle.active::after {
        content: '-';
        transform: none;
    }
    
    /* Ajustes de contenido con menú activo */
    #main-menu.active ~ .main-content,
    #main-menu.active ~ .slider-container {
        margin-top: 15px;
    }
    
    .main-content, .slider-container {
        transition: margin-top 0.5s ease-in-out;
    }
    
    #main-menu {
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
        background-color: #0066a4;
        z-index: 300;
    }
    
    .search-bar {
        width: 60%;
    }
    
    /* Slider responsive */
    .slider-container {
        width: 92%;
        height: auto;
        z-index: 40;
        flex-direction: column;
    }
    
    .thumbnail-container {
        flex-direction: row;
        width: 100%;
        max-height: none;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px 0;
        margin: 10px 0;
        justify-content: center;
    }
    
    .thumbnail-container img {
        width: 70px;
        height: 70px;
        object-fit: contain;
        margin: 0 5px;
    }
    
    .main-image {
        max-width: 90%;
        margin: 15px auto;
        order: -1;
    }
    
    .nav-button {
        display: none;
    }
    
    .slide-button {
        bottom: 15px;
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .arrow-left {
        left: 10px;
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
        border-right: 16px solid rgba(0, 102, 164, 0.8);
    }
    
    .arrow-right {
        right: 10px;
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
        border-left: 16px solid rgba(0, 102, 164, 0.8);
    }
    
    #main-menu.active {
        max-height: 2000px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }
    
    .product-grid > div {
        width: calc(50% - 20px);
    }
    
    /* Footer en móvil */
    footer {
        flex-direction: column;
        padding: 15px 5%;
    }
    
    .footer-column {
        width: 100%;
        margin-bottom: 25px;
        align-items: center;
    }
    
    .footer-section {
        border-left: none;
        border-top: 2px solid #0066a4;
        padding-left: 0;
        padding-top: 15px;
        width: 100%;
        text-align: center;
    }
    
    .footer-logo {
        max-width: 220px;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-button img {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .slider-container {
        width: 90%;
        height: auto;
    }
    
    header {
        flex-wrap: wrap;
    }
    
    .logo {
        order: 1;
        width: 70%;
    }
    
    .hamburger {
        order: 2;
        width: 20%;
    }
    
    .search-bar {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    
    #main-menu.active ~ .main-content,
    #main-menu.active ~ .slider-container {
        margin-top: 20px;
    }
    
    .main-image {
        max-width: 100%;
    }
    
    .thumbnail-container img {
        width: 60px;
        height: 60px;
    }
    
    .thumbnail-container {
        justify-content: flex-start;
    }
    
    .product-grid > div {
        width: 100%;
    }
    
    .product-title {
        font-size: 22px;
    }
    
    /* Footer en móviles pequeños */
    .footer-logo {
        max-width: 180px;
    }
    
    .footer-title {
        font-size: 14px;
    }
    
    .footer-links li,
    .contact-info {
        font-size: 13px;
        margin-bottom: 6px;
    }
}