/* ==========================================================================
   VARIABLES GLOBALES Y RESETEO (COLORES ORIGINALES CLÁSICOS)
   ========================================================================== */
:root {
    --bg-dark: #1f1f1f;
    --bg-black: #0a0a0a;
    --orange: #f39c12;
    --border-color: #333;
    --text-light: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: var(#fffff);
    color: var(--text-light);
    overflow-x: hidden;
}

/* ==========================================================================
   HEADER Y NAVEGACIÓN
   ========================================================================== */
.top-socials {
    text-align: center;
    background: #434343;
    padding: 5px;
    font-size: 12px;
}
.top-socials i { margin: 0 10px; cursor: pointer; }

.main-header {
    background: #000;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    border-bottom: 1px solid #222;
    flex-wrap: wrap;
    gap: 10px;
}

.logo img {
    max-height: 60px;
    object-fit: contain;
}

.navbar {
    background: var(--orange);
    text-align: center;
    padding: 10px 5%;
    display: block;
    line-height: 2.2;
}
.navbar a {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 1px;
    white-space: nowrap;
    margin: 0 15px;
}

/* ==========================================================================
   BANNERS Y SLIDERS
   ========================================================================== */
.slider-container { width: 100%; height: 400px; overflow: hidden; position: relative; }
.slide { width: 100%; height: 100%; display: none; background-size: cover; background-position: center; }
.slide.active { display: block; }
.hero-content h1 { font-size: 40px; text-align: right; margin-bottom: 10px; }
.hero-content p { text-align: right; margin-bottom: 20px; font-size: 14px; }
.btn-orange { background: var(--orange); color: #000; padding: 10px 30px; text-decoration: none; font-weight: bold; border-radius: 20px; display: inline-block; }

/* ==========================================================================
   GRILLAS: CATEGORÍAS Y PRODUCTOS
   ========================================================================== */
.dark-bg { background: var(--bg-dark); padding: 40px 5%; text-align: center; }
.dark-bg h2 { margin-bottom: 30px; font-size: 24px; letter-spacing: 2px; }

.products-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 15px; }
.product-card { background: #f8f9fa; border: 1px solid var(--border-color); padding: 15px; text-align: center; position: relative; border-radius: 8px; transition: transform 0.2s, box-shadow 0.2s; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(243,156,18,0.2); border-color: var(--orange); }
.product-card img { width: 100%;  object-fit: contain; background: #fff; margin-bottom: 15px; border-radius: 4px; }
.product-card h3 { font-size: 12px; color: #000000; height: 35px; overflow: hidden; margin-bottom: 10px; }
.product-card .price-new { color: var(--orange); font-weight: bold; margin-bottom: 10px; font-size: 16px; }
.btn-code { border: 1px solid #555; padding: 5px 10px; font-size: 11px; color: var(--orange); border-radius: 4px; display: inline-block; text-decoration: none; }
.center-btn { margin-top: 30px; }

/* ==========================================================================
   SECCIONES DE PROMOCIÓN Y BENEFICIOS
   ========================================================================== */
.benefits-bar { background: #222; display: flex; justify-content: center; flex-wrap: wrap; gap: 15px 30px; padding: 15px 5%; font-size: 11px; border-top: 2px solid #000; border-bottom: 2px solid #000; text-align: center; }
.promo-section { display: grid; grid-template-columns: 1fr 1fr; background: #fff; padding: 20px 5%; gap: 20px; }
.promo-whatsapp { background: #111; border-radius: 10px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.promo-whatsapp img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.promo-grid-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.promo-grid-4 img { width: 100%; height: 100%; min-height: 145px; object-fit: cover; border-radius: 10px; }

/* ==========================================================================
   CATÁLOGO CON SIDEBAR Y DETALLE
   ========================================================================== */
.catalogo-layout { display: flex; gap: 30px; padding: 30px 5%; max-width: 1400px; margin: 0 auto; }
.sidebar-filtros { width: 260px; flex-shrink: 0; background: #111; padding: 25px; border-radius: 8px; border: 1px solid #333; position: sticky; top: 120px; align-self: flex-start; }
.productos-area { flex: 1; }

.detalle-container { display: flex; padding: 30px 5%; max-width: 1200px; margin: 30px auto; background: #1a1a1a; gap: 40px; border-radius: 10px; }
.detalle-img { flex: 1; background: #fff; padding: 20px; border-radius: 8px; text-align: center; }
.detalle-img img { max-width: 100%; height: auto; max-height: 400px; object-fit: contain; }
.detalle-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.precio-grande { font-size: 32px; font-weight: bold; color: #2ecc71; margin-bottom: 20px; }

/* ==========================================================================
   BOTONES FLOTANTES
   ========================================================================== */
.floating-action-buttons { position: fixed; bottom: 25px; right: 25px; display: flex; flex-direction: column; gap: 15px; z-index: 9999; }
.float-wa { background-color: #25D366; color: white; width: 55px; height: 55px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 30px; text-decoration: none; box-shadow: 0px 4px 10px rgba(0,0,0,0.3); }
.scroll-top-btn { background-color: var(--orange); color: black; width: 55px; height: 55px; border-radius: 50%; border: none; font-size: 24px; cursor: pointer; box-shadow: 0px 4px 10px rgba(0,0,0,0.3); display: flex; justify-content: center; align-items: center; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer { background: #111; padding: 40px 5% 10px; }
.footer-layout { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 30px; border-bottom: 1px solid #333; padding-bottom: 20px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: #ccc; text-decoration: none; font-size: 13px; }
.footer-socials { margin-top: 10px; color: var(--orange); }
.footer-bottom { text-align: center; padding-top: 20px; font-size: 11px; color: #666; }

/* ==========================================================================
   MEDIA QUERIES (ADAPTACIÓN RESPONSIVE MÓVIL)
   ========================================================================== */
@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(4, 1fr); }
    .catalogo-layout { gap: 20px; }
    .sidebar-filtros { width: 220px; }
}

@media (max-width: 900px) {
    .navbar {
        display: flex;
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 15px;
    }
    .catalogo-layout { flex-direction: column; }
    .sidebar-filtros { width: 100%; position: static; margin-bottom: 20px; }
}

@media (max-width: 768px) {
    .top-bar { flex-direction: column; gap: 12px; padding: 12px 5%; text-align: center; }
    .search-bar { width: 100%; max-width: 100%; margin: 0; }

    /* SLIDER ADAPTADO EN MÓVIL (Altura fluida para evitar recortes) */
    .slider-container {
        height: auto !important;
        aspect-ratio: 16 / 9;
        max-height: 320px;
    }
    .slide {
        height: 100% !important;
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
    }

    .hero-content h1 { font-size: 26px; text-align: center; }
    .hero-content p { text-align: center; }

    .products-grid { grid-template-columns: repeat(3, 1fr); }

    .promo-section { grid-template-columns: 1fr; }
    .promo-whatsapp { min-height: 180px !important; }

    .detalle-container { flex-direction: column; padding: 20px; gap: 20px; margin-top: 15px; }
    .footer-layout { flex-direction: column; text-align: center; align-items: center; }
}

@media (max-width: 480px) {
    .slider-container {
        aspect-ratio: 4 / 3;
        max-height: 260px;
    }
    .navbar a { font-size: 11px; margin: 0 8px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .promo-grid-4 { grid-template-columns: 1fr; }
    .precio-grande { font-size: 24px; }
}
