/**
 * Chiodagomme Filters & Labels Styles
 */

/* Filters Sidebar - Default Style */
.chiodagomme-filters-sidebar {
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 30px;
}

/* Force override Elementor inline styles */
.elementor-widget-chiodagomme_filters .chiodagomme-filters-sidebar {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* Vertical Layout (Default) */
.chiodagomme-elementor-widget.layout-vertical .chiodagomme-filters-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Horizontal Layout */
.chiodagomme-elementor-widget.layout-horizontal .chiodagomme-filters-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.chiodagomme-elementor-widget.layout-horizontal .chiodagomme-filters-sidebar {
    width: 100%;
}

/* Filter Dropdown */
.chiodagomme-filter-dropdown {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e1e4e8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.chiodagomme-filter-dropdown:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.chiodagomme-filter-label {
    font-weight: 700;
    font-size: 15px;
    padding: 14px 50px 14px 18px;
    background: linear-gradient(135deg, #0265B2 0%, #024a8a 100%);
    color: #ffffff;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chiodagomme-filter-label:hover {
    background: linear-gradient(135deg, #024a8a 0%, #023666 100%);
}

.chiodagomme-filter-label::after {
    content: '▼';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0.8;
}

/* Tooltip Info Icon */
.chiodagomme-filter-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
}

.chiodagomme-filter-info-icon {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    cursor: help;
    transition: all 0.3s ease;
}

.chiodagomme-filter-info-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* Tooltip Content - Portal Version */
.chiodagomme-filter-tooltip-content {
    position: fixed;
    background: #2c3e50;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: normal;
    max-width: 250px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 999999;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.5;
    transform: translateX(-50%) translateY(-100%);
}

.chiodagomme-filter-tooltip-content.is-visible {
    opacity: 1;
    visibility: visible;
}

.chiodagomme-filter-tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #2c3e50;
}

.chiodagomme-filter-body {
    max-height: 290px;
    overflow: hidden;
    border-top: 2px solid #0265B2;
}

.chiodagomme-filter-search {
    padding: 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e4e8;
}

.chiodagomme-filter-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.chiodagomme-filter-search-input:focus {
    outline: none;
    border-color: #0265B2;
    box-shadow: 0 0 0 3px rgba(2, 101, 178, 0.1);
}

.chiodagomme-filter-items {
    max-height: 230px;
    overflow-y: auto;
    padding: 8px;
}

.chiodagomme-filter-items::-webkit-scrollbar {
    width: 8px;
}

.chiodagomme-filter-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chiodagomme-filter-items::-webkit-scrollbar-thumb {
    background: #0265B2;
    border-radius: 4px;
}

.chiodagomme-filter-items::-webkit-scrollbar-thumb:hover {
    background: #024a8a;
}

.chiodagomme-filter-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin-bottom: 3px;
}

.chiodagomme-filter-item:hover {
    background: #e8f4fd;
    transform: translateX(2px);
}

.chiodagomme-filter-checkbox {
    display: none;
}

.chiodagomme-filter-decorator {
    width: 22px;
    height: 22px;
    border: 2px solid #c4c8cc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.25s ease;
    background: #ffffff;
}

.chiodagomme-filter-item:hover .chiodagomme-filter-decorator {
    border-color: #0265B2;
}

.chiodagomme-filter-decorator svg {
    width: 14px;
    height: 14px;
    fill: #ffffff;
    opacity: 0;
    transform: scale(0.3);
    transition: all 0.25s ease;
}

.chiodagomme-filter-checkbox:checked + .chiodagomme-filter-decorator {
    background: linear-gradient(135deg, #0265B2 0%, #024a8a 100%);
    border-color: #0265B2;
    box-shadow: 0 2px 4px rgba(2, 101, 178, 0.3);
}

.chiodagomme-filter-checkbox:checked + .chiodagomme-filter-decorator svg {
    opacity: 1;
    transform: scale(1);
}

.chiodagomme-filter-label-text {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.4;
}

/* European Labels */
.chiodagomme-european-labels {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.chiodagomme-european-labels.single-product {
    margin: 20px 0;
    gap: 20px;
}

.chiodagomme-label-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.chiodagomme-label-item img {
    height: 24px;
    width: auto;
}

.chiodagomme-european-labels.single-product .chiodagomme-label-item img {
    height: 32px;
}

.chiodagomme-label-item .label-value {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.chiodagomme-european-labels.single-product .label-value {
    font-size: 16px;
}

/* Product Measurements */
.chiodagomme-product-measurements {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin: 8px 0;
    line-height: 1.4;
}

.chiodagomme-product-measurements .measurement-item {
    margin: 0 2px;
}

/* Wheel Measurements - Vertical Layout with Labels */
.chiodagomme-product-measurements.wheels {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 10px 0 12px 0;
}

.chiodagomme-product-measurements.wheels .measurement-row {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.5;
}

.chiodagomme-product-measurements.wheels .measurement-label {
    font-weight: 700;
    color: #374151;
    font-size: 13px;
    min-width: 70px;
}

.chiodagomme-product-measurements.wheels .measurement-value {
    font-weight: 500;
    color: #6b7280;
    font-size: 13px;
}

/* Single Product Page - Larger measurements */
.single-product .chiodagomme-product-measurements.wheels {
    margin: 15px 0 20px 0 !important;
    gap: 8px;
    background: #f9fafb !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    border: 1px solid #e5e7eb !important;
    display: flex !important;
    flex-direction: column !important;
}

.single-product .chiodagomme-product-measurements.wheels .measurement-row {
    gap: 8px;
    display: flex !important;
    align-items: center !important;
}

.single-product .chiodagomme-product-measurements.wheels .measurement-label {
    font-size: 15px !important;
    min-width: 90px !important;
    font-weight: 700 !important;
    color: #374151 !important;
}

.single-product .chiodagomme-product-measurements.wheels .measurement-value {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
}

/* Single Product Page - Attribute Icons */
.single-product .chiodagomme-attribute-icons {
    margin: 15px 0 !important;
    display: flex !important;
    gap: 12px !important;
}

.single-product .chiodagomme-attribute-icons .attribute-icon {
    display: flex !important;
}

.single-product .chiodagomme-attribute-icons .attribute-icon img {
    height: 35px !important;
    width: auto !important;
}

.single-product .chiodagomme-attribute-icons .brand-icon img {
    height: 45px !important;
    width: auto !important;
}

/* Attribute Icons */
.chiodagomme-attribute-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.chiodagomme-attribute-icons .attribute-icon {
    height: 28px;
    display: flex;
    align-items: center;
}

.chiodagomme-attribute-icons .attribute-icon img {
    height: 100%;
    width: auto;
}

.chiodagomme-attribute-icons .brand-icon {
    height: 35px;
}

/* Responsive */
@media (max-width: 768px) {
    .chiodagomme-filters-sidebar {
        padding: 15px;
    }

    .chiodagomme-elementor-widget.layout-horizontal .chiodagomme-filters-container {
        grid-template-columns: 1fr;
    }

    .chiodagomme-european-labels {
        gap: 10px;
    }

    .chiodagomme-label-item img {
        height: 20px;
    }
}

/* WooCommerce Integration */
.woocommerce ul.products li.product .chiodagomme-attribute-icons {
    min-height: 35px;
}

.woocommerce ul.products li.product .chiodagomme-european-labels {
    min-height: 30px;
}

.woocommerce ul.products li.product .chiodagomme-product-measurements {
    font-size: 13px;
}

/* Loading State */
.chiodagomme-filters-loading {
    opacity: 0.6;
    pointer-events: none;
}

.chiodagomme-filters-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #0265B2;
    border-top-color: transparent;
    border-radius: 50%;
    animation: chiodagomme-spin 0.8s linear infinite;
}

@keyframes chiodagomme-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================
   WooCommerce Product Styling - High Specificity
   =================================== */

/* Product Grid Improvements */
.elementor-widget-wc-products ul.products li.product,
.elementor-widget-woocommerce-products ul.products li.product,
.elementor-wc-products ul.products li.product,
.elementor-element ul.products li.product,
.elementor-products-grid ul.products.elementor-grid li.product,
.woocommerce ul.products.elementor-grid li.product,
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
ul.products li.product {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 20px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.elementor-widget-wc-products ul.products li.product:hover,
.elementor-widget-woocommerce-products ul.products li.product:hover,
.elementor-wc-products ul.products li.product:hover,
.elementor-element ul.products li.product:hover,
.elementor-products-grid ul.products.elementor-grid li.product:hover,
.woocommerce ul.products.elementor-grid li.product:hover,
.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover,
ul.products li.product:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-4px) !important;
    border-color: #0265B2 !important;
}

/* Product Image */
.elementor-widget-wc-products ul.products li.product img,
.elementor-widget-woocommerce-products ul.products li.product img,
.elementor-wc-products ul.products li.product img,
.elementor-element ul.products li.product img,
.elementor-products-grid ul.products.elementor-grid li.product .woocommerce-loop-product__link img,
.woocommerce ul.products.elementor-grid li.product .woocommerce-loop-product__link img,
.woocommerce ul.products li.product .woocommerce-loop-product__link img,
.woocommerce-page ul.products li.product .woocommerce-loop-product__link img,
ul.products li.product img {
    border-radius: 8px !important;
    margin-bottom: 15px !important;
}

/* Product Title */
.elementor-widget-wc-products ul.products li.product .woocommerce-loop-product__title,
.elementor-widget-wc-products ul.products li.product h2,
.elementor-widget-woocommerce-products ul.products li.product .woocommerce-loop-product__title,
.elementor-widget-woocommerce-products ul.products li.product h2,
.elementor-wc-products ul.products li.product .woocommerce-loop-product__title,
.elementor-wc-products ul.products li.product h2,
.elementor-element ul.products li.product .woocommerce-loop-product__title,
.elementor-element ul.products li.product h2,
.elementor-products-grid ul.products.elementor-grid li.product .woocommerce-loop-product__title,
.woocommerce ul.products.elementor-grid li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product h2 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1f2937;
    margin-bottom: 10px !important;
    line-height: 1.4;
    min-height: 44px;
}

/* Product Price */
.elementor-widget-wc-products ul.products li.product .price,
.elementor-widget-woocommerce-products ul.products li.product .price,
.elementor-wc-products ul.products li.product .price,
.elementor-element ul.products li.product .price,
.elementor-products-grid ul.products.elementor-grid li.product .price,
.woocommerce ul.products.elementor-grid li.product .price,
.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price,
ul.products li.product .price {
    color: #0265B2;
    font-size: 20px !important;
    font-weight: 700 !important;
    margin-bottom: 15px !important;
    display: block !important;
}

.elementor-widget-wc-products ul.products li.product .price del,
.elementor-widget-woocommerce-products ul.products li.product .price del,
.elementor-wc-products ul.products li.product .price del,
.elementor-element ul.products li.product .price del,
.elementor-products-grid ul.products.elementor-grid li.product .price del,
.woocommerce ul.products.elementor-grid li.product .price del,
.woocommerce ul.products li.product .price del,
.woocommerce-page ul.products li.product .price del,
ul.products li.product .price del {
    color: #9ca3af;
    font-size: 16px;
    opacity: 0.7;
}

.elementor-widget-wc-products ul.products li.product .price ins,
.elementor-widget-woocommerce-products ul.products li.product .price ins,
.elementor-wc-products ul.products li.product .price ins,
.elementor-element ul.products li.product .price ins,
.elementor-products-grid ul.products.elementor-grid li.product .price ins,
.woocommerce ul.products.elementor-grid li.product .price ins,
.woocommerce ul.products li.product .price ins,
.woocommerce-page ul.products li.product .price ins,
ul.products li.product .price ins {
    text-decoration: none;
    color: #dc2626;
    font-weight: 700;
}

/* Product Content Wrapper - grows to push button to bottom */
.elementor-widget-wc-products ul.products li.product > *:not(.button):not(.add_to_cart_button):not(a.button),
.elementor-widget-woocommerce-products ul.products li.product > *:not(.button):not(.add_to_cart_button):not(a.button),
.elementor-wc-products ul.products li.product > *:not(.button):not(.add_to_cart_button):not(a.button),
.elementor-element ul.products li.product > *:not(.button):not(.add_to_cart_button):not(a.button),
.elementor-products-grid ul.products.elementor-grid li.product > *:not(.button):not(.add_to_cart_button):not(a.button),
.woocommerce ul.products.elementor-grid li.product > *:not(.button):not(.add_to_cart_button):not(a.button),
.woocommerce ul.products li.product > *:not(.button):not(.add_to_cart_button):not(a.button),
.woocommerce-page ul.products li.product > *:not(.button):not(.add_to_cart_button):not(a.button),
ul.products li.product > *:not(.button):not(.add_to_cart_button):not(a.button) {
    flex-grow: 0 !important;
}

/* Add to Cart Button - stays at bottom */
.elementor-widget-wc-products ul.products li.product .button,
.elementor-widget-wc-products ul.products li.product .add_to_cart_button,
.elementor-widget-wc-products ul.products li.product a.button,
.elementor-widget-woocommerce-products ul.products li.product .button,
.elementor-widget-woocommerce-products ul.products li.product .add_to_cart_button,
.elementor-widget-woocommerce-products ul.products li.product a.button,
.elementor-wc-products ul.products li.product .button,
.elementor-wc-products ul.products li.product .add_to_cart_button,
.elementor-wc-products ul.products li.product a.button,
.elementor-element ul.products li.product .button,
.elementor-element ul.products li.product .add_to_cart_button,
.elementor-element ul.products li.product a.button,
.elementor-products-grid ul.products.elementor-grid li.product .button,
.elementor-products-grid ul.products.elementor-grid li.product .add_to_cart_button,
.woocommerce ul.products.elementor-grid li.product .button,
.woocommerce ul.products.elementor-grid li.product .add_to_cart_button,
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce-page ul.products li.product .button,
.woocommerce-page ul.products li.product .add_to_cart_button,
ul.products li.product .button,
ul.products li.product .add_to_cart_button,
ul.products li.product a.button {
    background: linear-gradient(135deg, #0265B2 0%, #024a8a 100%) !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px;
    border: none !important;
    width: 100% !important;
    display: inline-block !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(2, 101, 178, 0.3) !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
}

.elementor-widget-wc-products ul.products li.product .button:hover,
.elementor-widget-wc-products ul.products li.product .add_to_cart_button:hover,
.elementor-widget-wc-products ul.products li.product a.button:hover,
.elementor-widget-woocommerce-products ul.products li.product .button:hover,
.elementor-widget-woocommerce-products ul.products li.product .add_to_cart_button:hover,
.elementor-widget-woocommerce-products ul.products li.product a.button:hover,
.elementor-wc-products ul.products li.product .button:hover,
.elementor-wc-products ul.products li.product .add_to_cart_button:hover,
.elementor-wc-products ul.products li.product a.button:hover,
.elementor-element ul.products li.product .button:hover,
.elementor-element ul.products li.product .add_to_cart_button:hover,
.elementor-element ul.products li.product a.button:hover,
.elementor-products-grid ul.products.elementor-grid li.product .button:hover,
.elementor-products-grid ul.products.elementor-grid li.product .add_to_cart_button:hover,
.woocommerce ul.products.elementor-grid li.product .button:hover,
.woocommerce ul.products.elementor-grid li.product .add_to_cart_button:hover,
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover,
.woocommerce-page ul.products li.product .button:hover,
.woocommerce-page ul.products li.product .add_to_cart_button:hover,
ul.products li.product .button:hover,
ul.products li.product .add_to_cart_button:hover,
ul.products li.product a.button:hover {
    background: linear-gradient(135deg, #024a8a 0%, #023666 100%) !important;
    box-shadow: 0 4px 12px rgba(2, 101, 178, 0.4) !important;
    transform: translateY(-2px) !important;
}

.elementor-products-grid ul.products.elementor-grid li.product .button.loading,
.elementor-products-grid ul.products.elementor-grid li.product .add_to_cart_button.loading,
.woocommerce ul.products.elementor-grid li.product .button.loading,
.woocommerce ul.products.elementor-grid li.product .add_to_cart_button.loading,
.woocommerce ul.products li.product .button.loading,
.woocommerce ul.products li.product .add_to_cart_button.loading {
    opacity: 0.7;
    cursor: wait;
}

.elementor-products-grid ul.products.elementor-grid li.product .button.added,
.elementor-products-grid ul.products.elementor-grid li.product .add_to_cart_button.added,
.woocommerce ul.products.elementor-grid li.product .button.added,
.woocommerce ul.products.elementor-grid li.product .add_to_cart_button.added,
.woocommerce ul.products li.product .button.added,
.woocommerce ul.products li.product .add_to_cart_button.added {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Out of Stock */
.elementor-products-grid ul.products.elementor-grid li.product .button.out-of-stock,
.elementor-products-grid ul.products.elementor-grid li.product .out-of-stock,
.woocommerce ul.products.elementor-grid li.product .button.out-of-stock,
.woocommerce ul.products.elementor-grid li.product .out-of-stock,
.woocommerce ul.products li.product .button.out-of-stock,
.woocommerce ul.products li.product .out-of-stock {
    background: #6b7280;
    cursor: not-allowed;
}

.elementor-products-grid ul.products.elementor-grid li.product .button.out-of-stock:hover,
.woocommerce ul.products.elementor-grid li.product .button.out-of-stock:hover,
.woocommerce ul.products li.product .button.out-of-stock:hover {
    background: #6b7280;
    transform: none;
}

/* Product Rating */
.elementor-products-grid ul.products.elementor-grid li.product .star-rating,
.woocommerce ul.products.elementor-grid li.product .star-rating,
.woocommerce ul.products li.product .star-rating,
.woocommerce-page ul.products li.product .star-rating {
    margin: 10px auto !important;
    font-size: 14px;
}

.elementor-products-grid ul.products.elementor-grid li.product .star-rating::before,
.woocommerce ul.products.elementor-grid li.product .star-rating::before,
.woocommerce ul.products li.product .star-rating::before,
.woocommerce-page ul.products li.product .star-rating::before {
    color: #e5e7eb;
}

.elementor-products-grid ul.products.elementor-grid li.product .star-rating span::before,
.woocommerce ul.products.elementor-grid li.product .star-rating span::before,
.woocommerce ul.products li.product .star-rating span::before,
.woocommerce-page ul.products li.product .star-rating span::before {
    color: #fbbf24;
}

/* Sale Badge */
.elementor-widget-wc-products ul.products li.product .onsale,
.elementor-widget-woocommerce-products ul.products li.product .onsale,
.elementor-wc-products ul.products li.product .onsale,
.elementor-element ul.products li.product .onsale,
.elementor-products-grid ul.products.elementor-grid li.product .onsale,
.woocommerce ul.products.elementor-grid li.product .onsale,
.woocommerce ul.products li.product .onsale,
.woocommerce-page ul.products li.product .onsale,
ul.products li.product .onsale {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    margin: 0 !important;
    min-height: auto !important;
    min-width: auto !important;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3) !important;
}

/* Product Short Description */
.elementor-products-grid ul.products.elementor-grid li.product .woocommerce-loop-product__excerpt,
.woocommerce ul.products.elementor-grid li.product .woocommerce-loop-product__excerpt,
.woocommerce ul.products li.product .woocommerce-loop-product__excerpt,
.woocommerce-page ul.products li.product .woocommerce-loop-product__excerpt {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Product Category */
.elementor-products-grid ul.products.elementor-grid li.product .product-category,
.woocommerce ul.products.elementor-grid li.product .product-category,
.woocommerce ul.products li.product .product-category,
.woocommerce-page ul.products li.product .product-category {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

/* Stock Status */
.elementor-widget-wc-products ul.products li.product .stock,
.elementor-widget-woocommerce-products ul.products li.product .stock,
.elementor-wc-products ul.products li.product .stock,
.elementor-element ul.products li.product .stock,
.elementor-products-grid ul.products.elementor-grid li.product .stock,
.woocommerce ul.products.elementor-grid li.product .stock,
.woocommerce ul.products li.product .stock,
.woocommerce-page ul.products li.product .stock,
ul.products li.product .stock {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    display: inline-block !important;
}

.elementor-widget-wc-products ul.products li.product .stock.in-stock,
.elementor-widget-woocommerce-products ul.products li.product .stock.in-stock,
.elementor-wc-products ul.products li.product .stock.in-stock,
.elementor-element ul.products li.product .stock.in-stock,
.elementor-products-grid ul.products.elementor-grid li.product .stock.in-stock,
.woocommerce ul.products.elementor-grid li.product .stock.in-stock,
.woocommerce ul.products li.product .stock.in-stock,
ul.products li.product .stock.in-stock {
    background: #d1fae5;
    color: #065f46;
}

.elementor-widget-wc-products ul.products li.product .stock.out-of-stock,
.elementor-widget-woocommerce-products ul.products li.product .stock.out-of-stock,
.elementor-wc-products ul.products li.product .stock.out-of-stock,
.elementor-element ul.products li.product .stock.out-of-stock,
.elementor-products-grid ul.products.elementor-grid li.product .stock.out-of-stock,
.woocommerce ul.products.elementor-grid li.product .stock.out-of-stock,
.woocommerce ul.products li.product .stock.out-of-stock,
ul.products li.product .stock.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

/* Out of Stock Products - Custom Styling */
.chiodagomme-out-of-stock-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: auto !important;
    padding: 15px !important;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    border-radius: 8px !important;
    border: 2px solid #f59e0b !important;
}

.chiodagomme-out-of-stock-message {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #92400e !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

.chiodagomme-contact-button {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    width: 100% !important;
    display: inline-block !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4) !important;
    text-decoration: none !important;
    margin: 0 !important;
}

.chiodagomme-contact-button:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5) !important;
    transform: translateY(-2px) !important;
    color: #ffffff !important;
}

/* Hide ALL default out of stock messages and badges - AGGRESSIVE (only in archive/loop) */
ul.products li.product.outofstock .stock,
ul.products li.product.outofstock .stock.out-of-stock,
ul.products li.product.outofstock span.out-of-stock,
ul.products li.product:has(.chiodagomme-out-of-stock-wrapper) .stock,
ul.products li.product:has(.chiodagomme-out-of-stock-wrapper) .stock.out-of-stock,
ul.products li.product:has(.chiodagomme-out-of-stock-wrapper) span.out-of-stock,
.elementor-widget-wc-products ul.products li.product.outofstock .stock,
.elementor-widget-woocommerce-products ul.products li.product.outofstock .stock,
.elementor-wc-products ul.products li.product.outofstock .stock,
.woocommerce ul.products li.product.outofstock .stock {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide any default out-of-stock button text and old buttons (only in archive/loop) */
ul.products li.product.outofstock .button.product_type_simple,
ul.products li.product.outofstock a.button:not(.chiodagomme-contact-button),
ul.products li.product:has(.chiodagomme-out-of-stock-wrapper) .button.product_type_simple:not(.chiodagomme-contact-button),
ul.products li.product:has(.chiodagomme-out-of-stock-wrapper) a.button:not(.chiodagomme-contact-button),
.elementor-widget-wc-products ul.products li.product.outofstock .button:not(.chiodagomme-contact-button),
.elementor-widget-woocommerce-products ul.products li.product.outofstock .button:not(.chiodagomme-contact-button),
.elementor-wc-products ul.products li.product.outofstock .button:not(.chiodagomme-contact-button),
.woocommerce ul.products li.product.outofstock .button:not(.chiodagomme-contact-button) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Responsive Product Grid */
@media (max-width: 768px) {
    .elementor-widget-wc-products ul.products li.product,
    .elementor-widget-woocommerce-products ul.products li.product,
    .elementor-wc-products ul.products li.product,
    .elementor-element ul.products li.product,
    .elementor-products-grid ul.products.elementor-grid li.product,
    .woocommerce ul.products.elementor-grid li.product,
    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product,
    ul.products li.product {
        padding: 15px !important;
    }

    .elementor-widget-wc-products ul.products li.product .button,
    .elementor-widget-wc-products ul.products li.product .add_to_cart_button,
    .elementor-widget-woocommerce-products ul.products li.product .button,
    .elementor-widget-woocommerce-products ul.products li.product .add_to_cart_button,
    .elementor-wc-products ul.products li.product .button,
    .elementor-wc-products ul.products li.product .add_to_cart_button,
    .elementor-element ul.products li.product .button,
    .elementor-element ul.products li.product .add_to_cart_button,
    .elementor-products-grid ul.products.elementor-grid li.product .button,
    .elementor-products-grid ul.products.elementor-grid li.product .add_to_cart_button,
    .woocommerce ul.products.elementor-grid li.product .button,
    .woocommerce ul.products.elementor-grid li.product .add_to_cart_button,
    .woocommerce ul.products li.product .button,
    .woocommerce ul.products li.product .add_to_cart_button,
    ul.products li.product .button,
    ul.products li.product .add_to_cart_button {
        padding: 10px 18px !important;
        font-size: 13px !important;
    }
}

/* ============================================
   HOMEPAGE SEARCH FORM STYLES
   ============================================ */

/* Common styles for both layouts */
.chiodagomme-search-form-wrapper {
    background: linear-gradient(135deg, #0265B2 0%, #024d8a 100%);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(2, 101, 178, 0.15);
}

.chiodagomme-search-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 25px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chiodagomme-search-form {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px;
    align-items: flex-end;
}

.chiodagomme-search-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chiodagomme-search-field label {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.chiodagomme-search-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chiodagomme-search-select:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: #ffffff;
}

.chiodagomme-search-select:focus {
    outline: none;
    border-color: #ffffff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.chiodagomme-search-submit {
    flex-shrink: 0;
}

.chiodagomme-search-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: #ffffff;
    color: #0265B2;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chiodagomme-search-button:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.chiodagomme-search-button:active {
    transform: translateY(0);
}

.chiodagomme-search-button-icon {
    display: flex;
    align-items: center;
}

/* Horizontal layout (default - for homepage center) */
.chiodagomme-search-horizontal .chiodagomme-search-form {
    flex-wrap: nowrap !important;
    flex-direction: row !important;
}

.chiodagomme-search-horizontal .chiodagomme-search-field {
    min-width: 120px !important;
    max-width: 250px !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
}

.chiodagomme-search-horizontal .chiodagomme-search-submit {
    min-width: 120px !important;
    flex-shrink: 0 !important;
}

/* Vertical layout (for header/sidebar) */
.chiodagomme-search-vertical {
    max-width: 320px;
}

.chiodagomme-search-vertical .chiodagomme-search-form {
    flex-direction: column;
    gap: 12px;
}

.chiodagomme-search-vertical .chiodagomme-search-field {
    width: 100%;
}

.chiodagomme-search-vertical .chiodagomme-search-submit {
    width: 100%;
}

.chiodagomme-search-vertical .chiodagomme-search-button {
    width: 100%;
    justify-content: center;
}

.chiodagomme-search-vertical .chiodagomme-search-title {
    font-size: 20px;
    margin-bottom: 20px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .chiodagomme-search-horizontal .chiodagomme-search-form {
        flex-direction: column;
    }

    .chiodagomme-search-horizontal .chiodagomme-search-field {
        width: 100%;
    }

    .chiodagomme-search-horizontal .chiodagomme-search-submit {
        width: 100%;
    }

    .chiodagomme-search-horizontal .chiodagomme-search-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .chiodagomme-search-form-wrapper {
        padding: 20px;
    }

    .chiodagomme-search-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .chiodagomme-search-select {
        padding: 10px 12px;
        font-size: 13px;
    }

    .chiodagomme-search-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

