/**
Theme Name: MG bobinas tema hijo
Author: Nexo Virtual
Author URI: https://nexovirtual.net/
Description: Tema para vender bobinas de papel
Version: 2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mg-bobinas-tema-hijo
Template: astra
*/

/** colores de cantidad seleccionada en la ficha de producto */
/* Opciones de cantidad */
.woo-variation-swatches .variable-items-wrapper .variable-item {
    border: 1px solid #F5008B !important;
    box-shadow: none !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
}

/* Al pasar el ratón */
.woo-variation-swatches .variable-items-wrapper .variable-item:hover {
    background: #F5008B !important;
    border-color: #F5008B !important;
    box-shadow: 0 0 0 1px #F5008B !important;
}

/* Texto blanco al pasar el ratón */
.woo-variation-swatches .variable-items-wrapper .variable-item:hover .variable-item-span {
    color: #ffffff !important;
}

/* Opción seleccionada */
.woo-variation-swatches .variable-items-wrapper .variable-item.selected {
    border-color: #F5008B !important;
    box-shadow: 0 0 0 2px #F5008B !important;
}

/* Seleccionada + hover */
.woo-variation-swatches .variable-items-wrapper .variable-item.selected:hover {
    background: #F5008B !important;
}

.woo-variation-swatches .variable-items-wrapper .variable-item.selected:hover .variable-item-span {
    color: #ffffff !important;
}

/* cambiar color botón añadir carrito */
/* Botón Añadir al carrito */
.woocommerce div.product .single_add_to_cart_button {
    background-color: #F5008B !important;
    border-color: #F5008B !important;
    color: #ffffff !important;
}

/* Hover */
.woocommerce div.product .single_add_to_cart_button:hover,
.woocommerce div.product .single_add_to_cart_button:focus {
    background-color: #C70070 !important;
    border-color: #C70070 !important;
    color: #ffffff !important;
}

/* Espaciado de las categorías de productos */
body.tax-product_cat .ast-woocommerce-container {
    padding: 25px 80px 70px !important;
}

/* Tablet */
@media (max-width: 921px) {
    body.tax-product_cat .ast-woocommerce-container {
        padding: 25px 30px 70px !important;
    }
}

/* Móvil */
@media (max-width: 544px) {
    body.tax-product_cat .ast-woocommerce-container {
        padding: 20px 18px 60px !important;
    }
}

/* tarjetas presentación en categorías de producto */
/* ==========================================================
   MG BOBINAS - TARJETAS EN CATEGORÍAS WOOCOMMERCE
   ========================================================== */

/* Tarjeta */
body.tax-product_cat ul.products li.product {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e3e7eb;
    border-radius: 14px;
    padding-bottom: 72px;

    box-shadow: 0 5px 18px rgba(23, 27, 31, 0.06);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}


/* Franja con colores de MG Bobinas */
body.tax-product_cat ul.products li.product::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    z-index: 3;

    background: linear-gradient(
        90deg,
        #F5008B 0%,
        #F5008B 33%,
        #00AEE8 33%,
        #00AEE8 66%,
        #FFD900 66%,
        #FFD900 100%
    );
}


/* Hover tarjeta */
body.tax-product_cat ul.products li.product:hover {
    transform: translateY(-5px);
    border-color: #F5008B;

    box-shadow: 0 14px 30px rgba(23, 27, 31, 0.13);
}


/* Imagen */
body.tax-product_cat ul.products li.product .astra-shop-thumbnail-wrap {
    overflow: hidden;
    position: static !important;
    background: #F5F6F7;
}


/* Animación imagen */
body.tax-product_cat ul.products li.product img {
    transition: transform .35s ease;
}

body.tax-product_cat ul.products li.product:hover img {
    transform: scale(1.035);
}


/* Zona de título y precio */
body.tax-product_cat ul.products li.product .astra-shop-summary-wrap {
    padding: 18px 18px 20px;
}


/* Título */
body.tax-product_cat ul.products li.product
.woocommerce-loop-product__title {
    color: #171B1F;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
    margin-bottom: 10px;
}


/* Hover título */
body.tax-product_cat ul.products li.product
.woocommerce-loop-product__title:hover {
    color: #F5008B;
}


/* Precio */
body.tax-product_cat ul.products li.product .price {
    color: #F5008B !important;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 0;
}


/* ==========================================================
   BOTÓN "SELECCIONAR OPCIONES"
   ========================================================== */

body.tax-product_cat ul.products li.product
.ast-on-card-button.ast-select-options-trigger {

    position: absolute !important;

    top: auto !important;
    bottom: 18px !important;
    left: 18px !important;
    right: 18px !important;

    width: auto !important;
    height: auto !important;

    display: flex !important;
    justify-content: center;
    align-items: center;

    padding: 13px 16px !important;

    background: #F5008B !important;
    color: #ffffff !important;

    border-radius: 8px !important;

    opacity: 1 !important;
    visibility: visible !important;

    text-decoration: none !important;

    transition:
        background-color .2s ease,
        transform .2s ease;
}


/* Ocultamos el icono pequeño de cesta */
body.tax-product_cat ul.products li.product
.ast-select-options-trigger .ahfb-svg-iconset {
    display: none !important;
}


/* Convertimos el tooltip de Astra en texto normal del botón */
body.tax-product_cat ul.products li.product
.ast-select-options-trigger .ast-card-action-tooltip {

    position: static !important;

    display: block !important;

    opacity: 1 !important;
    visibility: visible !important;

    background: transparent !important;
    color: #ffffff !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;

    pointer-events: none;
}


/* Quitamos triangulito del tooltip */
body.tax-product_cat ul.products li.product
.ast-select-options-trigger .ast-card-action-tooltip::after {
    display: none !important;
}


/* Hover botón */
body.tax-product_cat ul.products li.product
.ast-on-card-button.ast-select-options-trigger:hover {

    background: #C90072 !important;
    transform: translateY(-1px);
}


/* Tablet */
@media (max-width: 921px) {

    body.tax-product_cat ul.products li.product
    .astra-shop-summary-wrap {
        padding: 15px;
    }

}


/* Móvil */
@media (max-width: 544px) {

    body.tax-product_cat ul.products li.product {
        padding-bottom: 68px;
    }

}

/* Disponibilidad en categorías */
body.tax-product_cat .mg-loop-cantidades {
    margin: 14px 0 16px;
}

body.tax-product_cat .mg-loop-cantidades-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #171B1F;
}

body.tax-product_cat .mg-loop-cantidades-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

body.tax-product_cat .mg-loop-cantidad-item {
    display: inline-block;
    color: #F5008B;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

body.tax-product_cat .mg-loop-cantidad-item::before {
    content: "[";
}

body.tax-product_cat .mg-loop-cantidad-item::after {
    content: "]";
}

body.tax-product_cat .mg-loop-cantidades {
    padding: 0 18px;
    margin: 14px 0 16px;
}


/* Carrito - desplegables País / Provincia */
body.woocommerce-cart
.select2-container--default
.select2-results__option--highlighted[aria-selected] {
    background-color: #00AEE8 !important;
    color: #ffffff !important;
}

/* Opción actualmente seleccionada */
body.woocommerce-cart
.select2-container--default
.select2-results__option[aria-selected="true"] {
    background-color: #00AEE8 !important;
    color: #ffffff !important;
}


/* =========================================
   CHECKOUT - MINIATURA + NOMBRE DEL PRODUCTO
========================================= */

/* Celda de producto */
body.woocommerce-checkout
.woocommerce-checkout-review-order-table td.product-name {
    vertical-align: middle !important;
    text-align: left !important;
    padding: 12px 10px !important;
    white-space: normal !important;
}

/* IMPORTANTE:
   este contenedor contiene imagen + nombre,
   por tanto NO debe tener 55px */
body.woocommerce-checkout
.woocommerce-checkout-review-order-table .ast-product-image {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;

    width: auto !important;
    max-width: calc(100% - 35px) !important;
    min-width: 0 !important;

    vertical-align: middle !important;
}

/* Solo la caja de la imagen mide 55px */
body.woocommerce-checkout
.woocommerce-checkout-review-order-table .ast-product-thumbnail {
    flex: 0 0 55px !important;
    width: 55px !important;
    height: 55px !important;
    min-width: 55px !important;
    max-width: 55px !important;
}

/* Imagen */
body.woocommerce-checkout
.woocommerce-checkout-review-order-table .ast-product-thumbnail img {
    display: block !important;
    width: 55px !important;
    height: 55px !important;
    max-width: 55px !important;
    object-fit: contain !important;
}

/* Nombre del producto */
body.woocommerce-checkout
.woocommerce-checkout-review-order-table .ast-product-name {
    display: block !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;

    font-size: 14px !important;
    line-height: 1.35 !important;
}

/* Cantidad × 1 */
body.woocommerce-checkout
.woocommerce-checkout-review-order-table .product-quantity {
    display: inline-block !important;
    vertical-align: middle !important;
    margin-left: 5px !important;
    white-space: nowrap !important;
}

/* Reparto de columnas Producto / Subtotal */
@media (min-width: 768px) {

    body.woocommerce-checkout
    .woocommerce-checkout-review-order-table th.product-name,
    body.woocommerce-checkout
    .woocommerce-checkout-review-order-table td.product-name {
        width: 72% !important;
    }

    body.woocommerce-checkout
    .woocommerce-checkout-review-order-table th.product-total,
    body.woocommerce-checkout
    .woocommerce-checkout-review-order-table td.product-total {
        width: 28% !important;
        text-align: right !important;
        white-space: nowrap !important;
    }
}

/* PRODUCTOS RELACIONADOS - cantidades */

.related.products .mg-loop-cantidades {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	gap: 5px !important;
	margin: 8px 0 10px !important;
	line-height: 1.2 !important;
}

.related.products .mg-loop-cantidades-label {
	color: #666 !important;
	font-size: 11px !important;
	font-weight: 500 !important;
	margin-right: 3px !important;
}

.related.products .mg-loop-cantidad-item {
	display: inline-block !important;
	background: #F5008B !important;
	color: #fff !important;
	font-size: 10px !important;
	font-weight: 700 !important;
	padding: 4px 6px !important;
	border-radius: 3px !important;
	text-decoration: none !important;
}

.related.products .mg-loop-cantidad-item::before,
.related.products .mg-loop-cantidad-item::after {
	content: none !important;
}

/* Ajustar selector de país en la calculadora de envío del carrito */
.woocommerce-cart .shipping-calculator-form .select2-container {
	width: 100% !important;
}

.woocommerce-cart .shipping-calculator-form .select2-selection--single {
	height: 48px !important;
	display: flex !important;
	align-items: center !important;
	padding: 10px 12px 0 !important;
}

.woocommerce-cart .shipping-calculator-form
.select2-selection--single
.select2-selection__rendered {
	line-height: 1.2 !important;
	padding-left: 0 !important;
	padding-right: 25px !important;
}

.woocommerce-cart .shipping-calculator-form
.select2-selection--single
.select2-selection__arrow {
	height: 48px !important;
}

/* ==========================================================
   MG BOBINAS - SELECTORES PAÍS Y PROVINCIA EN CHECKOUT
   ========================================================== */

/* Opciones normales */
body.woocommerce-checkout
.select2-container--default
.select2-results__option {
    background-color: #ffffff !important;
    color: #171B1F !important;
}

/* Opción seleccionada */
body.woocommerce-checkout
.select2-container--default
.select2-results__option[aria-selected="true"],
body.woocommerce-checkout
.select2-container--default
.select2-results__option[data-selected="true"] {
    background-color: #00AEE8 !important;
    color: #ffffff !important;
}

/* Opción sobre la que pasamos el ratón / teclado */
body.woocommerce-checkout
.select2-container--default
.select2-results__option--highlighted[aria-selected],
body.woocommerce-checkout
.select2-container--default
.select2-results__option--highlighted[data-selected] {
    background-color: #00AEE8 !important;
    color: #ffffff !important;
}

/* ==========================================================
   MG BOBINAS - TARJETAS SOLO EN PÁGINA TIENDA
   /tienda/
   ========================================================== */


/* Mismo ancho y espaciado que las categorías */
body.woocommerce-shop .ast-woocommerce-container {
    padding: 25px 80px 70px !important;
}


/* TARJETA */
body.woocommerce-shop ul.products li.product {
    position: relative;
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e3e7eb;
    border-radius: 14px;

    padding-bottom: 72px;

    box-shadow: 0 5px 18px rgba(23, 27, 31, 0.06);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}


/* Franja superior colores MG Bobinas */
body.woocommerce-shop ul.products li.product::before {
    content: "";
    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 5px;
    z-index: 3;

    background: linear-gradient(
        90deg,
        #F5008B 0%,
        #F5008B 33%,
        #00AEE8 33%,
        #00AEE8 66%,
        #FFD900 66%,
        #FFD900 100%
    );
}


/* Hover tarjeta */
body.woocommerce-shop ul.products li.product:hover {
    transform: translateY(-5px);

    border-color: #F5008B;

    box-shadow: 0 14px 30px rgba(23, 27, 31, 0.13);
}


/* IMAGEN */
body.woocommerce-shop ul.products li.product
.astra-shop-thumbnail-wrap {

    overflow: hidden;

    position: static !important;

    background: #F5F6F7;
}


/* Animación imagen */
body.woocommerce-shop ul.products li.product img {
    transition: transform .35s ease;
}

body.woocommerce-shop ul.products li.product:hover img {
    transform: scale(1.035);
}


/* Zona título + precio */
body.woocommerce-shop ul.products li.product
.astra-shop-summary-wrap {

    padding: 18px 18px 20px;
}


/* TÍTULO */
body.woocommerce-shop ul.products li.product
.woocommerce-loop-product__title {

    color: #171B1F;

    font-size: 17px;

    line-height: 1.35;

    font-weight: 700;

    margin-bottom: 10px;
}


/* Hover título */
body.woocommerce-shop ul.products li.product
.woocommerce-loop-product__title:hover {

    color: #F5008B;
}


/* PRECIO */
body.woocommerce-shop ul.products li.product .price {

    color: #F5008B !important;

    font-size: 18px;

    font-weight: 700;

    margin-bottom: 0;
}


/* ==========================================================
   BOTÓN SELECCIONAR OPCIONES
   ========================================================== */

body.woocommerce-shop ul.products li.product
.ast-on-card-button.ast-select-options-trigger {

    position: absolute !important;

    top: auto !important;

    bottom: 18px !important;

    left: 18px !important;
    right: 18px !important;

    width: auto !important;
    height: auto !important;

    display: flex !important;

    justify-content: center;
    align-items: center;

    padding: 13px 16px !important;

    background: #F5008B !important;

    color: #ffffff !important;

    border-radius: 8px !important;

    opacity: 1 !important;

    visibility: visible !important;

    text-decoration: none !important;

    transition:
        background-color .2s ease,
        transform .2s ease;
}


/* Quitar icono pequeño de cesta */
body.woocommerce-shop ul.products li.product
.ast-select-options-trigger .ahfb-svg-iconset {

    display: none !important;
}


/* Tooltip de Astra convertido en texto del botón */
body.woocommerce-shop ul.products li.product
.ast-select-options-trigger .ast-card-action-tooltip {

    position: static !important;

    display: block !important;

    opacity: 1 !important;

    visibility: visible !important;

    background: transparent !important;

    color: #ffffff !important;

    margin: 0 !important;

    padding: 0 !important;

    font-size: 14px !important;

    line-height: 1.2 !important;

    font-weight: 700 !important;

    pointer-events: none;
}


/* Quitar triángulo tooltip */
body.woocommerce-shop ul.products li.product
.ast-select-options-trigger .ast-card-action-tooltip::after {

    display: none !important;
}


/* Hover botón */
body.woocommerce-shop ul.products li.product
.ast-on-card-button.ast-select-options-trigger:hover {

    background: #C90072 !important;

    transform: translateY(-1px);
}


/* ==========================================================
   CANTIDADES DISPONIBLES
   ========================================================== */

body.woocommerce-shop .mg-loop-cantidades {

    padding: 0 18px;

    margin: 14px 0 16px;
}


body.woocommerce-shop .mg-loop-cantidades-label {

    display: block;

    margin-bottom: 7px;

    font-size: 13px;

    font-weight: 700;

    color: #171B1F;
}


body.woocommerce-shop .mg-loop-cantidades-items {

    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 8px;
}


body.woocommerce-shop .mg-loop-cantidad-item {

    display: inline-block;

    color: #F5008B;

    font-size: 13px;

    font-weight: 700;

    line-height: 1.3;
}


body.woocommerce-shop .mg-loop-cantidad-item::before {
    content: "[";
}


body.woocommerce-shop .mg-loop-cantidad-item::after {
    content: "]";
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 921px) {

    body.woocommerce-shop .ast-woocommerce-container {

        padding: 25px 30px 70px !important;
    }

    body.woocommerce-shop ul.products li.product
    .astra-shop-summary-wrap {

        padding: 15px;
    }
}


/* ==========================================================
   MÓVIL
   ========================================================== */

@media (max-width: 544px) {

    body.woocommerce-shop .ast-woocommerce-container {

        padding: 20px 18px 60px !important;
    }

    body.woocommerce-shop ul.products li.product {

        padding-bottom: 68px;
    }
}

/* BOTÓN CALCULAR ENVÍO - CARRITO */
.woocommerce-cart .shipping-calculator-button {
    display: inline-block !important;
    background: #F5008B !important;
    color: #ffffff !important;
    padding: 10px 18px !important;
    border-radius: 3px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    margin-top: 8px !important;
    transition: background-color 0.2s ease;
}

/* Hover */
.woocommerce-cart .shipping-calculator-button:hover,
.woocommerce-cart .shipping-calculator-button:focus {
    background: #cf0075 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

