/*
 Theme Name:   SplideJS - GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      1.0
*/
@media (min-width:768px){
  :root {
	  --mm-container-width: 750px;
  }
}
@media (min-width:992px){
  :root {
	  --mm-container-width: 970px;
	}
}
@media screen and (max-width: 1799px) {
  :root {
	--mm-container-width: 100%;
  }
}
@media (min-width:1800px){
  :root {
	--mm-container-width: 1740px;
  }
}
body.single.single-post #content.site-content {
width:100%;max-width:1240px;margin-left: auto;margin-right: auto;
}
/*fix logo height*/
header.gb-site-header img.gb-media-b55976f4{height:65px;}
/* Pagination Static Position */
.dotbottom .splide__pagination {
	position:static;
	margin:10px 0;
}
.dotbottom .splide__pagination__page.is-active {
	background: #ccc;
}

/*Product Filter Form*/
/* Outer container */
.product-filter {
    border-radius: 6px;
    background-color: #ffffff;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
    border: 1px solid #ccc;
    padding: 20px;
    width: 100%;
    font-family: sans-serif;
    margin-bottom: 20px;
}
h4.filter-header:before {
    display: inline-block;
    float: left;
    content: " ";
    width: 4px;
    background-color: #fff;
    height: 24px;
    margin-right: 10px;
}
h4.filter-header::after {
   content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2z'/%3E%3C/svg%3E");
  display: inline-block;
  margin-left: auto;
  vertical-align: middle;

}

/* Section headers */
.filter-header {
    background-color: #262b3c;
    color: #fff;
    font-weight: bold;
    padding: 10px 15px;
    font-size: 18px;
    margin: -20px -20px 20px -20px;
    display: flex;
    
    align-items: center;
}

/* Group spacing */
.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.filter-group input[type="text"],.product-filter .filter-group select ,.product-filter .attr-filter .filter-search-input{
    width: 100%;
    padding: 6px 12px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

/* Price and size headings */
.filter-group-header span {
    font-weight: bold;
    display: block;
    padding: 6px 10px;
    color: #333;
    border-radius: 4px;
}

/* Checkboxes */
.filter-options label {
    display: block;
    margin-bottom: 6px;
    font-weight: normal;
    color: #111;
}

.filter-options input[type="checkbox"] {
    margin-right: 8px;
}

/* Apply button */
.apply-filters {
    display: block;
    width: 100%;
    background-color: #9b59b6;
    color: #fff;
    padding: 10px;
    border: none;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.apply-filters:hover {
    background-color: #8338a3;
}
/* Toggle Arrow */

.filter-group-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    border-radius: 4px;
    justify-content: space-between;
    align-items: center;
	background-color:#e0e0e0;
	margin-bottom: 10px;
}
.filter-group-header.collapsible .toggle-arrow {
    font-size: 16px;
    transition: transform 0.3s ease;
}

/* Collapsed state */
.filter-options.collapsed {
    display: none;
}

.filter-group-header.collapsible.collapsed .toggle-arrow {
    transform: rotate(-90deg);
}


/* Variations */

td.value input[type="radio"] {
    appearance: none;
    display: none;
}
td.value label {
    font-size: 13px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: inherit;
    text-align: center;
    border-radius: 5px;
    overflow: hidden;
    transition: linear 0.3s;
    color: var(--radio-color);
    padding: 8px 10px;
    border: 1px solid #e1dde7;
    cursor: pointer;
	line-height: 1em;
	font-weight: normal!important;
}
td.value input[type="radio"]:checked + label {
    background-color: var(--accent);
	border: 1px solid var(--accent);
    color: #fff;
    transition: 0.3s;
}
a.reset_variations {
    display: none!important;
}

table.variations {
	padding: 10px 0 15px!important;
	border-bottom: 1px solid #e1dde7!important;
	border-top: 1px solid #e1dde7!important;
	border-radius: 0;
	position: relative;
	margin-bottom:15px!Important;
}
table.variations tbody {
	display:flex;
	flex-direction:column;
	flex-wrap: wrap;
	column-gap: 10px;
	row-gap: 10px;
}
table.variations tbody tr {
	display: grid;              /* 用 grid 最直观 */
    grid-template-columns: 1fr; /* 单列：label 一行、选项一行 */
    row-gap: 6px;
}

/* 选项容器走横向排列，不再竖排 */
td.value .lc-attr-radios{
  display: flex;
  flex-wrap: wrap;            /* 一行放不下就换行 */
  gap: 8px;
}

/* 每个选项“药丸”是内联弹性盒，不占满整行 */
td.value .lc-attr-radio{
  display: inline-flex;       /* 确保不变成 100% 宽的块 */
  width: auto;
}

/* 选项按钮的 label 也不要占满整行 */
td.value .lc-attr-radio > label{
  display: inline-flex;       /* 维持你原来的居中排版 */
  width: auto;
}
table.variations tbody tr td {
	padding:0;
}

table.variations tbody tr td.value {
    display: block;             /* 覆盖你之前的 display:flex; */
    width: 100%;
}
.woocommerce-variation-description p {
	font-size:13px;
	margin-bottom:5px;
	line-height:1.4em;
}
.woocommerce div.product form.cart .variations select {
	max-width: 100%;
	appearance: none;
	background-image: url(images/chevron-down.svg);
	background-repeat: no-repeat;
	border: none!Important;
	font-size:13px!important;
	margin-bottom:0!important;
	border:1px solid #E6E9ED!Important;
	padding: 16px 50px 10px 15px!Important;
	background-position: 93% center;
}
.reset_variations {
	/*position: absolute;
	right: 20px;
	top: -11px;*/
	background: #FF0000;
	line-height: 1em;
	color: #fff;
	padding: 4px 8px 4px 21px;
	border-radius: 50px;
	font-weight: bold;
	background-image: url(images/reset.svg);
	background-repeat: no-repeat;
	background-position: 10px center;
    font-size: 10px!Important;
    background-size: 7px auto;
}
.reset_variations:hover {
	background-color:#000;
	color:#fff!Important;
}
.woocommerce-variation-price {
	margin-bottom:15px;
}
.woocommerce-variation-price {
	font-weight: bold;
	margin:0 0 20px;
}
.woocommerce div.product form.cart .variations th.label {
    line-height: 1.5em;
    padding: 0;
    margin-bottom: 5px;
    z-index: 9;
	font-size:14px;
    text-align: left;
}


.widget.woocommerce.widget_product_categories {
  border-right: 2px solid #0e0e0e2e;  /* 右侧竖线 */
}
.inside-left-sidebar .widget.woocommerce.widget_product_categories{
    padding: 20px;

}
.inside-left-sidebar .widget_product_categories h3{
    margin-bottom: 10px;
}

.widget_product_categories .product-categories > li {
  position: relative; /* 伪类定位 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  margin-bottom: 0;
}
/* hover 下划线（通过伪类实现） */
.widget_product_categories .product-categories > li::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background-color: #757575;
  opacity: 0;
}


/* 只有 hover 时显示线条 */
.widget_product_categories .product-categories > li:hover::after {
  opacity: 1;
}
/* 链接 */
.widget_product_categories .product-categories a {
  text-decoration: none;
  color: #111;
  font-size: 18px;
  line-height: 1.2;
}
ul.foot-links{
    list-style: none;
		margin-left:0;
		margin-bottom:0;
}
ul.foot-links li {
	margin-bottom: .5em;
}
ul.foot-links li a {
	color:var(--base-3);
	text-decoration: none;
}

.dynamic-entry-content img {
  display: block;        
  max-width: 70%;        
  height: auto;         
  margin: 0 auto;      
}

.site-footer .gb-media-523fc2a2 {
    height: auto;
	margin:0 auto 20px;
    max-width: 60% !important;
    object-fit: cover;
    width: auto;
}
@media (max-width: 768px) {
	.header-item-search{display:none!important;}
	.header-acc-icon {display:none!important;}
}

/* ================================================ */
/* MMB Product Page Improvements v3 - Scoped Only   */
/* ONLY targets body.single-product elements        */
/* Does NOT affect global layout or other pages     */
/* ================================================ */

/* 1. Add to Cart - deep green, full width, prominent like reference design */
body.single-product .single_add_to_cart_button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px 30px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    background-color: #2d6a4f !important;
    border: none !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    display: block !important;
}
body.single-product .single_add_to_cart_button:hover {
    background-color: #1b4332 !important;
}

/* 2. Wishlist heart button - more visible with border */
body.single-product .tinvwl_add_to_wishlist_button,
body.single-product .tinv-wishlist .tinvwl_add_to_wishlist_button {
    width: 100% !important;
    text-align: center !important;
    margin-top: 8px !important;
    padding: 10px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    background: #f9f9f9 !important;
    display: block !important;
}
body.single-product .tinvwl_add_to_wishlist_button:hover,
body.single-product .tinv-wishlist .tinvwl_add_to_wishlist_button:hover {
    background: #eee !important;
}

/* 3. Hide Tags/Categories/SKU metadata - keeps page clean */
body.single-product .product_meta {
    display: none !important;
}

/* 4. Price - larger and bolder */
body.single-product .summary p.price {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1a2744 !important;
    margin-bottom: 10px !important;
}
body.single-product .summary p.price del {
    color: #999 !important;
    font-size: 20px !important;
}
body.single-product .summary p.price ins {
    text-decoration: none !important;
    color: #1a2744 !important;
}

/* 5. SALE badge - red and prominent */
body.single-product .onsale {
    background-color: #e74c3c !important;
    color: #fff !important;
    font-weight: 700 !important;
    padding: 6px 14px !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
}

/* 6. Tabs - cleaner styling with navy accent */
body.single-product .woocommerce-tabs ul.tabs {
    border-bottom: 2px solid #1a2744 !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
}
body.single-product .woocommerce-tabs ul.tabs li {
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.single-product .woocommerce-tabs ul.tabs li a {
    font-weight: 600 !important;
    color: #666 !important;
    padding: 12px 20px !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
}
body.single-product .woocommerce-tabs ul.tabs li.active a {
    color: #1a2744 !important;
    border-bottom: 3px solid #1a2744 !important;
}

/* 7. Related products heading - centered */
body.single-product .related.products > h2 {
    text-align: center !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1a2744 !important;
    margin-bottom: 25px !important;
}

/* 8. Copy link button - subtle text style */
body.single-product .copy-link-btn,
body.single-product [class*="copy-link"] {
    background: transparent !important;
    border: none !important;
    color: #666 !important;
    font-size: 13px !important;
    padding: 4px 0 !important;
    text-decoration: underline !important;
}

/* 9. Mobile responsive */
@media (max-width: 768px) {
    body.single-product .single_add_to_cart_button {
        font-size: 15px !important;
        padding: 14px 20px !important;
    }
}

/* === END MMB Product Page Improvements v3 === */


/* === MMB Product Page Redesign v4 === */

/* Accordion Trigger Button */
.mmb-accordion-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    background: #F4F7FB;
    border: 1px solid #E0E4ED;
    border-radius: 8px;
    margin-bottom: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #1E2A44;
    transition: all 0.2s ease;
    text-align: left;
}
.mmb-accordion-trigger:hover {
    background: #E8E3F8;
    border-color: #4A5BDC;
}
.mmb-accordion-trigger.active {
    background: #4A5BDC;
    color: #fff;
    border-color: #4A5BDC;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}
.mmb-accordion-icon {
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
}
.mmb-accordion-trigger.active .mmb-accordion-icon {
    color: #fff;
}

/* Accordion Content */
.mmb-accordion-content {
    display: none;
    padding: 20px;
    background: #fff;
    border: 1px solid #E0E4ED;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-bottom: 12px;
}
.mmb-accordion-content.active {
    display: block;
}

/* Hide original WooCommerce tabs nav */
.woocommerce-tabs ul.tabs {
    display: none !important;
}

/* Add to Cart Button - Blue Purple */
.single_add_to_cart_button,
button.single_add_to_cart_button,
.woocommerce div.product form.cart .button {
    background-color: #4A5BDC !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 14px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    width: 100% !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease !important;
}
.single_add_to_cart_button:hover,
button.single_add_to_cart_button:hover,
.woocommerce div.product form.cart .button:hover {
    background-color: #3A4BC0 !important;
}

/* WooPay + Google Pay 50/50 Layout */
#wc-stripe-payment-request-wrapper,
.wc-stripe-payment-request-wrapper {
    display: flex !important;
    gap: 0 !important;
    width: 100% !important;
}
#wc-stripe-payment-request-wrapper > *,
.wc-stripe-payment-request-wrapper > * {
    flex: 1 !important;
    min-width: 0 !important;
}

/* Review Stars Yellow */
.star-rating span::before,
.star-rating::before,
.woocommerce .star-rating span::before {
    color: #FFB800 !important;
}
.star-rating::before,
.woocommerce .star-rating::before {
    color: #E0E0E0 !important;
}
p.stars a {
    color: #FFB800 !important;
}

/* Product page general cleanup */
.woocommerce-tabs {
    margin-top: 20px !important;
}

/* === END MMB Product Page Redesign v4 === */


/* ================================================================
   MMB MASTER MOBILE RESPONSIVE FIX v2 - All Pages
   ================================================================ */

/* GLOBAL */
@media (max-width: 1024px) {
    html, body { overflow-x: hidden !important; max-width: 100vw !important; }
    * { box-sizing: border-box !important; }
    img, video, iframe, embed, object, table { max-width: 100% !important; }
}

@media (max-width: 768px) {

    /* HEADER */
    .gb-site-header, .site-header, header.site-header {
        padding: 10px 16px !important;
        overflow-x: hidden !important;
    }
    .gb-media-b55976f4 { height: 45px !important; width: auto !important; }
    .gb-element-e02a04b5 { gap: 6px !important; }
    .wp-block-search__label.screen-reader-text {
        width: 1px !important; max-width: 1px !important; overflow: hidden !important;
    }

    /* FOOTER */
    .gb-element-3bf6757b {
        grid-template-columns: 1fr !important;
        row-gap: 32px !important;
    }
    .gb-element-75bd7a52 { padding: 30px 16px !important; }
    .gb-element-af2868bc { justify-content: center !important; gap: 10px !important; }
    .foot-links, .gb-text.foot-links { column-count: 2 !important; column-gap: 12px !important; font-size: 13px !important; }
    .gb-element-e040ac36 { flex-direction: column !important; align-items: center !important; text-align: center !important; gap: 8px !important; }

    /* SHOP */
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 0 8px !important;
    }
    .woocommerce ul.products li.product { width: 100% !important; margin: 0 !important; }
    .woocommerce-ordering, .woocommerce-result-count { width: 100% !important; text-align: center !important; }
    .woocommerce-ordering select { width: 100% !important; }

    /* PRODUCT PAGE */
    .woocommerce div.product { display: flex !important; flex-direction: column !important; }
    .woocommerce div.product div.images { float: none !important; width: 100% !important; margin-bottom: 20px !important; }
    .woocommerce div.product div.summary { float: none !important; width: 100% !important; padding: 0 !important; }
    .woocommerce div.product h1.product_title { font-size: 22px !important; line-height: 1.3 !important; }
    body.single-product .summary p.price { font-size: 24px !important; }

    /* Pay row */
    .mmb-pay-row { flex-direction: column !important; width: 100% !important; gap: 8px !important; }
    .mmb-pay-row > * { width: 100% !important; min-width: 0 !important; }
    #wcpay-woopay-button,
    .wcpay-express-checkout-wrapper:not(.mmb-hidden),
    .woopay-express-checkout-wrapper:not(.mmb-hidden) { display: block !important; width: 100% !important; }

    /* Sticky add-to-cart */
    #wc-sticky-cart-panel, .add-to-cart-panel {
        position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important;
        width: 100% !important; z-index: 9999 !important; box-sizing: border-box !important;
    }

    /* Chaty */
    body.single-product .chaty-widget,
    body.single-product [class*="chaty-widget"] { bottom: 110px !important; z-index: 9998 !important; }
    body:not(.single-product) .chaty-widget,
    body:not(.single-product) [class*="chaty-widget"] { bottom: 20px !important; }

    /* Reviews */
    .mmb-reviews-section { display: block !important; width: 100% !important; overflow: hidden !important; }
    .mmb-review-cards, .mmb-review-cards-wrapper {
        display: flex !important; flex-direction: column !important;
        width: 100% !important; gap: 16px !important; overflow: hidden !important;
    }
    .mmb-review-card { width: 100% !important; min-width: unset !important; max-width: 100% !important; flex: 0 0 auto !important; }

    /* Trust dashboard */
    .mmb-trust-dashboard { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
    .mmb-trust-item { width: 100% !important; }

    /* Related products */
    .related.products ul.products { grid-template-columns: repeat(2, 1fr) !important; }

    /* CART - WC Blocks */
    .wc-block-cart-items__row {
        display: flex !important; flex-direction: row !important;
        align-items: flex-start !important; gap: 12px !important;
        padding: 16px 0 !important; flex-wrap: nowrap !important;
    }
    .wc-block-cart-item__image,
    .wc-block-components-order-summary-item__image {
        flex: 0 0 72px !important; width: 72px !important;
        min-width: 72px !important; max-width: 72px !important;
    }
    .wc-block-cart-item__image img,
    .wc-block-components-order-summary-item__image img {
        width: 72px !important; height: 72px !important; object-fit: cover !important; border-radius: 6px !important;
    }
    .wc-block-cart-item__description,
    .wc-block-components-order-summary-item__description,
    .wc-block-cart-item__wrap { flex: 1 1 auto !important; min-width: 0 !important; word-break: break-word !important; }
    .wc-block-cart__submit-button,
    .wc-block-components-checkout-place-order-button { width: 100% !important; padding: 16px !important; font-size: 16px !important; }

    /* CART - Classic WC */
    .woocommerce-cart-form__cart-item .product-thumbnail { width: 72px !important; min-width: 72px !important; }
    .woocommerce-cart-form__cart-item .product-thumbnail img { width: 72px !important; height: auto !important; }

    /* Coupon */
    .wc-block-components-coupon, .coupon { width: 100% !important; }
    .wc-block-components-coupon input, .coupon input.input-text { width: 100% !important; margin-bottom: 8px !important; }

    /* CHECKOUT */
    .woocommerce-checkout #customer_details,
    .woocommerce-checkout .col2-set,
    .woocommerce-checkout .col-1,
    .woocommerce-checkout .col-2 { float: none !important; width: 100% !important; }
    .wp-block-woocommerce-checkout { padding: 0 8px !important; }
    .wc-block-checkout__main, .wc-block-checkout__sidebar { padding: 0 !important; width: 100% !important; }
    .wc-block-components-address-form input,
    .wc-block-components-text-input input,
    .wc-block-components-select select { width: 100% !important; font-size: 16px !important; }
    .wc-block-components-checkout-place-order-button { width: 100% !important; padding: 16px !important; }
    .wc-block-components-express-payment,
    .wc-block-components-express-payment__event-buttons { width: 100% !important; }
    .wc-block-components-express-payment__event-buttons button { width: 100% !important; margin-bottom: 8px !important; }

} /* end 768px */

@media (max-width: 480px) {
    .woocommerce ul.products { grid-template-columns: 1fr 1fr !important; gap: 8px !important; padding: 0 4px !important; }
    .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 12px !important; }
    .woocommerce ul.products li.product .price { font-size: 13px !important; }
    .foot-links, .gb-text.foot-links { column-count: 1 !important; }
    .mmb-trust-dashboard { grid-template-columns: 1fr !important; }
    #wc-sticky-cart-panel .mmb-sticky-title {
        font-size: 13px !important; white-space: nowrap !important;
        overflow: hidden !important; text-overflow: ellipsis !important; max-width: 55vw !important;
    }
    .woocommerce div.product h1.product_title { font-size: 19px !important; }
    .wc-block-components-address-form .wc-block-components-address-form__first-name,
    .wc-block-components-address-form .wc-block-components-address-form__last-name {
        width: 100% !important; flex: 0 0 100% !important;
    }
} /* end 480px */

/* LOYALTY POINTS - HIDE GLOBALLY */
.wc-points-rewards-product-message,
.woocommerce-points-and-rewards-message,
.wc-points-rewards-message,
.wlpr-message, .wlpr-points-message,
.wlpr-earn-message, .wlpr-notice,
[class*="wlpr-"], [id*="wlpr-"],
.woocommerce-info.wc-points-rewards,
p.wc-points-rewards {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* === END MMB MASTER MOBILE FIX v2 === */


/* ================================================================
   MMB OVERFLOW PRECISION FIX v3
   Fixes: product gallery overflow + review card fixed width
   ================================================================ */

/* Product gallery - clip the 2000%-wide Splide/Flexslider wrapper */
/* NOTE: Use overflow-x only on inner elements so the action bar above (top:-32px) is NOT clipped */
.woocommerce-product-gallery .flex-viewport,
.woocommerce-product-gallery .flexslider,
.woocommerce-product-gallery .splide__track,
.woocommerce-product-gallery .splide__list,
.woocommerce-product-gallery__wrapper {
    overflow: hidden;
    max-width: 100%;
}
/* Gallery outer container - desktop: keep original overflow */
.woocommerce-product-gallery {
    position: relative;
    max-width: 100%;
}

/* Review cards - remove fixed width, use fluid width */
.mmb-review-card {
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.mmb-review-cards-wrapper,
.mmb-review-cards {
    overflow: hidden !important;
    max-width: 100% !important;
}

/* Global safety net - any element with fixed px width that could overflow */
@media (max-width: 768px) {
    .mmb-review-card {
        width: calc(100vw - 32px) !important;
        min-width: unset !important;
        max-width: 100% !important;
    }
    /* Gallery on mobile */
    .woocommerce-product-gallery {
        width: 100% !important;
        max-width: 100% !important;
    }
    .woocommerce-product-gallery__image {
        max-width: 100% !important;
    }
    .woocommerce-product-gallery__image img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }
}

/* === END MMB OVERFLOW PRECISION FIX v3 === */


/* ================================================================
   MMB REVIEW GRID OVERFLOW FIX v4
   Fix: .mmb-review-grid uses repeat(5, minmax(0,1fr)) on desktop
   but cards overflow on screens < 1265px because minmax(0,1fr)
   still allows cards to be wider than the grid column.
   Also: no mobile breakpoint for 768px in the snippet.
   ================================================================ */

/* Force review grid to use fluid columns that never overflow */
.mmb-review-grid {
    overflow: hidden !important;
    max-width: 100% !important;
}
.mmb-review-card {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
}
.mmb-review-top,
.mmb-review-layout,
.mmb-trust-inner {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Tablet: 3 columns */
@media (max-width: 900px) {
    .mmb-review-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* Mobile: 2 columns */
@media (max-width: 768px) {
    .mmb-review-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    .mmb-review-card {
        width: 100% !important;
        min-width: 0 !important;
    }
    .mmb-trust-inner {
        overflow: hidden !important;
        max-width: 100vw !important;
    }
    .mmb-trust-dashboard {
        overflow: hidden !important;
        max-width: 100% !important;
    }
}

/* Small mobile: 1 column */
@media (max-width: 480px) {
    .mmb-review-grid {
        grid-template-columns: 1fr !important;
    }
}

/* === END MMB REVIEW GRID OVERFLOW FIX v4 === */


/* ================================================================
   MMB REVIEW CARD FINAL FIX v5
   Override old custom-styles.css .mmb-review-card{min-width:400px}
   and inline style min-width:320px
   These are remnants of the old horizontal scroll card design.
   ================================================================ */

/* High specificity override - must beat custom-styles.css */
body .mmb-review-card,
body.single-product .mmb-review-card,
.mmb-trust-dashboard .mmb-review-card,
.mmb-trust-inner .mmb-review-card,
.mmb-review-grid .mmb-review-card {
    min-width: 0 !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    min-height: unset !important;
    flex-direction: column !important;
    scroll-snap-align: unset !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Also override the inline style by using !important on the grid item */
.mmb-review-grid > .mmb-review-card {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* === END MMB REVIEW CARD FINAL FIX v5 === */


/* ================================================================
   MMB FOOTER GRID FIX v6
   Footer grid .gb-element-3bf6757b has fixed column widths
   (240+170+170+170+320 = 1070px) + gaps (4x51=204px) = 1274px
   but parent is only 1265px → 9px overflow.
   Fix: use fluid columns that fit within parent.
   ================================================================ */

/* Footer grid - use fluid columns, centered */
.gb-element-3bf6757b {
    grid-template-columns: 240px 170px 170px 170px minmax(0, 395px) !important;
    gap: 30px !important;
    overflow: hidden !important;
    max-width: 1265px !important;
    box-sizing: border-box !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Also ensure footer wrapper doesn't overflow */
.footer-pro,
.gb-element-ccba8a69,
.site-footer {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* Mobile footer - stack columns */
@media (max-width: 768px) {
    .gb-element-3bf6757b {
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
    }
    .gb-element-1a422a3b {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 480px) {
    .gb-element-3bf6757b {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

/* === END MMB FOOTER GRID FIX v6 === */


/* ================================================================
   MMB HOMEPAGE FEATURED SLIDER FIX v7
   .mmb-featured-section has overflow:hidden but
   .mmb-featured-wrapper (child) has overflow:visible, allowing
   the scrollable slider to contribute to body scrollWidth.
   Fix: ensure the wrapper clips its overflow too.
   ================================================================ */

.mmb-featured-wrapper {
    overflow: hidden !important;
    max-width: 100% !important;
}

.mmb-featured-slider {
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

/* Also ensure the section itself clips */
.mmb-featured-section {
    overflow: hidden !important;
    max-width: 100% !important;
}

/* === END MMB HOMEPAGE FEATURED SLIDER FIX v7 === */


/* ================================================================
   MMB HOMEPAGE FEATURED SLIDER FIX v8 - FINAL
   The .mmb-featured-slider has overflow:auto which allows internal
   cards to overflow beyond the slider's own right edge (1205px),
   causing body scrollWidth to be 1276px.
   Fix: clip the slider and its parent strictly.
   ================================================================ */

.mmb-featured-section,
.mmb-featured-wrapper {
    overflow: hidden !important;
    max-width: 100% !important;
}

.mmb-featured-slider {
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    max-width: 100% !important;
    /* Clip any card that extends beyond the slider boundary */
    clip-path: none;
}

/* Ensure the new arrivals grid also doesn't overflow */
.mmb-new-arrivals-grid,
.mmb-new-arrivals-section {
    overflow: hidden !important;
    max-width: 100% !important;
}

/* Global safety net for body - prevent any horizontal scroll */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* === END MMB HOMEPAGE FEATURED SLIDER FIX v8 === */


/* ================================================================
   MMB FINAL MOBILE FIX v9 - PRODUCT PAGE RELATED PRODUCTS OVERFLOW
   Audit date: 2026-03-28
   Issue: Product page body scrollWidth = 1394px on mobile 390px
   Cause: Related/upsell products grid renders as multi-column
          Each product card overflows to right=685px and right=1394px
   Fix: Force related products to 2-col on mobile, add overflow guard
   ================================================================ */

@media (max-width: 768px) {

    /* === PRODUCT PAGE: Related & Upsell products === */
    .related.products,
    .upsells.products,
    .cross-sells {
        overflow: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .related.products ul.products,
    .upsells.products ul.products,
    .cross-sells ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .related.products ul.products li.product,
    .upsells.products ul.products li.product,
    .cross-sells ul.products li.product {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    /* === SHOP PAGE: Ensure product grid is properly contained === */
    .woocommerce .products,
    .woocommerce ul.products {
        overflow: hidden !important;
        max-width: 100% !important;
    }

    /* === HOMEPAGE: Footer columns - 2 column layout for better readability === */
    .gb-grid-wrapper.gb-grid-wrapper-footer,
    .site-footer .gb-grid-wrapper {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px !important;
    }

    /* === PRODUCT PAGE: Sticky cart panel - ensure it doesn't overflow === */
    #wc-sticky-cart-panel {
        max-width: 100vw !important;
        overflow: hidden !important;
    }

    /* === CONTACT FORM on product page: prevent overlap with other elements === */
    .mmb-contact-section,
    [class*="contact-form"],
    .fluentform-wrapper {
        position: relative !important;
        z-index: 1 !important;
        clear: both !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* === PRODUCT PAGE: WooCommerce payment buttons (Apple Pay, Google Pay) === */
    .wc-block-components-express-payment {
        display: block !important;
        width: 100% !important;
    }
    .wc-block-components-express-payment__event-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .wc-block-components-express-payment__event-buttons button,
    .wc-block-components-express-payment__event-buttons .wc-block-components-express-payment-button {
        width: 100% !important;
        min-height: 48px !important;
    }

    /* === REVIEWS: Ensure review section doesn't overflow === */
    .mmb-reviews-section {
        overflow: hidden !important;
        max-width: 100% !important;
    }

    /* === GENERAL: All images responsive === */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* === TABLES: Make all tables scrollable on mobile === */
    .woocommerce table,
    table.shop_table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {

    /* === PRODUCT PAGE: Related products single column on very small screens === */
    .related.products ul.products,
    .upsells.products ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* === HOMEPAGE: Category grid - 2x2 on small phones === */
    .mmb-category-grid,
    .wp-block-columns.mmb-categories {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* === PRODUCT PAGE: Product title smaller on tiny screens === */
    .woocommerce div.product h1.product_title {
        font-size: 17px !important;
        line-height: 1.3 !important;
    }

    /* === CART: Ensure cart totals are full width === */
    .cart_totals,
    .wc-block-cart__totals {
        width: 100% !important;
        float: none !important;
    }
}

/* === END MMB FINAL MOBILE FIX v9 === */

/* ================================================================
   MMB FIX v10 - WOOCS shortcode text + Gallery mobile
   ================================================================ */

/* Fix 1: Hide unrendered [woocs sd=1] shortcode text in header
   When WOOCS plugin is inactive, shortcode renders as raw <p> text */
.gb-element-1a210a23 > p:only-child,
.gb-element-1a210a23 p:only-child {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}







/* ================================================================
   MMB MOBILE GALLERY FIX - FINAL CLEAN VERSION
   Only applies on mobile (max-width: 768px)
   Desktop is completely unaffected
   ================================================================ */
@media (max-width: 768px) {
    /* Switch gallery from side-by-side to stacked column layout */
    .woocommerce-product-gallery {
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }
    /* Main image viewport */
    .woocommerce-product-gallery .flex-viewport {
        width: 100% !important;
        min-height: 280px !important;
        overflow: hidden !important;
        order: 1 !important;
        display: block !important;
    }
    /* Gallery wrapper */
    .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
        width: 100% !important;
        overflow: hidden !important;
        height: auto !important;
        max-height: none !important;
    }
    /* Each image slide */
    .woocommerce-product-gallery .woocommerce-product-gallery__image {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        height: auto !important;
        display: block !important;
    }
    .woocommerce-product-gallery .woocommerce-product-gallery__image img,
    .woocommerce-product-gallery .wp-post-image {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
    }
    /* Thumbnails - horizontal scrollable row below main image */
    .woocommerce-product-gallery .flex-control-thumbs {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        width: 100% !important;
        height: 76px !important;
        max-height: 80px !important;
        gap: 6px !important;
        padding: 8px 4px !important;
        order: 2 !important;
        -webkit-overflow-scrolling: touch !important;
        box-sizing: border-box !important;
    }
    .woocommerce-product-gallery .flex-control-thumbs li {
        flex-shrink: 0 !important;
        width: 60px !important;
        height: 60px !important;
        margin: 0 !important;
    }
    .woocommerce-product-gallery .flex-control-thumbs li img {
        width: 60px !important;
        height: 60px !important;
        object-fit: cover !important;
    }
    /* Action bar (Copy link + Share) */
    #mmb-gallery-action-bar {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        justify-content: flex-end !important;
        order: 0 !important;
        margin-bottom: 8px !important;
    }
}
/* === END MMB MOBILE GALLERY FIX FINAL === */
