/* ============================================================
   AFRICA ANGEL — SINGLE PRODUCT PAGE
   Loaded ONLY on single product pages via is_product().
   Fixes: hide broken "Rate this Product" widget, remove the
   duplicate wishlist heart, and make the whole page responsive
   and professional across all devices.
   Brand: green #1e5631 / #2f7d32 · ink #1f2d24
   ============================================================ */

:root {
    --aa-green:      #2f7d32;
    --aa-green-dark: #1e5631;
    --aa-ink:        #1f2d24;
    --aa-line:       #eaeaea;
}

/* ============================================================
   1) REMOVE the decorative "Rate this Product:" star widget
   ============================================================ */
body.single-product .elementor-widget-star-rating,
body.single-product .elementor-element-0f8b7d2 {
    display: none !important;
}

/* ============================================================
   2) WISHLIST — keep ONE heart (remove the theme's ::before
   font-icon heart; keep YITH's SVG heart)
   ============================================================ */
body.single-product .yith-wcwl-add-to-wishlist a::before,
body.single-product .elementor-element-073c84a .add_to_wishlist::before {
    content: none !important;
    display: none !important;
    margin: 0 !important;
}
body.single-product .elementor-element-073c84a .yith-wcwl-add-to-wishlist {
    justify-content: center;
}
body.single-product .add_to_wishlist.single_add_to_wishlist {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--aa-ink);
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}
body.single-product .add_to_wishlist.single_add_to_wishlist:hover { color: var(--aa-green); }
body.single-product .add_to_wishlist .yith-wcwl-icon-svg { width: 20px; height: 20px; }

/* ============================================================
   3) PROFESSIONAL POLISH (reinforces the cards from custom.css)
   ============================================================ */
body.single-product .product_title.entry-title {
    color: var(--aa-ink);
    font-weight: 700;
    line-height: 1.25;
}
/* price */
body.single-product .elementor-element-1b9cc1c2 .price,
body.single-product .elementor-element-1b9cc1c2 .woocommerce-Price-amount {
    color: var(--aa-green) !important;
    font-weight: 700;
}
/* special-offer box */
body.single-product .wcx-tiers-wrap {
    border-radius: 12px !important;
    border: 1px solid #cfe6d0 !important;
    border-left: 4px solid var(--aa-green-dark) !important;
    background: #f2f8f2 !important;
}
/* swatches — centered, consistent */
body.single-product .wcx-swatches { justify-content: center; gap: 10px; }
body.single-product .wcx-swatch {
    min-width: 58px; text-align: center; border-radius: 8px; padding: 9px 16px;
}
body.single-product table.variations .reset_variations { color: var(--aa-green); }

/* qty stepper + add to cart */
body.single-product .quantity .qty,
body.single-product .quantity input.qty {
    min-height: 48px; border-radius: 8px;
}
body.single-product .single_add_to_cart_button.button {
    background: var(--aa-green) !important;
    border: 0 !important; border-radius: 8px !important; color: #fff !important;
    font-weight: 700 !important; text-transform: uppercase; letter-spacing: .04em;
    min-height: 48px; box-shadow: 0 6px 16px rgba(47,125,50,.26);
    transition: background .2s ease, transform .12s ease;
}
body.single-product .single_add_to_cart_button.button:hover { background: var(--aa-green-dark) !important; }
body.single-product .single_add_to_cart_button.button:active { transform: scale(.99); }

/* meta / tags */
body.single-product .product_meta a { color: var(--aa-green); text-decoration: none; }
body.single-product .product_meta a:hover { color: var(--aa-green-dark); text-decoration: underline; }

/* product image never overflows its card */
body.single-product .elementor-element-7a020d0d img,
body.single-product .woocommerce-product-gallery img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

/* ============================================================
   4) RESPONSIVE — tablet (<= 992px): stack to one column
   ============================================================ */
@media (max-width: 992px) {
    body.single-product .elementor-element-3c14dab5 > .elementor-container {
        flex-wrap: wrap;
    }
    body.single-product .elementor-element-7a020d0d,
    body.single-product .elementor-element-4fef849b {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    body.single-product .elementor-element-7a020d0d { margin-bottom: 24px; }
    body.single-product .elementor-element-7a020d0d > .elementor-widget-wrap { padding: 20px !important; }
    body.single-product .elementor-element-4fef849b > .elementor-widget-wrap { padding: 28px 26px !important; }
}

/* ============================================================
   5) RESPONSIVE — mobile (<= 767px)
   ============================================================ */
@media (max-width: 767px) {
    body.single-product .product_title.entry-title {
        font-size: 24px !important;
        text-align: center;
    }
    body.single-product .elementor-element-4fef849b > .elementor-widget-wrap { padding: 22px 18px !important; }
    body.single-product .elementor-element-7a020d0d > .elementor-widget-wrap { padding: 14px !important; }

    /* price + section headings centered */
    body.single-product .elementor-element-1b9cc1c2,
    body.single-product .elementor-element-5201bff,
    body.single-product .elementor-element-4d5f6b7,
    body.single-product .elementor-element-ca407d9 { text-align: center; }

    /* special offer text a touch smaller */
    body.single-product .wcx-tiers-wrap { padding: 12px 14px !important; }
    body.single-product .wcx-tiers-text { font-size: 14px; }

    /* quantity + add-to-cart: full width, stacked and comfortable */
    body.single-product .elementor-add-to-cart form.cart,
    body.single-product form.cart {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    body.single-product form.cart .quantity {
        flex: 0 0 auto;
    }
    body.single-product .single_add_to_cart_button.button {
        flex: 1 1 100%;
        width: 100% !important;
        padding: 14px 18px !important;
    }

    /* payment buttons full width */
    body.single-product .elementor-add-to-cart .paypal-buttons,
    body.single-product #wc-stripe-payment-request-wrapper,
    body.single-product .wc-stripe-product-payment-request { width: 100% !important; }

    /* wishlist centered */
    body.single-product .elementor-element-073c84a { text-align: center; }

    /* meta centered */
    body.single-product .product_meta { text-align: center; font-size: 13px; }

    /* ---- tabs: WRAP so every tab (incl. Extra Info tabs) is visible ---- */
    body.single-product .elementor-element-39cc2630 .woocommerce-tabs,
    body.single-product .woocommerce-tabs { overflow: visible !important; }
    body.single-product .woocommerce-tabs ul.wc-tabs,
    body.single-product .woocommerce-tabs .tabs-nav {
        display: flex !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
        gap: 6px;
        max-height: none !important;
    }
    body.single-product .woocommerce-tabs ul.wc-tabs li,
    body.single-product .woocommerce-tabs .tabs-nav li {
        display: block !important;
        visibility: visible !important;
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
    }
    body.single-product .woocommerce-tabs ul.wc-tabs li a { white-space: nowrap; }
    body.single-product .woocommerce-tabs .tab-content { padding: 20px 18px !important; }

    /* related products slider */
    body.single-product #sp-woo-product-slider-pro24150 .wpsp-product-img { max-height: 120px; }
}

/* ============================================================
   6) RESPONSIVE — small phones (<= 480px)
   ============================================================ */
@media (max-width: 480px) {
    body.single-product .product_title.entry-title { font-size: 21px !important; }
    body.single-product .elementor-element-4fef849b > .elementor-widget-wrap { padding: 18px 14px !important; }
    body.single-product .wcx-swatch { min-width: 52px; padding: 8px 12px; font-size: 13px; }
    body.single-product .single_add_to_cart_button.button { font-size: 14px !important; letter-spacing: .03em; }
    body.single-product .elementor-element-1b9cc1c2 .woocommerce-Price-amount { font-size: 22px; }
}

/* ============================================================
   TABS FIX — the theme forces nowrap + overflow:auto at <=992px,
   which hides the extra "Extra Info" tabs behind a hidden scroll.
   Force the tab nav to WRAP so every tab is visible on tablet + mobile.
   ============================================================ */
@media (max-width: 992px) {
    body.single-product .elementor-element-39cc2630 .woocommerce-tabs,
    body.single-product .woocommerce-tabs { overflow: visible !important; }
    body.single-product .woocommerce-tabs.horizontal .wc-tabs,
    body.single-product .woocommerce-tabs ul.wc-tabs,
    body.single-product .woocommerce-tabs .tabs-nav {
        display: flex !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
        white-space: normal !important;
        gap: 6px;
        max-height: none !important;
    }
    body.single-product .woocommerce-tabs ul.wc-tabs li,
    body.single-product .woocommerce-tabs .tabs-nav li {
        display: block !important;
        visibility: visible !important;
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
    }
    body.single-product .woocommerce-tabs ul.wc-tabs li a { white-space: nowrap; }
}
