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

:root {
    --primary: #d946ef;
    --primary-dark: #c026d3;
    --secondary: #ec4899;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    
    /* Cores das Tags */
    --tag-novo: #3498db;
    --tag-promocao: #e74c3c;
    --tag-mais-vendido: #2ecc71;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #fce7f3 0%, #f3e8ff 100%);
    color: var(--dark);
    line-height: 1.4;
}

header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

header h1 {
    font-size: 2rem;
    text-align: center;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 0;
}

header p {
    text-align: center;
    font-size: 1rem;
    opacity: 0.95;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

/* Busca compacta */
.search-bar {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 3rem;
    border-radius: 12px;
    border: none;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark);
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-bar input::placeholder { color: var(--gray); }

.search-bar .fa-search {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

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

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(217, 70, 239, 0.2);
}

.product-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.product-tag.novo { background-color: var(--tag-novo); }
.product-tag.promoção { background-color: var(--tag-promocao); }
.product-tag.mais-vendido { background-color: var(--tag-mais-vendido); }

.product-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-info {
    padding: 0.75rem; 
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.product-price {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem; 
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.product-price-now { font-size: 1.3rem; color: var(--primary); font-weight: 700; }
.product-price-old { font-size: 0.9rem; color: var(--gray); text-decoration: line-through; }

.product-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}
.btn-primary:hover { transform: scale(1.02); }

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary); color: white; }

.btn-share { background: #1d9bf0; color: white; }
.btn-share:hover { background: #0c85d8; transform: scale(1.02); }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    padding: 10px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.carousel {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Importante para mobile: */
    touch-action: pan-y; 
}

.carousel-images {
    display: flex;
    transition: transform 0.3s ease-out;
    height: 100%;
    width: 100%;
    cursor: grab;
}

.carousel-image {
    min-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f5f5f5;
    -webkit-user-drag: none; 
    user-select: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 5;
}
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}
.indicator.active { background: white; width: 25px; border-radius: 5px; }

.modal-info {
    padding: 1.2rem; 
}

.modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
    line-height: 1.1;
}

.modal-price {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.modal-price .product-price-now { font-size: 1.8rem; }
.modal-price .product-price-old { font-size: 1.2rem; }

.modal-description {
    font-size: 1rem;
    color: var(--gray);
    line-height: 1.5;
    margin-bottom: 1.2rem;
}

.modal-buttons {
    display: flex;
    gap: 0.5rem;
}
.modal-buttons .btn { padding: 0.8rem; font-size: 1rem; }

/* WhatsApp & Top */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    z-index: 999;
    text-decoration: none;
}

.back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--dark);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 999;
    text-decoration: none;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 2rem;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.footer-section h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--primary); }
.footer-section p, .footer-section a { color: #d1d5db; margin-bottom: 0.3rem; display: block; text-decoration: none; font-size: 0.9rem; }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); color: #9ca3af; font-size: 0.85rem; }
.social-links { display: flex; gap: 0.8rem; margin-top: 0.5rem; }
.social-links a { width: 35px; height: 35px; background: rgba(217, 70, 239, 0.2); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: white; }

/* MOBILE */
@media (max-width: 768px) {
    .products-grid {
        padding-top: 0.5rem; 
        gap: 0.8rem;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-image { height: 180px; }
    .product-info { padding: 0.5rem; }
    .product-title { font-size: 0.85rem; margin-bottom: 0.1rem; }
    
    .product-price { 
        margin-bottom: 0.4rem; 
        flex-direction: column; 
        gap: 0; 
    }
    .product-price-now { font-size: 1rem; }
    .product-price-old { font-size: 0.8rem; }
    
    .product-buttons { flex-direction: column; gap: 0.3rem; }
    .btn { font-size: 0.8rem; padding: 0.4rem; }
    
    /* Modal Mobile */
    .carousel { height: 350px; }
    .modal-info { padding: 1rem; }
    .modal-title { font-size: 1.3rem; }
    .modal-price .product-price-now { font-size: 1.5rem; }
    .modal-buttons { flex-direction: column; }
    
    .footer-content { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 400px) {
    .products-grid { grid-template-columns: 1fr; }
    .product-image { height: 280px; }
    .product-buttons { flex-direction: row; }
}
