
/**Theme Name: Astra Child
Author: Brainstorm Force
Author URI: http://wpastra.com/about/
Description: Astra is the fastest, fully customizable & beautiful theme suitable for blogs, personal portfolios and business websites. It is very lightweight (less than 50KB on frontend) and offers unparalleled speed. Built with SEO in mind, Astra comes with schema.org code integrated so search engines will love your site. Astra offers plenty of sidebar options and widget areas giving you a full control for customizations. Furthermore, we have included special features and templates so feel free to choose any of your favorite page builder plugin to create pages flexibly. Some of the other features: # WooCommerce Ready # Responsive # Compatible with major plugins # Translation Ready # Extendible with premium addons # Regularly updated # Designed, Developed, Maintained & Supported by Brainstorm Force. Looking for a perfect base theme? Look no further. Astra is fast, fully customizable and beautiful theme!
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
Template: astra
*/

/* Estilos personalizados */

/* Estilo para el menú de categorías de WooCommerce */
.custom-product-categories-bar {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background-color: #f8f8f8;
}

.custom-product-categories-bar a {
    padding: 2px 0;
    text-decoration: none;
    color: #333;
    transition: color 0.3s, transform 0.3s;
    font-size: 14px;
    position: relative;
}

.custom-product-categories-bar a::after {
    content: '';
    width: 0;
    height: 2px;
    background-color: #333;
    position: absolute;
    left: 0;
    bottom: 0;
    transition: width 0.3s, background-color 0.3s;
}

.custom-product-categories-bar a:hover {
    color: #178e79;
    transform: scale(1.05);
}

.custom-product-categories-bar a:hover::after {
    width: 100%;
    background-color: #178e79;
}

/* Árbol de categorías - página categorías */
.category-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 10px;
}

.category-title {
    font-weight: bold;
    cursor: pointer;
}

.subcategory-list,
.child-category-list {
    display: none;
    list-style: none;
    padding-left: 20px;
}

.subcategory-item>.subcategory-title {
    cursor: pointer;
    color: #0073e6;
}

.subcategory-item>.subcategory-title:hover {
    text-decoration: underline;
}

.child-category-item a {
    color: #0073e6;
    text-decoration: none;
}

.child-category-item a:hover {
    text-decoration: underline;
}

/*template de categorias*/

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.filtros {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.filtros select,
.filtros button {
    margin: 0 10px;
    padding: 10px;
    font-size: 16px;
}

/* Estilos para las categorías principales y subcategorías */
.categorias-principales,
.subcategorias {
    display: flex;
    flex-wrap: wrap-reverse;
    gap: 20px;
    justify-content: center;
    height: auto;
}

/* Categorías y subcategorías */
.categoria,
.subcategoria {
    text-align: center;
    position: relative;
    flex: 1 1 calc(25% - 20px);
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 10px;
}

/* Leyenda que cubre toda la imagen y está visible inicialmente */
.categoria h2,
.subcategoria p {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.315);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Efecto hover, foco y tap para hacer que desaparezca la leyenda */
.categoria:hover h2,
.subcategoria:hover p,
.categoria:focus-within h2,
.subcategoria:focus-within p,
.categoria:active h2,
.subcategoria:active p {
    opacity: 0;
}

/* Imágenes en categorías principales y subcategorías */
.categoria img,
.subcategoria img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Ajustar el tamaño específico para ciertas categorías */
.categoria.calzado img,
.categoria.elementos-seguridad img {
    height: 300px;
    /* Ajusta según el tamaño que prefieras */
}

/* Responsivo para pantallas más pequeñas */
@media (max-width: 768px) {

    .categoria,
    .subcategoria {
        flex: 1 1 calc(45% - 20px);
    }

    .filtros select,
    .filtros button {
        font-size: 14px;
    }
}

@media (max-width: 480px) {

    .categoria,
    .subcategoria {
        flex: 1 1 calc(100% - 20px);
    }

    .filtros select,
    .filtros button {
        font-size: 12px;
    }
}

