﻿/* ==================== MOBILE RESPONSIVENESS ==================== */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #f2ede8;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 1024px) {
    .container {
        width: 95%;
    }

    .header__inner {
        gap: 20px;
    }

    .header__search-form {
        flex: 1;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        order: 1;
    }

    .header__inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 15px;
    }

    /* Primeira linha: Menu | Logo | Ícones */
    .header__logo {
        order: 2;
        flex: 1;
        display: flex;
        justify-content: center;
    }

    .header__logo img {
        height: 40px;
    }

    /* Ícones de ação - ficam à direita */
    .header__user-actions {
        order: 3;
        display: flex;
        gap: 18px;
        margin-left: 0;
    }

    .header__user-actions span {
        display: none;
    }

    .header__user-actions a {
        font-size: 22px;
        color: #f2ede8;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
    }

    /* Barra de busca - segunda linha */
    .header__search-form {
        order: 5;
        width: 100%;
        max-width: 100%;
        margin-top: 5px;
    }

    .category-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: rgba(75, 46, 43, 0.95);
        backdrop-filter: blur(10px);
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        border-top-right-radius: 20px;
        border-bottom-right-radius: 20px;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3);
    }

    .category-nav.active {
        left: 0;
    }

    .category-nav .container {
        width: 100%;
        padding: 20px;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-item {
        border-bottom: 1px solid rgba(242, 237, 232, 0.1);
    }

    .nav-item>a {
        display: block;
        padding: 15px 10px;
        width: 100%;
    }

    /* Dropdown com altura dinâmica */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        background-color: rgba(242, 237, 232, 0.05);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    /* Altura máxima MUITO ALTA para acomodar qualquer quantidade */
    .nav-item.active .dropdown-menu {
        max-height: 2000px !important;
        overflow: visible !important;
    }

    .dropdown-menu .container {
        padding: 10px 0;
    }

    /* FORÇA DROPDOWNS VERTICAIS - SUPER ESPECÍFICO */
    .category-nav .dropdown-content,
    .category-nav .dropdown-content-horizontal,
    .nav-item .dropdown-content,
    .nav-item .dropdown-content-horizontal {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        grid-template-columns: none !important;
        column-count: 1 !important;
        gap: 0 !important;
        padding: 10px 20px !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }

    .category-nav .dropdown-content a,
    .category-nav .dropdown-content-horizontal a,
    .nav-item .dropdown-content a,
    .nav-item .dropdown-content-horizontal a {
        display: block !important;
        float: none !important;
        padding: 12px 0 !important;
        font-size: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important;
        text-align: left !important;
        border-bottom: 1px solid rgba(242, 237, 232, 0.05);
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .mobile-overlay.active {
        display: block;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .product-carousel-section {
        padding-top: 20px !important;
        margin-top: 0 !important;
    }

    .section-title {
        margin-top: 0 !important;
        margin-bottom: 15px !important;
    }

    .footer-main .container {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    .footer-about {
        max-width: 100%;
    }

    .static-page .container {
        padding: 30px 20px;
    }

    .static-page h1 {
        font-size: 2rem;
    }

    .static-page h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .header__logo img {
        height: 35px;
    }

    .product-grid {
        grid-template-columns: 1fr !important;
    }

    .hero-slider {
        min-height: 250px;
    }

    .static-page .container {
        padding: 20px 15px;
    }
}

/* Copyright no menu mobile */
@media (max-width: 768px) {
    .mobile-menu-footer {
        display: block;
        padding: 30px 20px 20px;
        text-align: center;
        border-top: 1px solid rgba(242, 237, 232, 0.1);
        margin-top: 20px;
    }

    .mobile-menu-footer p {
        color: rgba(242, 237, 232, 0.6);
        font-size: 12px;
        margin: 0;
        font-weight: 300;
    }
}

/* ==================== PÁGINA DE PRODUTO RESPONSIVO ==================== */

/* Telas médias (notebooks, tablets landscape) */
@media (max-width: 1200px) {
    .product-main-content {
        grid-template-columns: 200px 1fr 300px;
        padding: 0 30px;
        gap: 15px;
    }

    .main-image-frame img {
        max-width: 400px;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .product-main-content {
        grid-template-columns: 1fr 1fr;
        padding: 0 20px;
    }

    .col-left-info {
        display: none;
        /* Esconde coluna esquerda em tablets */
    }

    .main-image-frame img {
        max-width: 100%;
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .product-main-content {
        display: flex;
        flex-direction: column;
        padding: 15px;
        gap: 20px;
    }

    .col-left-info {
        display: none;
    }

    .col-center-image {
        order: 1;
        width: 100%;
    }

    .col-right-buy {
        order: 2;
        width: 100%;
    }

    .product-gallery {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .gallery-thumbnails {
        flex-direction: row;
        justify-content: center;
    }

    .gallery-thumbnails .thumb-img {
        width: 60px;
        height: 60px;
    }

    .main-image-frame img {
        max-width: 100%;
        width: 100%;
        height: auto;
    }

    .product-title {
        font-size: 22px;
    }

    .current-price {
        font-size: 24px;
    }

    .buy-actions {
        flex-direction: column;
        gap: 10px;
    }

    .buy-actions form {
        flex-direction: column;
        width: 100%;
    }

    .btn-buy-black {
        width: 100%;
    }

    .product-extra-info {
        padding: 15px;
    }
}