/* Fonte carregada via <link> no header.php para melhor performance */

:root {
    /* 
       LIGHT MODE DEFAULT 
       Paleta de Cores claras cristalinas, mas mantendo a identidade Profissional e Elegante
    */
    --bg-color: #f7f7f9;
    --surface-color: rgba(255, 255, 255, 0.7);
    --surface-border: rgba(0, 0, 0, 0.08);

    --primary: #e60023;
    /* Electric Red */
    --secondary: #8e24aa;
    /* Neon Purple */

    --text-main: #100f1a;
    --text-muted: #5e5c6b;
    --text-title-gradient-start: #111111;
    --text-title-gradient-end: #333333;

    --success: #00ba61;
    --danger: #e60023;

    --glass-blur: 24px;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);

    --glass-border-light: rgba(255, 255, 255, 0.8);
    --card-img-bg: #e0e0e0;
    --btn-text-color: #fff;
}

[data-theme="dark"] {
    /* 
       DARK MODE 
       Meticulous Deep Dark Palette 
    */
    --bg-color: #030305;
    --surface-color: rgba(20, 15, 25, 0.4);
    --surface-border: rgba(255, 255, 255, 0.05);

    --text-main: #ffffff;
    --text-muted: #8e8d99;
    --text-title-gradient-start: #ffffff;
    --text-title-gradient-end: #aaaaaa;

    --success: #0df083;
    --danger: #ff003c;

    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --glass-border-light: rgba(255, 255, 255, 0.15);
    --card-img-bg: #000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(176, 38, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(255, 0, 60, 0.03) 0%, transparent 50%);
    transition: background 0.4s ease, color 0.4s ease;
}

body::before,
body::after {
    content: '';
    position: fixed;
    width: 60vw;
    height: 60vh;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
    animation: orbsDrift 30s infinite alternate ease-in-out;
    pointer-events: none;
}

body::before {
    background: radial-gradient(circle, var(--secondary), transparent 70%);
    top: -20vh;
    left: -20vw;
}

body::after {
    background: radial-gradient(circle, var(--primary), transparent 70%);
    bottom: -20vh;
    right: -20vw;
    animation-delay: -15s;
    opacity: 0.1;
}

@keyframes orbsDrift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(10vw, 5vh) scale(1.2);
    }

    100% {
        transform: translate(-5vw, 15vh) scale(0.9);
    }
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.4s ease;
}

a:hover {
    color: var(--primary);
}

header {
    background: var(--surface-color);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--surface-border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--glass-shadow);
}

.container {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ═══════════════════════════════════════════════ */
/* PÁGINA DE PRODUTOS - Classes dedicadas          */
/* ═══════════════════════════════════════════════ */

/* Carrossel: Os mais procurados */
.produtos-carousel-section {
    margin-bottom: 50px;
    padding: 35px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(142, 36, 170, 0.06);
    position: relative;
    overflow: hidden;
}

.produtos-carousel-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 80% 50%, rgba(142, 36, 170, 0.07) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 10% 50%, rgba(230, 0, 35, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.produtos-carousel-section > * {
    position: relative;
    z-index: 1;
}


.produtos-carousel-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
}

.produtos-section-header {
    margin-bottom: 25px;
}

.produtos-section-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: #ffffff;
}

.produtos-section-header p {
    color: #000000;
    font-size: 0.95rem;
    font-weight: 700;
}

.gradient-text {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Carrossel: mostra 1 item por vez, com slide automático */
.produtos-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    min-height: 280px;
}

.produtos-carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.produtos-carousel-card {
    flex: 0 0 100%;
    min-width: 100%;
}

.produtos-carousel-card .card {
    border-radius: 18px;
    display: flex;
    flex-direction: row !important;
    align-items: stretch;
    min-height: 260px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.produtos-carousel-card .card-img {
    flex: 0 0 45%;
    height: auto !important;
    min-height: 260px;
    border-radius: 18px 0 0 18px;
}

.produtos-carousel-card .card-body {
    flex: 1;
    padding: 30px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
}

.produtos-carousel-card .card-title {
    font-size: 1.5rem !important;
    margin-bottom: 10px !important;
    color: #000000 !important;
}

.produtos-carousel-card .card-price {
    font-size: 1.8rem !important;
    margin-bottom: 15px !important;
    color: #000000 !important;
}

/* Dots do carrossel */
.produtos-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.produtos-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.produtos-carousel-dot.active {
    background: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(230, 0, 35, 0.6);
}

/* Barra de Filtros */
.produtos-filters-section {
    margin-bottom: 35px;
}

.produtos-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    background: var(--surface-color);
    padding: 20px 25px;
    border-radius: 20px;
    border: 1px solid var(--surface-border);
    backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
}

.produtos-filters-search {
    flex: 2;
    min-width: 200px;
}

.produtos-filters-search input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
}

.produtos-filters-selects {
    display: flex;
    gap: 12px;
    flex: 3;
    min-width: 0;
}

.produtos-filters-selects select {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
}

/* Grid de Produtos - 4 colunas no desktop */
.produtos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.produtos-grid .card {
    border-radius: 18px;
}

.produtos-grid .card-img {
    height: 200px;
}

.produtos-grid .card-body {
    padding: 18px;
}

.produtos-grid .card-title {
    font-size: 1.05rem;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.produtos-grid .card-desc {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.produtos-grid .card-price {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.produtos-grid .card-add-cart {
    width: 40px;
    height: 40px;
    bottom: 12px;
    right: 12px;
}

/* Badge de desconto */
.badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 3;
}

/* Preço promocional */
.card-price-promo {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
}

.card-price-promo .price-old {
    font-size: 0.8rem;
    text-decoration: line-through;
    color: var(--danger);
    font-weight: 600;
}

.card-price-promo .price-new {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--success);
}

/* Responsivo: Produtos */
@media (max-width: 1100px) {
    .produtos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .produtos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .produtos-grid .card-img {
        height: 170px;
    }

    .produtos-grid .card-body {
        padding: 14px;
    }

    .produtos-grid .card-title {
        font-size: 0.95rem;
    }

    .produtos-grid .card-desc {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }

    .produtos-grid .card-price {
        font-size: 1.15rem;
    }

    .produtos-carousel-card .card {
        flex-direction: column !important;
        min-height: auto;
    }

    .produtos-carousel-card .card-img {
        flex: none;
        height: 200px !important;
        min-height: 200px;
        border-radius: 18px 18px 0 0;
    }

    .produtos-carousel-card .card-body {
        padding: 20px !important;
    }

    .produtos-carousel-card .card-title {
        font-size: 1.2rem !important;
    }

    .produtos-carousel-card .card-price {
        font-size: 1.4rem !important;
    }

    .produtos-filters {
        flex-direction: column;
    }

    .produtos-filters-search {
        width: 100%;
    }

    .produtos-filters-selects {
        width: 100%;
        flex-direction: column;
    }

    .produtos-filters-selects select {
        width: 100%;
    }

    .produtos-carousel-section {
        padding: 25px 20px;
        margin-bottom: 30px;
    }

    .produtos-section-header h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .produtos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .produtos-grid .card-img {
        height: 140px;
    }

    .produtos-grid .card-body {
        padding: 12px;
    }

    .produtos-grid .card-title {
        font-size: 0.85rem;
    }

    .produtos-grid .card-price {
        font-size: 1rem;
    }

    .produtos-grid .card-add-cart {
        width: 34px;
        height: 34px;
        bottom: 8px;
        right: 8px;
    }

    .produtos-carousel-card .card-img {
        height: 170px !important;
        min-height: 170px;
    }

    .produtos-carousel-card .card-title {
        font-size: 1.1rem !important;
    }

    .produtos-carousel-card .card-price {
        font-size: 1.2rem !important;
    }
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-title-gradient-start), var(--secondary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--text-main);
}

.btn {
    position: relative;
    background: linear-gradient(135deg, var(--primary), #e10029);
    /* Slightly brighter red/vibrant */
    color: var(--btn-text-color) !important;
    padding: 10px 24px;
    /* Botões mais compactos */
    border-radius: 50px;
    border: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 8px 25px rgba(230, 0, 35, 0.35);
    /* Glow baseado em --primary */
    display: inline-block;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff1a4a, var(--primary));
    /* Efeito Neon Brilhoso */
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.btn:hover {
    transform: translateY(-4px) scale(1.03);
    /* Elevação e tamanho refinados */
    box-shadow: 0 15px 35px rgba(230, 0, 35, 0.5);
    /* Glow aceso na área de compra */
}

.btn:hover::before {
    opacity: 1;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--surface-border);
    box-shadow: none;
    backdrop-filter: blur(15px);
    color: var(--text-main) !important;
    font-weight: 600;
}

.btn-outline::before {
    display: none;
}

.btn-outline:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: #fff !important;
    box-shadow: 0 10px 30px rgba(230, 0, 35, 0.3);
}

.btn-small {
    padding: 10px 24px;
    font-size: 0.85rem;
    border-radius: 30px;
}

.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 0;
    position: relative;
    width: 100%;
}

.hero h1 {
    font-size: 5.5rem;
    line-height: 1.05;
    margin-bottom: 30px;
    font-weight: 800;
    letter-spacing: -2px;
    color: var(--text-title-gradient-start);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero h1 span {
    background: linear-gradient(135deg, var(--secondary) 20%, var(--primary) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 50px;
    line-height: 1.6;
    font-weight: 400;
}

.glass-panel {
    background: var(--surface-color);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--surface-border);
    border-top: 1px solid var(--glass-border-light);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 40px;
}

.card {
    background: var(--surface-color);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--surface-border);
    border-top: 1px solid var(--glass-border-light);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

/* Clickable card */
.card-clickable {
    cursor: pointer;
}

/* Add to cart button on card */
.card-add-cart {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 5;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), #e10029);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(230, 0, 35, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    line-height: 1;
}

.card-add-cart:hover {
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 6px 25px rgba(230, 0, 35, 0.6);
}

.card-add-cart.added {
    background: var(--success);
    box-shadow: 0 4px 15px rgba(13, 240, 131, 0.4);
}

/* Toast notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--surface-color);
    backdrop-filter: blur(20px);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 16px 24px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease;
    pointer-events: none;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary);
}

[data-theme="dark"] .card:hover {
    border-color: rgba(176, 38, 255, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-img {
    height: 200px;
    background: var(--card-img-bg);
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, var(--surface-color), transparent);
}

.card-body {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    line-height: 1.3;
}

.card-title-colored {
    background: linear-gradient(to right, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.card-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-color);
    border: 1px solid var(--surface-border);
    border-bottom: 2px solid var(--surface-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] .form-control {
    background: rgba(255, 255, 255, 0.05);
    /* Lighter than background */
    border-color: rgba(255, 255, 255, 0.15);
}

.form-control:focus {
    outline: none;
    border-color: var(--surface-border);
    border-bottom-color: var(--secondary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    /* More highlight on focus */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Admin layout */
.admin-layout {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.admin-sidebar {
    flex: 0 0 280px;
    width: 280px;
    background: var(--surface-color);
    backdrop-filter: blur(15px);
    border-right: 1px solid var(--surface-border);
    padding: 40px 30px;
    height: 100vh;
    z-index: 90;
    /* Keep it above table scroll */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s;
}

.admin-sidebar h2 {
    margin-bottom: 40px;
}

.admin-sidebar a {
    display: block;
    padding: 14px 20px;
    margin-bottom: 8px;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: var(--surface-color);
    color: var(--text-main);
    padding-left: 25px;
}

.admin-content {
    flex: 1;
    padding: 60px;
    min-width: 0;
    /* Prevents flex flex-grow break */
    width: calc(100% - 280px);
}

/* Tables (Fixed design) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    /* Fixed layout */
    margin-top: 15px;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--surface-border);
    color: var(--text-main);
}

th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    background: var(--surface-color);
}

.badge {
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

.badge-success {
    background: rgba(13, 240, 131, 0.15);
    color: var(--success);
}

.badge-danger {
    background: rgba(255, 0, 60, 0.15);
    color: var(--danger);
}

.badge-primary {
    background: rgba(176, 38, 255, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(176, 38, 255, 0.2);
}

footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--surface-border);
    margin-top: auto;
    color: var(--text-muted);
    background: var(--surface-color);
    backdrop-filter: blur(10px);
}

footer p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

footer a {
    color: var(--primary);
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main {
    flex: 1;
}

/* Hamburger Menu Base */
.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-main);
}

/* Responsive Adjustments */
.nav-links {
    gap: 15px;
}

.crm-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
}

@media (max-width: 600px) {
    .filters-form {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100%;
        gap: 10px !important;
    }

    .filters-form select,
    .filters-form input {
        width: 100% !important;
    }

    .card-add-cart {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        bottom: 8px;
        right: 8px;
    }

    .toast-notification {
        left: 15px;
        right: 15px;
        bottom: 15px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-inner {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
        background: var(--surface-color);
        backdrop-filter: blur(var(--glass-blur));
        border: 1px solid var(--surface-border);
        border-radius: 15px;
        padding: 20px;
        gap: 20px;
        text-align: center;
        box-shadow: var(--glass-shadow);
    }

    .nav-links.active {
        display: flex;
        animation: slideDownMenu 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    @keyframes slideDownMenu {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .hero h1 {
        font-size: 2.8rem;
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 0.95rem;
        padding: 0 15px;
        margin-bottom: 35px;
    }

    .hero {
        min-height: 60vh;
        padding: 50px 0;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar.active {
        display: block;
        transform: none;
        opacity: 1;
    }

    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 80%;
        max-width: 300px;
        z-index: 2000;
        transform: translateX(-100%);
        opacity: 0;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    }

    .admin-content {
        max-width: 100%;
        padding: 80px 15px 40px;
    }

    .glass-panel {
        padding: 20px;
    }

    .table-responsive {
        border-radius: 8px;
        border: 1px solid var(--surface-border);
    }

    .glass-panel {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .glass-panel table {
        min-width: 600px;
    }

    /* Cart table → card layout on mobile */
    .cart-table thead {
        display: none;
    }

    .cart-table tr {
        display: flex;
        flex-direction: column;
        padding: 15px 0;
        border-bottom: 1px solid var(--surface-border);
        gap: 6px;
    }

    .cart-table td {
        padding: 4px 0;
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Checkout form improvements */
    .glass-panel {
        padding: 15px;
    }

    .btn {
        padding: 12px 25px;
    }

    footer {
        padding: 30px 0;
    }

    footer p {
        font-size: 0.85rem;
    }
}

/* (Carousel antigo removido — agora usando .produtos-carousel-* classes) */

/* ═══════════════════════════════════════════════ */
/* GRID GENÉRICO (home e outras páginas)           */
/* ═══════════════════════════════════════════════ */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════ */
/* HERO — mobile                                   */
/* ═══════════════════════════════════════════════ */
@media (max-width: 480px) {
    .hero {
        min-height: 50vh;
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 2rem;
        letter-spacing: -0.5px;
    }

    .hero p {
        font-size: 0.9rem;
        padding: 0 10px;
        margin-bottom: 25px;
    }

    .hero .btn {
        display: block;
        width: 100%;
        margin-left: 0 !important;
        margin-bottom: 10px !important;
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════ */
/* CHECKOUT — campos inline → stack em mobile     */
/* ═══════════════════════════════════════════════ */
.checkout-row {
    display: flex;
    gap: 15px;
}

@media (max-width: 560px) {
    .checkout-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ═══════════════════════════════════════════════ */
/* ADMIN — melhorias mobile                        */
/* ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .admin-content {
        padding: 70px 12px 30px;
        width: 100%;
    }

    /* Sidebar scroll interno */
    .admin-sidebar {
        overflow-y: auto;
        padding: 80px 20px 30px;
    }

    /* Tabelas admin: scroll horizontal */
    .admin-content .glass-panel {
        padding: 12px;
        overflow-x: auto;
    }

    /* Botão menu admin fixo no topo */
    #mobile-admin-btn {
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 3000;
    }

    /* Títulos admin menores */
    .admin-content h1 { font-size: 1.5rem; }
    .admin-content h2 { font-size: 1.3rem; }

    /* Stats/CRM grid */
    .crm-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 400px) {
    .crm-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ═══════════════════════════════════════════════ */
/* CARRINHO — total/botões em mobile              */
/* ═══════════════════════════════════════════════ */
@media (max-width: 560px) {
    .cart-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center;
    }

    .cart-actions a,
    .cart-actions div {
        width: 100%;
        text-align: center;
    }

    .cart-actions h3 {
        font-size: 1.5rem !important;
    }
}

/* ═══════════════════════════════════════════════ */
/* PRODUTO DETALHE — mobile                        */
/* ═══════════════════════════════════════════════ */
.produto-detalhe-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .produto-detalhe-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ═══════════════════════════════════════════════ */
/* BLOG / JOGOS — grid responsivo                  */
/* ═══════════════════════════════════════════════ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════ */
/* FOOTER — mobile                                 */
/* ═══════════════════════════════════════════════ */
@media (max-width: 480px) {
    footer {
        padding: 20px 0;
    }

    footer p {
        font-size: 0.8rem;
        padding: 0 10px;
    }
}

/* ═══════════════════════════════════════════════ */
/* CONTAINER — padding lateral em mobile           */
/* ═══════════════════════════════════════════════ */
@media (max-width: 480px) {
    .container {
        width: 95%;
    }

    main.container {
        padding-top: 20px !important;
    }
}


/* ═══════════════════════════════════════════════════════════ */
/* ADMIN PRODUTOS — formulário inline → stack em mobile       */
/* ═══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    /* Formulário de produto: todos os campos full-width */
    .admin-content .glass-panel form [style*="display:flex"][style*="flex-wrap:wrap"] {
        flex-direction: column;
    }

    .admin-content .glass-panel form .form-group[style*="flex"] {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }

    /* Desconto flash form */
    .admin-content details form[style*="display: flex"] {
        flex-direction: column;
    }

    /* Calculadora de margem */
    .admin-content details > div[style*="display:flex"] {
        flex-direction: column;
    }

    /* Categorias: form inline → coluna */
    .admin-content details form[style*="display:flex; gap:10px"] {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ═══════════════════════════════════════════════════════════ */
/* PRODUTO DETALHE — preço grande em mobile                   */
/* ═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .glass-panel .card-price[style*="font-size:3rem"],
    .glass-panel .card-price[style*="font-size:2.8rem"] {
        font-size: 2rem !important;
    }

    .glass-panel h1 {
        font-size: 1.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════ */
/* AVALIAÇÕES DE PRODUTO — estrelas + reviews                  */
/* ═══════════════════════════════════════════════════════════ */
.stars-display {
    color: #f5a623;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.star-picker {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.star-picker input[type="radio"] { display: none; }

.star-picker label {
    font-size: 2rem;
    color: var(--surface-border);
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
    line-height: 1;
}

.star-picker label:hover,
.star-picker label:hover ~ label,
.star-picker input[type="radio"]:checked ~ label {
    color: #f5a623;
    transform: scale(1.15);
}

.review-form {
    background: rgba(0,0,0,0.03);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
}

[data-theme="dark"] .review-form {
    background: rgba(255,255,255,0.03);
}

.review-alert {
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-weight: 600;
    font-size: 0.95rem;
}

.review-alert-success {
    background: rgba(13, 240, 131, 0.12);
    color: var(--success);
    border: 1px solid var(--success);
}

.review-alert-error {
    background: rgba(255, 0, 60, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.review-item {
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid var(--surface-border);
    background: var(--surface-color);
    backdrop-filter: blur(10px);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.review-stars {
    color: #f5a623;
    font-size: 1rem;
    letter-spacing: 1px;
}

.review-badge {
    background: rgba(13, 240, 131, 0.12);
    color: var(--success);
    border: 1px solid var(--success);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: auto;
}

.review-comment {
    color: var(--text-main);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
}

.review-avg .stars-display { font-size: 1.3rem; }

@media (max-width: 480px) {
    .star-picker label { font-size: 1.6rem; }
    .review-date { margin-left: 0; width: 100%; }
}
