:root {
    --primary: #FF0000;
    --primary-dark: #cc0000;
    --bg-dark: #121212;
    --header-bg: #1a1a1a;
    --card-bg: #ffffff;
    --text-dark: #1a1a1a;
    --text-light: #f8fafc;
    --text-gray: #64748b;
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --transition: all 0.2s ease;
}

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

body {
    background-color: #f4f4f5;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    background: var(--header-bg);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    color: white;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: white;
    text-decoration: none;
    letter-spacing: -2px;
    text-transform: uppercase;
}

.search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 2rem;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    background: #ffffff;
    color: #333;
    font-size: 0.9rem;
}

.location-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-right: 1.5rem;
}

.btn-entrar {
    background: white;
    color: var(--text-dark);
    border: none;
    padding: 8px 24px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

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

/* Category Slider */
.categories-section {
    padding: 2rem 5%;
    background: white;
}

.category-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.cat-item {
    text-align: center;
    min-width: 120px;
    cursor: pointer;
}

.cat-img-box {
    width: 120px;
    height: 80px;
    background: var(--primary);
    border-radius: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: var(--transition);
}

.cat-img-box img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.cat-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

/* Products */
.main-content {
    padding: 2rem 5% 5rem;
    flex: 1;
}

.grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.p-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.p-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.discount-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: white;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 10;
}

.p-img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.p-info h3 {
    font-size: 0.85rem;
    color: #444;
    margin-bottom: 5px;
    height: 40px;
    overflow: hidden;
}

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

.current-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a1a1a;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    z-index: 2000;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

.cart-header h3 {
    font-weight: 700;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
}

.btn-entrar-full {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 4px;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
}

.close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Cart Item Style */
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 15px;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.cart-item-info h4 {
    font-size: 0.85rem;
    color: #444;
    margin-bottom: 5px;
}

.cart-item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
}

.qty-val {
    font-weight: 700;
    color: var(--primary);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-box {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

/* Free Shipping Progress Bar */
.shipping-promo {
    background: #fff5f5;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px dashed var(--primary);
}

.promo-text {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
    color: var(--primary);
}

.progress-bg {
    background: #eee;
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: var(--primary);
    height: 100%;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smart Upsell */
.upsell-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.upsell-section h4 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #666;
}

.upsell-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.upsell-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.upsell-item:hover {
    background: #f1f5f9;
}

.upsell-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.upsell-item span {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 5000;
    display: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Product Detail Modal */
.product-detail-box {
    background: white;
    width: 90%;
    max-width: 800px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-modal-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-logo {
    color: var(--primary);
    font-weight: 900;
    font-size: 1.2rem;
}

.product-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 2rem;
    gap: 2rem;
}

.p-modal-img-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.p-modal-img-container img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.p-modal-info h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.modal-qty-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 20px;
    margin: 2rem 0;
}

.modal-qty-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    font-weight: bold;
}

.btn-add-modal {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 50px;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    font-size: 1rem;
}

/* Footer */
footer {
    background: #1a1a1a;
    color: white;
    padding-top: 3rem;
}

.footer-top {
    border-top: 5px solid var(--primary);
    padding: 3rem 5%;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-logo {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.footer-col h4 {
    margin-bottom: 1.2rem;
    font-size: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #94a3b8;
    cursor: pointer;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links i {
    cursor: pointer;
    transition: var(--transition);
}

.social-links i:hover {
    color: var(--primary);
}

.footer-bottom {
    background: var(--primary);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .grid-products {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.8rem 4%;
    }
    .logo { font-size: 1.5rem; }
    .search-container {
        display: none; /* Esconde busca no header para dar espaço */
    }
    .location-selector { display: none; }
    
    .grid-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .main-content { padding: 1rem 4%; }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .product-modal-body {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .social-links { justify-content: center; }
}

@media (max-width: 480px) {
    .grid-products {
        grid-template-columns: repeat(2, 1fr);
    }
    .p-card { padding: 0.8rem; }
    .current-price { font-size: 1rem; }
    .btn-entrar { padding: 6px 15px; font-size: 0.7rem; }
}
