/* styles.css for RC STORE landing page */
@import url("./typography.css"); /* Load typography base (mobile-first, rem-based) */
/* Prevent iOS Safari auto-zoom on inputs */
html { -webkit-text-size-adjust: 100%; }
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea { font-size: 1rem; }

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #FFFFFF;
    color: #333;
}

.container {
    max-width: 50rem; /* ~800px */
    margin: 0 auto;
    padding: 1.25rem; /* ~20px */
    text-align: center;
}

.header {
    background-color: #004688;
    color: #FFFFFF;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 2.125rem; /* ~34px */
    padding: 1.0625rem 0; /* ~17px */
    text-align: center;
}

.logo-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 8rem; /* ~128px */
    height: auto;
    margin: 0 auto 1.0625rem; /* ~17px */
    background-color: transparent;
}

.company-logo {
    width: 3.75rem; /* ~60px */
    height: 3.75rem;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem; /* ~8px */
}

.logo-circle h1 {
    margin: 0;
    font-size: 1.02em; /* Reduced from 1.2em */
    font-weight: bold;
    color: #FFFFFF;
}

.description {
    font-size: 0.935em; /* Reduced from 1.1em */
    margin: 0 1.0625rem; /* ~17px */
    color: #FFFFFF;
}

.shop-section {
    margin-top: 2.5rem; /* ~40px */
}

/* breathing room between main shop section and following sections */
.shop-section {
    margin-bottom: 28px; /* mobile default spacing between sections */
}

.weekly-carousel-section {
    margin-top: 8px; /* small gap on mobile to keep rhythm */
    padding-top: 6px;
    color: #004688;
    text-align: left;
    
}

@media (max-width: 600px) {
    .container {
        padding: 10px; /* mobile padding */
    }
    
    input[type="text"] {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }
}

@media (min-width: 768px) {
    .shop-section { margin-bottom: 48px; }
    .weekly-carousel-section { margin-top: 18px; padding-top: 12px; }
}

.shop-section h2 {
    color: #004688;
    margin-bottom: 1.875rem;
    text-align-last: left;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    padding: 0 1.25rem;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    background-color: white;
    padding: 0.9375rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    background-color: #25D366;
    color: #FFFFFF;
}

.category-link img {
    width: 80px;
    height: 72px;
    margin-right: 0.9375rem;
    border-radius: 0.25rem;
    object-fit: cover;
}

.category-link span {
    text-align: left;
    font-weight: bold;
}

/* Footer styles */
.footer {
    margin-top: 3.75rem;
    padding: 1.875rem 1.25rem;
    text-align: center;
    border-top: 1px solid #ddd;
    color: #666;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.875rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.2s;
}

.social-link:hover {
    color: #007bff;
}

.social-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-right: 0.625rem;
    border-radius: 50%;
    object-fit: cover;
}

.footer p {
    margin: 0;
    font-size: 0.9em;
}

/* Carousel styles */
.carousel-container {
    position: relative;
    max-width: 56.25rem; /* ~900px */
    margin: 1.25rem auto;
    overflow: hidden;
}

.carousel-inner {
    display: flex;
    justify-content: center;
    transition: transform 0.5s ease;
    width: 400%; /* For 4 products */
    align-items: center;
}

.product-card {
    flex: 0 0 25%;
    width: 25%; /* Fixed width for consistency */
    text-align: center;
    padding: 1.25rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 0 0.625rem;
    max-width: 51.625rem; /* ~826px */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    position: relative; /* For absolute positioning of label */
}

.product-image {
    width: 100%;
    max-width: 51.625rem; /* ~826px */
    height: auto;
    max-height: 21rem; /* ~336px */
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
    display: block;
    margin: 0 auto;
}

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

.product-card h3 {
    margin: 15px 0;
    color: #333;
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.3;
    font-size: 1.1em;
}

.cta-button {
    display: inline-block;
    background-color: #25D366;
    color: #FFFFFF;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.cta-button:hover {
    background-color: #004688;
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: #004688;
    border: 2px solid #004688;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.carousel-prev {
    left: -25px;
    content: '<';
}

.carousel-prev::before {
    content: '<';
}

.carousel-next {
    right: -25px;
    content: '>';
}

.carousel-next::before {
    content: '>';
}

.carousel-prev:hover, .carousel-next:hover {
    background: #004688;
    color: white;
    box-shadow: 0 4px 12px rgba(0,70,136,0.3);
    transform: translateY(-50%) scale(1.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 800px; /* Fixed width for consistency */
    height: 600px; /* Fixed height matching proportions */
}

.modal-carousel {
    display: flex;
    width: 600%; /* For 6 images */
    height: 100%;
    transition: transform 0.5s ease;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

.modal-carousel img {
    flex: 0 0 16.67%; /* Each image 16.67% of 600% = full width */
    max-width: 800px;
    max-height: 600px;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    display: none; /* Controlled by JS */
}

.modal-carousel img.active {
    display: block;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
}

.modal-prev, .modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 1.5rem;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
}

.modal-prev {
    left: -50px;
}

.modal-next {
    right: -50px;
}

.modal-prev:hover, .modal-next:hover {
    background: rgba(0,0,0,0.8);
}

/* Best Seller Label */
.best-seller-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #FF6B35;
    color: #FFFFFF;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* CTA Section styles - Modern Pill Design UX 2026 */
.cta-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    /* Modern pill gradient - vibrant retro-futurism */
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FF8C42 100%);
    color: #FFFFFF;
    padding: 14px 24px 14px 18px;
    border-radius: 50px; /* Full pill shape */
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.2px;
    margin-bottom: 0;
    /* Elevated shadow for floating effect */
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.35),
                0 2px 8px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
    min-height: 56px;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    /* Ultra-smooth transitions */
    transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateZ(0);
    /* Same animation as Christmas CTA */
    animation: cta-pulse 4s ease-in-out infinite;
}

/* Unified pulse animation for both CTAs */
@keyframes cta-pulse {
    0%, 100% {
        background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FF8C42 100%);
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.35),
                    0 2px 8px rgba(0, 0, 0, 0.1),
                    inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }
    50% {
        background: linear-gradient(135deg, #FF8C42 0%, #FF6B35 40%, #F7931E 100%);
        box-shadow: 0 8px 28px rgba(255, 107, 53, 0.45),
                    0 3px 12px rgba(0, 0, 0, 0.15),
                    inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Modern span styling inside CTA - expressive typography */
.cta-header span {
    flex: 1;
    text-align: left;
    line-height: 1.3;
    font-size: 1.05em;
    font-weight: 700;
}

.cta-header:hover {
    /* Pause float animation on interaction */
    animation-play-state: paused !important;
    /* Enhanced gradient shift */
    background: linear-gradient(135deg, #FF8C42 0%, #FF6B35 40%, #F7931E 100%);
    /* Expand pill slightly */
    transform: translateY(-5px) scale(1.03) translateZ(0) !important;
    /* Amplified floating shadow */
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.5),
                0 6px 15px rgba(0, 0, 0, 0.15),
                inset 0 2px 0 rgba(255, 255, 255, 0.35);
    color: #FFFFFF;
    filter: brightness(1.08) saturate(1.1) !important;
}

.cta-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    /* Radial shimmer effect - more modern */
    background: radial-gradient(
        circle at 30% 50%,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.08) 25%,
        transparent 50%
    );
    animation: rotate-shimmer 8s linear infinite;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes rotate-shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Decorative accent bar on left side */
.cta-header::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.2) 100%);
    border-radius: 0 4px 4px 0;
    opacity: 0.8;
    pointer-events: none;
}

/* Natal CTA - Vibrant Christmas Red Design */
.cta-black-friday {
    /* Vibrant Christmas red gradient - traditional festive colors */
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 35%, #ffffff 70%, #fcfcfc 100%) !important;
    color: #FFFFFF !important;
    /* Premium floating shadow with red tones */
    box-shadow: 0 6px 25px rgba(196, 30, 58, 0.5),
                0 2px 10px rgba(168, 25, 46, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    border: 1.5px solid rgba(255, 215, 0, 0.5) !important;
    /* Festive pulse animation */
    animation: festive-glow 4s ease-in-out infinite !important;
}

/* Christmas festive glow animation with vibrant reds */
@keyframes festive-glow {
    0%, 100% {
        background: linear-gradient(135deg, #C41E3A 0%, #A8192E 35%, #DC143C 70%, #B91C1C 100%);
        box-shadow: 0 6px 25px rgba(196, 30, 58, 0.5),
                    0 2px 10px rgba(168, 25, 46, 0.35),
                    inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        background: linear-gradient(135deg, #DC143C 0%, #C41E3A 30%, #B91C1C 65%, #A8192E 100%);
        box-shadow: 0 8px 30px rgba(220, 20, 60, 0.6),
                    0 3px 12px rgba(196, 30, 58, 0.4),
                    inset 0 1px 0 rgba(255, 255, 255, 0.35);
    }
}

.cta-black-friday:hover {
    /* Pause festive animation */
    animation-play-state: paused !important;
    /* Reverse vibrant Christmas red gradient */
    background: linear-gradient(135deg, #050505 0%, #000000 30%, #000000 70%, #070707 100%) !important;
    /* Elevated expansion */
    transform: translateY(-5px) scale(1.03) translateZ(0) !important;
    /* Maximum festive red glow */
    box-shadow: 0 14px 40px rgba(220, 20, 60, 0.65),
                0 6px 18px rgba(196, 30, 58, 0.45),
                0 0 25px rgba(255, 215, 0, 0.35),
                inset 0 2px 0 rgba(255, 255, 255, 0.4) !important;
    filter: brightness(1.12) saturate(1.2) !important;
    border: 1.5px solid rgba(255, 215, 0, 0.7) !important;
}

/* Festive sparkle with modern placement */
.cta-black-friday::before {
    /* Override parent shimmer for Christmas theme */
    background: radial-gradient(
        circle at 70% 30%,
        rgba(255, 215, 0, 0.25) 0%,
        rgba(255, 255, 255, 0.15) 20%,
        transparent 50%
    ) !important;
    animation: sparkle-pulse 3s ease-in-out infinite !important;
}

@keyframes sparkle-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.1); }
}

.cta-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    /* Floating circle effect */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.cta-section {
    /* Clean container for modern pills */
    background: transparent;
    padding: 12px 8px;
    text-align: center;
    margin: 16px 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    /* Smooth transitions */
    transition: transform 0.3s ease;
}

.cta-section:hover {
    /* Minimal lift */
    transform: translateY(-1px);
}

/* Probiótica coupon block styles */
.probiotica-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 10px 0 18px;
}

.probiotica-coupon-label {
    color: #ffffff;
    background: transparent;
    font-weight: 700;
    color: #002b7a; /* dark blue text */
    font-size: 1rem;
}

.probiotica-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.coupon-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 30px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.coupon-code {
    color: #0b3dfc; /* vivid blue for code */
    font-weight: 800;
    letter-spacing: 0.6px;
}

.copy-button {
    background: #0b3dfc;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(11,61,252,0.15);
}

.copy-button:active { transform: translateY(1px); }

.probiotica-button {
    display: inline-block;
    background: linear-gradient(180deg,#0b3dfc,#004688);
    color: #fff;
    padding: 12px 20px;
    border-radius: 28px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(11,61,252,0.18);
}

.probiotica-button:hover {
    background: linear-gradient(180deg,#004688,#002b7a);
    transform: translateY(-2px);
}

@media (max-width: 520px) {
    .probiotica-actions { gap: 8px; }
    .coupon-box { padding: 8px 10px; }
    .probiotica-button { padding: 10px 14px; }
}

.cta-section .mercadopago-button,
.cta-section button[data-mercadopago] {
    background-color: #25D366 !important;
    color: #FFFFFF !important;
    border: none !important;
    padding: 8px 16px !important; /* Reduced for inline */
    border-radius: 20px !important; /* Slightly smaller radius */
    font-size: 0.85em !important; /* Smaller font */
    font-weight: bold !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(37,211,102,0.3) !important; /* Reduced shadow */
    min-width: 120px; /* Compact inline width */
    margin-left: auto; /* Push to right if needed, but center overall */
}

.cta-section .mercadopago-button:hover,
.cta-section button[data-mercadopago]:hover {
    background-color: #004688 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(0,70,136,0.4) !important;
}

/* Ad Modal Styles */
.ad-modal {
    display: none;
    position: fixed;
    z-index: 2000; /* Higher than other modals */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ad-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.ad-images {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.ad-image, .ad-video {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: contain;
}

/* Adiciona estilos para o vídeo e imagem dentro do modal de anúncio */
.ad-content video,
.ad-content img {
    width: 100%; /* Ocupa toda a largura disponível do contêiner */
    height: auto; /* Mantém a proporção original */
    max-width: 100%; /* Garante que não ultrapasse a largura do contêiner */
    max-height: 80vh; /* Limita a altura para 80% da altura da tela */
    object-fit: contain; /* Garante que a mídia inteira seja visível, sem cortes */
    display: none; /* Mantém o padrão de iniciar escondido */
    margin: 0 auto 15px; /* Centraliza e dá respiro inferior */
}

@media (max-width: 768px) {
    .ad-image, .ad-video {
        max-height: 50vh;
    }
    
    .ad-content {
        padding: 15px;
    }
}

.close-ad {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 1.75rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 3;
}

.close-ad:hover {
    color: #000;
}

/* --- Estilos específicos para seção Ofertas Especiais (cards) --- */
#ofertas-container {
    padding: 1rem 1.25rem 2rem;
}

#ofertas-container .category-link.oferta-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border: 1px solid rgba(0,0,0,0.04);
    position: relative; /* for badge */
}

#ofertas-container .category-link.oferta-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.08);
}

.oferta-image-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0;
    background: transparent;
    position: relative; /* enable absolute badge positioning relative to image */
}

.oferta-image {
    width: 200px; /* 160px +25% */
    height: 200px; /* 160px +25% */
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.oferta-info {
    width: 100%;
    padding: 0.5rem 0 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.oferta-title {
    font-weight: 700;
    color: #133e57; /* keep site palette darker blue */
    font-size: 0.98rem;
    margin: 6px 0 8px;
    line-height: 1.2;
    text-align: center;
    min-height: 2.6em;
}

.oferta-rating .stars {
    color: #FFD800; /* yellow stars */
    letter-spacing: 0.06em;
    display: inline-block;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.oferta-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.oferta-price .old-price {
    color: #999;
    font-size: 0.85rem;
    text-decoration: line-through;
}

.oferta-price .price {
    font-size: 1.55rem;
    font-weight: 900;
    color: #25D366; /* green primary CTA */
    margin-top: -2px;
}

.oferta-price .installments {
    color: #666;
    font-size: 0.85rem;
}

.oferta-availability {
    font-size: 0.82rem;
    color: #133e57;
    margin-bottom: 10px;
}

/* Oferta badge (top-left) */
.oferta-badge {
    position: absolute;
    top: 8px;
    left: 8px; /* sit on top-left of image */
    background: #0b66c3; /* site blue */
    color: #fff;
    padding: 4px 8px; /* smaller */
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.54rem; /* reduced further (~25%) */
    letter-spacing: .4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 6px 14px rgba(11,102,195,0.14);
    z-index: 6;
    transform: translateZ(0);
}

/* Discount badge (top-right) */
.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(180deg,#FFD54F,#FFC107);
    color: #3b2300;
    padding: 6px 8px;
    border-radius: 8px;
    font-weight: 900;
    font-size: 0.72rem;
    letter-spacing: 0.6px;
    box-shadow: 0 6px 18px rgba(255,193,7,0.18);
    z-index: 8;
}

@media (max-width: 420px) {
    .discount-badge { font-size: 0.68rem; padding: 5px 7px; }
}

.oferta-badge::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: url('/images/icon-badge.png') center/contain no-repeat; /* optional icon, fallback blank */
}

.buy-button {
    width: calc(100% - 2rem);
    max-width: 320px;
    margin: 8px 0 0;
    background: linear-gradient(180deg, #25D366, #1fb85b);
    color: #fff;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(37,211,102,0.22);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.buy-button:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(16,120,79,0.18); background: linear-gradient(180deg, #0a4a7a, #004688); }

/* ensure buy button text remains white on hover */
.buy-button:hover { color: #fff; }

/* slightly smaller badge on very small screens */
@media (max-width: 420px) {
    .oferta-badge { font-size: 0.68rem; padding: 3px 7px; left: 6px; top: 6px; }
    .buy-button { padding: 10px 14px; }
}

/* Grid layout specifically for ofertas: aim 4 columns on wide screens */
@media (min-width: 1100px) {
    #ofertas-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

@media (max-width: 1099px) and (min-width: 700px) {
    #ofertas-container { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 699px) and (min-width: 420px) {
    #ofertas-container { grid-template-columns: repeat(2, 1fr); }
    .oferta-image { width: 175px; height: 175px; } /* 140px +25% */
}

@media (max-width: 419px) {
    #ofertas-container { grid-template-columns: 1fr; padding: 0 8px; }
    .oferta-image { width: 150px; height: 150px; } /* 120px +25% */
}

/* keep global color harmony: small adjustments */
.oferta-title, .oferta-availability { color: #133e57; }


.ad-modal p {
    margin: 0 0 20px;
    font-size: 1em;
    color: #333;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

@media (max-width: 600px) {
    .links-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    
    .affiliate-link {
        flex-direction: column;
        text-align: center;
    }
    
    .affiliate-link img {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .social-links {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .social-link {
        justify-content: center;
    }
    
    .social-icon {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    
    .category-link {
        flex-direction: column;
        text-align: center;
    }
    
    .category-link img {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .ad-modal {
        padding: 5px; /* Reduced further */
    }

    .ad-content {
        max-width: 98%;
        max-height: 80%;
        padding: 15px 10px; /* Tighter padding */
        border-radius: 8px;
    }

    .ad-image {
        max-width: 85%; /* Slightly smaller */
        max-height: 30vh; /* Reduced height for more close space */
        margin: 0 auto 8px; /* Less bottom margin */
        display: block;
    }

    .close-ad {
        position: absolute;
        top: 2px; /* Closer to top edge */
        right: 5px; /* Closer to right edge */
    font-size: 2.25rem; /* Larger for touch */
        padding: 8px; /* More padding for hit area */
        width: 44px; /* Minimum touch target size */
        height: 44px;
        background: rgba(255,255,255,0.8); /* Semi-transparent bg for visibility */
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 3;
        line-height: 1;
    }

    .close-ad:hover {
        background: rgba(255,255,255,1);
    }

    .ad-modal p {
        font-size: 0.85em;
        padding: 0 5px;
        margin-top: 5px;
    }
}

@media (max-width: 768px) {
    .carousel-inner {
        width: 400%;
    }
    
    .product-card {
        flex: 0 0 25%;
        padding: 10px;
        margin: 0 5px;
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
    
    .close-modal {
        top: 10px;
        right: 10px;
    font-size: 1.875rem;
    }
    
    .cta-section {
        padding: 12px;
        margin: 10px 0;
    }
    
    .cta-header {
        font-size: 0.75em;
        padding: 6px 10px;
        gap: 6px;
        flex-wrap: nowrap; /* Keep items side by side */
        justify-content: center;
        white-space: nowrap; /* Prevent text wrapping if possible */
    }
    
    .cta-header span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal; /* Allow text to wrap within the span */
        line-height: 1.2;
    }
    
    .cta-icon {
        width: 25px;
        height: 25px;
    }
    
    .cta-section .mercadopago-button,
    .cta-section button[data-mercadopago] {
        padding: 6px 12px !important;
        font-size: 0.8em !important;
        min-width: 100px;
        margin: 0 !important; /* No auto margin on mobile */
    }
}

@media (max-width: 900px) {
    .product-image {
        max-height: 200px;
    }
    
    .product-card {
        width: 25%;
        padding: 10px;
        margin: 0 5px;
    }
    
    .product-card h3 {
        font-size: 1em;
    }
    
    .carousel-container {
        max-width: 100%;
    }
    
    .carousel-inner {
        justify-content: center;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
    
    .carousel-prev, .carousel-next {
    font-size: 1.25rem;
        width: 40px;
        height: 40px;
        padding: 8px 12px;
    }
    
    .ad-content {
        padding: 20px;
        max-width: 95%;
    }
    
    .ad-image {
        max-height: 50vh;
    }
    
    .close-ad {
    font-size: 1.5rem;
        right: 10px;
    }
}

/* New Year Golden CTA: tema festivo dourado */
.cta-newyear {
    background: linear-gradient(135deg, #FFD700 0%, #FFECB3 50%, #FFC107 100%);
    color: #2b1500;
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.25), 0 4px 12px rgba(0,0,0,0.12), inset 0 1px rgba(255,255,255,0.25);
    border: 1px solid rgba(255,215,0,0.45);
    animation: newyear-glow 5s ease-in-out infinite;
    transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.25s ease;
}
.cta-newyear:hover {
    animation-play-state: paused;
    transform: translateY(-5px) scale(1.03) translateZ(0);
    box-shadow: 0 14px 40px rgba(255, 193, 7, 0.35);
    filter: brightness(1.06) saturate(1.03);
}
@keyframes newyear-glow {
    0%, 100% {
        background: linear-gradient(135deg, #FFD700 0%, #FFECB3 50%, #FFC107 100%);
    }
    50% {
        background: linear-gradient(135deg, #FFE082 0%, #FFD54F 50%, #FFC107 100%);
    }
}
.cta-newyear .cta-icon {
    border: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.45), transparent);
}
.cta-newyear span {
    color: #2b1500;
    font-weight: 900;
    text-shadow: 0 1px 0 rgba(255,255,255,0.15);
}

@media (max-width: 520px) {
    .cta-newyear {
        padding: 8px 10px;
        border-radius: 40px;
    }
    .cta-newyear .cta-icon { width: 28px; height: 28px; }
}

/* Quick categories (circular icons) placed after header */
.quick-categories-section {
    margin: 14px 0 6px;
}
.quick-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    align-items: center;
    justify-items: center;
    padding: 0 12px;
}
.quick-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}
.quick-category img {
    width: clamp(72px, 13vw, 120px);
    height: clamp(72px, 13vw, 120px);
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255,255,255,0.9);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    background: linear-gradient(180deg, #e6f7ff, #ffffff);
}
.quick-category span {
    margin-top: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #133e57;
}
.quick-category:hover img { transform: translateY(-6px) scale(1.04); box-shadow: 0 18px 36px rgba(0,0,0,0.14); }

@media (max-width: 520px) {
    .quick-categories { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .quick-category img { width: clamp(64px, 18vw, 96px); height: clamp(64px, 18vw, 96px); }
    .quick-category span { font-size: 0.85rem; }
}

@media (max-width: 360px) {
    /* allow wrapping on very narrow screens while keeping them visually aligned */
    .quick-categories { grid-template-columns: repeat(2, 1fr); }
}

/* Hero banner styles (rotativo) */
.hero-banner-section {
    padding: 12px 0 6px;
}
.hero-slider {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 14px;
}
.hero-slider .hero-slide {
    display: block;
    width: 100%;
    height: 25vh; /* banner height: 25% of viewport */
    max-height: 320px; /* avoid overly tall on large screens */
    min-height: 120px; /* maintain readability on small screens */
}
.hero-slider .hero-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* fill the rect while preserving ratio */
    border-radius: 12px;
}

/* Hover effect: image starts slightly zoomed-in and on hover zooms out (reveals more of the image)
   giving the impression it "goes to the background" instead of coming forward */
.hero-slider .hero-slide img {
    transform: scale(1.12);
    transform-origin: center center;
    transition: transform 600ms cubic-bezier(.2,.9,.2,1);
    will-change: transform;
}
.hero-slider:hover .hero-slide img,
.hero-slider .hero-slide:hover img {
    transform: scale(1);
}

/* Optional: small indicator row centered */
.hero-indicators {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 10px;
    display: flex;
    gap: 8px;
    z-index: 30;
}
.hero-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.6);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
}
.hero-indicators button.active { background: rgba(255,255,255,0.95); }

@media (max-width: 768px) {
    .hero-slider { max-width: 92%; }
}

@media (max-width: 420px) {
    .hero-slider { border-radius: 10px; }
}