/* MAHAMU Catalog Cards 0.1.0 | one WooCommerce listing language everywhere. */
:root{--mh-card-cream:var(--mhui-surface);--mh-card-ink:var(--mhui-ink);--mh-card-gold:var(--mhui-action);--mh-card-line:var(--mhui-border)}
.wc-block-product-template>li.wc-block-product{display:flex!important;flex-direction:column!important;min-width:0;margin:0!important;padding:0!important;border:1px solid var(--mh-card-line);border-radius:13px;overflow:hidden;background:var(--mh-card-cream)}
.wc-block-product-template>li.wc-block-product>.mahamu-catalog-card{--mh-card-pad:22px;display:flex!important;flex:1 1 auto;flex-direction:column!important;align-items:stretch!important;min-width:0;width:100%;box-sizing:border-box;margin:0!important;padding:0 0 22px!important;gap:0!important}
.wc-block-product-template .mahamu-catalog-card>.wp-block-woocommerce-product-image,
.mhx-home .mhx-featured-native .mhx-native-product>.wp-block-woocommerce-product-image{display:block!important;overflow:hidden;width:100%!important;aspect-ratio:1/1!important;margin:0 0 14px!important;padding:0!important;background:var(--mhui-surface)}
.wc-block-product-template .mahamu-catalog-card>.wp-block-woocommerce-product-image>a,
.mhx-home .mhx-featured-native .mhx-native-product>.wp-block-woocommerce-product-image>a{display:block!important;width:100%;height:100%;aspect-ratio:1/1}
.wc-block-product-template .mahamu-catalog-card>.wp-block-woocommerce-product-image img,
.mhx-home.mhx-home .mhx-featured-native .mhx-native-product>.wp-block-woocommerce-product-image img{display:block!important;width:100%!important;height:100%!important;aspect-ratio:1/1!important;object-fit:cover!important;object-position:center!important;margin:0!important}
.wc-block-product-template .mahamu-catalog-card>.wp-block-post-title{margin:0 var(--mh-card-pad) 11px!important;padding:0!important;min-height:2.9em;color:var(--mh-card-ink);font:700 15px/1.45 Inter,"IBM Plex Sans Thai",system-ui,sans-serif!important}
.wc-block-product-template .mahamu-catalog-card>.wp-block-post-title a{color:inherit;text-decoration:none}
.wc-block-product-template .mahamu-catalog-card>.wp-block-post-title a:hover{text-decoration:underline}
.mahamu-card-review-row{display:flex!important;flex-wrap:wrap;align-items:center;gap:7px 9px;min-height:24px;margin:0 var(--mh-card-pad,24px) 11px!important;padding:0!important}
.mahamu-card-review-row>.wc-block-components-product-rating{display:inline-block!important;flex:0 0 auto!important;margin:0!important;padding:0!important;line-height:1!important}
.mahamu-card-review-row .wc-block-components-product-rating__container{margin:0!important}
.mahamu-card-review-row .wc-block-components-product-rating__stars{margin:0!important;line-height:1!important}
.mahamu-review-data{display:inline-flex;align-items:baseline;gap:6px;flex-wrap:wrap;color:var(--mhui-muted);font-size:12px!important;line-height:1.45!important}
.mahamu-review-score{color:var(--mhui-ink);font-size:13px;font-weight:750}
.mahamu-review-out-of{color:var(--mhui-muted);font-size:11px;font-weight:400;margin-left:1px}
.mahamu-review-separator{color:var(--mhui-border)}
.mahamu-review-count{color:var(--mhui-muted)!important;font-size:12px;text-decoration:none!important}
.mahamu-review-count:hover{text-decoration:underline!important;color:var(--mh-card-gold)!important}
.mahamu-review-empty{color:var(--mhui-muted);font-size:12px}
.wc-block-product-template .mahamu-catalog-card>.wp-block-woocommerce-product-price{font-size:18px;font-weight:750;line-height:1.35;margin:0 var(--mh-card-pad) 15px!important;padding:0!important;color:var(--mhui-ink)}
.wc-block-product-template .mahamu-catalog-card .wc-block-components-product-price{font-size:inherit;font-weight:750;color:var(--mhui-ink)}
/* Woo nests the native form in a notices wrapper. This is the real inset owner. */
.wc-block-product-template .mahamu-catalog-card>.wc-block-components-notices,
.mhx-home .mhx-featured-native .mhx-native-product>.wc-block-components-notices{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;align-self:stretch!important;box-sizing:border-box!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;padding:0 var(--mh-card-pad,var(--mhx-card-inset,24px))!important}
.wc-block-product-template .mahamu-catalog-card form.wc-block-add-to-cart-with-options,
.mhx-home .mhx-featured-native .mhx-native-product form.wc-block-add-to-cart-with-options{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;align-items:stretch!important;min-width:0!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;gap:0!important}
.wc-block-product-template .mahamu-catalog-card form .wp-block-woocommerce-add-to-cart-with-options-variation-selector,
.mhx-home .mhx-featured-native .mhx-native-product form .wp-block-woocommerce-add-to-cart-with-options-variation-selector{width:100%!important;margin:0!important;padding:0!important}
.wc-block-product-template .mahamu-catalog-card form .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute>.wp-block-group,
.mhx-home .mhx-featured-native .mhx-native-product form .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute>.wp-block-group{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important;margin:0!important;padding:0!important;width:100%!important;max-width:none!important;min-width:0!important}
.wc-block-product-template .mahamu-catalog-card .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute-name,
.mhx-home .mhx-featured-native .mhx-native-product .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute-name{font-size:12px!important;font-weight:650!important;color:var(--mhui-muted)!important;line-height:1.5}
.wc-block-product-template .mahamu-catalog-card .wc-block-dropdown,
.mhx-home .mhx-featured-native .mhx-native-product .wc-block-dropdown{display:block!important;position:relative;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important}
.wc-block-product-template .mahamu-catalog-card .wc-block-dropdown__fieldset,
.mhx-home .mhx-featured-native .mhx-native-product .wc-block-dropdown__fieldset{display:block!important;box-sizing:border-box!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;background:var(--mhui-surface)!important;border:1px solid var(--mhui-control-border)!important;border-radius:8px!important;overflow:hidden}
.wc-block-product-template .mahamu-catalog-card .wc-block-dropdown__select,
.mhx-home .mhx-featured-native .mhx-native-product .wc-block-dropdown__select{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;min-height:50px!important;margin:0!important;padding:9px 43px 9px 14px!important;background:transparent!important;border:0!important;border-radius:8px!important;appearance:none!important;font:500 14px/1.5 Inter,"IBM Plex Sans Thai",system-ui,sans-serif!important;color:var(--mhui-ink)!important;cursor:pointer}
.wc-block-product-template .mahamu-catalog-card .wc-block-dropdown:after,
.mhx-home .mhx-featured-native .mhx-native-product .wc-block-dropdown:after{content:"";pointer-events:none;position:absolute;right:20px;top:50%;width:8px;height:8px;border-right:1.8px solid var(--mhui-action);border-bottom:1.8px solid var(--mhui-action);transform:translateY(-68%) rotate(45deg)}
.wc-block-product-template .mahamu-catalog-card .wc-block-dropdown:focus-within .wc-block-dropdown__fieldset,
.mhx-home .mhx-featured-native .mhx-native-product .wc-block-dropdown:focus-within .wc-block-dropdown__fieldset{box-shadow:0 0 0 3px rgba(133,105,61,.16)!important}
.wc-block-product-template .mahamu-catalog-card .wc-block-dropdown__select:focus-visible,
.mhx-home .mhx-featured-native .mhx-native-product .wc-block-dropdown__select:focus-visible{outline:3px solid #0354a8!important;outline-offset:-4px!important}
.wc-block-product-template .mahamu-catalog-card form .wc-block-components-product-stock-indicator,
.mhx-home .mhx-featured-native .mhx-native-product form .wc-block-components-product-stock-indicator{display:block!important;min-height:20px!important;margin:12px 0 17px!important;padding:0!important;font-size:12px!important;line-height:1.45!important;color:var(--mhui-muted)!important}
.wc-block-product-template .mahamu-catalog-card form .wp-block-group.is-layout-flex,
.mhx-home .mhx-featured-native .mhx-native-product form .wp-block-group.is-layout-flex{display:block!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;margin-top:auto!important;padding:0!important}
.wc-block-product-template .mahamu-catalog-card form .wc-block-add-to-cart-with-options__quantity-selector,
.mhx-home .mhx-featured-native .mhx-native-product form .wc-block-add-to-cart-with-options__quantity-selector{display:none!important}
.wc-block-product-template .mahamu-catalog-card .wp-block-button.wc-block-components-product-button,
.mhx-home .mhx-featured-native .mhx-native-product .wp-block-button.wc-block-components-product-button{display:block!important;width:100%!important;max-width:none!important;margin:0!important}
.wc-block-product-template .mahamu-catalog-card .wc-block-components-product-button__button,
.mhx-home .mhx-featured-native .mhx-native-product .wc-block-components-product-button__button{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-height:50px!important;box-sizing:border-box!important;margin:0!important;padding:10px 14px!important;background:var(--mhui-action)!important;color:var(--mhui-canvas)!important;border:0!important;border-radius:999px!important;font:650 14px/1.4 Inter,"IBM Plex Sans Thai",system-ui,sans-serif!important;text-align:center!important;cursor:pointer}
.wc-block-product-template .mahamu-catalog-card .wc-block-components-product-button__button:hover,
.mhx-home .mhx-featured-native .mhx-native-product .wc-block-components-product-button__button:hover{background:var(--mhui-action-hover)!important}
.wc-block-product-template .mahamu-catalog-card .wc-block-components-product-button__button:disabled,
.mhx-home .mhx-featured-native .mhx-native-product .wc-block-components-product-button__button:disabled{opacity:.67!important;cursor:not-allowed!important}
.mhx-home .mhx-featured-native .mhx-native-product>.mahamu-card-review-row{margin:0 var(--mhx-card-inset,24px) 11px!important}
.mhx-home .mhx-featured-native .mhx-native-product>.wp-block-woocommerce-product-price{margin-bottom:15px!important}
.woocommerce ul.products li.product>.mahamu-classic-review-data{display:block;margin:5px 0 12px;line-height:1.3}
.woocommerce ul.products li.product>.mahamu-classic-purchase{display:block;width:100%;margin-top:12px}
.woocommerce ul.products li.product .mahamu-classic-purchase form.wc-block-add-to-cart-with-options{display:flex;flex-direction:column;gap:8px}
.woocommerce ul.products li.product .mahamu-classic-purchase .wc-block-dropdown__select{width:100%;min-height:44px;background:var(--mhui-surface);border:1px solid var(--mhui-control-border);border-radius:6px;padding:8px}
.woocommerce ul.products li.product .mahamu-classic-purchase .wc-block-components-product-button__button{width:100%;min-height:44px;background:var(--mhui-action);color:var(--mhui-canvas);border-radius:999px}
.woocommerce ul.products li.product img{aspect-ratio:1/1;object-fit:cover}
@media(max-width:900px){.wc-block-product-template.is-flex-container>li.wc-block-product{width:calc(50% - .7em)!important}}
@media(max-width:599px){.wc-block-product-template.is-flex-container>li.wc-block-product{width:100%!important}.wc-block-product-template>li.wc-block-product>.mahamu-catalog-card{--mh-card-pad:20px}.mhx-home .mhx-featured-native .mhx-native-product{--mhx-card-inset:20px}}
@media(prefers-reduced-motion:reduce){.mahamu-catalog-card *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}


.mhx-home.mhx-home-v2 .mhx-container,
.mhx-testimonials[data-mhx-photo-reviews="1"] .mhx-testimonials__container{
  box-sizing:border-box;max-width:1160px;width:calc(100% - 2 * var(--mhsec-gutter));
  margin-inline:auto;
}

/* Homepage hierarchy only. Existing source section sequence stays untouched. */
.mhx-home.mhx-home-v2 .mhx-section{
  padding-block:clamp(46px,4.5vw,66px);
  border-bottom:1px solid var(--mhsec-line);
}
.mhx-home.mhx-home-v2 .mhx-section-heading{
  max-width:720px;margin:0 auto 23px;text-align:center;
}
.mhx-home.mhx-home-v2 .mhx-section-heading h2{
  font:600 clamp(29px,3vw,38px)/1.28 Inter,"IBM Plex Sans Thai",system-ui,sans-serif;
  letter-spacing:-.014em;color:var(--mhsec-ink);margin:0 0 8px;
}
.mhx-home.mhx-home-v2 .mhx-section-heading > p{
  max-width:600px;margin:0 auto;color:var(--mhsec-muted);
  font-size:clamp(13px,1.15vw,15px);line-height:1.6;
}
.mhx-home.mhx-home-v2 .mhx-section-heading .mhx-kicker{
  font-size:11px;line-height:1.4;letter-spacing:.12em;margin-bottom:9px;
  color:var(--mhui-accent);
}
.mhx-home.mhx-home-v2 .mhx-section-heading .mhx-flourish{
  display:none!important;
}

/* Product-first hero: preserve the real product composite and actual CTA targets.
 * Bring its reading scale close to the wireframe, without creating a second hero. */
@media(min-width:901px){
  .mhx-home.mhx-home-v2 .mhx-hero{min-height:530px}
  .mhx-home.mhx-home-v2 .mhx-hero-content{min-height:530px}
  .mhx-home.mhx-home-v2 .mhx-hero-copy{
    max-width:590px;padding-block:38px 42px;
  }
  .mhx-home.mhx-home-v2 .mhx-hero h1{
    font-size:clamp(39px,2.9vw,48px);
    line-height:1.17;letter-spacing:-.025em;
  }
  .mhx-home.mhx-home-v2 .mhx-hero-copy > p{
    max-width:44ch;font-size:16px;line-height:1.65;
  }
}

/* Featured shelf: keep the native Woo forms and previously approved compact
 * in-card variation + bag arrangement, unify shelf spacing with other sections. */
.mhx-home.mhx-home-v2 .mhx-featured .mhx-featured-native{
  margin-inline:auto;
}
.mhx-home.mhx-home-v2 .mhx-featured .mhx-native-product{
  box-shadow:none!important;
}
.mhx-home.mhx-home-v2 .mhx-featured .mhx-native-product a:focus-visible,
.mhx-home.mhx-home-v2 .mhx-category a:focus-visible{
  outline:3px solid var(--mhui-focus,var(--mhui-action));outline-offset:3px;
}

/* Product categories: keep all four authentic images and URLs, but adopt
 * the denser photographic tile anatomy of the research wireframe. */
.mhx-home.mhx-home-v2 .mhx-category-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
.mhx-home.mhx-home-v2 .mhx-category{
  display:flex;flex-direction:column;min-width:0;overflow:hidden;
  border:1px solid var(--mhsec-line);border-radius:2px;
  background:var(--mhsec-paper);box-shadow:none;
  color:var(--mhsec-ink);text-decoration:none;
  transform:none;transition:border-color .15s ease;
}
.mhx-home.mhx-home-v2 .mhx-category:hover{
  transform:none;border-color:var(--mhsec-gold);
}
.mhx-home.mhx-home-v2 .mhx-category-media{
  width:100%;aspect-ratio:1.25;overflow:hidden;
  background:linear-gradient(135deg,var(--mhsec-canvas),var(--mhsec-paper));
}
.mhx-home.mhx-home-v2 .mhx-category-media img{
  display:block;width:100%;height:100%;object-fit:contain;
  object-position:center;
}
.mhx-home.mhx-home-v2 .mhx-category-info{
  flex:1;min-height:82px;padding:14px 15px;
  background:var(--mhsec-paper);
}
.mhx-home.mhx-home-v2 .mhx-category-info h3{
  font-size:15px;line-height:1.4;font-weight:600;
}
.mhx-home.mhx-home-v2 .mhx-category-info p{
  font-size:12px;line-height:1.45;color:var(--mhsec-muted);
}

/* Real review evidence: keep the approved authentic-photo gallery and
 * accessibility/full-text behavior; only align the section's outer rhythm. */
.mhx-testimonials[data-mhx-photo-reviews="1"]{
  border-bottom:1px solid var(--mhsec-line);
}
.mhx-testimonials[data-mhx-photo-reviews="1"] .mhx-testimonials__container{
  max-width:1160px;
}
.mhx-testimonials[data-mhx-photo-reviews="1"] .mhx-testimonials__header{
  max-width:720px;margin-inline:auto;
}

/* Finder: retain existing native Woo product panels and tab-state logic,
 * but align the editorial header and make chooser controls less decorative. */
.mhx-home.mhx-home-v2 .mhx-chooser{min-height:0}
.mhx-home.mhx-home-v2 .mhx-chooser h2{
  font-size:clamp(29px,3vw,38px);line-height:1.25;
}

/* Quiet Typography: preserve the already-selected atmospheric fade, but
 * share the same content width and editorial typography as the upper page. */
.mhx-home.mhx-home-v2 .mhx-quiet .mhx-container{max-width:1160px}

/* Shop: single content measure with native filters and native product grid.
 * No fake sidebar or reimplementation of stock/variation controls. */
body.woocommerce-shop main{
  box-sizing:border-box;max-width:1160px;
  width:calc(100% - 2 * var(--mhsec-gutter));
  margin-inline:auto;padding-inline:0!important;
  padding-block:28px 64px;
}
body.woocommerce-shop main > .wp-block-group,
body.woocommerce-shop main .wp-block-woocommerce-product-collection{
  max-width:100%;min-width:0;
}
body.woocommerce-shop .wp-block-woocommerce-product-collection > .wc-block-product-template,
body.woocommerce-shop ul.wc-block-product-template{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:18px!important;
}
body.woocommerce-shop .wc-block-product-template > li.wc-block-product{
  min-width:0;border:1px solid var(--mhsec-line);
  border-radius:2px;background:var(--mhsec-paper);
  box-shadow:none;
}
body.woocommerce-shop .mahamu-catalog-card{
  --mh-card-pad:16px;
  border-radius:2px;
}
body.woocommerce-shop .mahamu-catalog-card > .wp-block-post-title{
  font-weight:600!important;font-size:15px!important;line-height:1.5!important;
  min-height:3em;
}
body.woocommerce-shop .mahamu-catalog-card > .wp-block-woocommerce-product-image{
  background:var(--mhsec-paper);
}
body.woocommerce-shop .wc-block-product-filters__open-overlay{
  min-height:44px;border-radius:2px;
}
body.woocommerce-shop .wc-block-product-template .wc-block-components-product-button__button{
  border-radius:2px!important;min-height:48px!important;
}
body.woocommerce-shop .wc-block-product-template .wc-block-components-product-button__button:focus-visible{
  outline:3px solid var(--mhui-focus,var(--mhui-action));outline-offset:2px;
}

/* Reduce default block gaps above the native Shop filters and grid. */
body.woocommerce-shop main > .wp-block-group:first-child{
  margin-block-start:0!important;margin-block-end:22px!important;
}
body.woocommerce-shop main > .wp-block-group:nth-child(2){
  margin-block-start:0!important;
}

/* PDP: original Woo gallery/purchase state stays authoritative, with
 * the same balanced split, typographic rhythm and reading width. */
body.single-product main{
  box-sizing:border-box;padding-inline:var(--mhsec-gutter);
  padding-block-start:28px;
}
body.single-product main .wp-block-columns.alignwide{
  box-sizing:border-box;max-width:1160px;
  width:100%;margin-inline:auto;gap:clamp(24px,4vw,52px);
  align-items:flex-start;
}
body.single-product main .wp-block-columns.alignwide > .wp-block-column{
  min-width:0;
}
body.single-product main .wp-block-post-title{
  font-family:Inter,"IBM Plex Sans Thai",system-ui,sans-serif;
  font-size:clamp(28px,2.65vw,38px);
  font-weight:600;line-height:1.25;letter-spacing:-.014em;
}
body.single-product main .wp-block-woocommerce-product-summary{
  color:var(--mhsec-muted);line-height:1.65;
}
body.single-product main .wp-block-woocommerce-product-gallery{
  max-width:100%;
}
body.single-product main .wp-block-woocommerce-product-gallery img{
  max-width:100%;height:auto;
}

/* Responsive: mobile decisions remain readable with truthful Woo state. */
@media(min-width:701px) and (max-width:1023px){
  .mhx-home.mhx-home-v2 .mhx-category-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  body.woocommerce-shop .wp-block-woocommerce-product-collection > ul.wc-block-product-template,
  body.woocommerce-shop ul.wc-block-product-template{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:700px){
  /* Prevent legacy 100vw centering from overflowing layouts with scrollbars. */
  body.home .mhx-home.mhx-home-v2{
    width:100%!important;max-width:100%!important;margin-inline:0!important;
  }
  .mhx-home.mhx-home-v2 .mhx-section{
    padding-block:42px;
  }
  .mhx-home.mhx-home-v2 .mhx-section-heading h2{
    font-size:clamp(26px,7.5vw,32px);
  }
  .mhx-home.mhx-home-v2 .mhx-section-heading > p{
    font-size:13px;
  }
  .mhx-home.mhx-home-v2 .mhx-hero-image{
    height:clamp(220px,62vw,280px);
  }
  .mhx-home.mhx-home-v2 .mhx-hero-copy{padding-block:22px 30px}
  .mhx-home.mhx-home-v2 .mhx-hero h1{
    font-size:clamp(32px,8vw,40px);line-height:1.22;
  }
  .mhx-home.mhx-home-v2 .mhx-category-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
  }
  .mhx-home.mhx-home-v2 .mhx-category-media{aspect-ratio:1.15}
  .mhx-home.mhx-home-v2 .mhx-category-info{
    padding:10px;min-height:82px;
  }
  .mhx-home.mhx-home-v2 .mhx-category-info h3{
    font-size:13px;line-height:1.4;
  }
  .mhx-home.mhx-home-v2 .mhx-category-info p{
    font-size:11px;line-height:1.4;
  }
  .mhx-home.mhx-home-v2 .mhx-chooser h2{
    font-size:clamp(27px,7vw,33px);
  }
  body.woocommerce-shop main{padding-block:16px 48px}
  body.woocommerce-shop .wp-block-woocommerce-product-collection > ul.wc-block-product-template,
  body.woocommerce-shop ul.wc-block-product-template{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }
  body.woocommerce-shop .mahamu-catalog-card{--mh-card-pad:12px}
  body.woocommerce-shop .mahamu-catalog-card > .wp-block-post-title{
    font-size:13px!important;
  }
  body.single-product main{padding-inline:var(--mhsec-gutter)}
  /* WordPress alignfull negative margins otherwise spill 4px beyond 390px viewport. */
  body.single-product main > .wp-block-group.alignfull{
    box-sizing:border-box;
    width:calc(100% + var(--mhsec-gutter) + var(--mhsec-gutter))!important;
    max-width:calc(100% + var(--mhsec-gutter) + var(--mhsec-gutter))!important;
    margin-inline:calc(0px - var(--mhsec-gutter))!important;
  }
  body.single-product main .wp-block-columns.alignwide{
    flex-direction:column;gap:20px;
  }
  body.single-product main .wp-block-columns.alignwide > .wp-block-column{
    width:100%;flex-basis:auto!important;
  }
}
@media(prefers-reduced-motion:reduce){
  .mhx-home.mhx-home-v2 .mhx-category{
    transition:none!important;
  }
}
