/*
Theme Name: Newsy
Version: 1.0.1
Theme URI: https://demo.akbilisim.com/newsy
Description: A basic starter child theme for customization purpose of Newsy theme.
Author: akbilisim
Author URI: http://themeforest.net/user/akbilisim?ref=akbilisim
Template: newsy
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* Lock gallery inner wrapper to square aspect ratio — prevents flexslider reflow on window.load */
.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery__wrapper .flex-viewport {
    aspect-ratio: 1 / 1;
}

/* Override WC JS inline height on flex-viewport — use !important to beat inline style */
.woocommerce-product-gallery__wrapper .flex-viewport {
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
}

/* Reserve space for Stripe/Google Pay button — keep at 0 to avoid dead space */
.wcpay-express-checkout-wrapper,
#wcpay-express-checkout-wrapper {
    min-height: 0 !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}

/* Kill all gaps from PayPal wrapper */
.ppc-button-wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

.ppcp-messages {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    display: none !important;
}

/* Override PayPal plugin's 14px margin-top on items */
#ppc-button-ppcp-gateway div[class^=item-] {
    margin-top: 4px !important;
}

#ppc-button-ppcp-gateway div[class^=item-]:first-child {
    margin-top: 0 !important;
}

/* Tighten gap between Add to Cart and express buttons */
.woocommerce div.product form.cart {
    margin-bottom: 4px !important;
}

/* Override PayPal plugin's margin-top on dynamically injected buttons */
.ppcp-button-apm {
    margin-top: 4px !important;
}

/* Kill any margin on the PayPal gateway button container */
#ppc-button-ppcp-gateway {
    margin: 0 !important;
    padding: 0 !important;
}

/* Zero out wcpay wrapper bottom space */
.wcpay-express-checkout-wrapper,
#wcpay-express-checkout-wrapper {
    padding: 0 !important;
    margin-bottom: 0 !important;
}

/* Kill stray bullet next to PayPal button */
.wc-block-components-express-payment ul,
.wc-block-components-express-payment li,
.wc-block-express-checkout ul,
.wc-block-express-checkout li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Kill height from WooPayments order attribution custom element */
wc-order-attribution-inputs,
#wcpay-express-checkout__order-attribution-inputs {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Small gap between G Pay and PayPal buttons */
.ppc-button-wrapper {
    margin-top: 6px !important;
}

/* Match Add to Cart button height to PayPal (~48px) */
.woocommerce div.product form.cart .single_add_to_cart_button {
    min-height: 48px !important;
    line-height: 48px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Hide PayPal plugin separator — we have our own "or" above */
.ppcp-button-separator,
#ppcp-button-separator,
.ppc-button-wrapper > .ppcp-separator,
[class*="ppcp"][class*="separator"],
[id*="ppcp"][id*="separator"] {
    display: none !important;
}

/* Hide WooPayments/PayPal injected separator between G Pay and PayPal */
#wcpay-express-checkout-button-separator,
.wcpay-express-checkout-button-separator {
    display: none !important;
}

/* Hide breadcrumbs on product pages */
.single-product .ak-breadcrumb,
.single-product .breadcrumbs {
    display: none !important;
}

/* Hide SKU and Category meta on product pages */
.single-product .product_meta {
    display: none !important;
}

/* Description & Reviews tabs — break out of product column to full container width */
.single-product .woocommerce-tabs {
    clear: both !important;
    float: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    position: relative !important;
}


/* Hide "added to cart" notification on product page */
.single-product .woocommerce-notices-wrapper,
.single-product .woocommerce-message {
    display: none !important;
}

/* Add padding above and below quantity field */
.single-product .quantity {
    margin-top: 15px !important;
    margin-bottom: 15px !important;
}

/* Space between quantity field and Add to Cart button */
.single-product form.cart .quantity {
    margin-bottom: 12px !important;
}

/* Sale price styling — current price red, original price gray */
.single-product .price del {
    color: #999 !important;
    opacity: 0.7 !important;
}
.single-product .price ins {
    color: #e74c3c !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* Align quantity box and Add to Cart button on same line */
.single-product form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}
.single-product form.cart .quantity {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

/* Space between bullet points and quantity box */
.single-product .woocommerce-product-details__short-description {
    margin-bottom: 24px !important;
}

/* Space between bullet points and quantity/add-to-cart form */
.single-product form.cart {
    margin-top: 28px !important;
}

/* Trust badges above Add to Cart */
.mtq-trust-badges {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.mtq-trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #2d6a2d;
    background: #f0faf0;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
    padding: 6px 12px;
    white-space: nowrap;
}
.mtq-trust-badge svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    fill: #2d6a2d;
}

/* Center trust badges on mobile */
@media (max-width: 768px) {
    .mtq-trust-badges {
        justify-content: flex-start;
        width: 100vw !important;
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box !important;
    }
}

/* Pull star rating tight to title, push away from price */
.single-product h1.product_title {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    font-weight: 900 !important;
    letter-spacing: -0.02em !important;
}
.single-product .woocommerce-product-rating {
    margin-top: 0px !important;
    margin-bottom: 36px !important;
}
.single-product .price {
    margin-top: 0 !important;
}

/* 20% OFF label below price */
.single-product .mtq-percent-off {
    color: #e02020 !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    margin: -4px 0 10px !important;
    display: block;
}

/* Guarantee badge — auto-width, centered on its own row */
.mtq-guarantee-wrap {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-top: 6px;
}

/* Desktop: qty + Add to Cart move inside trust-badges via JS (see functions.php footer hook) */
@media (min-width: 769px) {
    /* form.cart becomes a simple block — children handled by trust-badges flex */
    .single-product form.cart {
        display: block !important;
    }
    /* trust-badges is now the flex row container */
    .single-product .mtq-trust-badges {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        margin-bottom: 14px !important;
    }
    /* qty and button moved inside trust-badges via JS */
    .mtq-trust-badges .quantity {
        flex-shrink: 0 !important;
        margin-left: 8px !important;
    }
    .mtq-trust-badges button.single_add_to_cart_button {
        flex: 1 1 auto !important;
        width: auto !important;
        margin: 0 !important;
    }
    /* guarantee stays full-width on row 2 */
    .mtq-trust-badges .mtq-guarantee-wrap {
        flex: 0 0 100% !important;
        margin-top: 4px !important;
    }
}

/* === Site-wide DM Sans override (Boss: 2026-04-17) === */
body,
button,
input,
select,
optgroup,
textarea,
p, a, li, blockquote, cite, em, strong,
h1, h2, h3, h4, h5, h6,
.entry-title, .widget-title, .site-title,
.elementor-widget-container,
.wp-block-heading,
.woocommerce,
.woocommerce div.product .product_title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
    letter-spacing: -0.01em;
}
