/* Mahiblu Editorial 3.6.0 — scoped presentation; WooCommerce owns behavior. */
.mahi-commerce { padding: clamp(36px, 5vw, 68px) 0; }
.mahi-content--commerce .mahi-content__article { max-width: none; padding: 0; border: 0; }
.mahi-commerce :is(.page-title, .product_title) { margin: 0 0 24px; font-family: var(--mahi-sans); font-weight: 500; line-height: 1.15; letter-spacing: -.035em; font-size: clamp(2rem, 3.8vw, 2.8rem); }
.mahi-commerce .woocommerce-loop-product__title { font-family: var(--mahi-sans); font-weight: 500; line-height: 1.25; letter-spacing: -.02em; }
.mahi-commerce .woocommerce-breadcrumb { margin-bottom: 24px; line-height: 1.5; }
.mahi-store-intro { max-width: 680px; margin: -10px 0 32px; color: var(--mahi-muted); font-size: 1rem; line-height: 1.7; }
:is(.mahi-commerce, .mahi-content--commerce) :is(input, textarea, select):focus-visible { outline: 2px solid var(--mahi-primary); outline-offset: 3px; }
:is(.mahi-commerce, .mahi-content--commerce) .button:focus-visible { outline: 2px solid var(--mahi-primary); outline-offset: 4px; }
:is(.mahi-commerce, .mahi-content--commerce) :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) { border-radius: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.mahi-commerce .woocommerce-info { border-top-color: var(--mahi-primary); }
.mahi-commerce .woocommerce-result-count, .mahi-commerce .woocommerce-ordering { margin-bottom: 24px; }
:where(.mahi-commerce, .mahi-content--commerce) .woocommerce .button,
.mahi-commerce .button,
.mahi-commerce :is(a, button, input).button.alt,
.mahi-content--commerce .woocommerce :is(a, button, input).button.alt,
:where(.mahi-commerce, .mahi-content--commerce) .woocommerce #respond input#submit {
  min-height: 44px; padding: 12px 18px; border: 1px solid transparent; border-radius: 999px; background: var(--mahi-primary); color: #fff; font-family: var(--mahi-body); font-weight: 700; font-size: .88rem; line-height: 1.25; white-space: normal;
}
:where(.mahi-commerce, .mahi-content--commerce) .woocommerce .button:hover,
.mahi-commerce .button:hover,
.mahi-commerce :is(a, button, input).button.alt:hover,
.mahi-content--commerce .woocommerce :is(a, button, input).button.alt:hover,
:where(.mahi-commerce, .mahi-content--commerce) .woocommerce #respond input#submit:hover { background: var(--mahi-ink); color: #fff; }
:where(.mahi-commerce, .mahi-content--commerce) .woocommerce form .form-row input.input-text,
:where(.mahi-commerce, .mahi-content--commerce) .woocommerce form .form-row textarea,
.mahi-commerce .woocommerce-ordering select {
  min-height: 44px; padding: 10px 12px; border: 1px solid var(--mahi-line); border-radius: 8px; background: #fff; color: var(--mahi-ink); font: inherit;
}
:where(.mahi-commerce, .mahi-content--commerce) .woocommerce form .form-row label { font-size: .9rem; line-height: 1.5; margin-bottom: 5px; }
:where(.mahi-commerce, .mahi-content--commerce) .woocommerce table.shop_table { border-color: var(--mahi-line); border-radius: 12px; }
:where(.mahi-commerce, .mahi-content--commerce) .woocommerce table.shop_table :is(th, td) { padding: 14px 12px; line-height: 1.5; }
:where(.mahi-commerce, .mahi-content--commerce) .woocommerce :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) { border-radius: 10px; line-height: 1.6; overflow-wrap: anywhere; }
:where(.mahi-commerce, .mahi-content--commerce) .woocommerce .woocommerce-info { border-top-color: var(--mahi-primary); }
.mahi-commerce .woocommerce-tabs :is(h2, h3) { font-family: var(--mahi-sans); font-weight: 500; line-height: 1.3; }
.mahi-commerce .woocommerce-product-gallery img { border-radius: 12px; }
.mahi-shop-filters { clear: both; margin-bottom: 28px; padding: 16px 20px; background: var(--mahi-cream); border-radius: 12px; }
.mahi-shop-filters > summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.mahi-shop-filters > summary:focus-visible { outline: 2px solid var(--mahi-primary); outline-offset: 4px; }
.mahi-shop-filters__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 24px; padding-top: 20px; }
.mahi-commerce .mahi-shop-filter__title { margin: 0 0 12px; font-size: 1rem; font-weight: 600; }
.mahi-shop-filter ul { padding-left: 18px; }
.mahi-shop-filter li { margin-bottom: 8px; font-size: .9rem; }
:where(.mahi-commerce, .mahi-content--commerce) .wc-block-components-button:not(.is-link) { border-radius: 999px; min-height: 44px; font-family: var(--mahi-body); }
/* Native Cart's fixed mobile tracks can overflow a narrow shell; only adapt layout. */
@container (max-width: 399px) {
  .mahi-content--commerce .entry-content table.wc-block-cart-items .wc-block-cart-items__row { grid-template-columns: 64px minmax(0, 1fr); }
  .mahi-content--commerce .entry-content table.wc-block-cart-items .wc-block-cart-item__product { grid-column: 2 / 3; min-width: 0; }
  .mahi-content--commerce .entry-content table.wc-block-cart-items .wc-block-cart-item__total { grid-column: 2 / 3; grid-row: 2; text-align: left; padding-top: 8px; }
  .mahi-content--commerce .entry-content table.wc-block-cart-items .wc-block-cart-item__image { padding-right: 0; }
}
@media (max-width: 760px) {
  .mahi-commerce { padding: 32px 0; }
  :where(.mahi-commerce, .mahi-content--commerce) .woocommerce table.shop_table :is(th, td) { padding: 12px 8px; }
}
/* One consistent gap before the footer on commerce routes. */
body.woocommerce-page .site-footer { margin-top: 24px; }
/* Preserve WooCommerce's store-only launch screen and its native content. */
.woocommerce-coming-soon-store-only { --wp--preset--font-family--cardo: var(--mahi-sans); --wp--preset--font-family--inter: var(--mahi-body); width: min(calc(100% - 32px), var(--mahi-shell)); margin: 36px auto; padding: clamp(28px, 5vw, 56px) 24px; box-sizing: border-box; border-radius: 20px; background: #f5f9fb; }
.woocommerce-coming-soon-store-only > .wp-block-group { gap: 0; }
.woocommerce-coming-soon-store-only .wp-block-spacer { display: none; }
.woocommerce-coming-soon-store-only h1.wp-block-heading { max-width: 700px; margin: 0 auto 16px; font-family: var(--mahi-sans); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; letter-spacing: -.03em; font-weight: 500; }
.woocommerce-coming-soon-store-only p { max-width: 600px; margin: 0 auto; color: var(--mahi-muted); font-family: var(--mahi-body); font-size: 1rem; line-height: 1.7; }

/* Keep breathing room when a notice or text block contains an action. */
:is(.mahi-commerce, .mahi-content--commerce) :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) .button { margin-block: 12px; }
