:root {
    --primary: #0066FF;
    --primary-glow: rgba(0, 102, 255, 0.3);
    --bg: #050505;
    --card-bg: #0f0f0f;
    --border: #1a1a1a;
    --text: #ffffff;
    --text-dim: #888888;
    --success: #22c55e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Efeito de Grade no Fundo */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    opacity: 0.4;
}

/* Navbar */
header {
    padding: 20px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    font-size: 20px;
    box-shadow: 0 0 20px var(--primary-glow);
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -1px;
    color: white;
}

.logo-text span {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

.btn-logout {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.btn-ghost {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
    background: transparent;
    border: none;
    cursor: pointer;
}

.btn-ghost:hover {
    color: white;
}

.btn-white {
    background: white;
    color: black;
    padding: 10px 20px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-white:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

/* Loader Animation */
.loader {
    width: 16px;
    height: 16px;
    border: 2px solid #FFF;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hero Section */
.hero {
    padding: 80px 10% 40px;
    text-align: center;
}

.badge-hero {
    background: rgba(0, 102, 255, 0.1);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(0, 102, 255, 0.2);
    margin-bottom: 24px;
    display: inline-block;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.hero p {
    color: var(--text-dim);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Products Section */
.container {
    padding: 40px 10% 100px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.card-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.card h3 {
    font-size: 20px;
    font-weight: 700;
}

.card ul {
    list-style: none;
    margin-bottom: 40px;
}

.card ul li {
    color: var(--text-dim);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.card ul li::before {
    content: '→';
    color: var(--primary);
    font-weight: 800;
}

.price-container {
    margin-bottom: 24px;
}

.price-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 700;
}

.price-value {
    font-size: 42px;
    font-weight: 800;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.price-value span {
    font-size: 16px;
    color: var(--text-dim);
    font-weight: 500;
}

.btn-buy {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-buy:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 20px var(--primary-glow);
}

.stock-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
}

/* Modais */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    padding: 40px;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
}

.modal-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    text-align: center;
}

.modal-subtitle {
    color: var(--text-dim);
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    outline: none;
    transition: 0.3s;
}

.form-input:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.08);
}

.btn-modal {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    margin-top: 10px;
}

.modal-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-dim);
}

.modal-switch span {
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
}

/* Footer */
.site-footer {
    margin-top: 60px;
    padding: 60px 10% 35px;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(0,102,255,.035), rgba(255,255,255,.015));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 55px;
    align-items: flex-start;
}

.footer-brand-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.footer-brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 22px;
    box-shadow: 0 14px 38px var(--primary-glow);
}

.footer-brand-name {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -1px;
}

.footer-brand-name span { color: var(--primary); }

.footer-brand p, .footer-item p, .footer-bottom p {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.7;
}

.footer-contact { margin-top: 14px; }
.footer-contact strong { color: #fff; }

.footer-col h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 22px;
}

.footer-item {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.footer-item-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 12px;
    background: rgba(0,102,255,.12);
    border: 1px solid rgba(0,102,255,.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-item strong {
    color: #fff;
    display: block;
    margin-bottom: 4px;
}

.footer-bottom {
    margin-top: 42px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    display: block;
}

.footer-logo span { color: var(--primary); }
.footer-text { color: var(--text-dim); font-size: 14px; }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; }
}

@media (max-width: 768px) {
    .site-footer { padding: 42px 5% 28px; }
    .footer-brand-name { font-size: 23px; }
    .footer-col h3 { font-size: 18px; }
}

/* Mobile */
@media (max-width: 768px) {
    header { padding: 20px 5%; }
    .nav-actions { gap: 10px; }
    .btn-white { padding: 8px 16px; font-size: 12px; }
    .hero { padding: 60px 5% 30px; }
    .container { padding: 20px 5% 60px; }
    .hero h1 { font-size: 40px; }
}


/* Correções mobile e segurança visual */
input, select, textarea, button { font-size: 16px; }
.mobile-profile-wrap { display: none; position: relative; }
.mobile-profile-button {
    width: 42px; height: 42px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06); color: #fff; display:flex; align-items:center; justify-content:center;
    font-weight: 800; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.mobile-user-menu {
    display:none; position:absolute; right:0; top:52px; min-width:210px; background:#0f0f0f;
    border:1px solid #1f2937; border-radius:16px; padding:8px; z-index:3000;
    box-shadow:0 18px 50px rgba(0,0,0,.55);
}
.mobile-user-menu.open { display:block; }
.mobile-user-menu a, .mobile-user-menu button {
    width:100%; display:flex; align-items:center; gap:10px; padding:12px 12px; border-radius:12px;
    color:#fff; text-decoration:none; background:transparent; border:0; text-align:left; font-weight:700; cursor:pointer;
}
.mobile-user-menu a:hover, .mobile-user-menu button:hover { background:rgba(0,102,255,.14); }
.mobile-user-info { padding:10px 12px; color:#a3a3a3; font-size:13px; border-bottom:1px solid #1f2937; margin-bottom:6px; }

@media (max-width: 768px) {
    .nav-actions .user-badge { display:none; }
    .mobile-profile-wrap { display:block; }
    header { padding: 14px 5%; }
    .logo-text { font-size: 20px; }
    .modal-content { padding: 24px; }
    input, select, textarea { font-size:16px!important; }
}

.stock-badge.out-of-stock {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: #fecaca !important;
}


/* Feedback profissional */
.toast-wrap {
    position: fixed; right: 18px; top: 18px; z-index: 99999; display: grid; gap: 10px; max-width: min(420px, calc(100vw - 28px));
}
.toast {
    transform: translateY(-8px); opacity: 0; transition: .22s ease;
    background: #0f172a; color: #fff; border: 1px solid rgba(255,255,255,.10); border-radius: 16px;
    padding: 13px 14px; box-shadow: 0 18px 60px rgba(0,0,0,.35); display: flex; align-items: center; gap: 10px; font-weight: 800;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { width: 24px; height: 24px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; font-weight: 950; }
.toast-success .toast-icon { background: rgba(34,197,94,.18); color: #4ade80; }
.toast-error .toast-icon { background: rgba(239,68,68,.18); color: #f87171; }
.toast-info .toast-icon { background: rgba(0,102,255,.18); color: #60a5fa; }
.form-message { margin-bottom: 12px; border-radius: 12px; padding: 11px 12px; font-size: 14px; font-weight: 800; }
.form-message-error { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35); color: #fecaca; }
.form-message-success { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.35); color: #bbf7d0; }
@media (max-width: 768px) { .toast-wrap { left: 14px; right: 14px; top: 12px; } }
