/* MacFaaast Modular Stylesheet: mf-single-product.css (auto-extracted from style.css) */
/* ==========================================================================
   MACFAAAST SINGLE PRODUCT MODERN SHOWROOM REDESIGN
   ========================================================================== */

/* 1. Desktop 2-Column Flex & Sticky Gallery Stage */
@media (min-width: 992px) {
    body.single-product .site-content .product-images-summary {
        display: flex !important;
        align-items: flex-start !important;
        gap: 48px !important;
    }

    body.single-product .site-content .product-images-summary .woocommerce-product-gallery {
        float: none !important;
        width: 50% !important;
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 100px !important;
        z-index: 10 !important;
        background: #ffffff !important;
        border-radius: 20px !important;
        padding: 24px !important;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04) !important;
        border: 1px solid #f1f5f9 !important;
    }

    body.single-product .site-content .product-images-summary .summary.entry-summary {
        float: none !important;
        width: 50% !important;
        padding-left: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
}

/* 2. Apple Showroom Header: Grade pill, Occasione tag, Clean Title, Specs */
.mf-sp-header {
    margin-bottom: 16px;
    width: 100%;
}

.mf-sp-top-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.mf-sp-grade-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: -0.2px;
}

.mf-sp-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mf-sp-badge-new {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.mf-sp-badge-sale {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    letter-spacing: -0.2px !important;
}

.mf-sp-title {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1.25 !important;
    margin: 0 0 12px 0 !important;
    letter-spacing: -0.5px !important;
}

@media (max-width: 767px) {
    .mf-sp-title {
        font-size: 24px !important;
    }
}

.mf-sp-specs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.mf-sp-chip {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

/* 3. Availability & Stock status */
.single-product .summary .ts-product-ratings-stock {
    margin-bottom: 14px !important;
    width: 100% !important;
}

.single-product .summary .ts-product-ratings-stock .availability {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
}

.single-product .summary .ts-product-ratings-stock .availability .label {
    display: none !important;
}

.single-product .summary .ts-product-ratings-stock .availability .availability-text {
    color: #166534 !important;
    font-weight: 700 !important;
}

.single-product .summary .ts-product-ratings-stock .availability:before {
    content: "🟢 In Pronta Consegna:";
    font-weight: 700;
    color: #166534;
    margin-right: 4px;
}

/* 4. Short Description / Spec Card */
.single-product .summary .woocommerce-product-details__short-description {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    margin-bottom: 18px !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    color: #475569 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 5. Modern Price Card */
.single-product .summary .premium-price-wrapper {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 20px 24px !important;
    margin-bottom: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.single-product .summary .premium-price-wrapper .main-price-container {
    margin-bottom: 6px !important;
}

.single-product .summary .premium-price-wrapper .main-price-container .mf-price-saving-chip {
    display: none !important;
}

.single-product .summary .premium-price-wrapper p.price {
    font-size: 36px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 12px !important;
}

.single-product .summary .premium-price-wrapper p.price del {
    font-size: 20px !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

.single-product .summary .premium-price-wrapper p.price ins {
    text-decoration: none !important;
    color: #0f172a !important;
}

.single-product .summary .premium-price-wrapper .savings-badge {
    display: inline-flex !important;
    align-items: center !important;
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-top: 8px !important;
}

.single-product .summary .premium-price-wrapper .savings-badge,
.single-product .summary .premium-price-wrapper .savings-badge span,
.single-product .summary .premium-price-wrapper .savings-badge bdi {
    color: #065f46 !important;
    font-weight: 700 !important;
}

.single-product .summary .premium-price-wrapper .savings-badge svg {
    stroke: #065f46 !important;
}

/* 6. Urgency Shipping Banner */
.single-product .summary #shipping-countdown-banner {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 14px 18px !important;
    margin: 0 0 18px 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 7. Marketing Trust Badges Box & WhatsApp Concierge */
.single-product .summary .marketing-trust-badges-box {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 24px !important;
    margin-top: 24px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
}

.single-product .summary .marketing-trust-badges {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
}

@media (max-width: 600px) {
    .single-product .summary .marketing-trust-badges {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
}



/* ==========================================================================
   MACFAAAST SINGLE PRODUCT MASTERPIECE - FULL TITLE & LUXURY DESCRIPTION TABS
   ========================================================================== */

/* 1. Full Extended Title (Restored & Elevated) */
.single-product .summary h1.mf-sp-title,
.single-product .summary h1.product_title {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1.4 !important;
    margin: 8px 0 14px 0 !important;
    letter-spacing: -0.3px !important;
}

@media (max-width: 767px) {

    .single-product .summary h1.mf-sp-title,
    .single-product .summary h1.product_title {
        font-size: 20px !important;
        line-height: 1.35 !important;
    }
}

/* 2. Peace of Mind Strip (Refurbished Guarantees) */
.mf-sp-peace-of-mind-strip {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 14px 18px !important;
    margin: 0 0 18px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 600px) {
    .mf-sp-peace-of-mind-strip {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
}

.mf-pom-pill {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.mf-pom-icon {
    font-size: 22px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

.mf-pom-txt strong {
    display: block !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.25 !important;
}

.mf-pom-txt span {
    display: block !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    line-height: 1.2 !important;
}

/* 3. Short Description Elevated Card */
.single-product .summary .woocommerce-product-details__short-description {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #00ade6 !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    margin-bottom: 18px !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    color: #334155 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
}

.single-product .summary .woocommerce-product-details__short-description p {
    margin: 0 !important;
}

.single-product .summary .woocommerce-product-details__short-description strong {
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* 4. Luxury Description Tabs Section (Full Description Unleashed) */
.single-product .woocommerce-tabs.wc-tabs-wrapper {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 24px !important;
    padding: 36px 40px !important;
    margin-top: 40px !important;
    margin-bottom: 40px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 767px) {
    .single-product .woocommerce-tabs.wc-tabs-wrapper {
        padding: 24px 16px !important;
        border-radius: 18px !important;
    }
}

/* Unclamp the description content - Show all rich text! */
.single-product .woocommerce-Tabs-panel--description .product-content,
.single-product .woocommerce-Tabs-panel--description .product-content.closed,
.single-product .woocommerce-Tabs-panel--description .product-content.show-more-less {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

.single-product .woocommerce-tabs .more-less-buttons,
.single-product .woocommerce-tabs .more-button,
.single-product .woocommerce-tabs .less-button {
    display: none !important;
}

/* Modern Segmented Tab Navigation Bar */
.single-product .woocommerce-tabs ul.tabs.wc-tabs {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    background: #f1f5f9 !important;
    padding: 6px !important;
    border-radius: 16px !important;
    border: none !important;
    margin: 0 0 32px 0 !important;
}

.single-product .woocommerce-tabs ul.tabs.wc-tabs:before,
.single-product .woocommerce-tabs ul.tabs.wc-tabs:after {
    display: none !important;
}

.single-product .woocommerce-tabs ul.tabs.wc-tabs li {
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 12px !important;
}

.single-product .woocommerce-tabs ul.tabs.wc-tabs li:before,
.single-product .woocommerce-tabs ul.tabs.wc-tabs li:after {
    display: none !important;
}

.single-product .woocommerce-tabs ul.tabs.wc-tabs li a {
    display: inline-block !important;
    padding: 10px 22px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    border-radius: 12px !important;
    border: none !important;
    transition: all 0.25s ease !important;
}

.single-product .woocommerce-tabs ul.tabs.wc-tabs li:hover a {
    color: #0f172a !important;
}

.single-product .woocommerce-tabs ul.tabs.wc-tabs li.active a {
    background: #ffffff !important;
    color: #00ade6 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

/* Inside Description Panel Styling */
.single-product .woocommerce-Tabs-panel--description>h2:first-of-type {
    display: none !important;
    /* Hide generic Dettagli heading */
}

/* Unified Headings (h1, h2, h3, h4) */
.single-product .woocommerce-Tabs-panel--description h1,
.single-product .woocommerce-Tabs-panel--description h2,
.single-product .woocommerce-Tabs-panel--description h3,
.single-product .woocommerce-Tabs-panel--description h4 {
    color: #0f172a !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    letter-spacing: -0.2px !important;
}

.single-product .woocommerce-Tabs-panel--description h2 {
    font-size: 21px !important;
    margin: 32px 0 14px 0 !important;
}

.single-product .woocommerce-Tabs-panel--description h3 {
    font-size: 18px !important;
    margin: 28px 0 12px 0 !important;
}

.single-product .woocommerce-Tabs-panel--description h4 {
    font-size: 16px !important;
    margin: 22px 0 10px 0 !important;
}

/* ALL Heading Icons in Description: Uniform Cyan Color & Harmonious Proportions */
.single-product .woocommerce-Tabs-panel--description h1 i,
.single-product .woocommerce-Tabs-panel--description h2 i,
.single-product .woocommerce-Tabs-panel--description h3 i,
.single-product .woocommerce-Tabs-panel--description h4 i,
.single-product .woocommerce-Tabs-panel--description h1 .icon,
.single-product .woocommerce-Tabs-panel--description h2 .icon,
.single-product .woocommerce-Tabs-panel--description h3 .icon,
.single-product .woocommerce-Tabs-panel--description h4 .icon {
    color: #00ade6 !important;
    font-size: 1.15em !important;
    line-height: 1 !important;
    width: 1.25em !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

/* Warning / Alert Notice Box Special Accent */
.single-product .woocommerce-Tabs-panel--description .arrival-notice-box h4,
.single-product .woocommerce-Tabs-panel--description .arrival-notice-box h4 i {
    color: #b45309 !important;
}

.single-product .woocommerce-Tabs-panel--description p {
    font-size: 15px !important;
    line-height: 1.75 !important;
    color: #475569 !important;
    margin-bottom: 20px !important;
}

/* Technical Specification List Grid Cards */
.single-product .woocommerce-Tabs-panel--description .wp-block-group ul {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px 20px !important;
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

@media (max-width: 767px) {
    .single-product .woocommerce-Tabs-panel--description .wp-block-group ul {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

.single-product .woocommerce-Tabs-panel--description .wp-block-group ul li {
    list-style: none !important;
    list-style-type: none !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 14px 18px 14px 44px !important;
    position: relative !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #334155 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02) !important;
}

.single-product .woocommerce-Tabs-panel--description .wp-block-group ul li::before {
    content: "✓" !important;
    position: absolute !important;
    left: 14px !important;
    top: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    background: #e0f2fe !important;
    color: #0284c7 !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
}

.single-product .woocommerce-Tabs-panel--description .wp-block-group ul li strong {
    color: #0f172a !important;
    font-weight: 700 !important;
    margin-right: 4px !important;
}

/* Stylized General Description Lists (Warranty, Shipping, Highlights) */
.single-product .woocommerce-Tabs-panel--description ul:not(.wp-block-group ul) {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 16px 0 24px 0 !important;
}

.single-product .woocommerce-Tabs-panel--description ul:not(.wp-block-group ul) li {
    list-style: none !important;
    list-style-type: none !important;
    position: relative !important;
    padding-left: 24px !important;
    margin-bottom: 12px !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
    color: #334155 !important;
}

.single-product .woocommerce-Tabs-panel--description ul:not(.wp-block-group ul) li::before {
    content: "" !important;
    position: absolute !important;
    left: 2px !important;
    top: 9px !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #00ade6 !important;
    box-shadow: 0 0 0 3px rgba(0, 173, 230, 0.2) !important;
}

.single-product .woocommerce-Tabs-panel--description ul:not(.wp-block-group ul) li strong {
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* Keyboard Customization Callout Box */
.single-product .woocommerce-Tabs-panel--description .wp-block-group[style*="f0f7ff"] {
    background: #f0f9ff !important;
    border: 1.5px solid #bae6fd !important;
    border-left: 5px solid #00ade6 !important;
    border-radius: 16px !important;
    padding: 24px 28px !important;
    margin: 28px 0 !important;
}

.single-product .woocommerce-Tabs-panel--description .wp-block-group[style*="f0f7ff"] h4 {
    color: #0369a1 !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    margin-bottom: 10px !important;
}

/* 40+ Laboratory Test Protocol Box */
.single-product .woocommerce-Tabs-panel--description .wp-block-group[style*="f5f5f7"] {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-left: 5px solid #10b981 !important;
    border-radius: 16px !important;
    padding: 24px 28px !important;
    margin: 28px 0 !important;
}

.single-product .woocommerce-Tabs-panel--description .wp-block-group[style*="f5f5f7"] h3 {
    color: #065f46 !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    margin-bottom: 8px !important;
}

/* 5. Additional Information Attributes Table */
.single-product #tab-additional_information table.shop_attributes {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    border: none !important;
    margin: 0 !important;
}

.single-product #tab-additional_information table.shop_attributes tr {
    border: none !important;
}

.single-product #tab-additional_information table.shop_attributes th {
    background: #f8fafc !important;
    padding: 14px 22px !important;
    border-radius: 12px 0 0 12px !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    border: none !important;
    width: 30% !important;
}

.single-product #tab-additional_information table.shop_attributes td {
    background: #f8fafc !important;
    padding: 14px 22px !important;
    border-radius: 0 12px 12px 0 !important;
    color: #334155 !important;
    font-size: 14px !important;
    border: none !important;
}

.single-product #tab-additional_information table.shop_attributes td p {
    margin: 0 !important;
    padding: 0 !important;
}


/* ==========================================================================
   MACFAAAST SINGLE PRODUCT REFINEMENTS (GALLERY, UNIFORM MARGINS, NO PRONTA CONSEGNA)
   ========================================================================== */

/* 1. Complete Removal of the "In Pronta Consegna" Banner */
.single-product .summary .ts-product-ratings-stock,
.single-product .summary .availability {
    display: none !important;
    visibility: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* 2. Uniform Vertical Margins & Complete Spacing System (Antigravity) */
.single-product .site-content .product-images-summary .summary.entry-summary {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 20px !important;
}

.single-product .summary.entry-summary>* {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.single-product .summary .mf-sp-header {
    margin: 0 !important;
}

.single-product .summary .mf-sp-header .mf-sp-top-badges {
    margin-bottom: 10px !important;
}

.single-product .summary .mf-sp-header h1.mf-sp-title,
.single-product .summary .mf-sp-header h1.product_title {
    margin: 0 !important;
}

.single-product .summary .mf-sp-peace-of-mind-strip {
    margin: 0 !important;
}

.single-product .summary .woocommerce-product-details__short-description {
    margin: 0 !important;
}

.single-product .summary .premium-price-wrapper {
    margin: 0 !important;
}

.single-product .summary #shipping-countdown-banner,
.single-product .summary .shipping-same-day-banner {
    margin: 0 !important;
}

/* Variable Products: Form, Swatches & Price Card Hierarchy */
.single-product .summary form.cart {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

.single-product .summary form.cart input[type="hidden"] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    width: 0 !important;
}

.single-product .summary .personalize-selection-title {
    margin: 0 0 16px 0 !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.single-product .summary table.variations {
    margin: 0 0 20px 0 !important;
    border-collapse: separate !important;
}

.single-product .summary #variation-selection-summary {
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* single_variation_wrap: flex column with strictly enforced 20px gap */
.single-product .summary .single_variation_wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.single-product .summary .single_variation_wrap>* {
    margin: 0 !important;
}

.single-product .summary .single_variation_wrap .premium-price-wrapper,
.single-product .summary .premium-price-wrapper.variable {
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.single-product .summary .woocommerce-variation-add-to-cart {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

body.woocommerce.single-product div.product .summary form.cart .single_add_to_cart_button,
body.woocommerce.single-product div.product .summary form.cart button.single_add_to_cart_button,
body.single-product .woocommerce-variation-add-to-cart .single_add_to_cart_button,
body.single-product button.single_add_to_cart_button,
body.single-product .button.alt {
    margin: 0 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
}

/* Action Buttons Stack (14px between Add to Cart, Buy Now, and Instant Pay) */
.single-product .summary .ts-buy-now-button {
    margin-top: -6px !important;
    margin-bottom: 0 !important;
    width: 100% !important;
}

.single-product .summary #wc-stripe-express-checkout-element,
.single-product .summary #wc-stripe-payment-request-wrapper,
.single-product .summary .wc-stripe-banner-checkout {
    margin-top: -6px !important;
    margin-bottom: 0 !important;
    width: 100% !important;
}

/* Secondary Actions (Wishlist / Compare / Trust / Meta) */
.single-product .summary .single-product-buttons {
    margin: 4px 0 0 0 !important;
    border-top: 1.5px solid #f1f5f9 !important;
    padding-top: 20px !important;
}

.single-product .summary .marketing-trust-badges-box {
    margin: 0 !important;
}

.single-product .summary .meta-content {
    margin: 0 !important;
    border-top: 1px dashed #e2e8f0 !important;
    padding-top: 16px !important;
}

/* Simple Products: TM Options & Totals */
.single-product .summary .tc-extra-product-options {
    margin: 0 0 16px 0 !important;
}

.single-product .summary .tc-totals-form,
.single-product .summary #tm-epo-totals {
    margin: 0 0 20px 0 !important;
}

.single-product .summary .qty-selection-label {
    margin: 0 0 10px 0 !important;
}

.single-product .summary div.quantity {
    margin: 0 0 16px 0 !important;
}

/* 3. Image Gallery Redesign (Supporting 1, 2, 3, 4+ Photos with Zero Overlap) */
.single-product div.product .woocommerce-product-gallery {
    padding: 24px !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #f1f5f9 !important;
    box-sizing: border-box !important;
}

@media (min-width: 992px) {

    /* Assicura che nessun container genitore blocchi il comportamento sticky nativo su Desktop */
    body.single-product,
    body.single-product html,
    body.single-product #page,
    body.single-product #main,
    body.single-product .page-container,
    body.single-product #main-content,
    body.single-product #primary,
    body.single-product div.product,
    body.single-product .product-images-summary {
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
    }

    body.single-product .product-images-summary {
        display: flex !important;
        align-items: flex-start !important;
        position: relative !important;
    }

    body.single-product div.product .woocommerce-product-gallery,
    .single-product div.product .woocommerce-product-gallery {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 100px !important;
        align-self: flex-start !important;
        z-index: 10 !important;
    }
}

/* MOBILE & TABLET: LA FOTO DEL PRODOTTO DEVE SCORRERE E SPARIRE VERSO L'ALTO */
@media (max-width: 991px) {

    body.single-product .woocommerce-product-gallery,
    .single-product div.product .woocommerce-product-gallery,
    .single-product .site-content .product-images-summary .woocommerce-product-gallery,
    .single-product div.product div.images,
    body.single-product div.images {
        position: static !important;
        position: relative !important;
        top: auto !important;
        align-self: auto !important;
        z-index: 1 !important;
        transform: none !important;
    }

    .single-product div.product .woocommerce-product-gallery,
    .single-product div.product.gallery-layout-vertical.has-gallery div.images {
        padding: 16px !important;
    }
}

.single-product div.product.gallery-layout-vertical.has-gallery div.images,
.single-product div.product .woocommerce-product-gallery {
    padding-left: 24px !important;
    padding-right: 24px !important;
}

.single-product div.product .woocommerce-product-gallery .flex-viewport {
    width: 100% !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}

.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
    max-height: 480px !important;
    object-fit: contain !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    display: block !important;
}

/* Thumbnails (for products with 2 or more photos) */
.single-product div.product .woocommerce-product-gallery .flex-control-thumbs,
.single-product div.product.gallery-layout-vertical div.images .flex-control-thumbs {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 16px 0 0 0 !important;
    padding: 8px 0 !important;
    list-style: none !important;
    overflow: visible !important;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li {
    width: 76px !important;
    height: 76px !important;
    float: none !important;
    margin: 0 !important;
    padding: 4px !important;
    cursor: pointer !important;
    border-radius: 14px !important;
    border: 2px solid #e2e8f0 !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
    background: #f8fafc !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li:hover {
    border-color: #00ade6 !important;
    transform: translateY(-2px) !important;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    opacity: 0.75 !important;
    transition: opacity 0.2s ease !important;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active,
.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li.active img {
    opacity: 1 !important;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li:has(img.flex-active),
.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li.active {
    border-color: #00ade6 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 173, 230, 0.25) !important;
}

/* Soluzione A: Galleria 100% pulita senza adesivi flottanti */
.single-product div.product .woocommerce-product-gallery .product-label {
    display: none !important;
}



/* ==========================================================================
   28. MACFAAAST MODERN SINGLE PRODUCT TABS: SPECS & GRADES
   Strictly scoped to .mf-product-specs-wrapper and .mf-product-grades-wrapper
   ========================================================================== */

/* Modern Tab Panels */
.woocommerce div.product .woocommerce-tabs .panel#tab-additional_information,
.woocommerce div.product .woocommerce-tabs .panel#tab-ts_custom {
    padding-top: 10px;
    margin-top: 0;
}

/* 1. INFORMAZIONI AGGIUNTIVE: .mf-product-specs-wrapper */
.mf-product-specs-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.mf-product-specs-wrapper .mf-specs-intro {
    margin-bottom: 28px;
    text-align: left;
}

.mf-product-specs-wrapper .mf-specs-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #00ade6;
    margin-bottom: 6px;
}

.mf-product-specs-wrapper .mf-specs-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.mf-product-specs-wrapper .mf-specs-subtitle {
    font-size: 14.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.55;
}

.mf-product-specs-wrapper .mf-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.mf-product-specs-wrapper .mf-spec-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.mf-product-specs-wrapper .mf-spec-card:hover {
    background: #ffffff;
    border-color: #00ade6;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 173, 230, 0.08);
}

.mf-product-specs-wrapper .mf-spec-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.mf-product-specs-wrapper .mf-spec-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
}

.mf-product-specs-wrapper .mf-spec-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.mf-product-specs-wrapper .mf-spec-values {
    display: flex;
    align-items: center;
}

.mf-product-specs-wrapper .mf-spec-val-single {
    font-size: 15.5px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.mf-product-specs-wrapper .mf-spec-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mf-product-specs-wrapper .mf-spec-pill {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.mf-product-specs-wrapper .mf-spec-condizione-estetica .mf-spec-pill,
.mf-product-specs-wrapper .mf-spec-condizione .mf-spec-pill {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #0284c7;
}

/* Specs Guarantee Strip */
.mf-product-specs-wrapper .mf-specs-guarantee-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    background: #f1f5f9;
    border-radius: 16px;
    padding: 18px 24px;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.mf-product-specs-wrapper .mf-sg-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mf-product-specs-wrapper .mf-sg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.mf-product-specs-wrapper .mf-sg-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mf-product-specs-wrapper .mf-sg-content strong {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.mf-product-specs-wrapper .mf-sg-content span {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.3;
}

.mf-product-specs-wrapper .mf-no-specs {
    font-size: 14.5px;
    color: #64748b;
    padding: 24px 0;
}


/* 2. GRADI ESTETICI: .mf-product-grades-wrapper */
.mf-product-grades-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.mf-product-grades-wrapper .mf-grades-intro {
    margin-bottom: 28px;
    text-align: left;
}

.mf-product-grades-wrapper .mf-grades-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #00ade6;
    margin-bottom: 6px;
}

.mf-product-grades-wrapper .mf-grades-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.mf-product-grades-wrapper .mf-grades-subtitle {
    font-size: 14.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.55;
}

.mf-product-grades-wrapper .mf-grades-showroom-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.mf-product-grades-wrapper .mf-gcard {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 22px 18px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.22s ease;
    box-sizing: border-box;
}

.mf-product-grades-wrapper .mf-gcard:hover {
    border-color: #00ade6;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 173, 230, 0.08);
}

.mf-product-grades-wrapper .mf-gcard.mf-gcard-featured {
    border: 2px solid #00ade6;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
    box-shadow: 0 6px 20px rgba(0, 173, 230, 0.1);
}

.mf-product-grades-wrapper .mf-gcard-badge {
    position: absolute;
    top: -10px;
    right: 14px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 50px;
    border: 1px solid transparent;
    line-height: 1.2;
    z-index: 2;
}

.mf-product-grades-wrapper .mf-badge-featured {
    background: #00ade6;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 173, 230, 0.3);
}

.mf-product-grades-wrapper .mf-badge-popular {
    background: #0f172a;
    color: #ffffff;
}

.mf-product-grades-wrapper .mf-badge-value {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #bae6fd;
}

.mf-product-grades-wrapper .mf-badge-savings {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.mf-product-grades-wrapper .mf-badge-cyan {
    background: #e0f2fe;
    color: #0096c7;
    border-color: #bae6fd;
}

.mf-product-grades-wrapper .mf-gcard-header {
    margin-top: 4px;
    margin-bottom: 12px;
}

.mf-product-grades-wrapper .mf-gcard-title-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.mf-product-grades-wrapper .mf-gcard-name {
    font-size: 16.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.mf-product-grades-wrapper .mf-gcard-subgrade {
    font-size: 11px;
    font-weight: 700;
    color: #00ade6;
    background: #e0f2fe;
    padding: 1px 6px;
    border-radius: 4px;
}

.mf-product-grades-wrapper .mf-gcard-tagline {
    font-size: 11.5px;
    color: #64748b;
    display: block;
    line-height: 1.3;
}

.mf-product-grades-wrapper .mf-gcard-gauge {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.mf-product-grades-wrapper .mf-gdot {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: #e2e8f0;
    transition: background 0.2s ease;
}

.mf-product-grades-wrapper .mf-gdot.filled {
    background: #00ade6;
}

.mf-product-grades-wrapper .mf-gcard-specs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    font-size: 11.5px;
}

.mf-product-grades-wrapper .mf-gcard-spec {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mf-product-grades-wrapper .mf-gcard-spec-label {
    font-weight: 800;
    color: #64748b;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mf-product-grades-wrapper .mf-gcard-spec-val {
    color: #1e293b;
    font-weight: 600;
    line-height: 1.35;
}

/* Grades Bottom Row */
.mf-product-grades-wrapper .mf-grades-bottom-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.mf-product-grades-wrapper .mf-gb-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 20px 22px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-sizing: border-box;
}

.mf-product-grades-wrapper .mf-gb-card.mf-gb-whatsapp {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.mf-product-grades-wrapper .mf-gb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
}

.mf-product-grades-wrapper .mf-gb-whatsapp .mf-gb-icon {
    border-color: #86efac;
    background: #ffffff;
}

.mf-product-grades-wrapper .mf-gb-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mf-product-grades-wrapper .mf-gb-info h5 {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.mf-product-grades-wrapper .mf-gb-info p {
    font-size: 12.5px;
    color: #475569;
    margin: 0 0 10px 0;
    line-height: 1.45;
}

.mf-product-grades-wrapper .mf-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #22c55e;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 50px;
    text-decoration: none;
    align-self: flex-start;
    transition: background 0.2s ease, transform 0.15s ease;
}

.mf-product-grades-wrapper .mf-wa-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
    color: #ffffff !important;
}

/* Tablet & Mobile Responsiveness */
@media (max-width: 1024px) {
    .mf-product-grades-wrapper .mf-grades-showroom-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .mf-product-specs-wrapper .mf-specs-guarantee-bar {
        grid-template-columns: 1fr;
    }

    .mf-product-grades-wrapper .mf-grades-showroom-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mf-product-grades-wrapper .mf-grades-bottom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .mf-product-grades-wrapper .mf-grades-showroom-grid {
        grid-template-columns: 1fr;
    }

    .mf-product-specs-wrapper .mf-specs-grid {
        grid-template-columns: 1fr;
    }

    .mf-product-specs-wrapper .mf-specs-title,
    .mf-product-grades-wrapper .mf-grades-title {
        font-size: 20px;
    }
}



/* ==========================================================================
   FIX BUG SELETTORE QUANTITÀ SU PRODOTTI CON DISPONIBILITÀ = 1 (O HIDDEN)
   Nasconde completamente .quantity quando il prodotto ha 1 solo pezzo acquistabile
   ========================================================================== */
body.single-product .summary div.quantity.hidden,
body.single-product .summary div.quantity:has(input[type="hidden"].qty),
body.single-product .summary div.quantity:has(input.is-singular-qty),
body.single-product .summary div.quantity:has(input.qty[max="1"]),
form.cart div.quantity.hidden,
form.cart div.quantity:has(input[type="hidden"].qty),
form.cart div.quantity:has(input.is-singular-qty),
form.cart div.quantity:has(input.qty[max="1"]) {
    display: none !important;
    visibility: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ==========================================================================
   PAGINA PRODOTTO — CARD PAGAMENTO RAPIDO 1-CLICK (APPLE PAY, GOOGLE PAY, LINK)
   Incapsula e rifinisce i bottoni Express Checkout sotto "Acquista Ora"
   ========================================================================== */
body.single-product .summary #wc-stripe-express-checkout-element:not([style*="display:none"]):not([style*="display: none"]):not(:empty),
body.single-product .summary #wc-stripe-payment-request-wrapper:not([style*="display:none"]):not([style*="display: none"]):not(:empty),
body.single-product .summary .wc-stripe-banner-checkout:not([style*="display:none"]):not([style*="display: none"]):not(:empty) {
    order: 15 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    justify-content: center !important;
    row-gap: 10px !important;
    column-gap: 10px !important;
    margin: 0 !important;
    padding: 16px 18px 15px 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.08) !important;
}

body.single-product .summary #wc-stripe-express-checkout-element::before,
body.single-product .summary #wc-stripe-payment-request-wrapper::before {
    content: "Pagamento Rapido · 1-Click" !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.015em !important;
    line-height: 1.3 !important;
    padding: 1px 0 1px 10px !important;
    border-left: 3.5px solid #00ade6 !important;
    margin: 0 0 2px 0 !important;
}

body.single-product .summary #wc-stripe-express-checkout-element::after,
body.single-product .summary #wc-stripe-payment-request-wrapper::after {
    content: "Apple Pay · Google Pay · Link · SSL 256-bit Stripe" !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
    text-align: center !important;
    margin: 2px 0 0 0 !important;
    padding: 6px 12px !important;
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #15803d !important;
}

body.single-product .summary #wc-stripe-express-checkout-element > .StripeElement {
    flex: 1 1 calc(50% - 5px) !important;
    min-width: 240px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transition: transform 0.18s ease, filter 0.18s ease !important;
}

body.single-product .summary #wc-stripe-express-checkout-element > #wc-stripe-express-checkout-element-link {
    flex: 1 1 100% !important;
}

@media (hover: hover) {
    body.single-product .summary #wc-stripe-express-checkout-element > .StripeElement:hover {
        transform: translateY(-1px) !important;
        filter: brightness(1.03) !important;
    }
}

@media (max-width: 767px) {
    body.single-product .summary #wc-stripe-express-checkout-element:not([style*="display:none"]):not([style*="display: none"]):not(:empty),
    body.single-product .summary #wc-stripe-payment-request-wrapper:not([style*="display:none"]):not([style*="display: none"]):not(:empty),
    body.single-product .summary .wc-stripe-banner-checkout:not([style*="display:none"]):not([style*="display: none"]):not(:empty) {
        padding: 14px 13px 13px 13px !important;
        border-radius: 18px !important;
        row-gap: 8px !important;
        column-gap: 8px !important;
    }

    body.single-product .summary #wc-stripe-express-checkout-element::before {
        font-size: 13px !important;
        margin-bottom: 2px !important;
    }

    body.single-product .summary #wc-stripe-express-checkout-element > .StripeElement {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    body.single-product .summary #wc-stripe-express-checkout-element::after {
        font-size: 10.5px !important;
        padding: 6px 10px !important;
    }
}

/* ==========================================================================
   APPLE-STYLE PRODUCT CONFIGURATOR (DESKTOP & MOBILE)
   Trasforma table.variations e vi-wpvs in step numerati con prezzi live,
   palette colore reali, descrizioni grado e switch intelligente senza blocchi.
   ========================================================================== */
body.single-product .summary form.variations_form {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 20px 22px 18px 22px !important;
    margin: 0 0 18px 0 !important;
    box-shadow: 0 6px 24px -8px rgba(15, 23, 42, 0.05) !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

body.single-product .summary form.variations_form .mf-config-header-wrap {
    margin: 0 0 18px 0 !important;
    padding: 0 0 14px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

body.single-product .summary form.variations_form .mf-config-header-top {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    margin: 0 0 8px 0 !important;
}

body.single-product .summary form.variations_form .mf-config-eyebrow {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    background: #e0f2fe !important;
    color: #0284c7 !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
    line-height: 1.2 !important;
}

body.single-product .summary form.variations_form .mf-config-avail {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    white-space: nowrap !important;
}

body.single-product .summary form.variations_form .personalize-selection-title {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    font-size: 1.32rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.025em !important;
    line-height: 1.2 !important;
    text-align: left !important;
}

body.single-product .summary form.variations_form .mf-config-actions-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.single-product .summary form.variations_form .mf-reset-btn {
    display: none !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 10px 0 0 0 !important;
    padding: 5px 12px !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease !important;
}

body.single-product .summary form.variations_form .mf-reset-btn.is-visible {
    display: inline-flex !important;
}

body.single-product .summary form.variations_form .mf-reset-btn:hover {
    border-color: #00ade6 !important;
    color: #0284c7 !important;
    background: #f0f9ff !important;
}

/* Table -> Modern Vertical Stack */
body.single-product .summary form.variations_form table.variations {
    display: block !important;
    width: 100% !important;
    border: none !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
}

body.single-product .summary form.variations_form table.variations tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    width: 100% !important;
}

body.single-product .summary form.variations_form table.variations tr.mf-config-step {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 0 18px 0 !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: transparent !important;
}

body.single-product .summary form.variations_form table.variations tr.mf-config-step:last-child {
    padding-bottom: 2px !important;
    border-bottom: none !important;
}

body.single-product .summary form.variations_form table.variations th.label {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-align: left !important;
}

body.single-product .summary form.variations_form table.variations td.value {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

body.single-product .summary form.variations_form .reset_variations {
    display: none !important;
}

/* Step Header */
body.single-product .summary form.variations_form .mf-step-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
}

body.single-product .summary form.variations_form .mf-step-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
}

body.single-product .summary form.variations_form .mf-step-num {
    width: 24px !important;
    height: 24px !important;
    border-radius: 999px !important;
    background: #0f172a !important;
    color: #ffffff !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: background-color 0.2s ease !important;
}

body.single-product .summary form.variations_form .mf-step-header.is-completed .mf-step-num {
    background: #00ade6 !important;
}

body.single-product .summary form.variations_form .mf-step-titles {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 5px !important;
    min-width: 0 !important;
}

body.single-product .summary form.variations_form .mf-step-title {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.015em !important;
    line-height: 1.25 !important;
}

body.single-product .summary form.variations_form .mf-step-sub {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    line-height: 1.25 !important;
}

body.single-product .summary form.variations_form .mf-step-chosen {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

body.single-product .summary form.variations_form .mf-step-chosen.is-active {
    background: #e0f2fe !important;
    color: #0284c7 !important;
}

/* Grids per tipo opzione */
body.single-product .summary form.variations_form .vi-wpvs-variation-wrap.mf-options-grid {
    display: grid !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.single-product .summary form.variations_form .vi-wpvs-variation-wrap.mf-grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.single-product .summary form.variations_form .vi-wpvs-variation-wrap.mf-grid-cols-1 {
    grid-template-columns: minmax(0, 1fr) !important;
}

body.single-product .summary form.variations_form .vi-wpvs-variation-wrap.mf-grid-colors {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
}

body.single-product .summary form.variations_form .vi-wpvs-variation-wrap.mf-grid-colors-many {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)) !important;
}

/* Reset completo eredità vi_wpvs sui bottoni (elimina sfondo azzurro spigoloso dietro agli angoli!) */
body.single-product .summary form.variations_form .vi-wpvs-option-wrap,
body.single-product .summary form.variations_form .vi-wpvs-option-wrap.vi-wpvs-option-wrap-selected,
body.single-product .summary form.variations_form .vi-wpvs-option-wrap.mf-opt-selected,
body.single-product .summary form.variations_form .vi-wpvs-option-wrap.vi-wpvs-option-wrap-default,
body.single-product .summary form.variations_form .vi-wpvs-option-wrap.vi-wpvs-option-wrap-disable,
body.single-product .summary form.variations_form .vi-wpvs-option-wrap.vi-wpvs-option-wrap-disabled,
body.single-product .summary form.variations_form .vi-wpvs-option-wrap:hover {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 16px !important;
    transform: none !important;
    opacity: 1 !important;
    cursor: pointer !important;
    position: relative !important;
    text-decoration: none !important;
    pointer-events: auto !important;
    display: flex !important;
    align-items: stretch !important;
}

body.single-product .summary form.variations_form .vi-wpvs-option-wrap *,
body.single-product .summary form.variations_form .vi-wpvs-option-wrap-disable *,
body.single-product .summary form.variations_form .vi-wpvs-option-wrap-disabled * {
    text-decoration: none !important;
}

body.single-product .summary form.variations_form .vi-wpvs-option-wrap::before,
body.single-product .summary form.variations_form .vi-wpvs-option-wrap::after,
body.single-product .summary form.variations_form .vi-wpvs-option-wrap .vi-wpvs-option-button::before,
body.single-product .summary form.variations_form .vi-wpvs-option-wrap .vi-wpvs-option-button::after {
    display: none !important;
    content: none !important;
}

body.single-product .summary form.variations_form .vi-wpvs-option-wrap .vi-wpvs-option.vi-wpvs-option-button {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 62px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 13px 15px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: inset 0 0 0 1.5px #e2e8f0, 0 2px 6px rgba(15, 23, 42, 0.03) !important;
    text-align: left !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    color: #0f172a !important;
    transform: none !important;
    transition: background-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease !important;
}

body.single-product .summary form.variations_form .vi-wpvs-option-wrap:not(.mf-opt-selected):not(.mf-opt-oos):hover .vi-wpvs-option.vi-wpvs-option-button {
    box-shadow: inset 0 0 0 1.5px #94a3b8, 0 4px 12px rgba(15, 23, 42, 0.06) !important;
}

body.single-product .summary form.variations_form .vi-wpvs-option-wrap.mf-opt-selected .vi-wpvs-option.vi-wpvs-option-button {
    background: #f0f9ff !important;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: inset 0 0 0 2px #00ade6, 0 8px 20px -6px rgba(0, 173, 230, 0.22) !important;
}

body.single-product .summary form.variations_form .vi-wpvs-option-wrap.mf-opt-switch-needed .vi-wpvs-option.vi-wpvs-option-button {
    background: #f8fafc !important;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: inset 0 0 0 1.5px #cbd5e1 !important;
    opacity: 0.88 !important;
}

body.single-product .summary form.variations_form .vi-wpvs-option-wrap.mf-opt-switch-needed:hover .vi-wpvs-option.vi-wpvs-option-button {
    opacity: 1 !important;
    background: #ffffff !important;
    box-shadow: inset 0 0 0 1.5px #00ade6, 0 4px 12px rgba(0, 173, 230, 0.1) !important;
}

body.single-product .summary form.variations_form .vi-wpvs-option-wrap.mf-opt-oos {
    opacity: 0.42 !important;
    pointer-events: none !important;
}

/* Color Card compatta & allineata su 1 riga pulita per nome */
body.single-product .summary form.variations_form .mf-grid-colors .vi-wpvs-option.vi-wpvs-option-button {
    padding: 11px 12px !important;
    min-height: 58px !important;
}

body.single-product .summary form.variations_form .mf-grid-colors .mf-tile-color {
    gap: 9px !important;
}

body.single-product .summary form.variations_form .mf-grid-colors .mf-color-ring {
    width: 26px !important;
    height: 26px !important;
}

body.single-product .summary form.variations_form .mf-grid-colors .mf-opt-name {
    font-size: 13.5px !important;
    letter-spacing: -0.02em !important;
}

body.single-product .summary form.variations_form .mf-cond-switch-pill {
    display: inline-flex !important;
    align-items: center !important;
    padding: 2px 8px !important;
    border-radius: 999px !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}

/* Tile Internals */
body.single-product .summary form.variations_form .mf-tile-spec {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
}

body.single-product .summary form.variations_form .mf-spec-left,
body.single-product .summary form.variations_form .mf-tile-text {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
}

body.single-product .summary form.variations_form .mf-opt-name {
    font-size: 14.5px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.01em !important;
    line-height: 1.2 !important;
}

body.single-product .summary form.variations_form .mf-opt-sub {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    line-height: 1.25 !important;
}

body.single-product .summary form.variations_form .mf-opt-price {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

body.single-product .summary form.variations_form .mf-opt-selected .mf-opt-price {
    color: #0284c7 !important;
}

/* Color Swatch Tile */
body.single-product .summary form.variations_form .mf-tile-color {
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    width: 100% !important;
}

body.single-product .summary form.variations_form .mf-color-ring {
    width: 30px !important;
    height: 30px !important;
    border-radius: 999px !important;
    padding: 2px !important;
    border: 1.5px solid #e2e8f0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    background: #ffffff !important;
}

body.single-product .summary form.variations_form .mf-opt-selected .mf-color-ring {
    border-color: #00ade6 !important;
    box-shadow: 0 0 0 2px rgba(0, 173, 230, 0.2) !important;
}

body.single-product .summary form.variations_form .mf-color-dot {
    width: 100% !important;
    height: 100% !important;
    border-radius: 999px !important;
    display: block !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18) !important;
}

body.single-product .summary form.variations_form .mf-color-ring.is-light .mf-color-dot {
    border: 1px solid #cbd5e1 !important;
}

/* Condition Tier Card */
body.single-product .summary form.variations_form .mf-tile-condition {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    width: 100% !important;
}

body.single-product .summary form.variations_form .mf-cond-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
}

body.single-product .summary form.variations_form .mf-cond-title-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

body.single-product .summary form.variations_form .mf-cond-badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 2px 8px !important;
    border-radius: 999px !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
}

body.single-product .summary form.variations_form .mf-cond-badge.is-top {
    background: #dcfce7 !important;
    color: #15803d !important;
}

body.single-product .summary form.variations_form .mf-cond-badge.is-popular {
    background: #e0f2fe !important;
    color: #0284c7 !important;
}

body.single-product .summary form.variations_form .mf-cond-badge.is-value {
    background: #fef3c7 !important;
    color: #b45309 !important;
}

body.single-product .summary form.variations_form .mf-opt-desc {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    line-height: 1.35 !important;
}

/* Price Wrapper separation inside configurator form */
body.single-product .summary form.variations_form .single_variation_wrap {
    margin-top: 6px !important;
    padding-top: 16px !important;
    border-top: 1px solid #f1f5f9 !important;
}

@media (max-width: 767px) {
    body.single-product .summary form.variations_form {
        padding: 16px 14px 16px 14px !important;
        border-radius: 18px !important;
    }

    body.single-product .summary form.variations_form .personalize-selection-title {
        font-size: 1.18rem !important;
    }

    body.single-product .summary form.variations_form .mf-step-titles {
        flex-direction: column !important;
        gap: 1px !important;
    }

    body.single-product .summary form.variations_form .mf-step-sub {
        font-size: 12px !important;
    }

    body.single-product .summary form.variations_form .vi-wpvs-variation-wrap.mf-grid-cols-2,
    body.single-product .summary form.variations_form .vi-wpvs-variation-wrap.mf-grid-colors {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 8px !important;
    }

    body.single-product .summary form.variations_form .vi-wpvs-option-wrap .vi-wpvs-option.vi-wpvs-option-button {
        padding: 12px 13px !important;
    }
}

