/* ============================================
   TEMA PRINCIPAL - LOJA VIRTUAL MODERNA
   ============================================ */

/* Importação de fontes */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Variáveis de cores */
:root {
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --primary-light: #A29BFE;
    --secondary: #00B894;
    --secondary-dark: #00A381;
    --accent: #FDCB6E;
    --danger: #E17055;
    --danger-dark: #D63031;
    --warning: #FDCB6E;
    --info: #74B9FF;
    --dark: #2D3436;
    --dark-light: #636E72;
    --light: #DFE6E9;
    --lighter: #F5F6FA;
    --white: #FFFFFF;
    --gradient-primary: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
    --gradient-secondary: linear-gradient(135deg, #00B894 0%, #55EFC4 100%);
    --gradient-dark: linear-gradient(135deg, #2D3436 0%, #636E72 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--lighter);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   HEADER MODERNO
   ============================================ */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    gap: 32px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    font-weight: 300;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 14px 20px;
    padding-right: 50px;
    border: 2px solid var(--light);
    border-radius: 50px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    background: var(--lighter);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.search-bar button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar button:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon {
    position: relative;
    font-size: 24px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--lighter);
}

.cart-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

#cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.btn-login {
    padding: 12px 28px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-cadastro {
    padding: 12px 28px;
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-cadastro:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--lighter);
    border-radius: 50px;
}

.user-menu span {
    font-weight: 500;
    font-size: 14px;
}

.btn-admin {
    padding: 8px 18px;
    background: var(--dark);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-admin:hover {
    background: var(--primary);
}

/* ============================================
   NAVEGAÇÃO DE CATEGORIAS
   ============================================ */
.nav-categories {
    background: var(--white);
    border-bottom: 1px solid var(--light);
    padding: 0;
}

.nav-categories ul {
    display: flex;
    list-style: none;
    gap: 8px;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-categories ul::-webkit-scrollbar {
    height: 0;
}

.nav-categories a {
    display: block;
    padding: 14px 24px;
    color: var(--dark-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    position: relative;
}

.nav-categories a:hover {
    color: var(--primary);
    background: var(--lighter);
}

.nav-categories a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* ============================================
   HERO BANNER
   ============================================ */
.hero-banner {
    background: var(--gradient-primary);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.hero-banner .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-content .btn-hero {
    padding: 16px 36px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-content .btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   SEÇÕES DE PRODUTOS
   ============================================ */
.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--dark);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: var(--lighter);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.badge-destaque {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--accent);
    color: var(--dark);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.badge-desconto {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--danger);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.btn-quick-view {
    padding: 12px 28px;
    background: white;
    color: var(--dark);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-quick-view:hover {
    background: var(--primary);
    color: white;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.product-category {
    font-size: 13px;
    color: var(--dark-light);
    margin-bottom: 12px;
}

.price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 8px 0;
}

.old-price {
    font-size: 15px;
    color: #999;
    text-decoration: line-through;
}

.installments {
    font-size: 13px;
    color: var(--dark-light);
    margin-bottom: 12px;
}

.stock-status {
    margin: 12px 0;
    font-size: 13px;
}

.in-stock {
    color: var(--secondary);
    font-weight: 500;
}

.low-stock {
    color: var(--warning);
    font-weight: 500;
}

.out-stock {
    color: var(--danger);
    font-weight: 500;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.btn-add-cart {
    flex: 1;
    padding: 12px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-favorite {
    width: 48px;
    height: 48px;
    border: 2px solid var(--light);
    background: white;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.btn-favorite:hover {
    border-color: var(--danger);
    background: #FFF5F5;
}

.btn-favorite.favorited {
    border-color: var(--danger);
    background: #FFF5F5;
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ============================================
   FOOTER MODERNO
   ============================================ */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-col p {
    color: #B2BEC3;
    line-height: 1.8;
    font-size: 14px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #B2BEC3;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 18px;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    color: #B2BEC3;
    font-size: 14px;
}

/* ============================================
   NOTIFICAÇÕES TOAST
   ============================================ */
.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 24px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    font-weight: 500;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid var(--secondary);
}

.notification-error {
    border-left: 4px solid var(--danger);
}

.notification button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #999;
}

/* ============================================
   BOTÕES GERAIS
   ============================================ */
.btn-primary {
    padding: 14px 32px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
    padding: 14px 32px;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 1024px) {
    .hero-banner .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .hero-image {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .search-bar {
        max-width: 100%;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn-favorite {
        width: 100%;
        border-radius: 50px;
    }
}

/* ============================================
   ANIMAÇÕES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}