/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* TARJETAS DE PRODUCTOS */

/* ==========================================================
   COLOMBIA DOLLS - 5 COLUMNAS + BOTÓN FIJO Y VISIBLE (PC Y MÓVIL)
   ========================================================== */

/* 1. Forzamos estrictamente las 5 columnas en la cuadrícula de productos de escritorio y alturas iguales */
.wp-block-woocommerce-product-collection ul.wc-block-product-template,
.wc-block-product-template__responsive {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    align-items: stretch !important;
}

.wc-block-product.product {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* 2. Fondo, bordes y sombra de la tarjeta */
.tarjeta-coleccionista {
    background-color: #ffffff !important;
    border-radius: 4px !important;
    overflow: visible !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    position: relative !important;
    z-index: 1 !important;
    
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

/* Eleva la tarjeta activa sobre las demás al pasar el mouse */
.tarjeta-coleccionista:hover {
    z-index: 10 !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(214, 0, 127, 0.3) !important;
}

/* 3. Imagen con esquinas superiores redondeadas y estática */
.tarjeta-coleccionista img {
    display: block !important;
    border-top-left-radius: 4px !important;
    border-top-right-radius: 4px !important;
    width: 100% !important;
    object-fit: cover !important;
}

/* 4. Título con espacio flexible controlado para equilibrar textos cortos y largos */
.tarjeta-coleccionista .wp-block-post-title {
    flex-grow: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 0 !important;
    margin-top: 0.75rem !important;
}

/* 5. Cambio de color en textos y precios al hacer hover */
.tarjeta-coleccionista a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.tarjeta-coleccionista:hover .wp-block-post-title a,
.tarjeta-coleccionista:hover .woocommerce-loop-product__title a,
.tarjeta-coleccionista:hover .price,
.tarjeta-coleccionista:hover .price span,
.tarjeta-coleccionista:hover .price bdi,
.tarjeta-coleccionista:hover .amount {
    color: #D6007F !important;
}


/* ==========================================================
   BOTÓN DE COMPRA Y SU ESTADO "VER CARRITO" UNIFICADO
   ========================================================== */

.tarjeta-coleccionista .add_to_cart_button,
.tarjeta-coleccionista .wp-block-button__link,
.tarjeta-coleccionista .wc-block-grid__product-add-to-cart a,
.tarjeta-coleccionista .added_to_cart {
    background-color: #D6007F !important;
    color: #ffffff !important;
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    border-radius: 0 0 4px 4px !important;
    padding: 12px 0 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
    box-sizing: border-box !important;
    transition: background-color 0.3s ease !important;
    margin: 0 !important;
    text-decoration: none !important;
}

.tarjeta-coleccionista .add_to_cart_button:hover,
.tarjeta-coleccionista .wp-block-button__link:hover,
.tarjeta-coleccionista .wc-block-grid__product-add-to-cart a:hover,
.tarjeta-coleccionista .added_to_cart:hover {
    background-color: #111111 !important;
    color: #ffffff !important;
}

/* Oculta el botón original si ya está el de "Ver carrito" */
.tarjeta-coleccionista .added_to_cart ~ .add_to_cart_button {
    display: none !important;
}


/* ==========================================================
   COMPORTAMIENTO RESPONSIVO UNIFICADO (MÓVIL, TABLET Y PC)
   ========================================================== */

/* Posicionamiento base absoluto para los botones en todas las pantallas manteniendo la estructura */
.tarjeta-coleccionista .wc-block-grid__product-add-to-cart,
.tarjeta-coleccionista .add_to_cart_button,
.tarjeta-coleccionista .wp-block-button,
.tarjeta-coleccionista .added_to_cart {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 20 !important;
}

/* En pantallas táctiles (Móviles y tablets): botón siempre visible abajo */
@media (max-width: 1024px) {
    .wp-block-woocommerce-product-collection ul.wc-block-product-template,
    .wc-block-product-template__responsive {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .tarjeta-coleccionista {
        padding-bottom: 48px !important; 
    }

    .tarjeta-coleccionista .wc-block-grid__product-add-to-cart,
    .tarjeta-coleccionista .add_to_cart_button,
    .tarjeta-coleccionista .wp-block-button,
    .tarjeta-coleccionista .added_to_cart {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }
}

/* En computadoras (Escritorio): 5 columnas exactas + botón siempre visible abajo (sin ocultarse) */
@media (min-width: 1025px) {
    .wp-block-woocommerce-product-collection ul.wc-block-product-template,
    .wc-block-product-template__responsive {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    .tarjeta-coleccionista {
        padding-bottom: 48px !important; 
    }

    .tarjeta-coleccionista .wc-block-grid__product-add-to-cart,
    .tarjeta-coleccionista .add_to_cart_button,
    .tarjeta-coleccionista .wp-block-button,
    .tarjeta-coleccionista .added_to_cart {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }
}

/* FIN TARJETAS DE PRODUCTOS */

/* ==========================================================
   TAMAÑO Y COLOR DEL ICONO SVG EN EL MENÚ
   ========================================================== */

/* 1. Icono en estado normal (Tamaño aumentado y Blanco) */
.menu-item img._mi._svg {
    width: 28px !important; /* Ajusta este valor (ej. 24px, 28px, 32px) */
    height: auto !important;
    max-height: 24px !important;
    filter: brightness(0) invert(1) !important;
    transition: filter 0.3s ease, transform 0.2s ease !important;
    vertical-align: middle !important;
    margin-right: 6px !important; /* Separa un poco el icono del texto */
}

/* 2. Icono al pasar el cursor / Hover (Color fucsia #e6007e) */
.menu-item:hover > a img._mi._svg {
    filter: invert(18%) sepia(94%) saturate(4162%) hue-rotate(314deg) brightness(97%) contrast(106%) !important;
}

/* ==========================================================
   FIN TAMAÑO Y COLOR DEL ICONO SVG EN EL MENÚ
   ========================================================== */

   /* ==========================================================
   AJUSTES VISUALES Y PRIVACIDAD EN FORMULARIO DE SUBASTAS
   ========================================================== */

/* Ajustar ancho del input solo en subastas */
.auction_form .quantity input.bid {
    width: 120px !important;  /* Ajusta a 150px si requiere más espacio */
    max-width: 100% !important;
    text-align: center !important;
    font-size: 16px !important; /* Evita que el texto quede aplastado */
}

/* Alinear el contenedor de la puja (+ y -) */
.auction_form .quantity {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important; /* Separa los botones de incremento */
    width: auto !important; /* Evita heredar la variable --quantity-width */
}

/* Ocultar columnas de Usuario y Puja Automática en el historial */
.auction-history-table th:nth-child(3),
.auction-history-table td.username,
.auction-history-table th:nth-child(4),
.auction-history-table td.proxy {
    display: none !important;
}

/* ==========================================================
   FIN AJUSTES VISUALES Y PRIVACIDAD EN FORMULARIO DE SUBASTAS
   ========================================================== */


   /* ==========================================================
   SANGRÍA PARA SUBCATEGORÍAS EN BLOQUE DE FILTROS WOOCOMMERCE
   ========================================================== */

/* 1. Desplazar hacia la derecha el contenedor de la subcategoría "Blusas" */
.filtro-categorias-jerarquia .wc-block-product-filter-checkbox-list__item[data-wp-context*='"depth":1'] {
    margin-left: 24px !important;
    padding-left: 10px !important;
    border-left: 2px solid #cbd5e1 !important; /* Línea guía vertical */
    margin-top: 4px !important;
    margin-bottom: 4px !important;
}

/* 2. Reducir ligeramente el tamaño y opacidad del texto de las subcategorías */
.filtro-categorias-jerarquia .wc-block-product-filter-checkbox-list__item[data-wp-context*='"depth":1'] .wc-block-product-filter-checkbox-list__text {
    font-size: 0.9em !important;
    opacity: 0.88;
}

/* 3. Ajustar por ID directo como alternativa de respaldo */
.filtro-categorias-jerarquia label[for*="product_cat-blusas"] {
    padding-left: 0px !important;
}

/* ==========================================================
   FIN SANGRÍA PARA SUBCATEGORÍAS
   ========================================================== */