/* --- VARIABLES Y RESET --- */
:root {
    --primary: #004d7c;      /* Azul principal de HYRSAC */
    --secondary: #55898f;    /* Azul acero secundario */
    --accent: #83bb40;       /* Verde acento de HYRSAC */
    --accent-hover: #6da030;
    --text-dark: #333333;
    --text-light: #777777;
    --bg-light: #f4f7f6;     
    --white: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --transition: all 0.3s ease-in-out;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; color: var(--primary); }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.bg-light { background-color: var(--bg-light); }
.text-small { font-size: 0.75rem; margin-left: 3px; }

/* --- BOTONES --- */
.btn { display: inline-block; padding: 12px 28px; font-weight: 600; border-radius: 4px; border: none; cursor: pointer; transition: var(--transition);}
.btn-primary { background-color: var(--accent); color: var(--white); }
.btn-primary:hover { background-color: var(--accent-hover); }
.btn-slider { background-color: var(--accent); color: var(--white); }
.btn-slider:hover { background-color: var(--accent-hover); }
.btn-white { background-color: var(--white); color: var(--primary); }
.btn-white:hover { background-color: #f0f0f0; }

/* --- 1. TOPBAR --- */
.topbar-speedia { background-color: var(--white); border-bottom: 1px solid #eeeeee; font-size: 0.85rem; color: var(--text-light); padding: 8px 0; }
.topbar-flex { display: flex; justify-content: space-between; align-items: center; }
.topbar-left span { margin-right: 25px; display: inline-flex; align-items: center; }
.topbar-left i { margin-right: 5px; }
.social-icons a { color: var(--text-light); margin-left: 15px; transition: var(--transition); }
.social-icons a:hover { color: var(--primary); }

/* --- 2. MIDDLE HEADER --- */
.middle-header { padding: 25px 0; background-color: var(--white); }
.header-flex { display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.logo img { height: 50px; }

.search-container { flex: 1; max-width: 600px; display: flex; border: 1px solid #dddddd; border-radius: 4px; overflow: hidden; }
.search-container input { flex: 1; padding: 12px 15px; border: none; outline: none; font-family: var(--font-body); font-size: 0.9rem; }
.search-container button { background-color: #eaeaeb; color: var(--text-dark); border: none; padding: 0 25px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.search-container button:hover { background-color: #dddddd; }

.header-actions { display: flex; align-items: center; gap: 20px; }
.action-btn { font-size: 1.4rem; color: var(--text-dark); position: relative; }
.action-btn:hover { color: var(--primary); }
.catalog-cart .badge { position: absolute; top: -8px; right: -10px; background-color: var(--accent); color: var(--white); font-size: 0.7rem; font-weight: bold; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.menu-toggle { display: none; font-size: 1.6rem; cursor: pointer; color: var(--text-dark); }

/* --- 3. BOTTOM NAV --- */
.bottom-nav { background-color: var(--primary); color: var(--white); z-index: 999; }
.nav-flex { display: flex; justify-content: space-between; align-items: stretch; height: 60px;}
.categories-btn { background-color: var(--accent); color: var(--white); font-family: var(--font-heading); font-weight: 700; padding: 0 30px; display: flex; align-items: center; gap: 15px; cursor: pointer; font-size: 1.05rem; }
.categories-btn:hover { background-color: var(--accent-hover); }
.nav-menu { display: flex; align-items: center; }
.nav-menu li { height: 100%; display: flex; align-items: center; }
.nav-menu a { color: var(--white); font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; padding: 0 20px; transition: color 0.3s; }
.nav-menu a:hover, .nav-menu a.active { color: var(--accent); }
.nav-phone { display: flex; align-items: center; gap: 12px; font-weight: 600; font-family: var(--font-heading); font-size: 0.95rem; }
.phone-icon { background-color: rgba(255,255,255,0.15); width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* --- 4. HERO SLIDER --- */
.hero-slider-section { position: relative; width: 100%; height: 75vh; min-height: 500px; overflow: hidden; }
.slider-container { width: 100%; height: 100%; position: relative; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s ease-in-out; display: flex; align-items: center; z-index: 1; background: radial-gradient(circle at 70% 50%, #8ca6ab 0%, #465b69 100%); }
.slide.active { opacity: 1; z-index: 2; }
.slide-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.slide-content { flex: 1; max-width: 650px; transform: translateY(30px); opacity: 0; transition: all 0.8s ease 0.3s; }
.slide.active .slide-content { transform: translateY(0); opacity: 1; }
.slide-content h1 { font-size: 4rem; line-height: 1.1; margin-bottom: 20px; color: var(--white); }
.slide-content .text-accent { color: var(--accent); } 
.slide-content p { font-size: 1.1rem; margin-bottom: 30px; color: #f0f0f0; }
.slide-image { flex: 1; text-align: right; transform: translateX(50px); opacity: 0; transition: all 0.8s ease 0.5s; }
.slide.active .slide-image { transform: translateX(0); opacity: 1; }
.slide-image img { max-width: 110%; max-height: 65vh; object-fit: contain; filter: drop-shadow(0 25px 35px rgba(0,0,0,0.4)); }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 55px; height: 55px; border-radius: 50%; background-color: var(--white); color: var(--text-dark); border: none; font-size: 1.2rem; cursor: pointer; z-index: 10; box-shadow: 0 4px 15px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: center; }
.slider-btn:hover { background-color: var(--accent); color: var(--white); }
.prev-btn { left: 40px; }
.next-btn { right: 40px; }
.slider-dots { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.dot { width: 12px; height: 12px; border-radius: 50%; background-color: rgba(255,255,255,0.4); cursor: pointer; transition: var(--transition); }
.dot.active, .dot:hover { background-color: var(--accent); }

/* --- 5. CARACTERÍSTICAS HORIZONTALES (CORRECCIÓN DE COLOR A AZUL SECUNDARIO) --- */
.features-horizontal { padding: 40px 0; background-color: var(--white); border-bottom: 1px solid #eaeaea; }
.features-flex { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.feature-item { display: flex; align-items: center; gap: 20px; flex: 1; justify-content: center; padding: 15px; }
.feature-icon {
    width: 60px; height: 60px; 
    border: 2px solid var(--secondary); /* Color corporativo en lugar de rojo */
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: var(--secondary); /* Color corporativo */
}
.feature-text h4 { font-size: 1.15rem; color: var(--primary); margin-bottom: 5px; font-weight: 700; }
.feature-text p { font-size: 0.9rem; color: var(--text-light); margin: 0; line-height: 1.3; }
.feature-divider { width: 1px; height: 60px; background-color: #eaeaea; }

/* --- 6. CATEGORÍAS DESTACADAS GRID --- */
.section { padding: 80px 0; }
.categories-section { background-color: var(--bg-light); }
.section-subtitle { color: var(--text-light); margin-top: 10px; font-size: 1rem; }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-top: 50px; }
.cat-box { background-color: var(--white); padding: 40px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: var(--transition); text-decoration: none; border: 1px solid transparent; }
.cat-box:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.06); border-color: var(--secondary); transform: translateY(-5px); }
.cat-box iconify-icon { font-size: 3.5rem; color: var(--primary); margin-bottom: 20px; transition: var(--transition); }
.cat-box:hover iconify-icon { color: var(--accent); transform: scale(1.1); }
.cat-box span { font-size: 0.95rem; font-weight: 600; color: var(--text-dark); line-height: 1.3; }
.cat-box:hover span { color: var(--primary); }

/* --- 7. COLECCIONES POPULARES --- */
.section-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; border-bottom: 1px solid #eaeaea; padding-bottom: 20px; }
.section-header-flex h2 { margin: 0; }
.header-links a { font-size: 0.95rem; font-weight: 600; color: var(--text-light); margin-left: 20px; transition: var(--transition); }
.header-links a:hover, .header-links a.active { color: var(--accent); border-bottom: 2px solid var(--accent); padding-bottom: 22px; }

.lines-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.line-card { background: var(--white); padding: 30px; border: 1px solid #eaeaea; transition: var(--transition); text-align: left; }
.line-card:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-color: var(--secondary);}
.line-card img { width: 100%; height: 220px; object-fit: contain; margin-bottom: 20px; }
.line-card h3 { font-size: 1.1rem; color: var(--text-dark); font-weight: 600; margin-bottom: 10px;}
.line-card .price { color: var(--secondary); font-weight: 700; font-size: 1.1rem; }

/* --- 8. NUEVO: BANNERS PROMOCIONALES DOBLES --- */
.promo-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.promo-box { display: flex; align-items: center; justify-content: space-between; padding: 40px; border-radius: 8px; color: var(--white); overflow: hidden;}
.bg-primary-box { background-color: var(--primary); }
.bg-secondary-box { background-color: var(--secondary); }
.promo-text { flex: 1; z-index: 2;}
.promo-text h3 { color: var(--white); font-size: 1.8rem; margin-bottom: 10px; line-height: 1.2;}
.promo-text p { font-size: 0.9rem; font-weight: 700; margin-bottom: 25px; opacity: 0.9;}
.promo-text .small-tag { color: var(--accent); text-transform: uppercase; margin-bottom: 5px;}
.promo-img { flex: 1; text-align: right;}
.promo-img img { max-width: 100%; max-height: 180px; object-fit: contain; transform: scale(1.1); }

/* --- 9. NUEVO: CATEGORÍAS POPULARES (GRID 8) --- */
.tabs-buttons .tab-btn { background: var(--white); border: 1px solid #eaeaea; padding: 10px 20px; font-weight: 600; font-family: var(--font-body); cursor: pointer; color: var(--text-light); transition: var(--transition); margin-left: 10px;}
.tabs-buttons .tab-btn.active, .tabs-buttons .tab-btn:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

.products-grid-8 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-item-card { background: var(--white); padding: 25px; border: 1px solid #eaeaea; text-align: center; transition: var(--transition); }
.product-item-card:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-color: var(--secondary);}
.product-item-card img { width: 100%; height: 150px; object-fit: contain; margin-bottom: 15px; }
.product-item-card h4 { font-size: 1rem; color: var(--primary); margin-bottom: 8px; }
.product-item-card .item-price { color: var(--text-light); font-weight: 600; font-size: 0.95rem; }

/* --- 10. NUEVO: BANNER FULL WIDTH (FONDO ACENTO) --- */
.full-width-banner { background-color: var(--accent); color: var(--white); padding: 0; overflow: hidden; }
.banner-flex { display: flex; align-items: center; justify-content: space-between; }
.banner-text { flex: 2; text-align: center; padding: 60px 20px; }
.banner-text h2 { color: var(--white); font-size: 2.2rem; margin-bottom: 15px; }
.banner-text p { font-size: 1.1rem; margin-bottom: 30px; }
.banner-text .btn-primary { background-color: var(--primary); }
.banner-text .btn-primary:hover { background-color: var(--secondary); }
.banner-img { flex: 1; display: flex; align-items: center; justify-content: center; height: 100%;}
.banner-img img { max-height: 250px; object-fit: contain; }

/* --- 11. NUEVO: MÁS VENDIDOS (LISTA COMPACTA 6) --- */
.arrows-nav button { background: transparent; border: 1px solid #eaeaea; color: var(--text-light); width: 40px; height: 40px; cursor: pointer; transition: var(--transition); margin-left: 5px; }
.arrows-nav button:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

.compact-grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.compact-card { background: var(--white); border: 1px solid #eaeaea; display: flex; align-items: center; padding: 20px; transition: var(--transition); }
.compact-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-color: var(--secondary); }
.compact-card img { width: 80px; height: 80px; object-fit: contain; margin-right: 20px; }
.compact-info h5 { font-size: 1rem; color: var(--primary); margin-bottom: 5px; }
.compact-price { color: var(--secondary); font-weight: 700; font-size: 0.9rem; }

/* --- 12. NUEVO: LOGOS PARTNERS LINE --- */
.partners-5-cols { display: flex; align-items: center; justify-content: space-between; border: 1px solid #eaeaea; background: var(--white); }
.partner-box { flex: 1; padding: 30px; text-align: center; border-right: 1px solid #eaeaea; display: flex; align-items: center; justify-content: center; height: 120px; transition: var(--transition); filter: grayscale(100%); opacity: 0.7;}
.partner-box:last-child { border-right: none; }
.partner-box:hover { filter: grayscale(0%); opacity: 1; }
.partner-box img { max-width: 100%; max-height: 60px; object-fit: contain; }

/* --- 13. FOOTER --- */
.footer { background-color: var(--primary); color: var(--white); padding: 80px 0 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 50px; margin-bottom: 50px; }
.footer-logo { height: 60px; margin-bottom: 20px; filter: brightness(0) invert(1); }
.footer-info p { color: #d1d9e0; font-size: 0.95rem; margin-bottom: 15px;}
.ruc-footer { font-weight: 700; color: var(--white); font-family: var(--font-heading);}
.footer h3 { margin-bottom: 20px; font-size: 1.2rem; }
.footer-links a { color: #d1d9e0; display: block; margin-bottom: 10px; }
.footer-links a:hover { color: var(--accent); padding-left: 5px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px; margin-bottom: 10px; border: none; border-radius: 4px; font-family: var(--font-body);}
.footer-bottom { background-color: #003657; padding: 20px 0; font-size: 0.9rem; color: #a5b6c4; }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .products-grid-8 { grid-template-columns: repeat(2, 1fr); }
    .compact-grid-6 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .search-container, .nav-phone, .social-icons { display: none; }
    .nav-menu { display: none; width: 100%; flex-direction: column; background: var(--secondary); position: absolute; top: 60px; left: 0;}
    .nav-menu.active { display: flex; }
    .nav-menu li { width: 100%; padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .menu-toggle { display: block; }
    .categories-btn { flex: 1; justify-content: center; }
    .slide-content h1 { font-size: 3rem; }
    .section-header-flex { flex-direction: column; gap: 15px; }
    .promo-grid-2 { grid-template-columns: 1fr; }
    .banner-img { display: none; } /* Ocultar imágenes laterales del banner full en tablets */
    .partners-5-cols { flex-wrap: wrap; }
    .partner-box { min-width: 33.33%; border-bottom: 1px solid #eaeaea; }
}

@media (max-width: 768px) {
    .topbar-left { justify-content: center; width: 100%; }
    .slide-inner { flex-direction: column; text-align: center; justify-content: center; }
    .slide-image { transform: translateX(0); margin-top: 30px; }
    .slide-content h1 { font-size: 2.2rem; }
    .slider-btn { display: none; }
    
    .features-flex { flex-direction: column; align-items: flex-start; }
    .feature-divider { width: 100%; height: 1px; margin: 5px 0; }
    .feature-item { width: 100%; justify-content: flex-start; padding: 15px 20px; }
    
    .compact-grid-6 { grid-template-columns: 1fr; }
    .tabs-buttons { display: flex; flex-direction: column; width: 100%; gap: 10px; }
    .tabs-buttons .tab-btn { margin-left: 0; width: 100%; }

    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}