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

:root {
    --primary: #7c3aed;
    --dark-bg: #0b0f17;
    --card-bg: #111827;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --text: #ffffff;
    --text-secondary: #9ca3af;
    --border: #374151;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--dark-bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
}

.flash-sale-banner {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 1.5rem 0;
    border-bottom: 3px solid #991b1b;
}

.countdown-timer {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.timer-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.timer-value {
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
}

.timer-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.timer-separator {
    font-size: 3rem;
    font-weight: bold;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    background: var(--card-bg);
    border-bottom: 2px solid var(--primary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.cart-link {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.user-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    max-width: 400px;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.alert-success { background: var(--success); color: white; }
.alert-danger { background: var(--danger); color: white; }
.alert-warning { background: var(--warning); color: white; }
.alert-info { background: var(--info); color: white; }

.alert-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #6d28d9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.25rem;
    font-weight: bold;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, #581c87 100%);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2rem 0;
}

.product-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

.product-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.product-image-placeholder {
    width: 100%;
    height: 350px;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.product-info {
    padding: 1rem;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.price-current {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success);
}

.price-compare {
    font-size: 1rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge-success { background: var(--success); color: white; }
.badge-danger { background: var(--danger); color: white; }

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.login-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.telegram-login-wrapper {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.login-info {
    text-align: left;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.login-info ul {
    list-style: none;
}

.login-info li {
    padding: 0.5rem 0;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.cart-item-image {
    width: 100px;
    height: 100px;
}

.cart-item-image img,
.cart-item-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-quantity input {
    width: 60px;
    padding: 0.25rem;
    text-align: center;
}

.cart-summary {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-top: 2px solid var(--primary);
    margin-top: 1rem;
    font-size: 1.25rem;
    font-weight: bold;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--dark-bg);
    color: var(--text);
    font-size: 1rem;
}

.media-gallery {
    display: grid;
    gap: 1rem;
}

.media-item {
    width: 100%;
    border-radius: 8px;
}

footer {
    background: var(--card-bg);
    border-top: 2px solid var(--primary);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    /* Banner de oferta - COMPACTO IGUAL EXEMPLO */
    .flash-sale-banner {
        padding: 0.4rem 0;
    }
    
    .flash-sale-banner .container {
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
    }
    
    .flash-sale-banner > .container > div:first-child {
        gap: 0.4rem !important;
    }
    
    .flash-sale-banner > .container > div:first-child > span {
        font-size: 1.2rem !important;
    }
    
    .flash-sale-banner > .container > div:first-child > div > div:first-child {
        font-size: 0.85rem !important;
        white-space: nowrap;
    }
    
    .flash-sale-banner > .container > div:first-child > div > div:last-child {
        font-size: 0.65rem !important;
    }
    
    /* Timer - compacto ao lado */
    .countdown-timer {
        gap: 0.25rem !important;
    }
    
    .timer-box {
        padding: 0.3rem 0.4rem !important;
        min-width: 45px !important;
    }
    
    .timer-value {
        font-size: 1.1rem !important;
    }
    
    .timer-label {
        font-size: 0.6rem !important;
    }
    
    .timer-separator {
        font-size: 1.1rem !important;
        margin: 0 !important;
    }
    
    /* Products grid - 2 colunas compactas */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.5rem 0;
    }
    
    .product-card {
        max-width: 100%;
        min-height: auto !important;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-image-placeholder {
        height: 160px;
    }
    
    .product-info {
        padding: 0.4rem !important;
    }
    
    .product-info h3 {
        font-size: 0.75rem !important;
        line-height: 1.1;
        min-height: auto !important;
        margin-bottom: 0.2rem !important;
        margin-top: 0 !important;
    }
    
    .product-info > div > p {
        font-size: 0.65rem !important;
        line-height: 1.2;
        min-height: auto !important;
        margin: 0 !important;
        display: none;
    }
    
    .product-price {
        margin: 0.3rem 0 0 0 !important;
    }
    
    .price-current {
        font-size: 1rem !important;
    }
    
    .price-compare {
        font-size: 0.7rem;
    }
    
    /* Botões dos produtos - super compactos */
    .product-card .btn {
        font-size: 0.75rem !important;
        padding: 0.45rem !important;
    }
    
    .product-card > div:last-child {
        padding: 0.4rem !important;
        gap: 0.35rem !important;
        margin-top: 0 !important;
    }
    
    /* Container principal - sem espaços */
    main {
        padding-top: 0 !important;
    }
    
    main > .container {
        padding-top: 0.75rem !important;
        padding-bottom: 1rem !important;
    }
    
    /* Botões topo - compactos */
    .container > div:first-child {
        margin-bottom: 0.5rem !important;
        gap: 0.5rem !important;
    }
    
    .container > div:first-child .btn {
        font-size: 0.75rem !important;
        padding: 0.5rem 0.75rem !important;
        white-space: nowrap;
    }
    
    /* Título principal - compacto */
    .container > h1 {
        font-size: 1.1rem !important;
        margin: 0.5rem 0 0.75rem 0 !important;
    }
    
    /* Admin buttons */
    .container > div:nth-child(2) {
        margin-bottom: 0.75rem !important;
    }
    
    .container > div:nth-child(2) .btn {
        font-size: 0.85rem !important;
        padding: 0.65rem 1rem !important;
    }
    
    /* Hero */
    .hero {
        padding: 1.5rem 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .hero p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    /* Página do carrinho - mobile */
    main > .container {
        max-width: 100% !important;
        padding: 0 0.5rem 0.75rem 0.5rem !important;
    }
    
    /* Banner urgência - BRILHO PASSANDO */
    .urgency-banner {
        padding: 0.5rem !important;
        margin-bottom: 0.25rem !important;
        margin-top: 0 !important;
        position: relative !important;
        overflow: hidden !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        box-shadow: 0 4px 20px rgba(124, 58, 237, 0.6) !important;
    }
    
    .urgency-banner::after {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: -100% !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent) !important;
        animation: sweepGlow 2.5s infinite !important;
        z-index: 2 !important;
    }
    
    .urgency-banner p {
        font-size: 0.85rem !important;
        position: relative !important;
        z-index: 1 !important;
        white-space: nowrap !important;
        line-height: 1 !important;
    }
    
    @keyframes sweepGlow {
        0% {
            left: -100%;
        }
        100% {
            left: 100%;
        }
    }
    
    /* Voltar */
    main .container > a[href*="index"] {
        font-size: 0.85rem !important;
        margin-bottom: 0.25rem !important;
        margin-top: 0.25rem !important;
        display: block !important;
    }
    
    /* Card produtos no carrinho - MINI */
    .cart-items {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
        margin-top: 0.5rem !important;
    }
    
    .cart-items h2 {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Item do carrinho - HORIZONTAL e COMPACTO */
    .cart-item {
        flex-direction: row !important;
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }
    
    .cart-item > div[style*="width: 120px"] {
        width: 70px !important;
        height: 70px !important;
        flex-shrink: 0 !important;
    }
    
    .cart-item > div:nth-child(2) {
        flex: 1 !important;
    }
    
    .cart-item h3 {
        font-size: 0.8rem !important;
        margin-bottom: 0.2rem !important;
        line-height: 1.1 !important;
    }
    
    .cart-item button {
        font-size: 0.7rem !important;
        padding: 0 !important;
    }
    
    .cart-item > div:last-child {
        text-align: right !important;
        flex-shrink: 0 !important;
    }
    
    .cart-item p {
        font-size: 0.95rem !important;
        margin: 0 !important;
        font-weight: bold !important;
    }
    
    /* Resumo da compra - SUPER COMPACTO */
    .cart-summary {
        padding: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .cart-summary h2 {
        font-size: 0.95rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .cart-summary .subtotal-row {
        font-size: 0.85rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .cart-summary p {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Método de pagamento - MINI com efeito */
    .cart-summary > div {
        margin-bottom: 0.75rem !important;
    }
    
    .cart-summary > div > div[style*="display: flex"] {
        flex-direction: row !important;
        gap: 0.5rem !important;
    }
    
    .cart-summary label {
        flex: 1 !important;
    }
    
    .cart-summary label > div {
        padding: 0.6rem !important;
        gap: 0.3rem !important;
        transition: all 0.3s ease !important;
        cursor: pointer !important;
    }
    
    .cart-summary label > div:hover {
        transform: scale(1.05) !important;
    }
    
    .cart-summary label > div svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .cart-summary label > div span {
        font-size: 0.75rem !important;
    }
    
    /* Total - COMPACTO */
    .cart-total {
        padding: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .cart-total .total-row {
        flex-direction: row !important;
        gap: 0.5rem !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .cart-total .total-row > span:first-child {
        font-size: 1rem !important;
    }
    
    .cart-total .total-row > span:last-child {
        font-size: 1.4rem !important;
    }
    
    /* Botão finalizar - PISCANDO */
    .payment-button {
        font-size: 0.95rem !important;
        padding: 1rem !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        overflow: hidden !important;
        animation: blink 1.5s infinite !important;
    }
    
    .payment-button:active {
        transform: scale(0.98) !important;
    }
    
    .payment-button::before {
        animation: shimmer 3s infinite !important;
    }
    
    @keyframes shimmer {
        0% {
            left: -150%;
        }
        100% {
            left: 150%;
        }
    }
    
    @keyframes blink {
        0%, 100% {
            opacity: 1;
            box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
        }
        50% {
            opacity: 0.85;
            box-shadow: 0 6px 30px rgba(124, 58, 237, 0.8);
        }
    }
    
    /* Carrinho vazio */
    main .container > div[style*="text-align: center"] h2 {
        font-size: 1.2rem !important;
    }
    
    main .container > div[style*="text-align: center"] p {
        font-size: 0.9rem !important;
    }
    
    /* Página de pagamento PIX - mobile compacta */
    body div[style*="max-width: 100%"] {
        padding: 0 0.5rem !important;
    }
    
    /* Barra de progresso */
    body div[style*="progressBar"] {
        margin-bottom: 1rem !important;
        height: 4px !important;
    }
    
    /* Título */
    body h1 {
        font-size: 1.1rem !important;
        margin-bottom: 0.35rem !important;
    }
    
    /* Data */
    body h1 + p {
        font-size: 0.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Resumo do pedido */
    body div[style*="background: var(--card-bg)"] {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    body div[style*="background: var(--card-bg)"] h3 {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    body div[style*="background: var(--card-bg)"] p {
        font-size: 0.8rem !important;
        margin-bottom: 0.35rem !important;
    }
    
    body div[style*="border-top: 2px"] {
        margin: 0.75rem 0 !important;
        padding-top: 0.75rem !important;
    }
    
    body div[style*="border-top: 2px"] > div {
        font-size: 1rem !important;
    }
    
    /* Timer */
    #countdown {
        font-size: 1.75rem !important;
    }
    
    /* QR Code - compacto */
    #qrcode img {
        max-width: 180px !important;
        height: auto !important;
    }
    
    .qr-corner {
        width: 40px !important;
        height: 40px !important;
        border-width: 3px !important;
    }
    
    .qr-corner.top-left,
    .qr-corner.top-right,
    .qr-corner.bottom-left,
    .qr-corner.bottom-right {
        top: -8px !important;
    }
    
    /* Pix Copia e Cola */
    #pixCodeDisplay {
        font-size: 0.65rem !important;
        padding: 0.5rem !important;
        max-height: 60px !important;
    }
    
    /* Botão copiar */
    button.btn-block {
        font-size: 0.9rem !important;
        padding: 0.75rem !important;
    }
    
    /* Instruções */
    body div[style*="border-left: 4px"] {
        padding: 0.75rem !important;
    }
    
    body div[style*="border-left: 4px"] h3 {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    body div[style*="border-left: 4px"] p {
        font-size: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    body div[style*="border-left: 4px"] span {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.75rem !important;
    }
    
    /* Nav */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-brand a {
        font-size: 1.25rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Cart */
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
    }
    
    .cart-item-details {
        width: 100%;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Forms */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Previne zoom no iOS */
    }
    
    /* Login */
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    /* Footer */
    footer {
        margin-top: 2rem;
        padding: 1.5rem 0;
    }
    
    /* Alerts */
    .flash-messages {
        top: 60px;
        right: 10px;
        left: 10px;
        max-width: 100%;
    }
    
    .alert {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}
