/* ===================================================
   PRODUCTOS PAGE — css/productos.css
   Página: Catálogo
   =================================================== */

.products-section {
    padding: 70px 0 35px;
    background-color: var(--bg-white);
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    align-items: start;
}

/* Sidebar */
.products-sidebar {
    position: sticky;
    top: 100px; /* Stays in view as you scroll down the catalog */
}

.sidebar-title {
    font-size: 20px;
    font-weight: 800;
    color: #000;
    margin-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 12px;
    position: relative;
}

/* The green underline fragment */
.sidebar-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 60px;
    height: 3px;
    background-color: var(--primary-green);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 18px;
}

.sidebar-menu a {
    text-decoration: none;
    color: #333;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.3s ease;
    display: block;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: var(--primary-green);
}

/* Main Content Area */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
}

.p-header-left {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.section-title {
    font-size: 38px;
    font-weight: 900;
    color: #000;
    margin: 0;
}

.p-count {
    font-size: 15px;
    color: #555;
    font-weight: 600;
}

.p-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.p-header-right label {
    font-size: 14px;
    font-weight: 800;
    color: #000;
}

.p-header-right select {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    outline: none;
    cursor: pointer;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.p-header-right select:focus {
    border-color: var(--primary-green);
}

/* Product Grid */
.post-type-archive-product .p-grid,
.post-type-archive-product .products-grid,
.tax-product_cat .products-grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Product Card */
.post-type-archive-product .p-card,
.post-type-archive-product .product-card{
    background: transparent;
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    /* box-shadow: none; */
    flex-direction: column;
    cursor: pointer;
}

.p-card:hover {
    transform: translateY(-8px);
}

.p-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f7f7f7;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.product-card .content-wrap{
    padding: 15px;
}
.product-card .content-wrap h4{
    padding: 0 15px;
}

.p-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply; /* Helps eliminate white backgrounds if images are not perfect PNGs */
}

.p-card-body {
    padding: 5px 15px 15px;
}

.p-category {
    display: block;
    color: var(--primary-green);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.p-title {
    font-size: 17px;
    font-weight: 900;
    color: #000;
    margin: 0;
    line-height: 1.4;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 992px) {
    .products-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .products-sidebar {
        position: static;
        margin-bottom: 20px;
    }
    
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .sidebar-menu li {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .post-type-archive-product .products-grid,
    .tax-product_cat .products-grid
    {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .post-type-archive-product .products-grid,
    .tax-product_cat .products-grid{
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 32px;
    }
}
