/* ===================================================
   CameloMix v2 - Design System (Global CSS)
   Tema claro/escuro, glassmorphism, micro-animações
   =================================================== */

/* --- Google Font --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Variables (Light Theme) --- */
:root {
    /* Cores primárias */
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #5A4BD1;
    --primary-gradient: linear-gradient(135deg, #6C5CE7, #A29BFE);
    /* Cores secundárias */
    --secondary: #00CEC9;
    --secondary-light: #55EFC4;
    --secondary-gradient: linear-gradient(135deg, #00CEC9, #55EFC4);
    /* Cores de status */
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #E17055;
    --info: #74B9FF;
    /* Tons neutros */
    --bg-body: #F8F9FE;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F0F0F8;
    --bg-input: #F1F3F8;
    --bg-navbar: rgba(255,255,255,0.85);
    --bg-sidebar: #1E1E2E;
    --bg-footer: #1A1A2E;
    --bg-glass: rgba(255,255,255,0.6);
    --bg-overlay: rgba(0,0,0,0.5);
    /* Texto */
    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --text-muted: #B2BEC3;
    --text-inverse: #FFFFFF;
    --text-link: #6C5CE7;
    /* Bordas e sombras */
    --border-color: #E8ECF1;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;
    --border-radius-full: 9999px;
    --shadow-sm: 0 2px 8px rgba(108,92,231,0.06);
    --shadow-md: 0 4px 20px rgba(108,92,231,0.1);
    --shadow-lg: 0 8px 40px rgba(108,92,231,0.15);
    --shadow-hover: 0 12px 48px rgba(108,92,231,0.2);
    /* Espaçamentos */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    /* Transições */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Tipografia */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    /* Preço */
    --price-color: #6C5CE7;
    --price-old-color: #B2BEC3;
    --price-promo-color: #E17055;
    /* Badge */
    --badge-new: linear-gradient(135deg, #00CEC9, #55EFC4);
    --badge-sale: linear-gradient(135deg, #E17055, #FDCB6E);
}

/* --- Dark Theme --- */
[data-theme="dark"] {
    --bg-body: #0F0F1A;
    --bg-card: #1A1A2E;
    --bg-card-hover: #252540;
    --bg-input: #252540;
    --bg-navbar: rgba(26,26,46,0.92);
    --bg-glass: rgba(26,26,46,0.7);
    --bg-overlay: rgba(0,0,0,0.7);
    --bg-footer: #0A0A14;
    --text-primary: #E8ECF1;
    --text-secondary: #A0A8B8;
    --text-muted: #636E80;
    --border-color: #2A2A42;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-hover: 0 12px 48px rgba(108,92,231,0.3);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background: var(--bg-body);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 100vh;
}
.snowfall-container { pointer-events: none !important; }

a { color: var(--text-link); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

/* === TIPOGRAFIA === */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; color: var(--text-primary); }
h1 { font-size: var(--font-size-4xl); letter-spacing: -0.02em; }
h2 { font-size: var(--font-size-3xl); letter-spacing: -0.01em; }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
p { color: var(--text-secondary); margin-bottom: var(--space-md); }

/* === CONTAINER === */
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--space-lg); }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 var(--space-lg); }
.container-lg { max-width: 1440px; margin: 0 auto; padding: 0 var(--space-lg); }

/* === GRID === */
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
    .grid-auto { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-auto { grid-template-columns: repeat(3, 1fr); }
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

/* === FLEXBOX === */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* === BOTÕES === */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
    padding: 12px 24px; border: none; border-radius: var(--border-radius);
    font-family: var(--font-family); font-size: var(--font-size-sm); font-weight: 600;
    cursor: pointer; transition: var(--transition); text-decoration: none;
    position: relative; overflow: hidden;
}
.btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0; transition: opacity 0.3s;
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--primary-gradient); color: white;
    box-shadow: 0 4px 15px rgba(108,92,231,0.35);
}
.btn-primary:hover { box-shadow: 0 6px 25px rgba(108,92,231,0.5); transform: translateY(-2px); color: white; }

.btn-secondary {
    background: var(--secondary-gradient); color: white;
    box-shadow: 0 4px 15px rgba(0,206,201,0.35);
}
.btn-secondary:hover { box-shadow: 0 6px 25px rgba(0,206,201,0.5); transform: translateY(-2px); color: white; }

.btn-danger { background: linear-gradient(135deg, #E17055, #D63031); color: white; }
.btn-success { background: linear-gradient(135deg, #00B894, #55EFC4); color: white; }
.btn-warning { background: linear-gradient(135deg, #FDCB6E, #F7B731); color: #2D3436; }

.btn-outline {
    background: transparent; border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-ghost { background: transparent; color: var(--text-secondary); padding: 8px 16px; }
.btn-ghost:hover { background: var(--bg-input); color: var(--text-primary); }

.btn-sm { padding: 8px 16px; font-size: var(--font-size-xs); border-radius: var(--border-radius-sm); }
.btn-lg { padding: 16px 32px; font-size: var(--font-size-lg); border-radius: var(--border-radius-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--border-radius-full); }

/* === CARDS === */
.card {
    background: var(--bg-card); border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-color);
    overflow: hidden; transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.card-body { padding: var(--space-lg); }
.card-header { padding: var(--space-lg) var(--space-lg) 0; }
.card-footer { padding: 0 var(--space-lg) var(--space-lg); }

/* Card glassmorphism */
.card-glass {
    background: var(--bg-glass); backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.18); border-radius: var(--border-radius-lg);
}

/* === PRODUCT CARD  === */
.product-card {
    background: var(--bg-card); border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-color);
    overflow: hidden; transition: var(--transition); position: relative;
    display: flex; flex-direction: column;
}
.product-card.has-ribbon { overflow: visible; }
.product-card .ribbon-frete {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #FFD700, #FFC107);
    color: #000;
    font-weight: 800;
    font-size: 11px;
    padding: 6px 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.product-card .ribbon-frete i { margin-right: 2px; }
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-6px); }
.product-card .product-image {
    position: relative; overflow: hidden; aspect-ratio: 1;
    background: var(--bg-input);
}
.product-card .product-image img {
    width: 100%; height: 100%; object-fit: contain;
    transition: transform 0.5s ease; padding: var(--space-md);
}
.product-card:hover .product-image img { transform: scale(1.08); }
.product-card .product-info { padding: var(--space-md) var(--space-lg) var(--space-lg); flex: 1; display: flex; flex-direction: column; }
.product-card .product-name {
    font-size: var(--font-size-sm); font-weight: 600;
    color: var(--text-primary); margin-bottom: var(--space-sm);
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.4; min-height: 2.8em;
}
.product-card .product-name:hover { color: var(--primary); }
.product-card .product-price { margin-top: auto; }
.product-card .original-price {
    font-size: var(--font-size-xs); color: var(--price-old-color);
    text-decoration: line-through; display: block;
}
.product-card .current-price, .product-card .promo-price {
    font-size: var(--font-size-xl); font-weight: 800;
    color: var(--price-color);
}
.product-card .promo-price { color: var(--price-promo-color); }
.product-card .installments {
    font-size: var(--font-size-xs); color: var(--text-muted); margin-top: 2px;
}
/* Product badges */
.product-badge {
    position: absolute; top: var(--space-md); right: var(--space-md);
    padding: 4px 12px; border-radius: var(--border-radius-full);
    font-size: var(--font-size-xs); font-weight: 700; color: white;
    z-index: 2; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-new { background: var(--badge-new); }
.badge-sale { background: var(--badge-sale); }
.badge-deal { background: linear-gradient(135deg, #d63031, #e17055); animation: dealPulse 2s ease-in-out infinite; }
@keyframes dealPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(214,48,49,0.4); } 50% { box-shadow: 0 0 12px 4px rgba(214,48,49,0.3); } }
.deal-timer-card { display:flex; align-items:center; gap:4px; font-size:var(--font-size-xs); color:var(--danger); font-weight:700; margin-top:6px; padding:4px 8px; background:rgba(214,48,49,0.08); border-radius:var(--border-radius-sm); }
/* Quick actions */
.product-card .quick-actions {
    position: absolute; top: var(--space-md); left: var(--space-md);
    display: flex; flex-direction: column; gap: var(--space-xs);
    opacity: 1; transform: translateX(0);
    z-index: 10;
}
.quick-action-btn {
    width: 36px; height: 36px; border-radius: var(--border-radius-full);
    background: var(--bg-card); border: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition); color: var(--text-secondary);
    font-size: var(--font-size-sm);
}
.quick-action-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* === FORMULÁRIOS === */
.form-group { margin-bottom: var(--space-lg); position: relative; }
.form-label {
    display: block; font-size: var(--font-size-sm); font-weight: 600;
    color: var(--text-primary); margin-bottom: var(--space-xs);
}
.form-control {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border-color);
    border-radius: var(--border-radius); background: var(--bg-input);
    font-family: var(--font-family); font-size: var(--font-size-base);
    color: var(--text-primary); transition: var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--primary); background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(108,92,231,0.1);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23636E72' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
}
.form-text { font-size: var(--font-size-xs); color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: var(--font-size-xs); color: var(--danger); margin-top: 4px; }
.form-control.is-invalid { border-color: var(--danger); }

/* Floating label */
.form-floating { position: relative; }
.form-floating .form-control { padding-top: 20px; }
.form-floating label {
    position: absolute; top: 14px; left: 16px;
    font-size: var(--font-size-sm); color: var(--text-muted);
    pointer-events: none; transition: var(--transition);
}
.form-floating .form-control:focus + label,
.form-floating .form-control:not(:placeholder-shown) + label {
    top: 4px; font-size: var(--font-size-xs); color: var(--primary);
}

/* Checkbox / Radio */
.form-check { display: flex; align-items: center; gap: var(--space-sm); cursor: pointer; }
.form-check input[type="checkbox"], .form-check input[type="radio"] {
    width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer;
}

/* === NAVBAR === */
.navbar {
    position: sticky; top: 0; z-index: 2000;
    background: var(--bg-navbar); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-md) 0;
    transition: var(--transition);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); }
.navbar-brand { display: flex; align-items: center; gap: var(--space-sm); }
.navbar-brand img { height: 40px; }
.navbar-brand span { font-size: var(--font-size-xl); font-weight: 800;
    background: var(--primary-gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.navbar-search {
    flex: 1; max-width: 520px; position: relative;
}
.navbar-search input {
    width: 100%; padding: 10px 20px 10px 44px;
    border: 2px solid var(--border-color); border-radius: var(--border-radius-full);
    background: var(--bg-input); font-family: var(--font-family);
    font-size: var(--font-size-sm); color: var(--text-primary);
    transition: var(--transition); outline: none;
}
.navbar-search input:focus { border-color: var(--primary); background: var(--bg-card); box-shadow: 0 0 0 4px rgba(108,92,231,0.1); }
.navbar-search .search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.navbar-actions { display: flex; align-items: center; gap: var(--space-md); }
.navbar-actions .nav-btn {
    position: relative; width: 42px; height: 42px; border-radius: var(--border-radius-full);
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-input); border: 1px solid var(--border-color);
    color: var(--text-secondary); cursor: pointer; transition: var(--transition);
    font-size: 1.1rem;
}
.navbar-actions .nav-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.navbar-actions .nav-btn .badge-count {
    position: absolute; top: -4px; right: -4px;
    background: var(--danger); color: white;
    font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: var(--border-radius-full);
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-navbar);
    animation: badgePop 0.3s ease;
}
@keyframes badgePop { 0% { transform: scale(0); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* Theme toggle */
.theme-toggle {
    width: 42px; height: 42px; border-radius: var(--border-radius-full);
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-input); border: 1px solid var(--border-color);
    cursor: pointer; transition: var(--transition);
    font-size: 1.1rem; color: var(--text-secondary);
}
.theme-toggle:hover { background: var(--primary-light); color: white; }

/* === HERO / SLIDER === */
.hero-section { position: relative; overflow: hidden; border-radius: var(--border-radius-xl); margin: var(--space-lg) 0; }
.hero-slide {
    position: relative; min-height: 420px; display: flex; align-items: center;
    background-size: cover; background-position: center;
    border-radius: var(--border-radius-xl); overflow: hidden;
}
.hero-slide::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.6), transparent 70%);
}
.hero-content { position: relative; z-index: 2; padding: var(--space-3xl); max-width: 540px; color: white; }
.hero-content h1 { color: white; font-size: var(--font-size-4xl); margin-bottom: var(--space-md); }
.hero-content p { color: rgba(255,255,255,0.85); font-size: var(--font-size-lg); margin-bottom: var(--space-xl); }

/* === FOOTER === */
.footer {
    background: var(--bg-footer); color: var(--text-inverse);
    padding: var(--space-3xl) 0 var(--space-lg);
    margin-top: var(--space-3xl);
}
.footer h4 { color: white; margin-bottom: var(--space-md); font-size: var(--font-size-base); }
.footer a { color: rgba(255,255,255,0.7); transition: var(--transition-fast); }
.footer a:hover { color: var(--primary-light); }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xl); }
.footer-bottom {
    margin-top: var(--space-xl); padding-top: var(--space-lg);
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center; color: rgba(255,255,255,0.5);
    font-size: var(--font-size-sm);
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* === BREADCRUMB === */
.breadcrumb {
    display: flex; align-items: center; gap: var(--space-sm);
    list-style: none; padding: var(--space-md) 0;
    font-size: var(--font-size-sm); color: var(--text-muted);
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .separator { color: var(--text-muted); }

/* === BADGES === */
.badge {
    display: inline-flex; align-items: center; padding: 4px 10px;
    border-radius: var(--border-radius-full); font-size: var(--font-size-xs);
    font-weight: 600; letter-spacing: 0.3px;
}
.badge-primary { background: rgba(108,92,231,0.15); color: var(--primary); }
.badge-success { background: rgba(0,184,148,0.15); color: var(--success); }
.badge-danger { background: rgba(225,112,85,0.15); color: var(--danger); }
.badge-warning { background: rgba(253,203,110,0.25); color: #E77F11; }
.badge-info { background: rgba(116,185,255,0.15); color: #0984E3; }

/* === TABELA === */
.table-wrapper { overflow-x: auto; border-radius: var(--border-radius-lg); border: 1px solid var(--border-color); }
table { width: 100%; border-collapse: collapse; }
thead th {
    background: var(--bg-input); padding: 14px 16px;
    text-align: left; font-size: var(--font-size-sm); font-weight: 600;
    color: var(--text-secondary); border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border-color); font-size: var(--font-size-sm); }
tbody tr { transition: var(--transition-fast); }
tbody tr:hover { background: var(--bg-card-hover); }
tbody tr:last-child td { border-bottom: none; }

/* === PAGINAÇÃO === */
.pagination {
    display: flex; align-items: center; justify-content: center; gap: var(--space-xs);
    margin-top: var(--space-xl); list-style: none;
}
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    border-radius: var(--border-radius); font-size: var(--font-size-sm);
    font-weight: 500; transition: var(--transition);
    color: var(--text-secondary); background: var(--bg-card);
    border: 1px solid var(--border-color);
}
.pagination a:hover { background: var(--primary-light); color: white; border-color: var(--primary-light); }
.pagination .active { background: var(--primary-gradient); color: white; border-color: transparent; }

/* === MODAL === */
.modal-overlay {
    position: fixed; inset: 0; background: var(--bg-overlay);
    display: none; align-items: center; justify-content: center; z-index: 2000;
    backdrop-filter: blur(4px); animation: fadeIn 0.2s ease;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-card); border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg); max-width: 560px; width: 90%;
    max-height: 85vh; overflow-y: auto;
    animation: slideUp 0.3s ease;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-lg); border-bottom: 1px solid var(--border-color); }
.modal-header h3 { margin: 0; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); transition: var(--transition-fast); }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: var(--space-lg); }
.modal-footer { padding: var(--space-lg); border-top: 1px solid var(--border-color); display: flex; justify-content: flex-end; gap: var(--space-sm); }

/* === TOAST / NOTIFICAÇÕES === */
.toast-container {
    position: fixed; top: var(--space-lg); right: var(--space-lg); z-index: 3000;
    display: flex; flex-direction: column; gap: var(--space-sm);
}
.toast {
    display: flex; align-items: center; gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--border-radius); background: var(--bg-card);
    box-shadow: var(--shadow-lg); border-left: 4px solid var(--primary);
    min-width: 320px; max-width: 480px;
    animation: slideInRight 0.4s ease, fadeOut 0.4s ease 4.6s forwards;
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast-message { font-size: var(--font-size-sm); flex: 1; color: var(--text-primary); }

/* === SKELETON LOADING === */
.skeleton {
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-card-hover) 50%, var(--bg-input) 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-sm);
}
.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-title { height: 24px; width: 60%; margin-bottom: 12px; }
.skeleton-image { aspect-ratio: 1; }

/* === SCROLL CUSTOM === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* === ANIMAÇÕES === */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.animate-fade-in { animation: fadeIn 0.5s ease; }
.animate-slide-up { animation: slideUp 0.5s ease; }

/* Spinner */
.spinner { width: 24px; height: 24px; border: 3px solid var(--border-color); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }

/* === UTILIDADES === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-sm { font-size: var(--font-size-sm); }
.fs-xs { font-size: var(--font-size-xs); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-full { border-radius: var(--border-radius-full); }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* === BOTTOM NAV BAR (Mobile Only) === */
.bottom-nav-bar { display: none; }
@media (max-width: 768px) {
    .bottom-nav-bar { display: flex; }
}

/* === CATEGORIES BAR (horizontal nav under navbar) === */
.categories-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
}
@media (max-width: 768px) {
    .categories-bar .container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
.categories-bar .container { position: relative; }
.categories-nav {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    white-space: nowrap;
    padding: 0;
    margin: 0;
    scrollbar-width: none;
}
.categories-nav::-webkit-scrollbar { display: none; }
.categories-nav li { position: relative; }
.categories-nav li > a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 12px 18px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.categories-nav li > a:hover {
    color: var(--primary);
    background: rgba(108,92,231,0.04);
    border-bottom-color: var(--primary);
}
.categories-nav li > a i { font-size: 1rem; }
/* Dropdown - flutuante sobreposto ao conteúdo */
.categories-nav .has-dropdown > a::after {
    content: '\F282';
    font-family: 'bootstrap-icons';
    font-size: 0.6rem;
    margin-left: 4px;
    transition: transform 0.2s ease;
}
.categories-nav .has-dropdown:hover > a::after {
    transform: rotate(180deg);
}
.categories-nav .has-dropdown:hover .dropdown { display: block; }
.categories-nav .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: var(--space-sm) 0;
    z-index: 99999;
    list-style: none;
    animation: fadeIn 0.2s ease;
}
.categories-nav .dropdown li a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    transition: var(--transition-fast);
    white-space: nowrap;
}
.categories-nav .dropdown li a:hover {
    background: rgba(108,92,231,0.06);
    color: var(--primary);
    padding-left: 24px;
}

/* === SECTION LAYOUT === */
.section { padding: var(--space-2xl) 0; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}
.section-header h2 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0;
    font-size: var(--font-size-2xl);
}

/* === CATEGORIES CAROUSEL === */
.categories-carousel-wrapper {
    position: relative;
    overflow: hidden;
}
.categories-carousel {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: var(--space-xs) 0;
    -webkit-overflow-scrolling: touch; /* Suporte suave no iOS */
    touch-action: pan-x; /* Permite deslizar horizontalmente */
}
.categories-carousel::-webkit-scrollbar { display: none; }
.categories-carousel .category-card {
    min-width: 150px;
    max-width: 180px;
    flex-shrink: 0;
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 1.1rem;
}
.carousel-arrow:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}
.carousel-arrow.arrow-left { left: 0; }
.carousel-arrow.arrow-right { right: 0; }
.carousel-arrow.hidden { opacity: 0; pointer-events: none; }

/* Legacy fallback */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
}
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
}
.category-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    color: var(--primary);
}
.category-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-full);
    background: rgba(108,92,231,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}
.category-card:hover .category-icon {
    background: var(--primary);
    color: white;
}
.category-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}
.category-count {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* === THEME SELECTOR (Admin Config) === */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-lg);
}
.theme-card {
    position: relative;
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-card);
}
.theme-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}
.theme-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.2);
}
.theme-card.active::after {
    content: '\F26A';
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 5;
    box-shadow: var(--shadow-md);
}
.theme-preview {
    height: 120px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    position: relative;
    overflow: hidden;
}
.theme-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.theme-preview-gradient {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-md);
}
.theme-preview-gradient .preview-dots {
    display: flex;
    gap: 6px;
    margin-top: auto;
}
.theme-preview-gradient .preview-dot {
    width: 24px;
    height: 24px;
    border-radius: var(--border-radius-full);
    border: 2px solid rgba(255,255,255,0.5);
}
.theme-preview-gradient .preview-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.4);
    width: 60%;
    margin-top: 8px;
}
.theme-info {
    padding: var(--space-md);
    text-align: center;
}
.theme-info h5 {
    font-size: var(--font-size-sm);
    font-weight: 700;
    margin-bottom: 4px;
}
.theme-info p {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin: 0;
}

/* === HERO SLIDER (slides + dots) === */
.hero-slides { position: relative; }
.hero-slide { display: none; }
.hero-slide.active { display: flex; }
.hero-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) 0;
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--border-radius-full);
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}
.hero-dot.active, .hero-dot:hover {
    background: white;
    width: 28px;
}

/* === SEARCH SUGGESTIONS === */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    margin-top: var(--space-xs);
    max-height: 400px;
    overflow-y: auto;
    z-index: 99999;
    display: none;
}
.search-suggestions.active { display: block; }
.search-suggestions .suggestion-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: var(--transition-fast);
}
.search-suggestions .suggestion-item:hover { background: var(--bg-card-hover); }
.search-suggestions .suggestion-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
}

/* === MOBILE MENU === */
.mobile-menu-btn { display: none; }
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active { display: block; opacity: 1; }
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(85vw, 360px);
    height: 100%;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}
.mobile-menu-overlay.active .mobile-menu { transform: translateX(0); }
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}
.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: var(--space-xs);
    border-radius: var(--border-radius-full);
    transition: var(--transition-fast);
}
.mobile-menu-close:hover { background: var(--bg-input); color: var(--danger); }
.mobile-search {
    padding: var(--space-md) var(--space-lg);
}
.mobile-search input {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-full);
    background: var(--bg-input);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}
.mobile-search input:focus { border-color: var(--primary); }
.mobile-nav {
    list-style: none;
    padding: var(--space-sm) 0;
    margin: 0;
    flex: 1;
}
.mobile-nav li a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 14px var(--space-lg);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-weight: 500;
    transition: var(--transition-fast);
    text-decoration: none;
}
.mobile-nav li a:hover { background: rgba(108,92,231,0.06); color: var(--primary); }
.mobile-nav li a i { font-size: 1.1rem; color: var(--text-muted); width: 24px; text-align: center; }
.mobile-nav .divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--space-sm) var(--space-lg);
}

/* === FOOTER EXTRAS === */
.footer-desc { color: rgba(255,255,255,0.6); font-size: var(--font-size-sm); line-height: 1.7; }
.footer-social {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}
.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); color: white; transform: translateY(-3px); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: var(--space-sm); }
.footer ul li a { font-size: var(--font-size-sm); }

/* === WHATSAPP FLOAT === */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    z-index: 1500;
    transition: var(--transition);
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 8px 30px rgba(37,211,102,0.5);
    color: white;
}

/* === CHAT FAB === */
.chat-fab {
    position: fixed;
    bottom: 96px;
    right: 24px;
    z-index: 1500;
}
.chat-fab-btn {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-full);
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(108,92,231,0.4);
    transition: var(--transition);
}
.chat-fab-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(108,92,231,0.5);
}

/* === PRODUCT RATING === */
.product-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: var(--space-xs);
}

/* === PRICE CONTAINERS === */
.price-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* === PROMO BANNER === */
.promo-banner {
    transition: var(--transition);
}
.promo-banner:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* === UTILITIES === */
.w-100 { width: 100%; }
.d-flex { display: flex; }
.d-none { display: none; }

/* === RESPONSIVO MOBILE === */
@media (max-width: 768px) {
    :root { --space-lg: 16px; --space-xl: 24px; --space-2xl: 32px; --space-3xl: 40px; }
    h1 { font-size: var(--font-size-2xl); }
    h2 { font-size: var(--font-size-xl); }
    .navbar-search { display: none; }
    .mobile-menu-btn { display: flex; }
    .hero-slide { min-height: 280px; }
    .hero-content { padding: var(--space-xl); }
    .hero-content h1 { font-size: var(--font-size-2xl); }
    .toast-container { left: var(--space-md); right: var(--space-md); }
    .toast { min-width: auto; }
    .categories-bar { display: none; }
    .categories-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .section-header { flex-direction: column; gap: var(--space-sm); align-items: flex-start; }
    .whatsapp-float { bottom: 16px; right: 16px; width: 50px; height: 50px; font-size: 1.4rem; }
    .chat-fab { bottom: 80px; right: 16px; }
    .chat-fab-btn { width: 50px; height: 50px; font-size: 1.3rem; }
}
