/* Paleta principal */
:root {
    --rojo: #e4342c;
    --negro: #010100;
    --blanco: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--negro);
    background: var(--blanco);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* NAV mejorado */
.navbar {
    background: var(--blanco);
    color: var(--negro);
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
    padding: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo img {
    height: 88px;
    margin-right: 6px;
}
.logo h2 {
    color: var(--rojo);
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    letter-spacing: 1px;
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
    margin: 0;
}
.nav-menu li {
    margin: 0;
}
.nav-menu a {
    color: var(--negro);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 500;
    transition: color 0.3s;
}
.nav-menu a:hover {
    color: var(--rojo);
    background: #fff;
    box-shadow: 0 2px 12px rgba(228,52,44,0.13);
    border-radius: 12px;
    padding: 0.2em 0.7em;
    transition: box-shadow 0.2s, background 0.2s, color 0.2s;
}
.hamburger {
    display: none;
}
@media (max-width: 900px) {
    .nav-container {
        padding: 0 12px;
    }
    .logo h2 {
        font-size: 1.2rem;
    }
    .nav-menu {
        gap: 1.2rem;
    }
}
@media (max-width: 700px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        align-items: flex-start;
        padding: 0 8px;
    }
    .logo {
        margin-bottom: 8px;
    }
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

/* Slider */
.slider-section {
    margin-top: 80px;
    height: 400px;
    position: relative;
    overflow: hidden;
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Slider relación 16:9 */
.slider-wrapper {
    width: 100%;
    max-width: 1280px;
    height: 720px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}
.slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s;
}
.slide.active {
    opacity: 1;
    position: relative;
    z-index: 1;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #f5f5f5;
}

.slide-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--rojo);
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(1,1,0,0.7);
    color: var(--blanco);
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background 0.3s;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.prev-btn:hover, .next-btn:hover {
    background: var(--rojo);
}

/* Marcas Aliadas */
.brands-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.brands-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--negro);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.brand-item {
    background: var(--blanco);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.brand-item:hover {
    transform: translateY(-5px);
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--rojo);
    padding: 2rem;
    border: 2px dashed var(--rojo);
    border-radius: 10px;
}

/* Categorías */
.categories-section {
    padding: 4rem 0;
}

.categories-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--negro);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-item {
    background: var(--blanco);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid var(--rojo);
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-icon {
    font-size: 3rem;
    color: var(--rojo);
    margin-bottom: 1rem;
}

.category-item h3 {
    margin-bottom: 1rem;
    color: var(--rojo);
}

/* Efecto LED hover para categorías */
.category-item {
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s, border-color 0.3s;
}
.category-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, var(--rojo) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 0;
}
.category-item:hover::before {
    opacity: 0.25;
}
.category-item:hover {
    box-shadow: 0 0 24px 4px var(--rojo), 0 2px 15px rgba(0,0,0,0.08);
    border-color: var(--rojo);
    z-index: 1;
}
.category-item > * {
    position: relative;
    z-index: 1;
}

/* Página de productos: tarjetas */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}
.producto-card {
    background: var(--blanco);
    border: 2px solid var(--rojo);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(1,1,0,0.08);
    padding: 1.5rem;
    text-align: center;
    transition: box-shadow 0.3s, border-color 0.3s;
}
.producto-card:hover {
    box-shadow: 0 0 18px 2px var(--rojo);
    border-color: var(--negro);
}
.producto-card img {
    max-width: 120px;
    max-height: 120px;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: #f5f5f5;
}
.producto-card h4 {
    color: var(--rojo);
    margin-bottom: 0.5rem;
}
.producto-card .precio {
    color: var(--negro);
    font-weight: bold;
    margin-bottom: 0.5rem;
}
.producto-card .medida {
    color: #666;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: var(--blanco);
    color: var(--negro);
    border-top: 2px solid var(--rojo);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--rojo);
    letter-spacing: 1px;
}

.footer-section p {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--negro);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--rojo);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    background: var(--rojo);
    color: var(--blanco);
}

/* WhatsApp Flotante */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}
.whatsapp-float a {
    width: 80px;
    height: 80px;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rojo);
    color: var(--blanco);
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(228, 52, 44, 0.3);
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    animation: none;
}
.whatsapp-float a:hover {
    background: var(--negro);
    color: var(--rojo);
    animation: pulse 0.7s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 var(--rojo); }
    70% { transform: scale(1.12); box-shadow: 0 0 16px 8px var(--rojo); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 var(--rojo); }
}

/* Carrusel de Marcas Aliadas */
.brands-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 120px;
    margin: 2rem 0 0 0;
}
.brands-carousel-track {
    display: flex;
    align-items: center;
    height: 100%;
    animation: brands-move 20s linear infinite;
    gap: 48px;
}
.brand-logo-img {
    height: 90px;
    width: auto;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 10px 24px;
    object-fit: contain;
    transition: transform 0.3s;
}
.brand-logo-img:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(228,52,44,0.13);
}
@keyframes brands-move {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #2c3e50;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .slide-content h3 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .slider-wrapper {
        height: 40vw;
        max-height: 320px;
    }
    .brands-carousel {
        height: 70px;
    }
    .brand-logo-img {
        height: 50px;
        padding: 6px 10px;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .productos-grid, .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .nav-container {
        flex-direction: column;
        height: auto;
        align-items: flex-start;
        padding: 0 8px;
    }
    .logo {
        margin-bottom: 8px;
    }
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        align-items: flex-start;
    }
    body, .footer, .navbar {
        font-size: 1.05rem;
    }
    .category-item, .producto-card {
        padding: 1rem;
    }
}

@media (max-width: 600px) {
    .slider-wrapper {
        height: 48vw;
        max-height: 200px;
    }
    .brands-carousel {
        height: 48px;
    }
    .brand-logo-img {
        height: 32px;
        padding: 3px 4px;
    }
    .logo img {
        height: 32px;
    }
    .logo h2 {
        font-size: 1.1rem;
    }
    .footer-section h3 {
        font-size: 1.1rem;
    }
    .footer-bottom {
        font-size: 0.95rem;
    }
    .prev-btn, .next-btn {
        font-size: 1.1rem;
        padding: 0.5rem;
    }
}

.categories-grid a.category-item {
    color: var(--negro);
    text-decoration: none;
    display: block;
}
.categories-grid a.category-item:visited {
    color: var(--negro);
}
.categories-grid a.category-item:hover {
    color: var(--rojo);
}

/* Logo en el nav más grande y centrado */
.logo-img {
    height: 72px;
    vertical-align: middle;
}

/* Validación visual de inputs en formulario de contacto */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7em;
    border-radius: 8px;
    border: 1.5px solid #ccc;
    outline: none;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
}
.form-group input.valid,
.form-group select.valid,
.form-group textarea.valid {
    border-color: #3498db;
}
.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: var(--rojo);
}
.form-group label {
    position: absolute;
    top: -0.9em;
    left: 0.7em;
    background: #fff;
    color: #888;
    font-size: 0.95em;
    padding: 0 0.3em;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 2;
}
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group select:focus + label,
.form-group select:not([value=""]) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    color: var(--rojo);
}
