/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ================================================== */
/* 1. AJUSTES GENERALES */
/* ================================================== */
html {
    box-sizing: border-box;
    scroll-behavior: smooth;
}
*, *::before, *::after {
    box-sizing: inherit;
}
body {
    overflow-x: hidden;
    width: 100%;
}

/* ================================================== */
/* 2. BLOQUES GUTENBERG: ESTILOS BASE */
/* ================================================== */
.wp-block-group,
.wp-block-cover,
.wp-block-columns,
.wp-block-template-part,
.wp-block-post-content {
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

.alignwide,
.alignfull {
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
}

/* ================================================== */
/* 3. IMÁGENES */
/* ================================================== */
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

/* ================================================== */
/* 4. FOOTER */
/* ================================================== */
.site-footer {
    display: flex;
    flex-wrap: wrap;
}
.footer-widget {
    flex: 0 0 100%;
}
@media (min-width: 769px) {
    .footer-widget {
        flex: 0 0 33.33%;
    }
}

/* ================================================== */
/* 5. MEDIA QUERIES */
/* ================================================== */

/* Móviles */
@media (max-width: 768px) {
    .wp-block-column {
        width: 100% !important;
        margin-bottom: 20px;
    }

    h1, h2, h3 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }

    .main-navigation {
        flex-direction: column;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .wp-block-column {
        width: 48% !important;
    }

    .wpcf7-form input,
    .wpcf7-form textarea {
        width: 100% !important;
    }
}

/* ================================================== */
/* 6. PLUGINS (WooCommerce, Contact Form 7, etc.) */
/* ================================================== */
.woocommerce .quantity .qty {
    width: 60px !important;
}


/* =============================== */
/* 🎨 Tarjetas de productos Woo */
/* =============================== */

/* Espaciado entre productos */
.woocommerce ul.products {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Cada tarjeta de producto */
.woocommerce ul.products li.product {
    width: calc(33.333% - 20px);
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Hover efecto */
.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Imagen de producto */
.woocommerce ul.products li.product img {
    border-radius: 8px;
    object-fit: cover;
    height: auto;
    max-height: 250px;
}

/* Nombre del producto */
.woocommerce ul.products li.product h2 {
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Botón de añadir al carrito */
.woocommerce ul.products li.product .button {
    background-color: #0a84ff;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.woocommerce ul.products li.product .button:hover {
    background-color: #0066cc;
}

/* =============================== */
/* 📱 Responsive para móviles */
/* =============================== */
@media (max-width: 768px) {
    .woocommerce ul.products li.product {
        width: 100%;
    }
}

/* -----------marcas---------------*/
/* Contenedor principal del grid de marcas */
.brands-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Grid de WooCommerce (4 columnas en desktop) */
.brands-grid-container .wc-block-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}

/* Tablet (3 columnas) */
@media (max-width: 1024px) {
    .brands-grid-container .wc-block-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Móvil (2 columnas) */
@media (max-width: 768px) {
    .brands-grid-container .wc-block-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Ajustar imágenes de marcas */
.brands-grid-container .wc-block-grid__product-image img {
    max-height: 80px;
    width: auto !important;
    object-fit: contain;
}

/* === MRB: WooCommerce category archive header fix === */
@media (min-width: 1000px) {
    body.tax-product_cat .site-logo-container img.sticky-logo {
        display: none !important;
    }

    body.tax-product_cat .site-logo-container img.default-logo {
        display: inline-block !important;
    }

    body.tax-product_cat #header-menu-1.menu-container,
    body.tax-product_cat #header-menu-1.menu-container .menu {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 30px !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
    }

    body.tax-product_cat #header-menu-1.menu-container .menu {
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.tax-product_cat #header-menu-1.menu-container .menu > li {
        display: flex !important;
        align-items: center !important;
        position: relative !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.tax-product_cat #header-menu-1.menu-container .menu > li > a {
        display: flex !important;
        align-items: center !important;
        min-height: 64px !important;
        white-space: nowrap !important;
    }

    body.tax-product_cat #header-menu-1.menu-container .sub-menu {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        z-index: 99999 !important;
        width: 260px !important;
        min-width: 260px !important;
        height: auto !important;
        padding: 10px 0 !important;
        margin: 0 !important;
        list-style: none !important;
        background: #fff !important;
        border: 1px solid rgba(12, 24, 48, 0.1) !important;
        border-radius: 0 0 8px 8px !important;
        box-shadow: 0 18px 45px rgba(13, 27, 52, 0.16) !important;
    }

    body.tax-product_cat #header-menu-1.menu-container li:hover > .sub-menu,
    body.tax-product_cat #header-menu-1.menu-container li:focus-within > .sub-menu {
        display: block !important;
    }

    body.tax-product_cat #header-menu-1.menu-container .sub-menu .sub-menu {
        top: -10px !important;
        left: 100% !important;
    }

    body.tax-product_cat #header-menu-1.menu-container .sub-menu li {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
    }

    body.tax-product_cat #header-menu-1.menu-container .sub-menu a {
        display: block !important;
        padding: 10px 16px !important;
        line-height: 1.35 !important;
        white-space: normal !important;
    }
}

@media (max-width: 999.98px) {
    body.tax-product_cat .site-logo-container img.sticky-logo {
        display: none !important;
    }
}
/* === /MRB: WooCommerce category archive header fix === */

/* === MRB: WooCommerce category archive helpers style === */
body.tax-product_cat .mrb-cat-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    color: #69758a;
    font-size: 13px;
    line-height: 1.4;
}

body.tax-product_cat .mrb-cat-breadcrumbs a {
    color: #06115e;
    text-decoration: none;
    font-weight: 700;
}

body.tax-product_cat .mrb-cat-breadcrumbs a:hover {
    color: #ff2c1f;
}

body.tax-product_cat .mrb-cat-archive-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid #e7edf4;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(17, 21, 24, 0.06);
}

body.tax-product_cat .mrb-cat-archive-copy strong {
    display: block;
    margin: 0 0 6px;
    color: #06115e;
    font-size: 16px;
    line-height: 1.2;
    text-transform: uppercase;
}

body.tax-product_cat .mrb-cat-archive-copy p {
    margin: 0;
    color: #5b6778;
    line-height: 1.5;
}

body.tax-product_cat .mrb-cat-archive-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

body.tax-product_cat .mrb-cat-archive-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 7px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
}

body.tax-product_cat .mrb-cat-action-primary {
    background: #ff2c1f;
    color: #ffffff !important;
}

body.tax-product_cat .mrb-cat-action-secondary {
    border: 1px solid #d7e0ec;
    background: #f8fafc;
    color: #06115e !important;
}

body.tax-product_cat .mrb-cat-chip-grid,
body.tax-product_cat .mrb-cat-related-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px;
}

body.tax-product_cat .mrb-cat-chip-grid a,
body.tax-product_cat .mrb-cat-related-row a {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
    padding: 11px 12px;
    border: 1px solid #e9eef5;
    border-radius: 8px;
    background: #f8fafc;
    color: #06115e;
    text-decoration: none !important;
    font-weight: 800;
    line-height: 1.2;
}

body.tax-product_cat .mrb-cat-chip-grid a:hover,
body.tax-product_cat .mrb-cat-related-row a:hover {
    border-color: #d5dfeb;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(17, 21, 24, 0.08);
}

body.tax-product_cat .mrb-cat-chip-grid small {
    flex: 0 0 auto;
    color: #ff2c1f;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

body.tax-product_cat .mrb-cat-parent-link {
    background: #fff7f6 !important;
    border-color: #ffd2cc !important;
    color: #b91c12 !important;
}

@media (max-width: 999.98px) {
    body.tax-product_cat .mrb-cat-archive-panel {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    body.tax-product_cat .mrb-cat-archive-actions {
        justify-content: stretch;
    }

    body.tax-product_cat .mrb-cat-archive-actions a {
        flex: 1 1 150px;
    }

    body.tax-product_cat .mrb-cat-chip-grid,
    body.tax-product_cat .mrb-cat-related-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    body.tax-product_cat .mrb-cat-breadcrumbs {
        margin-bottom: 14px;
        font-size: 12px;
    }

    body.tax-product_cat .mrb-cat-chip-grid,
    body.tax-product_cat .mrb-cat-related-row {
        grid-template-columns: 1fr;
    }
}
/* === /MRB: WooCommerce category archive helpers style === */
