/**
 * DigitalBox - CSS Principal
 * Tema: Preto e Vermelho
 * Design: Moderno e Responsivo
 */

/* =====================================================
   VARIÁVEIS CSS (DESIGN SYSTEM)
   ===================================================== */

:root {
    /* Cores principais */
    --primary-red: #ff0000;
    --dark-red: #cc0000;
    --light-red: #ff3333;
    --accent-red: #ff6666;
    
    /* Tons de preto e cinza */
    --pure-black: #1f1f1f;
    --dark-black: #0a0a0a;
    --soft-black: #1a1a1a;
    --card-black: #1f1f1f;
    --border-black: #2a2a2a;
    --light-gray: #666666;
    --text-gray: #999999;
    --bg-gray: #f5f5f5;

    /* Gradientes */
    --gradient-red: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    --gradient-black: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 100%);
    --gradient-dark: linear-gradient(180deg, #1f1f1f 0%, #1a1a1a 100%);
    
    /* Tipografia */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    
    /* Espaçamentos */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(255, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.7);
    --shadow-red: 0 0 20px rgba(255, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(255, 0, 0, 0.4);
    
    /* Transições */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* =====================================================
   RESET E BASE
   ===================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--gradient-black);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =====================================================
   TIPOGRAFIA
   ===================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h5 { font-size: clamp(1.1rem, 2vw, 1.25rem); }
h6 { font-size: clamp(1rem, 1.5vw, 1.125rem); }

p {
    margin-bottom: var(--space-md);
    color: #cccccc;
}

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--light-red);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

/* =====================================================
   LAYOUT PRINCIPAL
   ===================================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-lg);
}

/* =====================================================
   HEADER E NAVEGAÇÃO
   ===================================================== */

.header {
    background: var(--gradient-dark);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border-black);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-red);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: var(--shadow-red);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
}

.nav-link {
    color: #cccccc;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-red);
    transform: translateX(-50%);
    transition: var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-red);
    background: rgba(255, 0, 0, 0.1);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.header-search {
    position: relative;
}

.header-search input {
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    background: var(--soft-black);
    border: 1px solid var(--border-black);
    border-radius: 50px;
    color: white;
    font-size: 0.9rem;
    width: 200px;
    transition: all 0.3s ease;
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
    width: 250px;
}

.header-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 0.9rem;
}

.cart-icon {
    position: relative;
    background: var(--gradient-red);
    color: white;
    border: none;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-red);
}

.cart-icon:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ffffff;
    color: var(--primary-red);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    min-width: 20px;
    text-align: center;
    animation: pulse 2s infinite;
}

/* =====================================================
   HERO SECTION
   ===================================================== */

.hero {
    background: var(--gradient-dark);
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-lg);
    text-shadow: none;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #cccccc;
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--gradient-red);
    color: white;
    padding: var(--space-lg) var(--space-2xl);
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
    border: none;
    cursor: pointer;
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    color: white;
}

/* =====================================================
   SEÇÕES DE CONTEÚDO
   ===================================================== */

.section {
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-title {
    color: #ffffff;
    margin-bottom: var(--space-md);
}

.section-subtitle {
    color: var(--text-gray);
    font-size: 1.125rem;
}

/* =====================================================
   GRID DE PRODUTOS
   ===================================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 380px));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.product-card {
    background: var(--card-black);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-black);
    overflow: hidden;
    transition: var(--transition-normal);
    position: relative;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    height: 420px;
    max-width: 380px;
    width: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-red);
    box-shadow: var(--shadow-red);
}

.product-image {
    width: 100%;
    height: 180px;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-red);
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: var(--gradient-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-info {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    color: var(--primary-red);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
}

.product-title {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.product-description {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: var(--space-lg);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-top: auto;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    position: relative;
    flex-wrap: wrap;
}

.price-from {
    color: var(--text-gray);
    font-size: 0.85rem;
    font-weight: 500;
    width: 100%;
    margin-bottom: -0.25rem;
}

.price-current {
    color: var(--primary-red);
    font-size: 1.5rem;
    font-weight: 700;
}

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

.discount-badge {
    background: var(--gradient-red);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: auto;
}

.btn-purchase {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    text-decoration: none;
    color: white;
}

.btn {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    background: var(--gradient-red);
    color: white;
}

.btn-primary {
    background: var(--gradient-red);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-red);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* =====================================================
   STOCK INDICATOR
   ===================================================== */

.stock-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    font-size: 0.875rem;
}

.stock-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stock-high { background: #00ff00; }
.stock-medium { background: #ffff00; }
.stock-low { background: #ff8800; }
.stock-out { background: #ff0000; }

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
    background: var(--pure-black);
    border-top: 2px solid var(--border-black);
    padding: var(--space-3xl) 0 var(--space-lg);
    margin-top: var(--space-3xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-section h3 {
    color: var(--primary-red);
    margin-bottom: var(--space-lg);
    font-size: 1.25rem;
}

.footer-section p,
.footer-section li {
    color: var(--text-gray);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links a {
    color: var(--text-gray);
    transition: var(--transition-fast);
}

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

.footer-bottom {
    border-top: 1px solid var(--border-black);
    padding-top: var(--space-lg);
    text-align: center;
    color: var(--text-gray);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--card-black);
    color: var(--text-gray);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.social-link:hover {
    background: var(--gradient-red);
    color: white;
    transform: translateY(-2px);
}

/* =====================================================
   MOBILE MENU
   ===================================================== */

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-sm);
}

/* =====================================================
   ANIMAÇÕES
   ===================================================== */

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.3); }
    50% { box-shadow: 0 0 30px rgba(255, 0, 0, 0.6); }
}

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

.animate-slide-up {
    animation: slideInUp 0.6s ease forwards;
}

/* =====================================================
   RESPONSIVIDADE
   ===================================================== */

@media (max-width: 768px) {
    :root {
        --space-lg: 1rem;
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
        --space-3xl: 2.5rem;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--gradient-dark);
        flex-direction: column;
        padding: var(--space-lg);
        border-top: 1px solid var(--border-black);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 320px));
        gap: var(--space-lg);
        justify-content: center;
    }

    .product-card {
        height: auto;
        min-height: 380px;
        max-width: 320px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .header-search {
        display: none;
    }
}

@media (max-width: 480px) {
    .container,
    .container-fluid {
        padding: 0 var(--space-md);
    }

    .hero {
        padding: var(--space-2xl) 0;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .products-grid {
        grid-template-columns: minmax(0, 380px);
        gap: var(--space-md);
        justify-content: center;
    }

    .product-card {
        height: auto;
        min-height: 320px;
        max-width: 380px;
    }

    .product-image {
        height: 120px;
        font-size: 2rem;
    }

    .btn-purchase {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9rem;
    }

    /* Additional mobile fixes */
    .section {
        padding: var(--space-xl) 0;
    }

    .section-header {
        margin-bottom: var(--space-lg);
    }

    .section-title {
        font-size: 1.35rem;
    }

    .section-subtitle {
        font-size: 0.875rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }

    .product-info h3 {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .footer {
        padding: var(--space-xl) 0 var(--space-md);
        margin-top: var(--space-xl);
    }

    .footer-section h3 {
        font-size: 1.1rem;
        margin-bottom: var(--space-md);
    }

    .social-links {
        gap: var(--space-md);
    }

    .social-link {
        width: 36px;
        height: 36px;
    }
}

/* =====================================================
   UTILITIES
   ===================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-red { color: var(--primary-red); }
.text-white { color: #ffffff; }
.text-gray { color: var(--text-gray); }

.bg-black { background: var(--pure-black); }
.bg-dark { background: var(--soft-black); }
.bg-card { background: var(--card-black); }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-red { box-shadow: var(--shadow-red); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

/* CSS com cores padrão fixas */
