/*
 Theme Name:   Storefront Child
 Theme URI:    https://superfacel.es/
 Description:  A premium child theme for Storefront, customized for super-fast performance and modern aesthetics.
 Author:       Antigravity
 Author URI:   https://superfacel.es/
 Template:     storefront
 Version:      1.0.0
 Text Domain:  storefront-child
*/


:root {
    --brand-50: #fdf2f7;
    --brand-100: #f9e3ef;
    --brand-500: #d5509e;
    --brand-600: #ca3e91;
    --brand-700: #ab337a;
    --brand-800: #8c2963;
    --brand-900: #732352;
    
    --accent-100: #eaf0f5;
    --accent-500: #3071ad;
    --accent-600: #265C8F;
    --accent-700: #1d4872;
    --accent-800: #6B268F;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #7a7a7a;
    --gray-600: #616161;
    --gray-700: #4a4a4a;
    --gray-800: #333333;
    --gray-900: #1a1a1a;
}

/* Custom styles will go here */

/* AJAX Cart Loading State */
.single_add_to_cart_button.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.single_add_to_cart_button.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: storefront_child_spin 0.8s linear infinite;
}

@keyframes storefront_child_spin {
    to {
        transform: rotate(360deg);
    }
}

.single_add_to_cart_button.added::after {
    content: " \2713";
    /* Checkmark icon */
}

/* SideCart Elegant Transition (PcComponentes style) */
.xoo-wsc-container,
.xoo-wsc-slider,
.xoo-wsc-basket {
    /* Transition más lenta y suave */
    transition: 0.45s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* Overlay (Fondo oscuro con blur suave) */
.xoo-wsc-opac {
    background-color: rgba(0, 0, 0, 0.25) !important;
    /* Más clarito */
    backdrop-filter: blur(4px) !important;
    /* Efecto cristal suave */
    transition: opacity 0.4s ease-in-out !important;
}

.xoo-wsc-cart-active .xoo-wsc-opac {
    opacity: 1 !important;
}

/* Navigation Menu Styling (Dynamic WP Menu) */
nav ul.flex li {
    list-style: none;
    /* Quitamos puntos si los hubiera */
}

nav ul.flex li a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 500;
    /* font-medium */
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    border-radius: 0.375rem;
    /* rounded-md */
    transition: all 0.15s ease-in-out;
    color: white;
    /* Color base en fondo oscuro */
    text-decoration: none;
}

nav ul.flex li a:hover {
    background-color: var(--brand-700);
    color: white;
}

/* Resaltar página actual */
nav ul.flex li.current-menu-item a,
nav ul.flex li.current_page_item a {
    background-color: var(--brand-800);
    color: white;
}

/* WooCommerce List View Fixes */
.full-width-products .products,
.full-width-products .products-list-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.full-width-products .products .product,
.full-width-products .products-list-container .product {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    clear: none !important;
}

/* WooCommerce List View Price Styling */
.full-width-products .price,
.full-width-products .price-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important; /* Corregido a la derecha */
    color: #111827 !important;
    font-weight: 800 !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
    margin-bottom: 0.25rem !important;
}

@media (min-width: 640px) {

    .full-width-products .price,
    .full-width-products .price-container {
        align-items: flex-end !important;
    }
}

.full-width-products .price del {
    color: #9ca3af !important;
    /* gray-400 */
    font-size: 0.875rem !important;
    /* text-sm */
    font-weight: 400 !important;
    margin-bottom: 0.125rem !important;
}

.full-width-products .price ins {
    text-decoration: none !important;
    color: #111827 !important;
}

/* WooCommerce Button Styling (Matching tienda.html) */
.full-width-products .button.add_to_cart_button,
.full-width-products .button.product_type_simple,
.full-width-products .button.product_type_variable {
    display: flex !important;
    width: 100% !important;
    background-color: var(--brand-600) !important;
    color: white !important;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
    font-weight: 700 !important;
    padding: 0.8rem 1.25rem !important;
    /* Slightly larger py and px */
    border-radius: 0.5rem !important;
    /* rounded-lg */
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    transition: all 0.2s !important;
    border: none !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    text-transform: none !important;
    font-size: 0.875rem !important;
}

.full-width-products .price,
.full-width-products .price-container {
    font-family: "Segoe UI Black", "Arial Black", sans-serif !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important; /* Corregido a la derecha */
    color: #111827 !important;
    font-weight: 900 !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
    margin-bottom: 0.25rem !important;
}

.full-width-products .button.add_to_cart_button:hover {
    background-color: var(--brand-700) !important;
}



/* Toast Notification Styling */
#custom-cart-toast {
    position: fixed;
    top: 9rem;
    right: 2rem;
    z-index: 9999;
    transform: translateY(-150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

#custom-cart-toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-content {
    background-color: #1f2937;
    /* gray-800 */
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 4px solid var(--brand-500);
}

/* Fix for sticky header: Storefront has overflow-x: hidden which breaks position: sticky */
body,
.site {
    overflow-x: visible !important;
}

/* Ensure main content doesn't get hidden behind the sticky header if needed */
/* (Currently handled by browser since it's sticky, not fixed) */

/* Shop Loader Overlay - controlled via display:none/flex from JS */
#shop-loader-overlay {
    transition: none;
    /* Sin transición en el overlay para evitar el flash del fade */
}



/* Sidebar Search Styling */
.sidebar-search-input {
    background-color: #F9FAFB !important;
    padding-left: 45px !important;
    font-size: 14px !important;
    height: 39px !important;
    /* 7px más */
    border: 1px solid #d1d5db !important;
    /* Borde un tono más oscuro */
    border-radius: 6px !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-shadow: none !important;
    /* Elimina sombras internas que parecen bordes dobles */
    transition: all 0.2s !important;
}

.sidebar-search-input:focus {
    border-color: var(--brand-500) !important;
    box-shadow: 0 0 0 1px var(--brand-500) !important;
    /* Combinado con el border-color da efecto de 2px sin saltos */
    background-color: #fff !important;
}

/* Header Search Input Reset */
.woocommerce-product-search input[type="text"],
.woocommerce-product-search input[type="search"] {
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

.woocommerce-product-search input[type="text"]:focus,
.woocommerce-product-search input[type="search"]:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* Anulamos el hover */
.sidebar-search-input:hover {
    border-color: #d1d5db !important;
}

.sidebar-search-form .relative svg {
    left: 14px !important;
    top: 10px !important;
    /* Centrado para 39px de altura */
    width: 18px !important;
    height: 18px !important;
    position: absolute !important;
}

/* --- UNIFIED SIDEBAR & PRICE FILTER STYLING --- */

/* 1. Labels and Titles */
.wc-block-price-filter__title,
.wc-block-attribute-filter__title,
.widget-title,
.widget h2,
.wc-block-grid__title,
.sidebar-search-form label {
    display: block !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 0.75rem !important;
    border: none !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* 2. Price Inputs (Classic & Blocks) */
.wc-block-product-filter-price-slider .text input[type=text],
.widget_price_filter .price_slider_amount .input-text,
.wc-block-price-filter__amount-input,
.wc-block-price-filter__amount {
    background-color: #F9FAFB !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    height: 39px !important;
    font-size: 14px !important;
    padding: 0 12px !important;
    appearance: none !important;
    box-shadow: none !important;
    transition: all 0.2s !important;
    max-width: 90px !important;
}

.wc-block-product-filter-price-slider .text input[type=text]:focus,
.wc-block-price-filter__amount:focus,
.widget_price_filter .price_slider_amount .input-text:focus {
    border-color: var(--brand-500) !important;
    box-shadow: 0 0 0 1px var(--brand-500) !important;
    background-color: #fff !important;
    outline: none !important;
}

/* 3. Price Slider (The "Track" and "Progress") */
.wc-block-product-filter-price-slider__range {
    background-color: #f3f4f6 !important;
    /* RAYA GRIS */
    --range-color: var(--brand-500) !important;
    /* SLIDER VERDE (Variable) */
    height: 6px !important;
    border-radius: 3px !important;
}

.wc-block-product-filter-price-slider__range-input-progress {
    background-color: var(--brand-500) !important;
    /* SLIDER VERDE (Progress block) */
    height: 100% !important;
    top: 0 !important;
}

/* Clear browser defaults that might force green everywhere */
.wc-block-product-filter-price-slider__range input[type=range]::-webkit-slider-runnable-track,
.wc-block-product-filter-price-slider__range input[type=range]::-moz-range-track {
    background: transparent !important;
}

/* Target the specific internal range-bar class for height consistency */
.wc-block-product-filter-price-slider__range .range-bar {
    height: 6px !important;
}

/* Final High-Contrast Price Slider Fix */
.wc-block-product-filter-price-slider__range {
    background-color: #e5e7eb !important;
}

.wc-block-product-filter-price-slider__range-input-progress {
    background-color: var(--brand-500) !important;
    opacity: 1 !important;
    z-index: 10 !important;
}

.wc-block-product-filter-price-slider__range .range-bar {
    background-color: #e5e7eb !important;
    opacity: 1 !important;
}

/* Absolute Uniformity for all Sidebar/Widget Titles */
.widget-title,
.widget h2,
.wc-block-grid__title,
.wc-block-attribute-filter__title,
.wc-block-price-filter__title,
.wc-block-product-categories__title,
.wc-block-product-tag-cloud__title,
.wc-block-product-filter-price-slider__title,
.sidebar-search-form label {
    display: block !important;
    font-size: 0.875rem !important;
    /* text-sm */
    font-weight: 600 !important;
    color: #374151 !important;
    /* gray-700 */
    margin-bottom: 0.75rem !important;
    border: none !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.25rem !important;
}

/* Remove default Storefront widget title borders */
.widget .widget-title {
    border-bottom: none !important;
    margin-bottom: 0.75rem !important;
    padding-bottom: 0 !important;
}

/* Scoped Sidebar Titles (Protected from global h3 changes) */
aside h3,
aside .widget-title,
aside .widget h2,
aside .wc-block-product-filter-price-slider__title,
aside .wc-block-attribute-filter__title,
aside .wc-block-product-categories__title,
aside .wc-block-product-tag-cloud__title,
aside .wc-block-grid__title {
    display: block !important;
    font-size: 0.875rem !important;
    /* text-sm */
    font-weight: 600 !important;
    /* semibold */
    color: #374151 !important;
    /* gray-700 */
    margin-bottom: 0.75rem !important;
    border: none !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.25rem !important;
}

/* Remove any internal flex or icons from the main Filters h3 if they look inconsistent */
aside h3 svg {
    display: none !important;
    /* Hide icon if you want it identical to the search label */
}

/* Restore Main Sidebar Title (Filtros) */
aside h3.text-lg {
    display: flex !important;
    font-size: 1.125rem !important;
    /* text-lg */
    font-weight: 700 !important;
    color: #1f2937 !important;
    border-bottom: 2px solid #f3f4f6 !important;
    padding-bottom: 0.5rem !important;
    margin-bottom: 1.5rem !important;
}

aside h3.text-lg svg {
    display: block !important;
}

/* Ensure small style ONLY affects widget internal titles */
aside .widget-title,
aside .widget h2,
aside .wc-block-product-filter-price-slider__title,
aside .wc-block-attribute-filter__title,
aside .wc-block-product-categories__title,
aside .wc-block-product-tag-cloud__title {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #4b5563 !important;
    margin-bottom: 0.75rem !important;
    border: none !important;
}

/* AUTOMATIC CHIP/BUTTON STYLE FOR ALL ATTRIBUTE FILTERS */
.wc-block-attribute-filter ul,
.wc-block-product-filter-attribute ul {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wc-block-attribute-filter ul li,
.wc-block-product-filter-attribute ul li {
    margin: 0 !important;
    padding: 0 !important;
}

.wc-block-attribute-filter ul li a,
.wc-block-attribute-filter ul li button,
.wc-block-product-filter-attribute ul li a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 6px 14px !important;
    background-color: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 9999px !important;
    /* Pill style */
    font-size: 0.8125rem !important;
    /* Un poco más pequeño para que quepan más */
    color: #4b5563 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

/* Hover & Active States */
.wc-block-attribute-filter ul li a:hover,
.wc-block-product-filter-attribute ul li a:hover,
.wc-block-attribute-filter ul li.is-active a,
.wc-block-product-filter-attribute ul li.is-active a {
    background-color: var(--brand-500) !important;
    color: white !important;
    border-color: var(--brand-500) !important;
}

/* Hide the default checkbox if the block tries to show it */
.wc-block-attribute-filter ul li input[type="checkbox"] {
    display: none !important;
}

/* REINFORCED CHIP STYLE - Targeting all common WC Block variations */
.wc-block-checkbox-list,
.wc-block-attribute-filter-list,
.wc-block-product-filter-attribute ul,
.wc-block-attribute-filter ul {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Targeting the items specifically */
.wc-block-checkbox-list-item,
.wc-block-attribute-filter-list-item {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Targeting the labels/links inside to look like chips */
.wc-block-checkbox-list-item label,
.wc-block-attribute-filter-list-item a,
.wc-block-attribute-filter-list-item label {
    display: inline-flex !important;
    align-items: center !important;
    padding: 6px 14px !important;
    background-color: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 9999px !important;
    font-size: 0.8125rem !important;
    color: #4b5563 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    position: relative !important;
}

.wc-block-checkbox-list-item label:hover,
.wc-block-attribute-filter-list-item a:hover {
    background-color: var(--brand-500) !important;
    color: white !important;
    border-color: var(--brand-500) !important;
}

/* Hide the actual checkbox input */
.wc-block-checkbox-list-item input[type="checkbox"],
.wc-block-attribute-filter-list-item input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

/* Style when checked */
.wc-block-checkbox-list-item input[type="checkbox"]:checked+span,
.wc-block-checkbox-list-item input[type="checkbox"]:checked+.wc-block-checkbox-list-item__text {
    color: white !important;
}

.wc-block-checkbox-list-item:has(input:checked) label {
    background-color: var(--brand-500) !important;
    color: white !important;
    border-color: var(--brand-500) !important;
}

/* TARGETING THE EXACT CHIP CLASSES PROVIDED */
.wc-block-product-filter-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wc-block-product-filter-chips__label {
    display: inline-flex !important;
    align-items: center !important;
    padding: 6px 14px !important;
    background-color: #f9fafb !important;
    border: 1px solid #d1d5db !important;
    border-radius: 9999px !important;
    /* Píldora */
    font-size: 0.8125rem !important;
    color: #4b5563 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    margin: 0 !important;
}

.wc-block-product-filter-chips__label:hover {
    background-color: var(--brand-500) !important;
    color: white !important;
    border-color: var(--brand-500) !important;
}

/* State when the chip is active/selected */
.wc-block-product-filter-chips__label[aria-checked="true"],
.wc-block-product-filter-chips__label.is-selected {
    background-color: var(--brand-500) !important;
    color: white !important;
    border-color: var(--brand-500) !important;
}

/* Ensure the text inside also behaves correctly */
.wc-block-product-filter-chips__text {
    font-weight: 500 !important;
}

/* Cleaning up the BUTTON wrapper for Chips */
.wc-block-product-filter-chips__item {
    background-color: #f9fafb !important;
    border: 1px solid #d1d5db !important;
    border-radius: 9999px !important;
    padding: 6px 14px !important;
    font-size: 0.8125rem !important;
    color: #4b5563 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    box-shadow: none !important;
    outline: none !important;
    margin: 0 !important;
}

.wc-block-product-filter-chips__item:hover,
.wc-block-product-filter-chips__item[aria-checked="true"] {
    background-color: var(--brand-500) !important;
    color: white !important;
    border-color: var(--brand-500) !important;
}

/* Resetting the internal span so it doesn't conflict */
.wc-block-product-filter-chips__label {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: inherit !important;
}

/* Smooth transition for every product card */
.product {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Ocultar el texto de disponibilidad (XX disponibles) de forma reversible */
.single-product .stock {
    display: none !important;
}

/* Ocultar párrafos de precio vacíos o residuales */
.single-product p.price:empty,
.summary.entry-summary > p.price {
    display: none !important;
}

/* --- SINGLE PRODUCT (tienda3.html) --- */

/* Badge de Oferta (Sale Flash) reposicionado sobre la imagen */
.single-product span.onsale {
    position: absolute !important;
    top: 30px !important;
    left: 125px !important;
    margin: 0 !important;
    background-color: #ef4444 !important; /* Rojo vibrante */
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    z-index: 40 !important;
    min-height: auto !important;
    line-height: 1 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.single-product .woocommerce-product-gallery {
    position: relative !important; /* Para que el badge de oferta se posicione respecto a esto */
    display: flex !important;
    flex-direction: row-reverse !important;
    justify-content: flex-end !important;
    gap: 15px !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Ajuste de márgenes para la zona de compra */
.single-product form.cart {
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
}

/* Estilos para el selector de cantidad premium (h-12 w-28) */
.single-product .quantity {
    display: flex !important;
    align-items: center;
    background: #ffffff; /* bg-white */
    border: 1px solid #d1d5db; /* border-gray-300 */
    border-radius: 0.5rem; /* rounded-lg */
    overflow: hidden;
    padding: 0;
    width: 112px !important; /* w-28 */
    height: 48px !important; /* h-12 */
    flex-shrink: 0;
}

.single-product .quantity input.qty {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important; /* Quitar sombras internas */
    text-align: center !important;
    font-size: 0.875rem !important; /* text-sm */
    font-weight: 700 !important; /* font-bold */
    color: #1f2937 !important; /* text-gray-800 */
    margin: 0 !important;
    padding: 0 !important;
    outline: none !important;
    appearance: none;
    -moz-appearance: textfield;
}

.qty-btn {
    width: 32px !important; /* w-8 */
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    color: #6b7280 !important; /* text-gray-500 */
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease; /* transition-colors */
    outline: none !important;
}

.qty-btn:focus,
.qty-btn:active {
    outline: none !important;
    background: var(--brand-50) !important;
    box-shadow: none !important;
}

.qty-btn:hover {
    background: var(--brand-50) !important; /* hover:bg-brand-50 */
    color: var(--brand-600) !important; /* hover:text-brand-600 */
}

.qty-btn.minus { border-radius: 0.5rem 0 0 0.5rem; } /* rounded-l-lg */
.qty-btn.plus { border-radius: 0 0.5rem 0.5rem 0; } /* rounded-r-lg */

/* Botón Añadir a la Cesta a juego (h-12) */
.single-product .single_add_to_cart_button {
    height: 48px !important; /* h-12 */
    border-radius: 0.5rem !important; /* rounded-lg */
    margin-left: 12px !important;
    padding: 0 24px !important;
}

.gallery-thumbs-wrapper {
    width: 80px !important;
    flex-shrink: 0 !important;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.single-product .woocommerce-product-gallery__wrapper {
    flex: 1 !important;
    min-width: 0;
    background: #fff !important;
    overflow: hidden !important;
    border: none !important;
}

.single-product .woocommerce-product-gallery .flex-viewport {
    width: 100% !important;
    border: 1px solid #f3f4f6 !important;
    border-radius: 0.5rem !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}


.single-product .woocommerce-product-gallery img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    opacity: 1 !important;
    /* Forzar visibilidad */
    visibility: visible !important;
}

/* Clase unificada para todos los botones de acción de la galería (favorito, compartir, lupa) */
.gallery-action-btn,
.single-product .woocommerce-product-gallery__trigger {
    position: absolute !important;
    z-index: 30 !important;
    background: #f3f4f6 !important; 
    border: 1px solid #d1d5db !important; 
    border-radius: 9999px !important; 
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0 !important;
    color: #6b7280 !important; /* Gris medio */
    cursor: pointer;
    outline: none !important; /* Quitar el anillo de enfoque */
}

.gallery-action-btn:focus,
.gallery-action-btn:active,
.single-product .woocommerce-product-gallery__trigger:focus,
.single-product .woocommerce-product-gallery__trigger:active {
    outline: none !important;
    box-shadow: none !important;
}

.gallery-action-btn:hover,
.single-product .woocommerce-product-gallery__trigger:hover {
    background: var(--brand-50) !important; 
    border-color: var(--brand-600) !important; /* Rosa corporativo en el borde */
    color: var(--brand-600) !important; /* Rosa corporativo en el icono */
    transform: scale(1.05); 
}

/* Posiciones específicas para los botones del lado derecho */
.gallery-action-btn.btn-fav { top: 52px !important; right: 16px !important; }
.gallery-action-btn.btn-share { top: 94px !important; right: 16px !important; }

/* Estado activo para el botón de favorito (relleno y fondo) */
.gallery-action-btn.btn-fav.active {
    color: var(--brand-600) !important;
    background: var(--brand-50) !important;
    border-color: var(--brand-600) !important;
}
.gallery-action-btn.btn-fav.active svg {
    fill: currentColor !important;
}

/* La lupa tiene su propia posición original pero el mismo estilo */
.single-product .woocommerce-product-gallery__trigger {
    top: 10px !important;
    right: 16px !important;
    text-indent: -9999px;
}

.single-product .woocommerce-product-gallery__trigger::before {
    content: "🔍"; 
    text-indent: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
}

.single-product .flex-control-nav.flex-control-thumbs {
    grid-area: thumbs !important;
    display: flex !important;
    flex-direction: column !important;
    width: 80px !important;
    min-width: 80px !important;
    flex-shrink: 0 !important;
    gap: 10px !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    max-height: 455px !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
    /* Hide scrollbar for Firefox */
    -ms-overflow-style: none !important;
    /* Hide scrollbar for IE/Edge */
    scroll-behavior: smooth !important;
}

.single-product .flex-control-nav.flex-control-thumbs::-webkit-scrollbar {
    display: none !important;
    /* Hide scrollbar for Chrome/Safari */
}

/* Container for the arrows */
.gallery-thumbs-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    user-select: none;
    /* Prevent text selection on rapid clicks */
    -webkit-user-select: none;
}

.thumb-arrow {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    width: 100%;
    height: 24px;
    display: none;
    /* Shown via JS */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
    z-index: 10;
    user-select: none;
    -webkit-user-select: none;
}

.thumb-arrow:hover {
    background: #f3f4f6;
    color: var(--brand-600);
}


.single-product .flex-control-nav.flex-control-thumbs li {
    width: 100% !important;
    margin: 0 !important;
    aspect-ratio: 1 / 1 !important;
}

.single-product .flex-control-nav.flex-control-thumbs img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 0.375rem !important;
    transition: all 0.2s ease !important;
    opacity: 1 !important;
    cursor: pointer !important;
    padding: 2px !important;
    background: white !important;
}

.single-product .flex-control-nav.flex-control-thumbs img:hover {
    border-color: var(--brand-500) !important;
    box-shadow: 0 0 0 2px rgba(213, 80, 158, 0.2) !important;
}

/* 2. Summary Info Scaling */
.single-product div.summary {
    width: 100% !important;
    float: none !important;
    margin-bottom: 0 !important;
}

.single-product .product_title {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #111827 !important;
    line-height: 1.25 !important;
    margin-bottom: 0.5rem !important;
}

/* 3. Tabs Styling */
.woocommerce-tabs.wc-tabs-wrapper {
    background: white !important;
    border-radius: 1rem !important;
    border: 1px solid #f3f4f6 !important;
    overflow: hidden !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.woocommerce-tabs ul.tabs {
    display: flex !important;
    width: 100% !important; /* Forzar ancho completo */
    border-bottom: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-tabs ul.tabs li a {
    display: block !important;
    padding: 1rem 2rem !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: #6b7280 !important;
    border-bottom: 2px solid transparent !important;
    transition: all 0.2s !important;
    outline: none !important; /* Quitar anillo de enfoque */
}

.woocommerce-tabs ul.tabs li a:focus,
.woocommerce-tabs ul.tabs li a:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Eliminar símbolos extras que ponga Storefront */
.woocommerce-tabs ul.tabs li a::before,
.woocommerce-tabs ul.tabs li a::after {
    content: none !important;
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--brand-600) !important;
    border-bottom-color: var(--brand-600) !important;
    background: var(--brand-50) !important;
}

/* Forzar eliminación de símbolos en todas las pestañas (normales y activas) */
.woocommerce-tabs ul.tabs li::before,
.woocommerce-tabs ul.tabs li::after,
.woocommerce-tabs ul.tabs li a::before,
.woocommerce-tabs ul.tabs li a::after {
    content: none !important;
    display: none !important;
    border: none !important;
}

.woocommerce-tabs .woocommerce-Tabs-panel {
    padding: 2rem !important;
    color: #4b5563 !important;
    width: 100% !important; /* Forzar ancho completo */
    float: none !important; /* Quitar cualquier float de Storefront */
    clear: both !important;
}

/* Ocultar títulos redundantes dentro de las pestañas y su posible raya */
.woocommerce-Tabs-panel h2,
.woocommerce-Tabs-panel > h2:first-child {
    display: none !important;
}

.woocommerce-Tabs-panel {
    border-top: none !important; /* Quitar posible raya superior del panel */
}

.woocommerce-Tabs-panel::before,
.woocommerce-Tabs-panel::after {
    content: none !important; /* Quitar posibles rayas hechas con pseudo-elementos */
    display: none !important;
}

/* Fulminar la raya específica detectada por el usuario */
h2 + h3, .beta + h3 {
    border-top: none !important;
    padding-top: 0 !important;
}

/* 4. Quantity and Add to Cart Area */
.single-product .quantity {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    height: 3rem !important;
    margin-right: 1rem !important;
    overflow: hidden !important;
}

.single-product .quantity input.qty {
    width: 3.5rem !important;
    height: 100% !important;
    border: none !important;
    font-weight: 700 !important;
    text-align: center !important;
    background: transparent !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.single-product .quantity input.qty::-webkit-outer-spin-button,
.single-product .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.single-product .single_add_to_cart_button {
    height: 3rem !important;
    border-radius: 0.5rem !important;
    background-color: var(--brand-600) !important;
    font-weight: 700 !important;
    padding: 0 2rem !important;
    transition: all 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.single-product .single_add_to_cart_button::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='19' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 0.5rem;
}

.single-product .single_add_to_cart_button:hover {
    background-color: var(--brand-700) !important;
}

/* --- PRODUCTOS RELACIONADOS PREMIUM (FORCE MICRO) --- */
.single-product section.related.products {
    padding-top: 3rem !important;
    border-top: 1px solid #f3f4f6 !important;
    margin-top: 3rem !important;
    clear: both !important;
}

.single-product section.related.products h2 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    border-left: 4px solid var(--brand-600) !important;
    padding-left: 0.75rem !important;
    margin-bottom: 1.5rem !important;
    text-transform: none !important;
}

/* Forzar rejilla sin elementos extra */
.single-product section.related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* 2 en móvil */
    gap: 1rem !important;
    padding: 0 !important;
    margin: 0 !important;
}

.single-product section.related.products ul.products::before,
.single-product section.related.products ul.products::after {
    content: none !important;
    display: none !important;
}

@media (min-width: 1024px) {
    .single-product section.related.products ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1.5rem !important;
    }
}

/* Tarjeta individual con ancho forzado */
.single-product section.related.products ul.products li.product {
    background: #ffffff !important;
    border: 1px solid #f3f4f6 !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem !important;
    margin: 0 !important;
    float: none !important; /* Quitar float de Storefront */
    width: 100% !important;
    max-width: 160px !important; /* Forzar tamaño pequeño */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.single-product section.related.products ul.products li.product img {
    width: 60% !important;
    height: auto !important;
    margin: 0 auto 0.5rem auto !important;
    background: transparent !important;
}

.single-product section.related.products ul.products li.product h2.woocommerce-loop-product__title {
    font-size: 0.75rem !important;
    text-align: center !important;
    margin: 0 0 0.5rem 0 !important;
    padding: 0 !important;
    border: none !important;
}

.single-product section.related.products ul.products li.product .price {
    text-align: center !important;
    display: block !important;
}

.single-product section.related.products ul.products li.product .price .amount,
.single-product section.related.products ul.products li.product .price ins .amount {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
}

/* Ocultar botones y estrellas */
.single-product section.related.products .add_to_cart_button,
.single-product section.related.products .star-rating,
.single-product section.related.products .button {
    display: none !important;
}

/* 6. Breadcrumbs */
.woocommerce-breadcrumb {
    font-size: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.375rem !important;
    color: #6b7280 !important;
    margin-top: 0.25rem !important;
    margin-bottom: 0.75rem !important;
}

.woocommerce-breadcrumb a {
    color: #6b7280 !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.woocommerce-breadcrumb a:hover {
    color: var(--brand-600) !important;
}

.woocommerce-breadcrumb .crumb-item:last-of-type {
    color: #1f2937 !important;
    font-weight: 600 !important;
}

/* Remove Storefront's default breadcrumb icons */
.woocommerce-breadcrumb a:before,
.woocommerce-breadcrumb span:before {
    content: none !important;
}

/* Archive Description */
.archive-description p {
    margin-bottom: 0 !important;
    line-height: 1.4 !important;
}

/* 7. Variations (Color Selector) Styling */
.single-product table.variations {
    width: 100% !important;
    border: none !important;
    margin-bottom: 1.5rem !important;
}

.single-product table.variations td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
}

.single-product table.variations td.label {
    margin-bottom: 0.5rem !important;
}

.single-product table.variations label {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    text-transform: none !important;
}

.single-product table.variations select {
    width: 100% !important;
    max-width: 300px !important;
    height: 2.5rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    padding: 0 0.75rem !important;
    font-size: 0.875rem !important;
    color: #4b5563 !important;
    background-color: #f9fafb !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
}

/* 8. Gallery Absolute Buttons Styling */
.woocommerce-product-gallery .absolute button {
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
}

.woocommerce-product-gallery .absolute button:hover i {
    transform: scale(1.1) !important;
}

.woocommerce-product-gallery .absolute button i {
    transition: all 0.2s !important;
}

/* --- ESTILOS DE PRECIO TACHADO (OFERTA) --- */
.price-container {
    display: block !important;
    text-align: right !important;
    width: 100% !important;
}

.price-container del, 
.price del {
    color: #9ca3af !important; /* text-gray-400 */
    text-decoration: line-through !important;
    font-size: 0.875rem !important; /* text-sm */
    font-weight: 400 !important;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
    display: block !important; /* Ocupa su propia línea */
    margin-right: 0 !important;
    margin-bottom: 10px !important; /* Aumentado a 10px */
    text-align: right !important;
}

.price-container ins,
.price ins {
    text-decoration: none !important;
    display: block !important;
    text-align: right !important;
}

/* --- FORZAR ANCHO COMPLETO EN EL CARRITO --- */
.woocommerce-cart .content-area,
.woocommerce-cart .site-main,
.woocommerce-cart .col-full {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Ajuste fino para los botones de cantidad en el carrito */
.woocommerce-cart .quantity button {
    cursor: pointer !important;
    border: none !important;
    background: none !important;
}

.woocommerce-cart .quantity input::-webkit-outer-spin-button,
.woocommerce-cart .quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
/* --- WOOCOMMERCE MY ACCOUNT FIXES --- */
.woocommerce-account .woocommerce-MyAccount-navigation {
    float: none !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

.woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
}

/* Ensure our grid handles the layout, not Storefront floats */
.woocommerce-account .woocommerce-content-area {
    width: 100% !important;
}

/* Limpieza adicional para los botones de Mi Cuenta */
.woocommerce-MyAccount-navigation ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.woocommerce-MyAccount-navigation ul li {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.woocommerce-MyAccount-navigation ul li a {
    display: flex !important;
    align-items: center !important;
}

/* Eliminar todos los pseudo-elementos de la navegación de mi cuenta */
.woocommerce-MyAccount-navigation ul li a:before,
.woocommerce-MyAccount-navigation ul li a:after {
    content: none !important;
}

/* --- CSS GRID CHECKOUT LAYOUT --- */

/* Fix the main woocommerce wrapper to ensure centering if Storefront floated it */
.woocommerce-checkout .woocommerce {
    width: 100% !important;
    max-width: 1400px !important; /* Aumentado para aprovechar plantillas Full Width */
    margin: 0 auto !important;
    float: none !important;
    clear: both !important;
}

form.woocommerce-checkout {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 3rem auto !important;
    float: none !important;
    border: 5px solid transparent !important;
    background-color: transparent !important; /* El contenedor principal lo dejamos transparente para que respire */
}

@media (min-width: 992px) {
    form.woocommerce-checkout {
        display: block !important; /* The form itself is just a block */
    }

    .antigravity-checkout-columns {
        display: flex; /* Quitamos !important para que JS pueda ocultarlo */
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        width: 100% !important;
        gap: 3rem !important;
    }

    /* Ocultar inicialmente SOLO si existe la pantalla de elección */
    .checkout-choice-wrapper ~ form .antigravity-checkout-columns {
        display: none;
    }


    #customer_details {
        width: 100% !important;
        flex: 1 1 auto !important; /* Ocupa el espacio restante */
        margin: 0 !important;
        padding: 20px !important;
        background-color: #e5e7eb !important;
        border: 2px solid transparent !important;
        border-radius: 1.5rem !important;
    }

    .woocommerce-checkout-review-order-wrapper {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 20px !important;
        position: sticky !important;
        top: 100px !important;
        background-color: #e5e7eb !important;
        border: 2px solid transparent !important;
        border-radius: 1.5rem !important;
    }

    /* Stack Billing and Shipping vertically */
    #customer_details .col-1, 
    #customer_details .col-2 {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        padding: 0 !important;
        margin-bottom: 2rem !important;
    }
}
.woocommerce-checkout .form-row {
    margin-bottom: 1rem !important;
}

.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    padding: 10px 15px !important;
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
    background: #fdfdfd !important;
}

/* Caja de Pedido */
#order_review_heading {
    width: 100% !important;
    float: none !important;
    margin-top: 0 !important;
}
#order_review {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 30px !important;
    border-radius: 15px !important;
    background: #fff !important;
    border: 1px solid #eee !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
}

/* Resetear columnas internas de Storefront */
.col2-set .col-1, .col2-set .col-2 {
    width: 100% !important;
    float: none !important;
    margin: 0 0 20px 0 !important;
}

/* Botón de pago */
#place_order {
    background-color: var(--brand-600) !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    padding: 15px !important;
    font-weight: bold !important;
}

@media (max-width: 991px) {
    #customer_details, .woocommerce-checkout-review-order-wrapper {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }
}


/* --- THANK YOU PAGE (ORDER RECEIVED) MODERNIZATION --- */

.woocommerce-order-received .woocommerce {
    max-width: 900px !important;
    margin: 4rem auto !important;
    padding: 3rem !important;
    background: #ffffff !important;
    border-radius: 2rem !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02) !important;
}

.woocommerce-thankyou-order-received {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: var(--brand-600) !important;
    text-align: center !important;
    margin-bottom: 3rem !important;
}

.woocommerce-thankyou-order-details {
    list-style: none !important;
    padding: 0 !important;
    margin: 2rem 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
    justify-content: center !important;
}

.woocommerce-thankyou-order-details li {
    background: #f9fafb !important;
    padding: 1.5rem !important;
    border-radius: 1rem !important;
    border: 1px solid #f3f4f6 !important;
    flex: 1 !important;
    min-width: 150px !important;
    text-align: center !important;
    font-size: 0.875rem !important;
    text-transform: uppercase !important;
    color: #6b7280 !important;
}

.woocommerce-thankyou-order-details li strong {
    display: block !important;
    font-size: 1.25rem !important;
    color: #111827 !important;
    margin-top: 0.5rem !important;
    text-transform: none !important;
}

.woocommerce-order-details__title {
    font-size: 1.75rem !important;
    font-weight: 900 !important;
    margin-top: 3rem !important;
    margin-bottom: 1.5rem !important;
    text-align: center !important;
}

table.woocommerce-table--order-details {
    border: none !important;
    margin-bottom: 2rem !important;
}

table.woocommerce-table--order-details th,
table.woocommerce-table--order-details td {
    padding: 1.25rem 1rem !important;
    border-color: #f3f4f6 !important;
}

.continue-shopping-btn {
    display: inline-block !important;
    background-color: var(--brand-600) !important;
    color: #ffffff !important;
    padding: 1rem 2.5rem !important;
    border-radius: 1rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 10px 15px -3px rgba(202, 62, 145, 0.3) !important;
}

.continue-shopping-btn:hover {
    background-color: var(--brand-700) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 20px 25px -5px rgba(202, 62, 145, 0.4) !important;
}

@media (max-width: 768px) {
    .woocommerce-order-received .woocommerce {
        padding: 1.5rem !important;
        margin: 1rem !important;
    }
}

/* Hide Order Details Table and Title on Thank You page */
.woocommerce-order-received .woocommerce-order-details,
.woocommerce-order-received .woocommerce-customer-details {
    display: none !important;
}

/* Hide payment instructions on thank you page */
.woocommerce-order-received .woocommerce > p:not(.woocommerce-thankyou-order-received) {
    display: none !important;
}

/* Aggressive hide for any extra instructions on Thank You page */
.woocommerce-order-received .woocommerce p {
    display: none !important;
}
.woocommerce-order-received .woocommerce p.woocommerce-thankyou-order-received {
    display: block !important;
}

/* --- MODERN TWO-COLUMN CART LAYOUT --- */

.woocommerce-cart .woocommerce {
    max-width: 1400px !important;
    margin: 0 auto !important;
}

@media (min-width: 992px) {
    .woocommerce-cart .woocommerce {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 3rem !important;
    }

    .woocommerce-cart-form {
        flex: 1 1 auto !important;
        width: 100% !important;
    }

    .cart-collaterals {
        flex: 0 0 420px !important;
        width: 420px !important;
    }

    .cart-collaterals .cart_totals {
        width: 100% !important;
        float: none !important;
        background: #f9fafb !important;
        padding: 2rem !important;
        border-radius: 1.5rem !important;
    }
}

/* Cleanup Storefront floats on cart */
.woocommerce-cart .cart-collaterals {
    float: none !important;
    width: 100% !important;
}

.woocommerce-cart .cart_totals {
    float: none !important;
    width: 100% !important;
    text-align: left !important;
}

/* Reduce tax info font size and fix line breaks */
.includes_tax, 
small.includes_tax {
    font-size: 0.75rem !important;
    color: #9ca3af !important;
    font-weight: normal !important;
    display: block !important;
    margin-top: 0.25rem !important;
    white-space: nowrap !important;
}

.includes_tax .amount, 
.includes_tax span {
    display: inline !important;
    color: inherit !important;
    font-size: inherit !important;
}

/* Style checkout button in cart */
.woocommerce-cart .checkout-button {
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    background-color: var(--brand-600) !important;
    color: #ffffff !important;
}

/* Remove extra arrows/icons from checkout button */
.woocommerce-cart .checkout-button:after,
.woocommerce-cart .checkout-button:before {
    content: none !important;
    display: none !important;
}

/* Hide any SVG inside checkout button */
.woocommerce-cart .checkout-button svg {
    display: none !important;
}

/* Style and reposition the remove button in cart */
.woocommerce-cart-form table.shop_table.cart tr.cart_item {
    position: relative !important;
}

/* Hide the default WooCommerce X if there's an overlap */
.woocommerce-cart-form table.shop_table.cart a.remove {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ef4444 !important; /* Red color */
    background: #fee2e2 !important;
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 1.25rem !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.woocommerce-cart-form table.shop_table.cart a.remove:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
}

/* Position it next to the quantity or in a better spot */
@media (min-width: 768px) {
    /* If the table is still a table, we can't easily move it out of its cell without absolute positioning */
    /* Let's try to make the product-remove cell less intrusive */
    .product-remove {
        width: 50px !important;
        text-align: center !important;
    }
}

/* Mobile fix for remove button */
@media (max-width: 767px) {
    .woocommerce-cart-form table.shop_table.cart .product-remove {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        display: block !important;
        width: auto !important;
        border: none !important;
    }
}

/* Remove overlapping icon on cart product remove link */
.woocommerce a.remove::before {
    content: none !important;
    display: none !important;
}

.woocommerce a.remove {
    position: relative !important;
    text-indent: 0 !important;
}

/* Fix cart page remove button layout and text clipping */
.woocommerce-cart-form .product-remove {
    width: auto !important;
    text-align: left !important;
}

.woocommerce-cart-form .product-remove a.remove {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    text-indent: 0 !important;
    overflow: visible !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #ef4444 !important; /* Tailwind text-red-500 */
    font-size: 0.75rem !important; /* Tailwind text-xs */
    font-weight: 500 !important; /* Tailwind font-medium */
    gap: 0.25rem !important; /* Tailwind gap-1 */
    text-decoration: none !important;
}

.woocommerce-cart-form .product-remove a.remove:hover {
    color: #b91c1c !important; /* Tailwind text-red-700 */
    background: transparent !important;
}
