
/* ==========================================
   1. CONFIGURACIÓN GENERAL
   ========================================== */
:root {
    --azul-oscuro: #102a43;
    --azul-principal: #1a365d;
    --azul-medio: #2c5282;
    --azul-claro: #ebf4ff;

    --verde: #38a169;
    --verde-oscuro: #2f855a;
    --verde-claro: #e6fffa;

    --dorado: #fbd38d;
    --blanco: #ffffff;

    --texto: #2d3748;
    --texto-suave: #718096;
    --borde: #d9e2ec;
    --fondo: #f4f7fb;

    --sombra-suave: 0 8px 25px rgba(26, 54, 93, 0.08);
    --sombra-media: 0 16px 40px rgba(26, 54, 93, 0.15);

    --radio: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

html {
    scroll-padding-top: 85px;
}

body {
    background-color: var(--fondo);
    color: var(--texto);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

/* ==========================================
   2. BARRA DE NAVEGACIÓN
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 76px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 10px 5%;

    background: rgba(16, 42, 67, 0.96);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 5px 22px rgba(16, 42, 67, 0.25);

    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
}

.logo-img {
    width: 54px;
    height: 54px;
    object-fit: contain;

    padding: 3px;

    background: var(--blanco);
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;

    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.logo-container:hover .logo-img {
    transform: rotate(-4deg) scale(1.05);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

#logo-texto {
    color: var(--blanco);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.navbar .menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar .menu a {
    position: relative;

    padding: 10px 14px;

    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;

    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        transform 0.25s ease;
}

.navbar .menu a:not(.btn-intranet)::after {
    content: '';

    position: absolute;
    left: 50%;
    bottom: 4px;

    width: 0;
    height: 2px;

    background-color: var(--dorado);
    border-radius: 20px;

    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.navbar .menu a:not(.btn-intranet):hover {
    color: var(--blanco);
    background-color: rgba(255, 255, 255, 0.08);
}

.navbar .menu a:not(.btn-intranet):hover::after {
    width: 55%;
}

.navbar .menu .btn-intranet {
    margin-left: 8px;
    padding: 10px 19px;

    color: var(--blanco);

    background: linear-gradient(
        135deg,
        var(--verde),
        var(--verde-oscuro)
    );

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 9px;

    box-shadow: 0 5px 14px rgba(56, 161, 105, 0.28);

    font-size: 14px;
    font-weight: 700;
}

.navbar .menu .btn-intranet:hover {
    color: var(--blanco);

    background: linear-gradient(
        135deg,
        #48bb78,
        var(--verde)
    );

    border-color: #68d391;

    transform: translateY(-2px);

    box-shadow: 0 8px 18px rgba(56, 161, 105, 0.4);
}

/* ==========================================
   3. SECCIÓN PRINCIPAL
   ========================================== */
.hero {
    position: relative;

    min-height: calc(100vh - 76px);

    display: flex;
    align-items: center;
    justify-content: center;

    margin-top: 76px;
    padding: 70px 24px;

    text-align: center;

    background:
        linear-gradient(
            135deg,
            rgba(16, 42, 67, 0.92),
            rgba(44, 82, 130, 0.76)
        ),
        url('https://images.unsplash.com/photo-1604719312566-8912e9227c6a?q=80&w=1600')
        center center / cover no-repeat;

    overflow: hidden;
}

.hero::before {
    content: '';

    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(72, 187, 120, 0.22),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(99, 179, 237, 0.22),
            transparent 28%
        );
}

.hero::after {
    content: '';

    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;

    height: 80px;

    background: linear-gradient(
        to bottom,
        transparent,
        rgba(244, 247, 251, 0.9),
        var(--fondo)
    );
}

.hero-content {
    position: relative;
    z-index: 2;

    max-width: 880px;

    color: var(--blanco);
}

.hero-content::before {
    content: 'Comercial M & L';

    display: inline-flex;

    margin-bottom: 20px;
    padding: 8px 16px;

    color: #e6fffa;

    background-color: rgba(255, 255, 255, 0.1);

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 30px;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;

    backdrop-filter: blur(8px);
}

.hero-content h2 {
    margin-bottom: 22px;

    color: var(--blanco);

    font-size: clamp(36px, 5vw, 62px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.5px;

    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    max-width: 730px;

    margin: 0 auto 36px;

    color: rgba(255, 255, 255, 0.9);

    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;

    text-shadow: 0 2px 7px rgba(0, 0, 0, 0.28);
}

.btn-principal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-width: 200px;

    padding: 15px 32px;

    color: var(--blanco);
    text-decoration: none;

    background: linear-gradient(
        135deg,
        #48bb78,
        var(--verde-oscuro)
    );

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;

    box-shadow: 0 10px 25px rgba(47, 133, 90, 0.4);

    font-size: 15px;
    font-weight: 800;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.btn-principal:hover {
    color: var(--blanco);

    transform: translateY(-4px);

    box-shadow: 0 14px 30px rgba(47, 133, 90, 0.5);

    filter: brightness(1.05);
}

.btn-principal:active {
    transform: translateY(-1px);
}

/* ==========================================
   4. SECCIÓN NOSOTROS
   ========================================== */
.nosotros-section {
    position: relative;

    padding: 100px 5%;

    background:
        radial-gradient(
            circle at top left,
            rgba(56, 161, 105, 0.09),
            transparent 25%
        ),
        linear-gradient(
            180deg,
            var(--fondo),
            var(--azul-claro)
        );

    border-bottom: 1px solid var(--borde);
}

.contenedor-nosotros {
    position: relative;

    max-width: 1200px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 65px;

    margin: 0 auto;
    padding: 50px;

    background: rgba(255, 255, 255, 0.92);

    border: 1px solid rgba(217, 226, 236, 0.85);
    border-radius: 24px;

    box-shadow: var(--sombra-media);

    overflow: hidden;
}

.contenedor-nosotros::before {
    content: '';

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 6px;

    background: linear-gradient(
        90deg,
        var(--azul-medio),
        var(--verde),
        #68d391
    );
}

.nosotros-texto {
    position: relative;
    z-index: 2;
}

.nosotros-texto .subtitulo {
    display: inline-flex;

    margin-bottom: 14px;
    padding: 7px 13px;

    color: #276749;

    background-color: var(--verde-claro);

    border: 1px solid #b2f5ea;
    border-radius: 20px;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.nosotros-texto h3 {
    position: relative;

    margin-bottom: 25px;
    padding-bottom: 17px;

    color: var(--azul-principal);

    font-size: clamp(28px, 3.5vw, 39px);
    font-weight: 800;
    line-height: 1.2;
}

.nosotros-texto h3::after {
    content: '';

    position: absolute;
    left: 0;
    bottom: 0;

    width: 75px;
    height: 5px;

    background: linear-gradient(
        90deg,
        var(--verde),
        #68d391
    );

    border-radius: 20px;
}

.nosotros-texto p {
    margin-bottom: 18px;

    color: #4a5568;

    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}

.nosotros-texto p:last-child {
    margin-bottom: 0;
}

.nosotros-imagen {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
}

.nosotros-imagen::before {
    content: '';

    position: absolute;

    width: 88%;
    height: 88%;

    background: linear-gradient(
        135deg,
        var(--verde-claro),
        #bee3f8
    );

    border-radius: 24px;

    transform: rotate(4deg);
}

.foto-nosotros-real {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 500px;
    height: 400px;

    object-fit: cover;

    border: 7px solid var(--blanco);
    border-radius: 20px;

    outline: 1px solid var(--borde);

    box-shadow: 0 18px 40px rgba(26, 54, 93, 0.22);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.foto-nosotros-real:hover {
    transform: translateY(-7px) scale(1.015);

    box-shadow: 0 24px 48px rgba(26, 54, 93, 0.28);
}

/* ==========================================
   5. PIE DE PÁGINA
   ========================================== */
.footer {
    position: relative;

    padding: 38px 20px;

    color: rgba(255, 255, 255, 0.84);
    text-align: center;

    background:
        radial-gradient(
            circle at center top,
            rgba(56, 161, 105, 0.15),
            transparent 35%
        ),
        var(--azul-oscuro);

    border-top: 4px solid var(--verde);

    font-size: 14px;
}

.footer::before {
    content: '';

    position: absolute;
    top: 0;
    left: 50%;

    width: 130px;
    height: 4px;

    background-color: #68d391;

    border-radius: 0 0 10px 10px;

    transform: translateX(-50%);
}

/* ==========================================
   6. TABLETAS
   ========================================== */
@media (max-width: 950px) {
    .navbar {
        padding: 10px 3%;
    }

    #logo-texto {
        font-size: 17px;
    }

    .navbar .menu {
        gap: 3px;
    }

    .navbar .menu a {
        padding: 9px 10px;
        font-size: 13px;
    }

    .contenedor-nosotros {
        gap: 42px;
        padding: 38px;
    }

    .foto-nosotros-real {
        height: 350px;
    }
}

/* ==========================================
   7. CELULARES
   ========================================== */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 140px;
    }

    .navbar {
        min-height: auto;

        flex-direction: column;
        gap: 10px;

        padding: 10px 4%;
    }

    .logo-container {
        width: 100%;
        justify-content: center;
    }

    .logo-img {
        width: 45px;
        height: 45px;
    }

    #logo-texto {
        font-size: 16px;
    }

    .navbar .menu {
        width: 100%;

        justify-content: center;
        flex-wrap: wrap;

        gap: 4px;
    }

    .navbar .menu a {
        padding: 7px 9px;
        font-size: 12px;
    }

    .navbar .menu .btn-intranet {
        margin-left: 0;
        padding: 8px 12px;
    }

    .hero {
        min-height: 650px;

        margin-top: 118px;
        padding: 55px 20px;
    }

    .hero-content::before {
        margin-bottom: 16px;
        font-size: 11px;
    }

    .hero-content h2 {
        margin-bottom: 18px;

        font-size: 34px;
        letter-spacing: -0.8px;
    }

    .hero-content p {
        margin-bottom: 28px;
        font-size: 16px;
        line-height: 1.65;
    }

    .btn-principal {
        width: 100%;
        max-width: 280px;

        padding: 14px 24px;
    }

    .nosotros-section {
        padding: 65px 18px;
    }

    .contenedor-nosotros {
        grid-template-columns: 1fr;
        gap: 42px;

        padding: 30px 22px;
    }

    .nosotros-texto {
        order: 1;
    }

    .nosotros-imagen {
        order: 2;
    }

    .nosotros-texto h3 {
        font-size: 29px;
    }

    .nosotros-texto p {
        font-size: 15px;
        text-align: left;
    }

    .foto-nosotros-real {
        height: 290px;
    }

    .footer {
        padding: 30px 18px;
        font-size: 13px;
    }
}

/* ==========================================
   8. CELULARES PEQUEÑOS
   ========================================== */
@media (max-width: 480px) {
    .navbar .menu {
        max-width: 360px;
    }

    .navbar .menu a {
        font-size: 11px;
    }

    .hero {
        min-height: 610px;
        margin-top: 132px;
    }

    .hero-content h2 {
        font-size: 29px;
    }

    .hero-content p {
        font-size: 15px;
    }

    .contenedor-nosotros {
        padding: 26px 18px;
        border-radius: 18px;
    }

    .nosotros-texto h3 {
        font-size: 26px;
    }

    .foto-nosotros-real {
        height: 240px;
        border-width: 5px;
    }
}

/* ==========================================
   7. VISTA DE CATÁLOGO DE PRODUCTOS
   ========================================== */
.catalogo-container {
    max-width: 1200px;
    margin: 110px auto 60px auto; /* Margen superior amplio para que no lo tape el navbar */
    padding: 0 4%;
}

.titulo-seccion {
    text-align: center;
    margin-bottom: 40px;
}

.titulo-seccion h2 {
    font-size: 32px;
    color: #1a365d;
    font-weight: 700;
}

.titulo-seccion p {
    color: #4a5568;
    font-size: 16px;
}

/* Alerta de información */
.alerta-info {
    background-color: #bee3f8;
    color: #2c5282;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #90cdf4;
}

/* Grilla adaptable */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

/* Tarjeta de Producto Individual */
.producto-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(26, 54, 93, 0.06);
    border: 1px solid #e2e8f0;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(26, 54, 93, 0.12);
}

/* Etiqueta de Categoría Flotante */
.tag-categoria {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #e6fffa; /* Tu verde menta */
    color: #234e52;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    border: 1px solid #b2f5ea;
}

.producto-img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Evita que la foto del producto se deforme */
    background-color: #f7fafc;
}

.producto-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.producto-info h3 {
    font-size: 18px;
    color: #1a365d;
    margin-bottom: 8px;
    font-weight: 700;
}

.stock-disponible {
    font-size: 13px;
    color: #718096;
    margin-bottom: 15px;
}

.stock-disponible strong {
    color: #2d3748;
}

/* Alineación de precio y botón */
.precio-comprar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Empuja este bloque al fondo de la tarjeta */
}

.precio-comprar .precio {
    font-size: 22px;
    font-weight: 800;
    color: #2b6cb0; /* Azul llamativo para el precio */
}

.btn-agregar {
    background-color: #38a169; /* Verde éxito */
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(56, 161, 105, 0.3);
    transition: all 0.2s ease;
}

.btn-agregar:hover {
    background-color: #2f855a;
    transform: scale(1.1);
}

/* Enlace activo en el menú */
.navbar .menu a.active {
    color: #fbd38d; /* Resalta en amarillo oro */
}

.btn-carrito {
    color: #ffffff !important;
    background-color: #2b6cb0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.btn-carrito #contador-carrito {
    background-color: #e53e3e; /* Círculo rojo de notificaciones */
    color: white;
    padding: 1px 6px;
    border-radius: 50%;
    font-size: 11px;
    margin-left: 3px;
    font-weight: 700;
}
/* ==========================================
   8. ESTILOS DEL BUSCADOR Y FILTROS
   ========================================== */
.filtro-wrapper {
    background: #e6fffa; /* Tu lindo verde menta */
    padding: 25px;
    border-radius: 14px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(49, 151, 149, 0.1);
    border: 1px solid #b2f5ea;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.buscador-caja {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.buscador-caja .icono-buscar {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #2c7a7b;
    font-size: 16px;
}

.buscador-caja input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #b2f5ea;
    border-radius: 30px;
    font-size: 15px;
    outline: none;
    color: #2d3748;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.buscador-caja input:focus {
    border-color: #1a365d; /* Cambia al azul al escribir */
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.15);
}

/* Botones de Categorías */
.categorias-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-filtro {
    background-color: #ffffff;
    color: #2c7a7b;
    border: 1px solid #b2f5ea;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-filtro:hover {
    background-color: #b2f5ea;
    color: #1a365d;
}

.btn-filtro.active {
    background-color: #1a365d; /* Azul oscuro al seleccionarse */
    color: #ffffff;
    border-color: #1a365d;
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}