/*
Theme Name: Shoptimizer Child Theme
Theme URI:
Description: Child theme of Shoptimizer
Author: CommerceGurus
Author URI:
Template: shoptimizer
Version: 1.2.1
License:         	GNU General Public License v2 or later
License URI:     	http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   Brand fonts — Fraunces (headings) + Manrope (body/UI)
   Self-hosted via includes/fonts.php (same WPTT loader that self-hosts Inter).
   !important needed to beat Kirki's inline customizer CSS on body/h1-h6.
   ========================================================================== */
body, button, input, select, textarea,
.site .menu-primary-menu-container > ul > li > a,
.main-navigation ul.menu ul li > a,
.woocommerce .price,
.woocommerce-loop-product__title,
ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Manrope', sans-serif !important;
}

h1, h2, h3, h4, h5, h6,
.wp-block-heading,
.sira-hero__title,
.sira-section__title,
.sira-property-card__label,
.sira-advantage__title,
.sira-blog-card__title,
.product_title,
.entry-title {
    font-family: 'Fraunces', serif !important;
}

/* ==========================================================================
   PayPal buttons
   ========================================================================== */
.ppc-button-wrapper {
    margin-bottom: 16px;
}

/* ==========================================================================
   Sale badge — catalog loop (image overlay: red, round, urgent)
   ========================================================================== */
.sale-item.product-label {
    background: linear-gradient(135deg, #e53935, #b71c1c) !important;
    color: #ffffff !important;
    scale: 1.2;
}

.summary {
    .sale-item.product-label {
        margin-top: 10px !important;
    }
}

/* ==========================================================================
   Badge sizing — CommerceKit badges (Nuovo, ecc.) and sale badge,
   catalog listing AND single product page.
   ========================================================================== */
.ckit-badge {
    font-size: 13px !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
}

.sale-item.product-label.type-bubble {
    font-size: 13px !important;
    padding: 6px 12px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
}


/* ==========================================================================
   Mini cart sizing
   ========================================================================== */
.shoptimizer-mini-cart-wrap .widget_shopping_cart li.mini_cart_item a {
    font-size: 16px !important;
}

.widget_shopping_cart .product_list_widget li a.remove:before {
    content: unset !important;
}


/* ==========================================================================
   Badge positioning — catalog loop cards
   Sale badge stays top-left; CommerceKit badges (Nuovo, ecc.) move bottom-right.
   ========================================================================== */
.woocommerce-image__wrapper .sale-item.product-label.type-bubble {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1 !important;
    margin: 0;
}

.woocommerce-image__wrapper .ckit-badge_wrapper {
    position: absolute;
    bottom: 10px;
    right: 10px;
    left: auto !important;
    top: auto !important;
    z-index: 1 !important;
}

/* ==========================================================================
   Badge positioning — single product gallery
   Sale badge (JS-moved into the gallery, see includes/frontend.php) stays
   top-left. CommerceKit "Nuovo" badge moves to top-right, so the two
   never overlap.
   ========================================================================== */
.single-product #commercegurus-pdp-gallery-wrapper {
    position: relative;
}

.single-product #commercegurus-pdp-gallery-wrapper .ckit-badge_wrapper {
    position: absolute;
    top: 14px;
    right: 14px;
    left: auto !important;
    bottom: auto !important;
    z-index: 25;
}

/* Hide the sale badge until JS repositions it into the gallery (avoids a flash
   in its original DOM location before the move happens). */
.single-product #commercegurus-pdp-gallery-wrapper .sale-item.product-label.type-bubble,
.single-product .woocommerce-product-gallery .sale-item.product-label.type-bubble {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* ==========================================================================
   Top bar text size
   ========================================================================== */
.top-bar,
.top-bar a {
    font-size: 17px !important;
    color: #0b803c !important;
}

/* ==========================================================================
   Sale badge — single product summary (inline pill, next to price)
   ========================================================================== */
.entry-summary .price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 28px !important;
}

.entry-summary .price del {
    font-size: 18px;
    opacity: 0.55;
}

.entry-summary .price ins {
    font-size: 32px;
    font-weight: 800;
    text-decoration: none;
}


/* ==========================================================================
   Widget "Prodotti in Offerta" — price sizing
   ========================================================================== */
.widget_products .product_list_widget li {
    position: relative;
}

.widget_products .product_list_widget del {
    font-size: 13px;
    opacity: 0.65;
}

.widget_products .product_list_widget ins {
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    color: #2e7d32;
}

.widget_products .product_list_widget del .woocommerce-Price-amount,
.widget_products .product_list_widget ins .woocommerce-Price-amount {
    font-size: inherit;
}

/* ==========================================================================
   Campione gratis badge — product loop cards (all contexts)
   ========================================================================== */
.woocommerce-image__wrapper {
    position: relative;
}

.sira-campione-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #16a34a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 5px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
    pointer-events: none;
    white-space: nowrap;
}

.sira-campione-badge svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* ==========================================================================
   Floating WhatsApp button (fixed, bottom-right, every page)
   ========================================================================== */
.sira-wa-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 9999;
    transition: transform 0.15s ease;
}

.sira-wa-float:hover {
    transform: scale(1.08);
}

@media (max-width: 480px) {
    .sira-wa-float {
        width: 50px;
        height: 50px;
        bottom: 14px;
        right: 14px;
    }
}

/* ==========================================================================
   Free sample notice — single product page
   ========================================================================== */
.sira-campione-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 16px 0 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1.5px solid #86efac;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.sira-campione-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #16a34a;
    border-radius: 10px 0 0 10px;
}

.sira-campione-notice__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.sira-campione-notice__icon svg {
    width: 20px;
    height: 20px;
}

.sira-campione-notice__content {
    flex: 1;
    min-width: 0;
}

.sira-campione-notice__title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 4px;
}

.sira-campione-notice__text {
    margin: 0;
    font-size: 13.5px;
    color: #166534;
    line-height: 1.5;
}

.sira-campione-notice__text em {
    font-style: normal;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sira-campione-notice__badge {
    flex-shrink: 0;
    align-self: flex-start;
    background: #16a34a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Discount badge in widget */
.sira-widget-discount-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #e53935, #b71c1c);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    letter-spacing: 0.03em;
}