:root {
    /***Categorias***/
    --c-grid-columns: 3;
    --c-gap-columns: 3rem;

    /***Productos***/
    --p-grid-columns: 5;
}

.categories .grid-3 {
    display: grid;
    grid-template-columns: repeat(var(--c-grid-columns), 1fr);
    gap: 20px;
}

.categories .category-card {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.categories .category-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
    z-index: 1;
}

.categories .category-card h3 {
    z-index: 2;
    position: relative;
}

.categories .category-card:hover .overlay {
    opacity: 0;
}

.categories .category-card:hover {
    transform: scale(1.03);
}

/* ============================= */
/*  Filtros */
/* ============================= */
.products-filters {
    display: flex;
    justify-content: space-between;
}

.products-filters .filters select {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.products-filters .filters select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
  outline: none;
}

/* ============================= */
/*  Productos */
/* ============================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(var(--p-grid-columns, 1), minmax(0, 1fr));
    gap: 1.5rem;
}

.product-grid .product-card {
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.product-grid .product-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Imagenes */
.product-img-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #01a0c7, #71daf5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.product-img {
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: absolute;
}

.product-img:nth-child(1) {
    width: 80%;
    height: 80%;
}

.product-img:nth-child(2) {
    width: 100%;
    height: 100%;
}

.product-img.secondary {
    opacity: 0;
}

.product-grid .product-card:hover .product-img.primary {
    opacity: 0;
}

.product-grid .product-card:hover .product-img.secondary {
    opacity: 1;
}

/* Info del producto */
.product-info {
    padding: 0.8rem 1rem;
    text-align: center;
    overflow: hidden;
}

.product-info .product-shop {
    position: relative;
}

.product-info .price {
    display: inline-block;
    color: var(--text-color, #333);
    transition: opacity 0.3s ease-in-out;
}

.product-info .buy-btn {
    position: absolute;
    left: 0;
    width: 100%;
    text-align: center;
    bottom: -100px;
    font-weight: 400;
    transition: bottom 0.3s ease-in-out;
}

.product-grid .product-card:hover .price {
    opacity: 0;
}

.product-grid .product-card:hover .buy-btn {
   bottom: 0;
}

/* Estilos para smartphones */
@media (max-width: 576px) {
    :root {
        /***Categorias***/
        --c-grid-columns: 1;
        --c-gap-columns: 1.5rem;
    }   

    .categories .category-card {
        height: 250px;
    }
}

/* Estilos para smartphones grandes o tablets pequeñas en vertical */
@media (max-width: 767px) {
    :root {
        /***Productos***/
        --p-grid-columns: 2;
    }

    
}

/* Estilos para tablets */
@media (min-width: 768px) and (max-width: 991px) {
    :root {
       /***Productos***/
       --p-grid-columns: 3;
    }
}

/* Estilos para tablets grandes o laptops pequeñas */
@media (min-width: 992px) and (max-width: 1199px) {
    :root {
       /***Productos***/
       --p-grid-columns: 3;
    }
}

/* Estilos para laptops, PCs de escritorio y pantallas grandes */
@media (min-width: 1200px) {
    :root {
        
    }
}

/* Estilos para monitores 4K y pantallas muy grandes */
@media (min-width: 1600px) {
  
}