@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #00b894;
    --primary-glow: rgba(0, 184, 148, 0.5);
    --secondary: #ff7675;
    --bg-color: #f8f9fa;
    --surface: #ffffff;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 15px 35px rgba(0, 184, 148, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-color); color: var(--text-dark); overflow: hidden; height: 100vh; }

.hidden { display: none !important; }
.screen { display: none; width: 100%; height: 100%; overflow-y: auto; padding-bottom: 90px; }
.screen.active { display: block; }
.screen.full-screen { padding-bottom: 0; background: var(--bg-color); z-index: 200; position: relative;}

#main-app-container { height: 100vh; display: flex; flex-direction: column; }
.app-main-scroll { flex-grow: 1; overflow-y: auto; padding-top: 70px; }

@keyframes pulse { 0% { transform: scale(1); } 100% { transform: scale(1.1); } }
@keyframes slideUpFade { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }
.fade-in-up { opacity: 0; animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.glass-effect { background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-border); }
.ripple { position: relative; overflow: hidden; transform: translate3d(0, 0, 0); }
.ripple:after { content: ""; display: block; position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; background-image: radial-gradient(circle, #000 10%, transparent 10.01%); background-repeat: no-repeat; background-position: 50%; transform: scale(10, 10); opacity: 0; transition: transform .5s, opacity 1s; }
.ripple:active:after { transform: scale(0, 0); opacity: .2; transition: 0s; }

.app-loader { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: var(--primary); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; transition: all 0.6s ease; }
.loader-icon { font-size: 60px; animation: pulse 1.5s infinite alternate; }
.app-loader h2 { font-size: 24px; margin-top: 10px; letter-spacing: 2px; }
.app-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none;}

.onboarding-content, .login-content { height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 30px; text-align: center; }
.onboarding-img { width: 80%; max-width: 300px; margin: 0 auto 30px; }
.onboarding-content h1 { font-size: 32px; line-height: 1.2; margin-bottom: 15px; color: var(--primary); }
.onboarding-content p { color: var(--text-light); margin-bottom: 40px; font-size: 16px; }

.btn-primary-large { width: 100%; background: var(--primary); color: white; border: none; padding: 18px; border-radius: 20px; font-size: 18px; font-weight: 700; display: flex; justify-content: center; align-items: center; gap: 10px; cursor: pointer; box-shadow: 0 10px 25px var(--primary-glow); transition: transform 0.2s; }
.btn-primary-large:active { transform: scale(0.98); }

.login-header { margin-bottom: 40px; }
.login-header i { font-size: 40px; color: var(--primary); margin-bottom: 10px; }
.login-header h2 { font-size: 24px; }
.input-group { display: flex; align-items: center; padding: 15px; border-radius: 16px; margin-bottom: 15px; background: var(--surface); }
.input-group i { color: var(--text-light); font-size: 20px; margin-right: 10px; }
.input-group input { border: none; background: transparent; width: 100%; outline: none; font-size: 16px; color: var(--text-dark);}
.forgot-pass { color: var(--text-light); font-size: 14px; margin-top: 15px; cursor: pointer; }
.divider { margin: 30px 0; position: relative; text-align: center; }
.divider span { background: var(--bg-color); padding: 0 15px; color: var(--text-light); font-size: 14px; position: relative; z-index: 1; }
.divider:before { content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: #e2e8f0; z-index: 0; }
.social-login { display: flex; justify-content: center; gap: 20px; }
.social-login button { width: 50px; height: 50px; border-radius: 12px; border: none; font-size: 24px; color: var(--text-dark); cursor: pointer; display: flex; align-items: center; justify-content: center;}

.app-header { position: fixed; top: 0; left: 0; width: 100%; height: 70px; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; z-index: 100; background: var(--glass-bg); backdrop-filter: blur(10px); box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03); }
.logo { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--text-dark); }
.logo i { color: var(--primary); font-size: 28px; }
.header-profile img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--primary); padding: 2px; }

.hero { padding: 20px 20px 15px; }
.hero h2 { font-size: 24px; font-weight: 700; line-height: 1.3; margin-bottom: 20px; }
.search-bar { border-radius: 20px; padding: 12px 20px; display: flex; align-items: center; gap: 15px; box-shadow: var(--shadow-soft); border: 1px solid rgba(255,255,255,0.5); }
.search-bar input { border: none; outline: none; background: transparent; width: 100%; font-size: 14px; font-weight: 500; }

.categories-wrapper { padding: 0 0 15px 0; }
.categories { display: flex; gap: 12px; overflow-x: auto; padding: 0 20px 10px; scrollbar-width: none; }
.categories::-webkit-scrollbar { display: none; }
.chip { background: var(--surface); color: var(--text-light); padding: 10px 20px; border-radius: 25px; font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-soft); cursor: pointer; transition: all 0.3s; border: 1px solid transparent; }
.chip.active { background: var(--primary); color: white; box-shadow: 0 8px 20px var(--primary-glow); transform: translateY(-2px); }
.section-title { padding: 0 20px 15px; }
.section-title h3 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 6px;}

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; padding: 0 20px 20px; }
.product-card { background: var(--surface); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-soft); position: relative; transition: all 0.4s ease; opacity: 0; }
.product-badge { position: absolute; top: 12px; left: 12px; background: var(--glass-bg); backdrop-filter: blur(5px); color: var(--text-dark); font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 12px; z-index: 10; }
.product-badge.destaque { color: var(--secondary); } .product-badge.novo { color: var(--primary); }
.img-container { width: 100%; height: 150px; }
.product-img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 16px; display: flex; flex-direction: column; }
.product-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; line-height: 1.2; }
.product-desc { font-size: 12px; color: var(--text-light); margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.product-price { font-weight: 700; font-size: 17px; color: var(--text-dark); }
.btn-add { background: var(--primary); color: white; border: none; width: 40px; height: 40px; border-radius: 14px; font-size: 22px; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: all 0.3s ease; box-shadow: 0 4px 15px var(--primary-glow); }
.btn-add:active { transform: scale(0.85); }

.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: 75px; display: flex; justify-content: space-around; align-items: center; border-radius: 30px 30px 0 0; z-index: 100; box-shadow: 0 -10px 40px rgba(0,0,0,0.05); }
.nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text-light); gap: 5px; transition: all 0.3s; padding: 10px; }
.nav-item i { font-size: 26px; transition: all 0.3s; }
.nav-item span { font-size: 11px; font-weight: 600; }
.nav-item.active { color: var(--primary); }
.nav-item.active i { transform: translateY(-5px); }
#cart-count { position: absolute; top: -6px; right: -10px; background: var(--secondary); color: white; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 50%; display: flex; justify-content: center; align-items: center; padding: 0 5px; border: 2px solid var(--surface); }
@keyframes cartPop { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }
.cart-pop { animation: cartPop 0.4s ease-out; }

.cart-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); z-index: 200; display: flex; flex-direction: column; justify-content: flex-end; visibility: hidden; opacity: 0; transition: all 0.4s ease; }
.cart-overlay.active { visibility: visible; opacity: 1; }
.cart-modal { background: var(--surface); width: 100%; max-height: 85vh; border-radius: 35px 35px 0 0; padding: 15px 25px 35px; transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; }
.cart-overlay.active .cart-modal { transform: translateY(0); }
.cart-indicator { width: 50px; height: 6px; background: #e2e8f0; border-radius: 10px; margin: 0 auto 20px; }
.cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.cart-header h3 { font-size: 22px; font-weight: 700; }
.cart-header i { font-size: 28px; color: var(--text-dark); background: var(--bg-color); border-radius: 50%; padding: 8px; cursor: pointer; }
.cart-items { flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; }
.cart-item { background: var(--bg-color); padding: 15px 20px; border-radius: 20px; display: flex; justify-content: space-between; align-items: center; }
.item-info h4 { font-size: 15px; margin-bottom: 5px; }
.item-info p { color: var(--primary); font-weight: 700; font-size: 15px; }
.item-actions { display: flex; align-items: center; background: var(--surface); border-radius: 15px; padding: 5px; box-shadow: var(--shadow-soft); }
.item-actions button { background: transparent; border: none; width: 30px; height: 30px; font-size: 18px; font-weight: bold; color: var(--text-dark); cursor: pointer; }
.item-actions span { width: 30px; text-align: center; font-size: 15px; font-weight: 700; }
.total-price { display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.highlight-price { font-size: 24px; font-weight: 700; color: var(--primary); }
.btn-whatsapp { width: 100%; background: linear-gradient(135deg, #25D366, #1da851); color: white; border: none; padding: 18px; border-radius: 20px; font-size: 16px; font-weight: 700; display: flex; justify-content: center; align-items: center; gap: 10px; cursor: pointer; box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4); transition: all 0.3s; }

#toast-container { position: fixed; top: 25px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.toast { background: var(--glass-bg); backdrop-filter: blur(10px); color: var(--text-dark); padding: 14px 24px; border-radius: 30px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-hover); border: 1px solid var(--glass-border); animation: slideDownBounce 0.5s forwards; }
.toast i { color: var(--primary); font-size: 22px; }
@keyframes slideDownBounce { 0% { opacity: 0; transform: translateY(-40px) scale(0.9); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
.toast.hide { opacity: 0; transform: translateY(-20px); transition: all 0.4s ease; }

.placeholder-content { padding: 20px; display: flex; justify-content: center; align-items: center; height: 60vh; }
.empty-state { text-align: center; color: var(--text-light); }
.empty-state i { font-size: 60px; margin-bottom: 15px; opacity: 0.5; }
.btn-small { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 12px; margin-top: 20px; font-weight: 600; cursor: pointer;}
.profile-header { text-align: center; padding: 30px 20px; }
.profile-big-img { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--primary); padding: 3px; margin-bottom: 15px; }
.profile-menu { padding: 0 20px; display: flex; flex-direction: column; gap: 10px; }
.menu-item { display: flex; align-items: center; padding: 15px 20px; border-radius: 16px; background: var(--surface); cursor: pointer; font-weight: 600; gap: 15px; }
.menu-item i { font-size: 22px; }
.ml-auto { margin-left: auto; color: var(--text-light); }