:root {
    --primary: #2d3436;
    --secondary: #0984e3;
    --accent: #6c5ce7;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;
    --light: #dfe6e9;
    --dark: #2d3436;
    --bg: #f8f9fa;
    --card-bg: #fff;
    --text: #2d3436;
    --text-muted: #636e72;
    --border: #dfe6e9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', 'Roboto', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}

a { text-decoration: none; color: var(--secondary); transition: color 0.2s; }
a:hover { color: var(--accent); }

/* ===== ANIMAÇÕES ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fadeInUp { animation: fadeInUp 0.5s ease-out; }
.animate-fadeIn { animation: fadeIn 0.4s ease-out; }

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ===== NAVBAR ===== */
.navbar-cprint {
    background: linear-gradient(135deg, var(--dark) 0%, #1a1a2e 100%);
    padding: 0.4rem 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.navbar-cprint .navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff !important;
}
.navbar-cprint .navbar-brand img {
    height: 32px;
    width: auto;
}
.navbar-cprint .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.3rem 0.7rem !important;
    transition: all 0.2s;
    border-radius: 6px;
}
.navbar-cprint .nav-link:hover,
.navbar-cprint .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.1);
}
.navbar-cprint .carrinho-badge {
    background: var(--danger);
    color: #fff;
    border-radius: 50px;
    padding: 1px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 4px;
    position: relative;
    top: -1px;
    animation: pulse 2s infinite;
}

@media (max-width: 991px) {
    .navbar-cprint .carrinho-badge {
        position: absolute;
        top: 0;
        right: 0;
        font-size: 0.6rem;
        padding: 1px 5px;
    }
}

/* ===== FOOTER ===== */
.footer-cprint {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
}
.footer-cprint strong { color: #fff; }

/* ===== CARDS PRODUTO ===== */
.produto-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease-out;
}
.produto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.produto-card .img-wrapper {
    height: 220px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.produto-card .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.produto-card:hover .img-wrapper img {
    transform: scale(1.08);
}
.produto-card .card-body {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.produto-card .card-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}
.produto-card .card-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex: 1;
}
.produto-card .preco {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary);
    margin: 0.5rem 0;
}
.produto-card .btn-comprar {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: #fff;
    border: none;
    padding: 0.7rem;
    border-radius: 10px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.produto-card .btn-comprar:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(9,132,227,0.4);
}
.produto-card .btn-comprar::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}
.produto-card .btn-comprar:active::after {
    width: 200px;
    height: 200px;
}

/* ===== PÁGINA DO PRODUTO ===== */
.produto-detalhe .img-principal {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    cursor: zoom-in;
}
.produto-detalhe .img-principal:hover {
    transform: scale(1.02);
}
.produto-detalhe .preco-destaque {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--secondary);
}
.produto-detalhe .estoque-info {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.produto-detalhe .qty-input {
    width: 80px;
    text-align: center;
    border: 2px solid var(--light);
    border-radius: 10px;
    padding: 0.5rem;
    font-weight: 600;
}

/* ===== CARRINHO ===== */
.carrinho-item {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
    animation: fadeInUp 0.4s ease-out;
}
.carrinho-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.carrinho-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s;
}
.carrinho-item img:hover { transform: scale(1.1); }
.carrinho-item .item-info { flex: 1; }
.carrinho-item .item-nome { font-weight: 700; }
.carrinho-item .item-preco { color: var(--secondary); font-weight: 600; }
.carrinho-item .qty-control {
    display: flex;
    align-items: center;
    gap: 5px;
}
.carrinho-item .qty-control input {
    width: 60px;
    text-align: center;
    border: 2px solid var(--light);
    border-radius: 8px;
    padding: 0.3rem;
    transition: border-color 0.2s;
}
.carrinho-item .qty-control input:focus {
    border-color: var(--secondary);
    outline: none;
}
.carrinho-item .btn-remove {
    color: var(--danger);
    background: none;
    border: none;
    font-size: 1.2rem;
    transition: transform 0.2s;
}
.carrinho-item .btn-remove:hover { transform: scale(1.2); }
.carrinho-resumo {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 80px;
}
.carrinho-resumo .total {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary);
}
.carrinho-resumo .btn-finalizar {
    background: linear-gradient(135deg, var(--success), #00a381);
    color: #fff;
    border: none;
    padding: 0.8rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    width: 100%;
    transition: all 0.3s;
}
.carrinho-resumo .btn-finalizar:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0,184,148,0.4);
}

/* ===== CHECKOUT ===== */
.checkout-form .form-control {
    border: 2px solid var(--light);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    transition: all 0.2s;
}
.checkout-form .form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(9,132,227,0.15);
}
.checkout-form label { font-weight: 600; margin-bottom: 0.3rem; }

/* ===== ENTREGA OPTIONS ===== */
.entrega-option {
    background: var(--card-bg);
    border: 2px solid var(--light);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}
.entrega-option:hover {
    border-color: var(--secondary);
    background: rgba(9,132,227,0.03);
    transform: translateY(-2px);
}
.entrega-option.active {
    border-color: var(--secondary);
    background: rgba(9,132,227,0.08);
    box-shadow: 0 0 0 3px rgba(9,132,227,0.15);
}
.entrega-option .fw-bold { font-size: 0.95rem; }

/* ===== ENTREGA INFO ===== */
.entrega-info {
    background: var(--bg);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    border: 1px solid var(--light);
}

/* ===== PEDIDO SUCESSO ===== */
.pedido-sucesso-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 25px rgba(0,0,0,0.08);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}
.pedido-sucesso-card .pix-qr {
    max-width: 280px;
    margin: 1.5rem auto;
    padding: 1rem;
    background: #fff;
    border: 3px dashed var(--light);
    border-radius: 16px;
}
.pedido-sucesso-card .pix-qr img { width: 100%; }
.pedido-sucesso-card .pix-copia-cola {
    background: var(--bg);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.85rem;
    border: 1px solid var(--light);
    cursor: pointer;
    transition: all 0.2s;
}
.pedido-sucesso-card .pix-copia-cola:hover {
    background: #e8f5e9;
    border-color: var(--success);
}
.pedido-sucesso-card .status-badge {
    display: inline-block;
    padding: 0.3rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== ADMIN ===== */
.admin-sidebar {
    background: var(--dark);
    min-height: 100vh;
    padding: 1.5rem 0;
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.7rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left-color: var(--secondary);
}
.admin-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    text-align: center;
    transition: all 0.3s;
}
.admin-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.admin-card .numero { font-size: 2.5rem; font-weight: 800; color: var(--secondary); }
.admin-card .rotulo { color: var(--text-muted); font-weight: 500; }

/* ===== FLASH MESSAGES ===== */
.alert {
    border-radius: 12px;
    border: none;
    padding: 0.8rem 1.2rem;
    animation: fadeInUp 0.3s ease-out;
}

/* ===== BOTÃO VOLTAR AO TOPO ===== */
.btn-topo {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--secondary);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(9,132,227,0.3);
    z-index: 999;
    transition: all 0.3s;
    border: none;
}
.btn-topo:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(9,132,227,0.4);
    color: #fff;
}
.btn-topo.visible { display: flex; }

/* ===== DARK MODE ===== */
.dark-mode {
    --bg: #1a1a2e;
    --card-bg: #16213e;
    --text: #eaeaea;
    --text-muted: #a0a0a0;
    --light: #2d3436;
    --border: #2d3436;
}
.dark-mode body { background: var(--bg); color: var(--text); }
.dark-mode .produto-card,
.dark-mode .carrinho-item,
.dark-mode .carrinho-resumo,
.dark-mode .pedido-sucesso-card,
.dark-mode .admin-card,
.dark-mode .entrega-option { background: var(--card-bg); }
.dark-mode .form-control { background: var(--card-bg); color: var(--text); border-color: var(--border); }
.dark-mode .entrega-info { background: var(--card-bg); }

/* ===== BADGES DESCONTO ===== */
.badge-desconto {
    background: linear-gradient(135deg, var(--danger), #e74c3c);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    animation: pulse 2s infinite;
}

/* ===== STATUS BADGES ===== */
.status-aguardando_pagamento { background: #ffeaa7; color: #2d3436; }
.status-pago { background: #55efc4; color: #00b894; }
.status-em_separacao { background: #74b9ff; color: #0984e3; }
.status-enviado { background: #a29bfe; color: #6c5ce7; }
.status-entregue { background: #00b894; color: #fff; }
.status-cancelado { background: #fab1a0; color: #d63031; }

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s;
    animation: float 3s ease-in-out infinite;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    color: #fff;
}

/* ===== TOGGLE DARK MODE ===== */
.btn-dark-mode {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 45px;
    height: 45px;
    background: var(--dark);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 999;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.btn-dark-mode:hover { transform: scale(1.1); }

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
    .produto-card .img-wrapper { height: 160px; }
    .carrinho-item { flex-wrap: wrap; }
    .carrinho-item img { width: 60px; height: 60px; }
    .produto-detalhe .preco-destaque { font-size: 1.6rem; }
    .whatsapp-float { width: 50px; height: 50px; font-size: 1.4rem; bottom: 15px; right: 15px; }
    .btn-topo { bottom: 75px; right: 15px; width: 40px; height: 40px; }
    .btn-dark-mode { bottom: 75px; left: 15px; width: 40px; height: 40px; }
}
