/* ==========================================
   ESTILOS GENERALES - PÁGINAS DE CATEGORÍA
   ========================================== */
body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: #000000;
    color: #ffffff;
    scroll-behavior: smooth;
}

/* Botón de volver atrás superior derecho */
.navbar-categoria {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.back-icon-btn {
    font-size: 22px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, text-shadow 0.3s ease, background 0.3s ease;
}

.back-icon-btn:hover {
    background: #000;
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.5);
}

/* ==========================================
   SECCIÓN 1: PORTADA CON IMAGEN DE FONDO
   ========================================== */
.categoria-hero {
    position: relative;
    width: 100%;
    height: 70vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 60px;
    box-sizing: border-box;
}

/* Fondo específico para Filamentos */
.hero-filamentos {
    background-image: url('../IMAGENES/filamentos.jpg');
}

/* Fondo específico para Repuestos */
.hero-repuestos {
    background-image: url('../IMAGENES/repuestos.jfif');
}

/* Fondo específico para Accesorios */
.hero-accesorios {
    background-image: url('../IMAGENES/imagenes accesorio.png');
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55); 
}

.categoria-title {
    position: relative;
    z-index: 2;
    font-size: 52px;
    font-weight: 950;
    letter-spacing: 3px;
    color: #ffffff;
    text-shadow: 0 5px 25px rgba(0, 0, 0, 0.9);
    margin: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================
   SECCIÓN 2: CONTENIDO (FILTROS + GRILLA)
   ========================================== */
.categoria-content {
    width: 100%;
    min-height: 100vh;
    background-color: #000000;
    padding: 60px 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.layout-container {
    display: flex;
    gap: 30px;
    max-width: 1300px;
    width: 100%;
    align-items: flex-start;
}

/* Caja de filtros izquierda */
.filter-box {
    background-color: #ffffff;
    color: #000000;
    border-radius: 12px;
    padding: 20px;
    width: 220px;
    min-width: 220px;
    height: fit-content;
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.05);
}

.filter-box h3 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 800;
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.filter-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-box ul li {
    margin: 10px 0;
}

.filter-box ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}

.filter-box ul li a:hover {
    color: #ff6f00;
}

/* GRILLA DE PRODUCTOS CORREGIDA */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    flex-grow: 1;
    width: 100%;
}

.product-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: #000;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 220px;            /* Ancho fijo para evitar deformación horizontal */
    height: 260px;           /* Altura fija */
    margin: 0 auto;
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
}

/* AJUSTE CLAVE DE LA IMAGEN */
.product-thumb {
    width: 100%;
    height: 160px;           /* Caja contenedor fija de 160px de alto */
    object-fit: contain;     /* Mantiene la proporción original de la foto */
    object-position: center;  /* Centra la imagen adentro de la caja */
    margin-bottom: 10px;
    display: block;
}

.product-card h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
}

.product-img-placeholder {
    color: #666;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
}

/* ==========================================
   ESTILOS PARA LA SECCIÓN DE MARCAS (FILAMENTOS)
   ========================================== */
.marcas-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.marcas-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 1000px;
    width: 100%;
}

.marca-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #000000;
    width: 260px;
    height: 240px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.marca-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.2);
}

.marca-img-wrapper {
    width: 100%;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.marca-img {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
}

.marca-card h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    color: #000000;
}