
/* -- Menú hamburguesa (móvil) -- */
@media (max-width: 992px) {
    .nav-menu {
        background: #ffffff !important;
    }
    .nav-menu a {
        color: #111 !important;
    }
    .btn-header-contact {
        background: var(--orange-grad);
        color: #fff !important;
        border: none;
    }
}

/* --- HERO (mismo estilo que tenías, ligeramente optimizado) --- */
.category-hero {
    padding: 150px 0 40px;
    background-color: #fdfdfd;
    text-align: center;
    color: var(--black);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.category-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--gray-light) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.4;
    pointer-events: none;
}

.category-hero .container {
    position: relative;
    z-index: 2;
}

.category-hero h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--black) 0%, #444444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.category-hero p {
    color: var(--gray);
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.6;
}

.category-tag {
    display: inline-block;
    background: #fff3ee;
    color: var(--orange);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(241, 90, 36, 0.15);
}

/* --- GRILLA DE PRODUCTOS --- */
.category-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px 30px;
    margin-top: 20px;
    padding-bottom: 60px;
}

/* --- TARJETA DE PRODUCTO --- */
.product-catalog-card {
    background: white;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--shadow-sm);
    position: relative;
    padding-top: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-catalog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: rgba(241, 90, 36, 0.2);
}

/* Badge flotante */
.product-code-badge {
    position: absolute;
    top: -15px;
    left: 25px;
    background: var(--orange-grad);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 6px 15px rgba(241,90,36,0.4);
    z-index: 5;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-catalog-card:hover .product-code-badge {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(241,90,36,0.6);
}

/* Contenedor de imagen */
.product-catalog-img {
    height: 220px;
    overflow: hidden;
    margin: 15px 15px 0;
    border-radius: 18px;
    position: relative;
    cursor: pointer; /* indica que es clickeable */
}

.product-catalog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-catalog-card:hover .product-catalog-img img {
    transform: scale(1.06);
}

/* Información */
.product-catalog-info {
    padding: 20px 24px 24px;
    text-align: left;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-catalog-info h4 {
    font-size: 1.25rem;
    color: var(--black);
    margin-bottom: 8px;
}

.product-catalog-info p {
    color: var(--gray);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.product-catalog-info .btn-outline {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* --- MODAL VENTANA EMERGENTE (mejorado) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 24px;
    max-width: 600px;           /* Antes era 400px, ahora más ancho para dos columnas */
    width: 90%;
    max-height: 80vh;           /* Limita la altura al 80% de la ventana */
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow-y: auto;           /* Scroll interno si el contenido es muy alto */
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: 300;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--black);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 20px;
    text-align: center;
}

/* LISTA EN DOS COLUMNAS CUANDO SEA NECESARIO */
.modal-specs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;                 /* Dos columnas automáticas */
    column-gap: 30px;           /* Espacio entre columnas */
    column-rule: 1px solid #eee; /* Línea divisoria opcional */
}

/* Cada ítem de la lista */
.modal-specs-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    break-inside: avoid;        /* Evita que un ítem se parta entre columnas */
    font-size: 0.95rem;
}

.modal-specs-list li:last-child {
    border-bottom: none;
}

/* Si hay muy pocos elementos, volvemos a una columna en pantallas chicas */
@media (max-width: 600px) {
    .modal-specs-list {
        columns: 1;             /* Una sola columna en móviles */
    }
    .modal-content {
        max-width: 90vw;
    }
}

.spec-code {
    font-weight: 700;
    color: var(--orange);
    margin-right: 10px;
}

.spec-measure {
    font-weight: 500;
    color: var(--black);
    text-align: right;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .category-hero {
        padding: 120px 20px 30px;
    }
    .category-hero h2 {
        font-size: 2.2rem;
    }
    .product-catalog-img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .category-products-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .product-catalog-card {
        margin: 0 10px;
    }
}