@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

/* ==========================================================================
   1. ESTILOS GERAIS E BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif !important;
}

body {
    background-color: #f0f0f0;
    height: 100vh;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif !important;
}

.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-color: #f5f5f5;
    overflow: hidden;
}

/* ==========================================================================
   2. SIDEBAR (DESKTOP)
   ========================================================================== */
.sidebar {
    width: 22%;
    min-width: 210px;
    max-width: 260px;
    background-color: #9c7558;
    height: 100vh;
    padding: 2.2vw 1.6vw;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6vw;
    margin-bottom: 2vw;
    padding-left: 0.4vw;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    width: 2vw;
    min-width: 24px;
    max-width: 32px;
    height: auto;
    object-fit: contain;
}

.logo-text {
    font-family: 'Montserrat', sans-serif !important;
    font-size: clamp(15px, 1.4vw, 22px);
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 0.4vw;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.8vw;
    padding: 0.7vw 0.9vw;
    border-radius: 20px;
    font-size: clamp(12px, 1vw, 15px);
    color: #2c2c2c;
    text-decoration: none;
    transition: background-color 0.2s;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 400;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.menu-item.active {
    background-color: #ffffff;
    font-weight: 700 !important;
    border-radius: 20px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.menu-icon {
    width: 1.3vw;
    min-width: 16px;
    max-width: 20px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* ==========================================================================
   3. ÁREA PRINCIPAL (DESKTOP)
   ========================================================================== */
.main {
    flex: 1;
    padding: clamp(16px, 2.5vw, 32px) clamp(16px, 3vw, 40px);
    background-color: #f8f4f0;
    overflow-y: auto;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(20px, 2.5vw, 36px);
    gap: 1.5vw;
}

.greeting {
    font-family: 'Montserrat', sans-serif !important;
    font-size: clamp(18px, 2vw, 26px);
    font-weight: 700;
    color: #3a2a1f;
    white-space: nowrap;
}

.search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 30px;
    padding: 0.7vw 1.4vw;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.search-icon {
    width: clamp(14px, 1.1vw, 16px);
    height: auto;
    margin-right: 0.6vw;
    opacity: 0.5;
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: clamp(12px, 1vw, 14px);
    background: transparent;
    color: #555;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500;
}

.search-box input::placeholder {
    color: #999;
    font-family: 'Montserrat', sans-serif !important;
}

.profile-pic {
    width: clamp(34px, 3vw, 42px);
    height: clamp(34px, 3vw, 42px);
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(12px, 1.8vw, 24px);
}

.product-card {
    background: #ffffff;
    border-radius: 18px;
    padding: clamp(12px, 1.5vw, 20px);
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-image {
    position: relative;
    margin-bottom: 0.9vw;
    height: clamp(110px, 12vw, 160px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 90%;
    max-height: 95%;
    object-fit: contain;
}

.badges {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.badge {
    background: #f5e6d3;
    color: #8b5e3c;
    font-size: clamp(8px, 0.7vw, 10px);
    font-weight: 700;
    font-family: 'Montserrat', sans-serif !important;
    padding: 2px 6px;
    border-radius: 20px;
    white-space: nowrap;
}

.product-name {
    font-family: 'Montserrat', sans-serif !important;
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-price {
    font-family: 'Montserrat', sans-serif !important;
    font-size: clamp(14px, 1.2vw, 17px);
    font-weight: 800;
    color: #8b5e3c;
}

/* ==========================================================================
   4. RESPONSIVIDADE (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body, html {
        overflow: auto;
    }

    .app-container {
        height: 100vh;
        overflow: hidden;
    }

    /* Sidebar Padronizada (Mesmo layout do perfil do funcionário) */
    .sidebar {
        width: 120px;
        min-width: 120px;
        padding: 15px 0;
        gap: 20px;
        align-items: flex-start;
        flex-shrink: 0;
    }

    .logo {
        padding: 0 10px;
        margin-bottom: 0;
        gap: 6px;
    }

    .logo-img {
        width: 18px;
        min-width: 18px;
    }

    .logo-text {
        font-size: 11px;
    }

    .menu {
        padding: 0 6px;
        gap: 6px;
        width: 100%;
    }

    .menu-item {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 8px;
        gap: 8px;
        border-radius: 10px;
    }

    .menu-item.active {
        border-radius: 12px;
    }

    .menu-icon {
        width: 16px;
        min-width: 16px;
    }

    .menu-item span {
        display: inline-block;
        font-size: 10px;
        font-weight: 600;
        white-space: nowrap;
    }

    /* Área Principal adaptada para mobile */
    .main {
        flex: 1;
        width: calc(100vw - 120px);
        padding: 15px 12px 30px 12px;
        overflow-y: auto !important;
    }

    .header {
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 20px;
    }

    .greeting {
        font-size: 16px;
    }

    .search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
        padding: 8px 12px;
    }

    .search-icon {
        width: 14px;
    }

    .search-box input {
        font-size: 12px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .product-card {
        padding: 14px;
    }

    .product-image {
        height: 120px;
    }
}