:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fff7ed;
    --brand-gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --secondary: #0f172a; 
    --whatsapp: #25d366;
    --food: #fbbf24;
    --bg: #f8fafc; 
    --text: #0f172a;
    --text-muted: #64748b;
    --radius: 12px;
    --radius-lg: 24px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-deep: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --glass: rgba(255, 255, 255, 0.7);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; letter-spacing: 0; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
body { background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
img, video, iframe { max-width: 100%; }

/* Responsive Grid System */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .stats-grid { grid-template-columns: 1fr; } }

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr; }
    .main-wrapper { padding: 20px !important; }
}

.card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid #f1f5f9;
}

/* Dashboard Sidebar Premium - Apenas para o painel */
.seller-sidebar {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: var(--brand-gradient);
    box-shadow: 0 12px 30px rgba(234, 88, 12, 0.22);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Painel - sem fundo no título */
.page-header {
    background: transparent !important;
    background-color: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 1000 !important;
    box-shadow: none !important;
    margin-bottom: 28px;
}

.main-wrapper {
    margin-left: 220px !important;
    width: calc(100% - 220px) !important;
    min-height: 100vh !important;
    background: #f8fafc !important;
    padding: 30px !important;
    transition: none !important;
}

@media (max-width: 992px) {
    .main-wrapper { margin-left: 0 !important; width: 100% !important; padding: 20px !important; }
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    min-height: 48px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.logo img {
    display: block;
    max-width: 210px;
    max-height: 42px;
    object-fit: contain;
}

.logo-fallback {
    display: none;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.search-bar input {
    width: 100%;
    padding: 13px 16px 13px 46px;
    border: 0;
    background: white;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    z-index: 10;
}

.site-nav,
.user-menu {
    display: flex;
    align-items: center;
    gap: 18px;
    white-space: nowrap;
}

.cart-link,
.account-link,
.login-link,
.logout-link {
    color: white;
    text-decoration: none;
    font-weight: 700;
}

.cart-link {
    position: relative;
    font-size: 1.2rem;
    line-height: 1;
}

.cart-count {
    position: absolute;
    top: -9px;
    right: -13px;
    background: #0f172a;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 999px;
}

.account-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-link {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.sell-link {
    padding: 9px 22px;
    color: var(--primary);
    font-size: 0.9rem;
    border-radius: 10px;
}

@media (max-width: 900px) {
    .site-header {
        padding: 14px 0;
    }

    .nav-content {
        flex-wrap: wrap;
        gap: 14px;
    }

    .search-bar {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .site-nav {
        margin-left: auto;
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 12px 0 16px;
    }

    .nav-content {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 14px;
    }

    .logo {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .site-nav,
    .user-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        white-space: normal;
        margin-left: 0;
    }

    .search-bar {
        order: 3;
        width: min(100%, 600px);
        max-width: 600px;
        flex-basis: auto;
    }
}

@media (max-width: 520px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .site-header {
        position: relative;
        padding: 10px 0;
    }

    .nav-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        min-height: 0;
    }

    .logo {
        font-size: 1.25rem;
        justify-content: center;
        width: 100%;
        overflow-wrap: anywhere;
        text-align: center;
    }

    .logo img {
        max-width: 170px;
        max-height: 36px;
    }

    .site-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px 12px;
        white-space: normal;
        font-size: .86rem;
    }

    .user-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px 12px;
        white-space: normal;
    }

    .account-link {
        max-width: 170px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sell-link {
        padding: 8px 12px;
    }

    .search-bar {
        order: 2;
        min-width: 0;
        border-radius: 10px;
    }

    .main-wrapper {
        padding: 14px !important;
    }

    .card {
        padding: 16px;
        border-radius: 14px;
    }
}

/* Categorias Círculos */
.categories-tray {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
}

.cat-circle {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 8px;
}

/* Grid de Produtos - Travado em 4 por linha */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #f1f5f9;
}

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

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.product-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

.price-tag {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    white-space: nowrap; /* Impede que o R$ quebre de linha */
}

.card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 12px;
}

.price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

/* Botões */
.btn {
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.btn-primary { background: var(--secondary); color: white; }
.btn-whatsapp { background: var(--whatsapp); color: white; }
.btn-white { background: white; color: var(--primary); }

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--whatsapp);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Modern Drag and Drop Upload Area */
.upload-zone {
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fdfdfd;
    cursor: pointer;
    position: relative;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-zone i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    opacity: 0.7;
}

.upload-zone p {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.upload-preview {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    margin: 20px auto 0;
    display: none; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
