:root {
    --primary: #1a237e;
    --secondary: #ff6b6b;
    --accent: #4ecdc4;
    --warning: #ffd93d;
    --dark: #2d3436;
}

/* Fix overflow issues */
html, body { 
    overflow-x: hidden; 
    max-width: 100vw;
}

.container, .container-fluid {
    overflow-x: hidden;
}

.mega-hero {
    background: #1f7cc0;
    min-height: 400px; /* Reducido para móvil */
    position: relative;
    overflow: hidden;
}

/* Responsive hero */
@media (max-width: 768px) {
    .mega-hero {
        min-height: 300px;
        padding: 2rem 0;
    }
    
    .mega-hero .display-3 {
        font-size: 2rem !important;
    }
    
    .mega-hero .lead {
        font-size: 1rem;
    }
}

.floating-book {
    animation: float 6s ease-in-out infinite;
    max-width: 100%;
    height: auto;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.product-spotlight {
    background: #f8f9fa;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    width: 100%; /* Fix width issues */
}

.product-spotlight:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* Mobile fixes for product cards */
@media (max-width: 768px) {
    .product-spotlight {
        border-radius: 15px;
        margin-bottom: 1rem;
    }
    
    .product-spotlight:hover {
        transform: none; /* Disable hover effects on mobile */
    }
    
    .col-lg-6, .col-lg-3, .col-lg-4 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

.countdown-badge {
    background: var(--secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

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

.category-bubble {
    width: 100px; /* Reducido para móvil */
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    cursor: pointer;
    margin: 0.5rem;
}

.category-bubble:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Mobile category bubbles */
@media (max-width: 768px) {
    .category-bubble {
        width: 80px;
        height: 80px;
        margin: 0.25rem;
    }
    
    .category-bubble:hover {
        transform: scale(1.05); /* Reduced hover effect */
    }
}

.grade-selector {
    background: white;
    border: 3px solid var(--accent);
    border-radius: 15px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.grade-selector:hover, .grade-selector.active {
    background: var(--accent);
    color: white;
    transform: translateY(-5px);
}

.deal-timer {
    background: #000;
    color: #0ff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 1rem; /* Reducido para móvil */
}

@media (max-width: 768px) {
    .deal-timer {
        font-size: 0.9rem;
        padding: 0.25rem 0.75rem;
    }
}

.product-card-hero {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.product-card-hero .discount-flag {
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--secondary);
    color: white;
    padding: 0.5rem 3rem;
    transform: rotate(45deg);
    font-weight: bold;
}

/* Fix horizontal scroll issues */
.scroll-container {
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.scroll-container::-webkit-scrollbar {
    height: 8px;
}

.scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* Mobile scroll container */
@media (max-width: 768px) {
    .scroll-container {
        padding-bottom: 1rem;
    }
    
    .scroll-container .card {
        min-width: 200px !important; /* Smaller cards on mobile */
    }
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: bounce 2s infinite;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.trust-badge {
    background: white;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.nav-pills .nav-link {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    margin: 0 0.5rem;
    transition: all 0.3s;
}

.nav-pills .nav-link.active {
    background: var(--primary);
}

/* Additional mobile fixes */
@media (max-width: 768px) {
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .col-lg-6 .row,
    .col-lg-4 .row,
    .col-lg-3 .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Fix button groups on mobile */
    .d-flex.gap-3,
    .d-flex.gap-4 {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
    
    /* Ensure cards don't overflow */
    .card {
        margin-bottom: 1rem;
        width: 100%;
    }
    
    /* Fix statistics display */
    .d-flex.gap-4 > div {
        min-width: 80px;
        text-align: center;
    }
}

/* Fix any remaining overflow issues */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* Cambiar scroll horizontal por grid en móvil */
@media (max-width: 768px) {
    /* Ocultar scroll horizontal en móvil */
    .scroll-container {
        overflow-x: visible !important;
    }
    
    .scroll-container .d-flex {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        width: 100% !important;
    }
    
    .scroll-container .card {
        min-width: auto !important;
        width: 100%;
    }
    
    .scroll-container .card-img-top {
        height: 180px;
    }
    
    /* Ocultar botones de navegación en móvil */
    .d-flex.gap-2 {
        display: none !important;
    }
}

.product-spotlight img,
.product-card-hero img {
  transform: none !important;
  transition: none !important;
}
