        :root {
            --primary: #6a11cb;
            --secondary: #2575fc;
            --accent: #ff3e80;
            --success: #00d26a;
            --warning: #ffca28;
            --danger: #ff4d4d;
            --text: #333;
            --bg: #f8f9fa;
            --card-bg: #ffffff;
            --border-radius: 20px;
            --shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
            --transition: all 0.3s ease;
        }

        [data-theme="dark"] {
            --text: #f8f9fa;
            --bg: #121212;
            --card-bg: #1e1e1e;
            --shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
            transition: var(--transition);
        }

        body {
            background-color: var(--bg);
            color: var(--text);
            padding-bottom: 80px;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 15px;
        }

        /* ===== NOVO HEADER COMPACTO ===== */
        header {
            background: var(--card-bg);
            color: var(--text);
            padding: 6px 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
            border-bottom: 1px solid rgba(106, 17, 203, 0.08);
        }

        .header-content {
            /* Grid layout: logo | search | actions */
            display: grid;
            grid-template-columns: auto 1fr auto;
            align-items: center;
            gap: 12px;
            position: relative;
        }

        .logo-container {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .logo-img {
            height: 56px;
            width: 56px;
            object-fit: contain;
        }

        .logo-text {
            font-size: 1.1rem;
            font-weight: 800;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .search-bar-container {
            display: flex;
            justify-content: center;
            align-items: center;
            max-width: 720px;
            margin: 0 12px;
        }

        .search-bar {
            position: relative;
            width: 100%;
            max-width: 640px;
        }

        .search-bar input {
            width: 100%;
            padding: 8px 12px 8px 35px;
            border-radius: 10px;
            border: 1.5px solid rgba(106, 17, 203, 0.15);
            background: var(--bg);
            color: var(--text);
            font-size: 0.85rem;
            transition: var(--transition);
            box-shadow: none;
        }

        /* Header adjustments for small screens */
        @media (max-width: 480px) {
            .logo-img {
                height: 72px;
                width: 72px;
            }

            .search-bar-container {
                margin: 0 8px;
                max-width: calc(100% - 140px);
            }

            .search-bar input {
                padding: 10px 12px 10px 40px;
                font-size: 0.95rem;
            }

            header {
                padding: 10px 0;
            }

            .header-content {
                gap: 8px;
            }
        }

        /* Messages icon in header */
        .msg-icon-btn {
            background: transparent;
            border: 1px solid rgba(0, 0, 0, 0.04);
            color: var(--text);
            font-size: 1.05rem;
            position: relative;
            padding: 8px;
            border-radius: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 44px;
            min-height: 44px;
            background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));
        }

        .msg-dot {
            position: absolute;
            top: 8px;
            right: 6px;
            width: 10px;
            height: 10px;
            background: #34D399;
            /* green */
            border-radius: 50%;
            box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
            animation: msgPulse 1.6s infinite;
            display: none;
            /* hidden by default; shown only quando houver mensagens */
        }

        /* mostrar apenas quando houver mensagens */
        .msg-icon-btn.has-msg .msg-dot {
            display: inline-block;
        }

        @keyframes msgPulse {
            0% {
                transform: scale(1);
                opacity: 1;
            }

            50% {
                transform: scale(1.4);
                opacity: 0.6;
            }

            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        .messages-dropdown {
            position: fixed;
            top: 68px;
            right: 20px;
            width: 300px;
            max-width: calc(100% - 40px);
            background: var(--card-bg);
            border-radius: 12px;
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
            z-index: 12500;
            display: none;
            border: 1px solid rgba(106, 17, 203, 0.06);
            overflow: hidden;
        }

        .messages-dropdown .messages-header {
            padding: 12px 14px;
            font-weight: 700;
            border-bottom: 1px solid rgba(0, 0, 0, 0.04);
            color: var(--text);
        }

        .messages-dropdown .messages-body {
            padding: 12px;
        }

        .messages-dropdown .empty-msg {
            color: #666;
            font-size: 0.95rem;
        }

        .search-bar input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
        }

        .search-bar::before {
            content: "\f002";
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--primary);
            font-size: 0.8rem;
            z-index: 1;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .cart-icon-btn {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            border: none;
            border-radius: 12px;
            padding: 10px 14px;
            font-size: 1.1rem;
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            transition: var(--transition);
            position: relative;
            font-weight: 600;
            box-shadow: 0 4px 12px rgba(106, 17, 203, 0.25);
        }

        .cart-icon-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(106, 17, 203, 0.35);
        }

        .cart-count {
            background: var(--accent);
            color: white;
            border-radius: 50%;
            padding: 2px 6px;
            font-size: 0.75rem;
            font-weight: 700;
            min-width: 18px;
            text-align: center;
        }

        .theme-toggle {
            background: none;
            border: none;
            color: var(--primary);
            font-size: 1.2rem;
            cursor: pointer;
            padding: 8px;
            border-radius: 8px;
            transition: var(--transition);
        }

        .theme-toggle:hover {
            background: rgba(106, 17, 203, 0.1);
        }

        /* ===== NAVBAR INFERIOR ===== */
        .bottom-navbar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--card-bg);
            border-top: 1px solid rgba(106, 17, 203, 0.1);
            padding: 14px 0 20px;
            /* espaço extra para FAB central aumentada */
            z-index: 999;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
            display: flex;
            justify-content: space-around;
            backdrop-filter: blur(10px);
        }

        /* Estilo para o botão do carrinho central na bottom nav */
        .bottom-navbar .cart-center {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1001;
            margin-top: -6px;
        }

        .bottom-navbar .cart-fab {
            width: 72px;
            height: 72px;
            border-radius: 16px;
            /* neutral background so it doesn't look selected by color */
            background: var(--card-bg);
            color: var(--text);
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
            transform: translateY(-36%);
            transition: transform 0.18s ease, box-shadow 0.18s ease;
            font-size: 1.25rem;
            position: relative;
            border: 1px solid rgba(106, 17, 203, 0.06);
            z-index: 1002;
        }

        @media (max-width: 480px) {
            .bottom-navbar {
                padding: 16px 0 24px;
            }

            .bottom-navbar .cart-fab {
                width: 76px;
                height: 76px;
                transform: translateY(-38%);
            }
        }

        .bottom-navbar .cart-fab .cart-count {
            position: absolute;
            top: 6px;
            right: 6px;
            padding: 3px 6px;
            font-size: 0.78rem;
            min-width: 18px;
            background: var(--accent);
            color: #fff;
            border-radius: 999px;
            font-weight: 800;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
        }

        .bottom-navbar .cart-center:active .cart-fab,
        .bottom-navbar .cart-center:hover .cart-fab {
            transform: translateY(-40%);
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
        }

        /* quando estiver ativo visualmente (selecionado pela navegação) apenas manter tamanho e sombra, sem trocar cor */
        .nav-item.cart-center.active .cart-fab {
            transform: translateY(-40%);
            box-shadow: 0 20px 46px rgba(0, 0, 0, 0.18);
        }

        /* hover dos outros botões da bottom nav deve permanecer perceptível */
        .bottom-navbar .nav-item:hover:not(.cart-center) {
            background: rgba(255, 255, 255, 0.2);
            opacity: 1;
        }

        /* Fullscreen cart dropdown (mobile) */
        .cart-dropdown.fullscreen {
            position: fixed !important;
            inset: 0 !important;
            width: 100vw !important;
            height: 100vh !important;
            max-width: 100% !important;
            border-radius: 0 !important;
            padding: 20px !important;
            overflow-y: auto !important;
            background: var(--card-bg) !important;
            box-shadow: none !important;
            z-index: 12000 !important;
            display: block !important;
        }

        /* Esconder versão fixa antiga caso ainda exista */
        .fixed-cart {
            display: none !important;
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 8px 12px;
            border-radius: 10px;
            color: var(--text);
            text-decoration: none;
            transition: var(--transition);
            position: relative;
            opacity: 0.7;
            min-width: 60px;
        }

        .nav-item.active {
            opacity: 1;
            /* keep color neutral for active state; exceptions handled below */
            color: var(--text);
            background: rgba(106, 17, 203, 0.04);
        }

        .nav-item:hover:not(.active) {
            opacity: 0.9;
            background: rgba(106, 17, 203, 0.05);
        }

        .nav-icon {
            font-size: 1.2rem;
            margin-bottom: 4px;
        }

        .nav-label {
            font-size: 0.7rem;
            font-weight: 600;
        }

        .nav-item.active .nav-icon {
            transform: translateY(-2px);
        }

        /* Prevent cart center from looking 'selected' by color — keep size emphasis */
        .nav-item.cart-center.active {
            color: inherit;
            background: transparent;
        }

        /* Ajuste para o conteúdo principal */
        body {
            padding-bottom: 70px;
            /* Espaço para a navbar inferior */
        }

        /* Remover a antiga barra de tabs */
        .tabs {
            display: none;
        }

        /* Ajustar o conteúdo das tabs */
        .tab-content {
            margin-bottom: 20px;
        }

        /* Ajustar o carrinho fixo */
        .fixed-cart {
            top: 10px;
            right: 10px;
        }

        .cart-icon-btn {
            padding: 8px 12px;
        }

        /* Responsividade */
        @media (max-width: 768px) {
            .logo-text {
                font-size: 1.2rem;
            }

            .logo-img {
                height: 85px;
                width: 85px;
            }

            .search-bar-container {
                margin: 0 10px;
            }

            .search-bar input {
                padding: 8px 12px 8px 35px;
                font-size: 0.85rem;
            }

            .header-actions {
                gap: 8px;
            }

            .nav-label {
                font-size: 0.65rem;
            }

            .nav-icon {
                font-size: 1.1rem;
            }
        }

        @media (max-width: 480px) {
            .logo-text {
                display: none;
            }

            .logo-img {
                height: 45px;
                width: 45px;
            }

            .search-bar-container {
                margin: 0 8px;
                max-width: 300px;
            }

            .search-bar input {
                font-size: 0.8rem;
                padding: 6px 10px 6px 30px;
            }

            .header-actions {
                gap: 6px;
            }

            .nav-item {
                padding: 6px 8px;
                min-width: 50px;
            }

            .fixed-cart {
                top: 60px;
                right: 8px;
            }

            .cart-icon-btn {
                padding: 8px 10px;
                font-size: 1rem;
                border-radius: 10px;
            }

            .cart-icon {
                margin-right: 4px;
                font-size: 1.2rem;
            }

            .cart-count {
                padding: 2px 6px;
                font-size: 0.7rem;
                min-width: 20px;
            }

            .cart-dropdown {
                width: 100vw;
                max-width: 100%;
                right: -20px;
                border-radius: 16px 16px 0 0;
                box-shadow: 0 -5px 40px rgba(106, 17, 203, 0.2);
            }
        }

        .role-selector {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50px;
            padding: 8px 15px;
            border: none;
            color: white;
            font-weight: 500;
            cursor: pointer;
            backdrop-filter: blur(10px);
        }

        .theme-toggle {
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
        }

        /* Navigation */
        .tabs {
            display: flex;
            justify-content: space-around;
            background-color: var(--card-bg);
            border-radius: var(--border-radius);
            margin: 20px 0;
            box-shadow: var(--shadow);
            position: sticky;
            top: 80px;
            z-index: 90;
        }

        .tab {
            padding: 15px 0;
            flex: 1;
            text-align: center;
            font-weight: 600;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            transition: var(--transition);
        }

        .tab.active {
            border-bottom: 3px solid var(--accent);
            color: var(--accent);
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
            animation: fadeIn 0.5s ease;
        }

        /* Hero Banner com imagem - paleta moderna e suave */
        .hero {
            background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
            border-radius: 18px;
            margin: 18px 0;
            overflow: hidden;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
            position: relative;
            border: 1px solid rgba(0, 0, 0, 0.03);
        }

        .hero-content {
            display: grid;
            grid-template-columns: 1fr 1fr;
            align-items: center;
            gap: 32px;
            padding: 40px;
            position: relative;
            min-height: 360px;
            animation: fadeInUp 0.8s ease-out;
        }

        .hero-text {
            display: flex;
            flex-direction: column;
            gap: 16px;
            z-index: 2;
            animation: slideInLeft 0.8s ease-out;
        }

        .hero h2 {
            font-size: 2.2rem;
            margin: 0;
            font-weight: 800;
            background: linear-gradient(135deg, #1f2937, #3b82f6);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            line-height: 1.2;
            letter-spacing: -0.5px;
        }

        .hero p {
            font-size: 1.1rem;
            margin: 0;
            color: #666;
            font-weight: 500;
            line-height: 1.6;
        }

        .hero-image {
            width: 100%;
            height: 100%;
            object-fit: contain;
            border-radius: 12px;
            animation: slideInRight 0.8s ease-out;
        }

        /* Animações */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes slideInLeft {
            from {
                opacity: 0;
                transform: translateX(-30px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(30px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .cta-button {
            background: linear-gradient(135deg, #3b82f6, #06b6d4);
            color: white;
            border: none;
            padding: 14px 32px;
            border-radius: 50px;
            font-weight: 700;
            font-size: 1rem;
            cursor: pointer;
            box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
            transition: all 0.3s ease;
            width: fit-content;
            position: relative;
            overflow: hidden;
        }

        .cta-button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.15);
            transition: left 0.3s ease;
        }

        .cta-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 28px rgba(59, 130, 246, 0.35);
        }

        .cta-button:hover::before {
            left: 100%;
        }

        /* Hero responsividade */
        @media (max-width: 768px) {
            .hero {
                margin: 14px 0;
                border-radius: 14px;
            }

            .hero-content {
                grid-template-columns: 1fr;
                gap: 20px;
                padding: 28px;
                min-height: auto;
            }

            .hero h2 {
                font-size: 1.7rem;
            }

            .hero p {
                font-size: 0.95rem;
            }

            .hero-image {
                width: 100%;
                height: auto;
                max-height: 280px;
            }
        }

        @media (max-width: 480px) {
            .hero {
                margin: 12px 0;
                border-radius: 12px;
            }

            .hero-content {
                gap: 16px;
                padding: 20px;
                display: flex;
                flex-direction: column;
            }

            .hero-text {
                order: 2;
                text-align: center;
                animation: slideInLeft 0.6s ease-out;
            }

            .hero h2 {
                font-size: 1.4rem;
                line-height: 1.3;
            }

            .hero p {
                font-size: 0.9rem;
                color: #777;
            }

            .cta-button {
                padding: 12px 24px;
                font-size: 0.9rem;
                width: 100%;
                text-align: center;
            }

            .hero-image {
                order: 1;
                width: 100%;
                height: auto;
                max-height: 240px;
                object-fit: contain;
                animation: slideInRight 0.6s ease-out;
            }
        }

        .categories-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            grid-auto-rows: 110px;
            gap: 14px;
            padding: 14px 0;
            width: 100%;
            box-sizing: border-box;
        }

        .categories-grid::-webkit-scrollbar {
            display: none;
        }

        @media (max-width: 768px) {
            .categories-grid {
                grid-template-columns: repeat(4, 1fr);
                grid-auto-rows: 100px;
                gap: 12px;
            }
        }

        @media (max-width: 480px) {
            .categories-grid {
                grid-template-columns: repeat(3, 1fr);
                grid-auto-rows: 90px;
                gap: 10px;
            }
        }

        .category-chip {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background-color: var(--card-bg);
            border-radius: 16px;
            padding: 16px 8px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
            transition: all 0.3s ease;
            border: 2px solid transparent;
            min-width: 100px;
            gap: 10px;
        }

        .category-chip:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 24px rgba(59, 130, 246, 0.15);
            border-color: #3b82f6;
        }

        .category-chip.active {
            background: linear-gradient(135deg, #f0f4ff, #e0f2fe);
            border-color: #3b82f6;
        }

        .category-chip i {
            font-size: 2.2rem;
            color: #3b82f6;
        }

        .category-chip span {
            font-size: 0.85rem;
            text-align: center;
            font-weight: 600;
            color: var(--text);
        }

        .category-chip img {
            display: none;
        }

        /* Products */
        /* Grid horizontal de produtos */
        .products-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            /* sempre 4 colunas */
            gap: 20px;
            margin: 20px 0;
        }

        .products-grid::-webkit-scrollbar {
            display: none;
        }

        .product-card {
            flex: 0 0 250px;
            background-color: var(--card-bg);
            border-radius: 16px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
            transition: all 0.3s ease;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border: 2px solid #ffffff;
        }

        .product-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
        }

        .product-image {
            width: 100%;
            height: 180px;
            border-radius: 12px 12px 0 0;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: #f5f5f5;
        }

        .product-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .product-info {
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .product-name {
            font-weight: 700;
            font-size: 1rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

        .product-store-container {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 5px;
        }

        .product-store-container img {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            object-fit: cover;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        }

        .product-store-container span {
            font-size: 0.85rem;
            color: var(--secondary);
        }

        .product-distance {
            font-size: 0.8rem;
            color: #777;
        }

        .product-price {
            font-weight: 800;
            font-size: 1.1rem;
            color: var(--primary);
        }

        .add-to-cart {
            margin-top: auto;
            padding: 8px;
            background: var(--primary);
            color: white;
            font-weight: 700;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .add-to-cart:hover {
            background: var(--secondary);
        }

        /* Modo escuro */
        .dark-mode .product-image {
            background-color: #2d2d2d;
        }

        .dark-mode .product-image.emoji-fallback {
            background-color: #1e2e1e;
        }

        .pac-container {
            z-index: 99999 !important;
        }

        /* Loading state */
        .loading {
            text-align: center;
            padding: 2rem;
            color: #666;
            font-style: italic;
            grid-column: 1 / -1;
        }

        .no-products {
            text-align: center;
            padding: 2rem;
            color: #999;
            grid-column: 1 / -1;
        }

        .add-to-cart {
            width: 100%;
            padding: 12px;
            background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
            color: white;
            border: none;
            border-radius: 12px;
            font-weight: 700;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            margin-top: auto;
        }

        .add-to-cart::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.15);
            transition: left 0.3s ease;
        }

        .add-to-cart:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
        }

        .add-to-cart:hover::before {
            left: 100%;
        }

        /* Cart */
        .fixed-cart {
            position: fixed;
            top: 70px;
            right: 20px;
            z-index: 1002;
        }

        .cart-icon-btn {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            border: none;
            border-radius: 14px;
            padding: 12px 16px;
            font-size: 1.2rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            box-shadow: 0 6px 15px rgba(107, 70, 193, 0.3);
            cursor: pointer;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
        }

        .cart-icon-btn:before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: 0.5s;
        }

        .cart-icon-btn:hover:before {
            left: 100%;
        }

        .cart-icon-btn:hover {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 8px 20px rgba(107, 70, 193, 0.4);
        }

        .cart-icon {
            margin-right: 8px;
            font-size: 1.4rem;
            position: relative;
            z-index: 1;
        }

        .cart-count {
            background: var(--accent);
            color: white;
            border-radius: 50%;
            padding: 4px 8px;
            font-size: 0.8rem;
            font-weight: 700;
            margin-left: 6px;
            min-width: 24px;
            text-align: center;
            box-shadow: 0 3px 8px rgba(229, 62, 62, 0.3);
            position: relative;
            z-index: 1;
            transition: var(--transition);
        }

        .cart-icon-btn:hover .cart-count {
            transform: scale(1.2) rotate(10deg);
            box-shadow: 0 4px 10px rgba(229, 62, 62, 0.4);
        }

        /* Responsividade */
        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                gap: 10px;
            }

            .search-bar {
                max-width: 100%;
                margin: 8px 0;
            }

            .fixed-cart {
                top: 65px;
                right: 10px;
            }

            .cart-icon-btn {
                padding: 10px 14px;
                font-size: 1rem;
            }
        }

        .cart-dropdown {
            display: none;
            /* Use fixed so the dropdown floats above other stacking contexts */
            position: fixed;
            top: 70px;
            right: 20px;
            width: 380px;
            background: var(--card-bg);
            border-radius: 18px;
            box-shadow: 0 10px 40px rgba(106, 17, 203, 0.15);
            padding: 20px;
            animation: fadeIn 0.3s;
            border: 1px solid rgba(106, 17, 203, 0.1);
            z-index: 11000;
            /* above hero but below checkout (13000) and login overlay (14000) */
        }

        .cart-dropdown-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 800;
            font-size: 1.1rem;
            margin-bottom: 14px;
            padding-bottom: 12px;
            border-bottom: 2px solid var(--bg);
            color: var(--primary);
        }

        .close-cart-dropdown {
            background: none;
            border: none;
            font-size: 1.6rem;
            color: var(--text);
            cursor: pointer;
            opacity: 0.6;
            transition: var(--transition);
            padding: 0;
            line-height: 1;
        }

        .close-cart-dropdown:hover {
            opacity: 1;
            color: var(--danger);
        }

        .cart-dropdown-items {
            max-height: 320px;
            overflow-y: auto;
            margin-bottom: 14px;
            padding-right: 6px;
        }

        .cart-dropdown-items::-webkit-scrollbar {
            width: 5px;
        }

        .cart-dropdown-items::-webkit-scrollbar-track {
            background: transparent;
        }

        .cart-dropdown-items::-webkit-scrollbar-thumb {
            background: rgba(106, 17, 203, 0.2);
            border-radius: 3px;
        }

        .cart-dropdown-items::-webkit-scrollbar-thumb:hover {
            background: rgba(106, 17, 203, 0.4);
        }

        .cart-dropdown-item {
            display: flex;
            align-items: flex-start;
            margin-bottom: 12px;
            padding: 12px;
            border-radius: 12px;
            background: var(--bg);
            gap: 12px;
        }

        .cart-dropdown-img {
            width: 60px;
            height: 60px;
            border-radius: 10px;
            overflow: hidden;
            background: #f5f5f5;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        }

        .cart-dropdown-img img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .cart-dropdown-details {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
        }

        .cart-dropdown-name {
            font-weight: 700;
            font-size: 0.9rem;
            color: var(--text);
            line-height: 1.2;
            word-break: break-word;
        }

        .cart-dropdown-price {
            color: var(--primary);
            font-size: 0.95rem;
            font-weight: 700;
            margin: 2px 0;
        }

        .cart-dropdown-qty {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: 6px;
            background: white;
            border-radius: 8px;
            padding: 2px 4px;
            width: fit-content;
        }

        .cart-dropdown-btn {
            background: transparent;
            border: none;
            border-radius: 6px;
            width: 26px;
            height: 26px;
            font-size: 0.95rem;
            font-weight: 700;
            cursor: pointer;
            color: var(--primary);
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cart-dropdown-btn:hover {
            background: rgba(106, 17, 203, 0.15);
            transform: scale(1.1);
        }

        .cart-dropdown-remove {
            background: none;
            border: none;
            color: var(--danger);
            font-size: 1.3rem;
            cursor: pointer;
            opacity: 0.6;
            transition: var(--transition);
            padding: 4px;
            margin-left: auto;
            align-self: flex-start;
        }

        .cart-dropdown-remove:hover {
            opacity: 1;
            transform: scale(1.15);
        }

        .cart-dropdown-footer {
            display: flex;
            flex-direction: column;
            gap: 12px;
            font-weight: 700;
            margin-top: 14px;
            padding-top: 14px;
            border-top: 2px solid var(--bg);
        }

        .cart-dropdown-footer span {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 1.05rem;
            color: var(--primary);
        }

        .cart-dropdown-checkout {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            border: none;
            border-radius: 12px;
            padding: 14px 18px;
            font-weight: 700;
            cursor: pointer;
            font-size: 1rem;
            transition: var(--transition);
            box-shadow: 0 4px 12px rgba(106, 17, 203, 0.25);
        }

        .cart-dropdown-checkout:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(106, 17, 203, 0.35);
        }

        .summary-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
        }

        .summary-total {
            font-weight: 800;
            font-size: 1.2rem;
            border-top: 2px solid var(--bg);
            padding-top: 10px;
            margin-top: 10px;
        }

        .checkout-button {
            width: 100%;
            padding: 15px;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            border: none;
            border-radius: 50px;
            font-weight: 700;
            font-size: 1.1rem;
            cursor: pointer;
            margin-top: 20px;
            transition: var(--transition);
        }

        .checkout-button:hover {
            transform: scale(1.02);
        }

        /* Checkout */
        .checkout-form {
            background-color: var(--card-bg);
            border-radius: var(--border-radius);
            padding: 20px;
            box-shadow: var(--shadow);
            margin: 20px 0;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
        }

        .form-group input,
        .form-group select {
            width: 100%;
            padding: 12px 15px;
            border-radius: 12px;
            border: 2px solid var(--bg);
            background-color: var(--bg);
            color: var(--text);
        }

        .form-row {
            display: flex;
            gap: 15px;
        }

        .form-row .form-group {
            flex: 1;
        }

        /* Orders */
        .orders-list {
            margin: 20px 0;
        }

        .order-card {
            background-color: var(--card-bg);
            border-radius: var(--border-radius);
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: var(--shadow);
        }

        .order-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 15px;
            border-bottom: 2px solid var(--bg);
            padding-bottom: 10px;
        }

        .order-id {
            font-weight: 700;
            color: var(--primary);
        }

        .order-status {
            padding: 5px 15px;
            border-radius: 50px;
            font-weight: 600;
            font-size: 0.9rem;
        }

        .status-pending {
            background-color: rgba(255, 202, 40, 0.2);
            color: var(--warning);
        }

        .status-delivered {
            background-color: rgba(0, 210, 106, 0.2);
            color: var(--success);
        }

        .status-canceled {
            background-color: rgba(255, 77, 77, 0.2);
            color: var(--danger);
        }

        .order-items {
            margin-bottom: 15px;
        }

        .order-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
        }

        .order-footer {
            display: flex;
            justify-content: space-between;
            border-top: 2px solid var(--bg);
            padding-top: 15px;
            font-weight: 700;
        }

        /* Inicio da area MeusPedidos */

        .seller-foto {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 10px;
            object-fit: cover;
        }

        .order-seller {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
        }

        .details-btn {
            margin: 10px 0;
            cursor: pointer;
            background: none;
            border: 1px solid var(--primary);
            padding: 5px 10px;
            border-radius: 5px;
        }

        .order-details p {
            margin: 5px 0;
        }

        .status-spinner {
            display: inline-block;
            width: 14px;
            height: 14px;
            border: 2px solid #ccc;
            border-top-color: var(--warning);
            border-radius: 50%;
            margin-right: 5px;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        /* Fim da area MeusPedidos */

        /* Profile */
        .profile-card {
            background-color: var(--card-bg);
            border-radius: var(--border-radius);
            padding: 20px;
            box-shadow: var(--shadow);
            margin: 20px 0;
            text-align: center;
        }

        .profile-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            margin: 0 auto 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 2.5rem;
        }

        .profile-name {
            font-weight: 800;
            font-size: 1.5rem;
            margin-bottom: 5px;
        }

        .profile-role {
            color: var(--secondary);
            margin-bottom: 20px;
        }

        .profile-stats {
            display: flex;
            justify-content: space-around;
            margin: 20px 0;
        }

        .stat {
            text-align: center;
        }

        .stat-value {
            font-weight: 800;
            font-size: 1.5rem;
            color: var(--primary);
        }

        .stat-label {
            font-size: 0.9rem;
            opacity: 0.7;
        }

        .profile-menu {
            margin-top: 20px;
        }

        .menu-item {
            display: flex;
            align-items: center;
            padding: 15px;
            border-radius: 12px;
            margin-bottom: 10px;
            background-color: var(--bg);
            cursor: pointer;
            transition: var(--transition);
        }

        .menu-item:hover {
            background-color: rgba(106, 17, 203, 0.1);
        }

        .menu-icon {
            margin-right: 15px;
            font-size: 1.2rem;
        }

        /* Help */
        .faq-list {
            margin: 20px 0;
        }

        .faq-item {
            background-color: var(--card-bg);
            border-radius: var(--border-radius);
            margin-bottom: 15px;
            box-shadow: var(--shadow);
            overflow: hidden;
        }

        .faq-question {
            padding: 20px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .faq-answer {
            padding: 0 20px 20px;
            color: rgba(0, 0, 0, 0.7);
        }

        [data-theme="dark"] .faq-answer {
            color: rgba(255, 255, 255, 0.7);
        }

        /* Animations */
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes pulse {
            0% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.05);
            }

            100% {
                transform: scale(1);
            }
        }

        .pulse {
            animation: pulse 1.5s infinite;
        }

        /* Toast */
        .toast {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background-color: var(--success);
            color: white;
            padding: 15px 25px;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            display: flex;
            align-items: center;
            z-index: 9000;
            transform: translateY(100px);
            opacity: 0;
            transition: var(--transition);
        }

        .toast.show {
            transform: translateY(0);
            opacity: 1;
        }

        .toast-error {
            background-color: var(--danger);
        }

        .my-swal-container {
            z-index: 99999 !important;
            /* aumenta acima de qualquer modal ou dropdown */
        }

        /* Aumentar z-index do SweetAlert2 */
        .swal2-container {
            z-index: 99999 !important;
        }

        .swal2-popup {
            z-index: 99999 !important;
        }

        /* Se estiver usando toast especificamente */
        .swal2-toast {
            z-index: 99999 !important;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                align-items: stretch;
            }

            .logo {
                margin-bottom: 15px;
                justify-content: center;
            }

            .search-bar {
                max-width: 100%;
                margin: 0 0 15px 0;
            }

            .header-actions {
                justify-content: center;
            }

            .products-grid {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            }

            .form-row {
                flex-direction: column;
                gap: 0;
            }
        }

        /* Modal ZappyLog */
        .modal-zappy .modal-content.auth-card {
            background: var(--card-bg);
            color: var(--text);
            border-radius: 24px;
            box-shadow: var(--shadow);
            overflow: hidden;
            border: 1px solid rgba(0, 0, 0, 0.06);
        }

        .modal-backdrop.show {
            background-color: rgba(255, 255, 255, 0.4) !important;
            backdrop-filter: blur(6px);
        }

        /* Modal full-screen ZappyLog */
        #loginModal .modal-dialog {
            max-width: 100% !important;
            width: 100% !important;
            height: 100% !important;
            margin: 0;
            /* remove centralização automática de altura */
        }

        #loginModal .modal-content {
            height: 100% !important;
            border-radius: 0;
            /* opcional, deixa quadrado full-screen */
            display: flex;
            flex-direction: column;
            background-color: var(--card-bg);
            color: var(--text);
            overflow-y: auto;
        }

        #loginModal .modal-body {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        /* Backdrop */
        .modal-backdrop.show {
            background-color: rgba(0, 0, 0, 0.6) !important;
        }

        .auth-close {
            position: absolute;
            top: 14px;
            right: 16px;
            z-index: 3;
        }

        .auth-hero {
            background: linear-gradient(45deg, var(--primary), var(--secondary));
            color: #fff;
            padding: 28px 24px;
        }

        .auth-hero .brand {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 800;
            font-size: 1.1rem;
            opacity: .95;
        }

        .auth-hero .logo-icon {
            filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .2));
        }

        .auth-hero .hero-title {
            margin: 8px 0 4px;
            font-weight: 800;
        }

        .auth-hero .hero-sub {
            margin: 0;
            opacity: .95;
        }

        .auth-body {
            padding: 20px 22px 24px;
        }

        .benefits {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
            margin-bottom: 16px;
        }

        .benefit {
            background: rgba(0, 0, 0, 0.03);
            border: 1px solid rgba(0, 0, 0, 0.06);
            padding: 10px 12px;
            border-radius: 16px;
            font-size: .95rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        [data-theme="dark"] .benefit {
            background: rgba(255, 255, 255, 0.04);
            border-color: rgba(255, 255, 255, 0.08);
        }

        .btn-auth-cta {
            width: 100%;
            padding: 12px 18px;
            border-radius: 999px;
            font-weight: 800;
            border: 0;
            background: linear-gradient(45deg, var(--primary), var(--secondary));
            color: #fff;
            margin: 4px 0 14px;
            transition: var(--transition);
        }

        .btn-auth-cta:hover {
            transform: translateY(-1px);
            box-shadow: var(--shadow);
        }

        .steps {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
            margin-bottom: 8px;
        }

        .step {
            display: flex;
            gap: 10px;
            align-items: center;
            background: var(--card-bg);
            border: 1px solid rgba(0, 0, 0, 0.06);
            border-radius: 14px;
            padding: 10px;
        }

        [data-theme="dark"] .step {
            border-color: rgba(255, 255, 255, 0.08);
        }

        .step-badge {
            width: 28px;
            height: 28px;
            display: grid;
            place-items: center;
            border-radius: 50%;
            background: linear-gradient(45deg, var(--primary), var(--secondary));
            color: #fff;
            font-weight: 800;
            font-size: .9rem;
        }

        .step-title {
            font-weight: 700;
            font-size: .95rem;
            line-height: 1;
        }

        .step-sub {
            font-size: .82rem;
            opacity: .75;
        }

        .microcopy {
            font-size: .8rem;
            opacity: .75;
            margin: 0 0 10px;
            text-align: center;
        }

        .btn-ghost {
            width: 100%;
            border-radius: 999px;
        }

        /* Responsivo */
        @media (max-width: 576px) {

            .benefits,
            .steps {
                grid-template-columns: 1fr;
            }
        }

        .store-card {
            background: var(--card-bg);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            padding: 1rem;
            text-align: center;
            transition: var(--transition);
            margin: 10px;
        }

        .store-card:hover {
            transform: translateY(-5px);
        }

        .store-photo {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            object-fit: cover;
            margin-bottom: 10px;
        }

        .banner-fechado {
            display: none;
            background: #ffcc00;
            color: #333;
            font-weight: 600;
            padding: 12px;
            text-align: center;
            border-bottom: 2px solid #ffa500;
            animation: fadeIn 0.5s ease-in-out;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        /* Estilos para o botão de localização - versão discreta */
        .enable-location-btn {
            background: transparent;
            color: var(--secondary);
            border: 1px solid var(--secondary);
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 11px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-weight: 500;
            width: 100%;
            text-align: center;
            opacity: 0.8;
        }

        .enable-location-btn:hover {
            background: var(--secondary);
            color: white;
            opacity: 1;
            transform: none;
            box-shadow: none;
        }

        /* Garantir que o botão não quebre o layout */
        .product-distance {
            min-height: 20px;
            display: flex;
            align-items: center;
            justify-content: flex-start;
        }

        /* Estilo para quando a distância é mostrada (sem botão) */
        .product-distance:not(:has(.enable-location-btn)) {
            font-size: 0.75rem;
            color: #666;
            min-height: auto;
        }

        .product-stock {
            font-size: 0.8rem;
            margin: 4px 0;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .add-to-cart:disabled {
            background: #cccccc !important;
            cursor: not-allowed !important;
            transform: none !important;
            box-shadow: none !important;
        }

        .add-to-cart:disabled:hover::before {
            left: -100% !important;
        }