/**
 * MAIVELO WooCommerce storefront foundation.
 *
 * WooCommerce owns catalog, cart, checkout, account, stock and payment logic.
 * This file supplies presentation for native WooCommerce blocks and the
 * classic markup retained by WooCommerce for compatible fallbacks.
 */

.maivelo-commerce-layout {
  min-width: 0;
  color: var(--maivelo-text);
  background: var(--maivelo-cream-light);
}

.maivelo-storefront {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding-block: clamp(2rem, 4vw, 4rem);
  padding-inline: var(--maivelo-gutter);
}

.maivelo-storefront > :where(.alignwide, .alignfull) {
  max-width: var(--maivelo-container);
  margin-inline: auto;
}

.maivelo-storefront > :first-child {
  margin-block-start: 0;
}

.maivelo-storefront :where(h1, h2, h3, p) {
  overflow-wrap: break-word;
}

.maivelo-storefront h1,
.woocommerce-products-header__title {
  margin-block: 0;
  color: var(--maivelo-bg);
  font-size: clamp(2.125rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

:where([dir="rtl"], :lang(ar)) .maivelo-storefront h1,
:where([dir="rtl"], :lang(ar)) .woocommerce-products-header__title {
  letter-spacing: normal;
}

.maivelo-storefront__heading {
  display: grid;
  gap: clamp(.75rem, 2vw, 1.25rem);
  margin-block: clamp(1rem, 2vw, 1.75rem) clamp(1.75rem, 3vw, 3rem);
}

.maivelo-storefront__heading > * {
  margin-block: 0;
}

.maivelo-storefront__heading :where(.term-description, .maivelo-storefront__lead),
.maivelo-storefront__intro .maivelo-storefront__lead {
  max-width: 48rem;
  margin-block: 0;
  color: var(--maivelo-text-muted);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.7;
}

.maivelo-storefront__intro {
  display: grid;
  gap: .75rem;
  width: 100%;
  margin-block: clamp(1rem, 2vw, 1.75rem) clamp(1.75rem, 3vw, 2.75rem);
}

.maivelo-storefront__intro > * {
  margin-block: 0;
}

.maivelo-storefront--cart .maivelo-storefront__intro,
.maivelo-storefront--checkout .maivelo-storefront__intro,
.maivelo-storefront--account .maivelo-storefront__intro {
  max-width: var(--maivelo-container);
}

.maivelo-storefront--cart {
  padding-block: clamp(1.5rem, 3vw, 3rem);
}

.maivelo-storefront--cart .maivelo-storefront__intro {
  margin-block: .5rem clamp(1.25rem, 2.5vw, 2rem);
}

.maivelo-storefront--cart .maivelo-storefront__intro h1 {
  font-size: clamp(2rem, 3.6vw, 3rem);
}

.maivelo-storefront__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: clamp(1.5rem, 3vw, 2.5rem);
  padding-block: 1rem;
  border-block: 1px solid rgba(139, 107, 86, .35);
}

.maivelo-storefront__toolbar :where(p, form) {
  margin: 0;
}

.maivelo-storefront__toolbar > :where(form, label, .wp-block-woocommerce-catalog-sorting, .woocommerce-ordering):last-child {
  flex: 0 1 18rem;
  width: min(100%, 18rem);
  margin-inline-start: auto;
}

.maivelo-storefront__toolbar > :where(form, label, .wp-block-woocommerce-catalog-sorting, .woocommerce-ordering):last-child select {
  width: 100%;
}

/* Native controls only: Blocks own floating-label spacing and control height. */
.maivelo-storefront__toolbar select,
.maivelo-product-summary__details .variations select,
.woocommerce select:not(.wc-block-components-select__select) {
  min-height: 48px;
  height: auto;
  line-height: 1.5;
  padding-block: .65rem;
  padding-inline: .85rem 2.5rem;
  color: var(--maivelo-text);
  background-color: var(--maivelo-white);
  border: 1px solid var(--maivelo-border);
  border-radius: var(--maivelo-radius-md);
}

/* Product catalog and product cards. */
.maivelo-product-collection {
  min-width: 0;
}

.maivelo-product-collection .wp-block-woocommerce-product-template,
.woocommerce .products,
.wc-block-grid__products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The Shop currently exposes three products. Give each product a complete
   track instead of reserving a fourth empty column on wide screens. */
.maivelo-product-collection .wp-block-woocommerce-product-template {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.maivelo-product-collection .wc-block-product,
.woocommerce .products .product,
.wc-block-grid__product {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 0 clamp(1rem, 2vw, 1.5rem);
  overflow: hidden;
  color: var(--maivelo-text);
  background: transparent;
  border: 0;
  border-block-end: 1px solid rgba(139, 107, 86, .38);
  border-radius: 0;
  box-shadow: none;
}

@media (hover: hover) {
  .maivelo-product-collection .wc-block-product:hover .wc-block-components-product-image,
  .woocommerce .products .product:hover :where(.woocommerce-loop-product__link, img),
  .wc-block-grid__product:hover .wc-block-grid__product-image {
    border-color: var(--maivelo-gold);
  }
}

.maivelo-product-collection :where(.wc-block-components-product-image, .wp-block-woocommerce-product-image),
.woocommerce .products .product :where(.woocommerce-loop-product__link, img),
.wc-block-grid__product-image {
  min-width: 0;
}

.maivelo-product-collection .wc-block-components-product-image,
.woocommerce .products .product img,
.wc-block-grid__product-image {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  margin-block-end: 1rem;
  overflow: hidden;
  background: var(--maivelo-white);
  border: 1px solid rgba(139, 107, 86, .24);
  border-radius: .75rem;
  transition: border-color 190ms ease;
}

.maivelo-product-collection .wc-block-components-product-image img,
.woocommerce .products .product img,
.wc-block-grid__product-image img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  transition: transform 190ms ease;
}

@media (hover: hover) {
  .maivelo-product-collection .wc-block-product:hover .wc-block-components-product-image img,
  .woocommerce .products .product:hover img,
  .wc-block-grid__product:hover .wc-block-grid__product-image img {
    transform: scale(1.02);
  }
}

.maivelo-product-collection .wp-block-post-title,
.woocommerce .woocommerce-loop-product__title,
.wc-block-grid__product-title {
  margin-block: 0 .625rem;
  color: var(--maivelo-bg);
  font-size: clamp(1rem, 1.4vw, 1.1875rem);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.maivelo-product-collection .wp-block-post-title a,
.woocommerce .woocommerce-loop-product__title a,
.wc-block-grid__product-title a {
  color: inherit;
  text-decoration: none;
}

.maivelo-product-collection :where(.wp-block-woocommerce-product-price, .wc-block-components-product-price),
.woocommerce .products .price,
.wc-block-grid__product-price {
  margin-block: auto .75rem;
  color: var(--maivelo-text-muted);
  font-size: 1.0625rem;
  font-weight: 750;
}

.maivelo-product-collection :where(.price, .wc-block-components-product-price) del,
.woocommerce .products .price del,
.wc-block-grid__product-price del {
  color: var(--maivelo-text-muted);
  font-weight: 550;
  opacity: .78;
}

.maivelo-product-collection :where(.price, .wc-block-components-product-price) ins,
.woocommerce .products .price ins,
.wc-block-grid__product-price ins {
  color: var(--maivelo-bg);
  font-weight: 800;
  text-decoration: none;
}

.maivelo-product-collection :where(.wp-block-woocommerce-product-rating, .wc-block-components-product-rating),
.woocommerce .products .star-rating,
.wc-block-grid__product-rating {
  margin-block: 0 .75rem;
  color: var(--maivelo-text-muted);
}

.maivelo-product-collection :where(.wp-block-woocommerce-product-button, .wc-block-components-product-button),
.woocommerce .products .button,
.wc-block-grid__product-add-to-cart {
  margin-block-start: auto;
}

.maivelo-product-collection .wp-block-button__link,
.maivelo-product-collection .wc-block-components-product-button__button,
.woocommerce .products .button,
.wc-block-grid__product-add-to-cart .wp-block-button__link {
  width: 100%;
}

.woocommerce :where(.onsale, .wc-block-components-product-sale-badge),
.maivelo-product-collection .wc-block-components-product-sale-badge {
  position: absolute;
  inset-block-start: 1rem;
  inset-inline-start: 1rem;
  z-index: 2;
  width: max-content;
  max-width: calc(100% - 2rem);
  min-width: 0;
  min-height: 0;
  padding: .4rem .65rem;
  color: var(--maivelo-bg);
  background: var(--maivelo-gold);
  border: 0;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1.2;
}

.woocommerce :where(.stock, .out-of-stock),
.wc-block-components-product-stock-indicator {
  color: var(--maivelo-text-muted);
  font-size: .9375rem;
  font-weight: 650;
}

.woocommerce .out-of-stock,
.wc-block-components-product-stock-indicator--out-of-stock {
  text-decoration: underline;
  text-decoration-thickness: .12em;
  text-underline-offset: .18em;
}

/* Shared controls, buttons and fields. */
.woocommerce :where(a.button, button.button, input.button),
.maivelo-storefront .wp-element-button,
.maivelo-storefront .wc-block-components-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .75rem 1.125rem;
  color: var(--maivelo-bg);
  background: var(--maivelo-gold);
  border: 1px solid var(--maivelo-gold);
  border-radius: var(--maivelo-radius-md);
  font: inherit;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.woocommerce :where(a.button, button.button, input.button):hover,
.maivelo-storefront .wp-element-button:hover,
.maivelo-storefront .wc-block-components-button:hover {
  color: var(--maivelo-cream-light);
  background: var(--maivelo-bg);
  border-color: var(--maivelo-bg);
}

.woocommerce :where(a.button, button.button, input.button):active,
.maivelo-storefront .wp-element-button:active,
.maivelo-storefront .wc-block-components-button:active {
  transform: translateY(1px);
}

.woocommerce :where(input.input-text, textarea):not(.wc-block-components-textarea) {
  width: 100%;
  min-height: 44px;
  padding: .75rem .875rem;
  color: var(--maivelo-text);
  background: var(--maivelo-white);
  border: 1px solid rgba(139, 107, 86, .6);
  border-radius: var(--maivelo-radius-md);
}

.maivelo-storefront :where(input, select, textarea):focus,
.woocommerce :where(input, select, textarea):focus,
.wc-block-components-text-input input:focus {
  border-color: var(--maivelo-bg);
  outline: 2px solid var(--maivelo-gold);
  outline-offset: 2px;
}

.maivelo-storefront :where(input[type="checkbox"], input[type="radio"]),
.woocommerce :where(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--maivelo-bronze);
}

/* Single product. Keep gallery and classic add-to-cart form from one generation. */
.maivelo-product-summary {
  align-items: flex-start;
  gap: clamp(2rem, 5vw, 5rem);
  margin-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 6vw, 6rem);
}

.wp-block-columns.maivelo-product-summary {
  display: flex;
}

.maivelo-product-summary > .wp-block-column {
  min-width: 0;
}

.maivelo-product-summary__gallery {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.maivelo-product-summary__gallery :where(.woocommerce-product-gallery, .wc-block-product-gallery, .wp-block-woocommerce-product-image-gallery) {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.maivelo-product-summary__gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.maivelo-product-summary__gallery :where(.flex-control-thumbs, .wc-block-product-gallery-thumbnails__scrollable) {
  display: flex;
  gap: .625rem;
  margin-block: .875rem 0;
  padding: .1875rem .1875rem .375rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  scrollbar-width: thin;
  list-style: none;
}

.maivelo-product-summary__gallery :where(.flex-control-thumbs li, .wc-block-product-gallery-thumbnails__thumbnail) {
  flex: 0 0 clamp(3.75rem, 18%, 5rem);
  float: none;
  width: clamp(3.75rem, 18%, 5rem);
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
  scroll-margin-inline: .1875rem;
}

.maivelo-product-summary__gallery :where(.flex-control-thumbs img, .wc-block-product-gallery-thumbnails__thumbnail img) {
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--maivelo-white);
  border: 1px solid rgba(139, 107, 86, .38);
  border-radius: .5rem;
  cursor: pointer;
}

.maivelo-product-summary__gallery :where(.flex-control-thumbs img.flex-active, .wc-block-product-gallery-thumbnails__thumbnail[aria-current="true"] img) {
  border-color: var(--maivelo-bg);
  outline: 2px solid var(--maivelo-gold);
  outline-offset: 2px;
}

.maivelo-product-summary__details {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 1rem;
}

.maivelo-product-summary__details > * {
  margin-block: 0;
}

.maivelo-product-summary__details .wp-block-post-title {
  font-size: clamp(1.625rem, 2.5vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -.02em;
}

.maivelo-product-summary__details :where(.wp-block-woocommerce-product-price, .wc-block-components-product-price),
.single-product .summary .price {
  color: var(--maivelo-bronze);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
}

.maivelo-product-summary__details :where(.wp-block-woocommerce-product-price, .wc-block-components-product-price) del,
.single-product .summary .price del {
  color: var(--maivelo-text-muted);
  font-size: .75em;
  font-weight: 600;
  text-decoration-line: line-through;
  text-decoration-thickness: .08em;
  opacity: .82;
}

.maivelo-product-summary__details :where(.wp-block-woocommerce-product-price, .wc-block-components-product-price) ins,
.single-product .summary .price ins {
  color: var(--maivelo-bg);
  font-size: 1.08em;
  font-weight: 800;
  text-decoration: none;
}

.maivelo-product-summary__details :where(.wp-block-post-excerpt, .woocommerce-product-details__short-description) {
  color: var(--maivelo-text-muted);
  font-size: 1.0625rem;
}

.maivelo-product-summary__details form.cart,
.maivelo-product-summary__details .variations_form {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: end;
  margin-block: .5rem;
}

.maivelo-product-summary__details .variations {
  width: 100%;
  table-layout: fixed;
  margin: 0;
}

/* Stack labels above controls, leaving the entire summary width for model names. */
.maivelo-product-summary__details .variations :where(tbody, tr, th, td) {
  display: block;
  width: 100%;
}

/* The script adds this class only after WooCommerce has processed the native
   change event for a selected, genuinely single-option attribute. */
.maivelo-product-summary__details .variations tr.maivelo-variation-single-option-resolved {
  display: none;
}

.maivelo-product-summary__details .variations select {
  /* Native appearance can force computed line-height to normal in Chromium.
     Own the closed control's metrics; keep the native select interaction. */
  appearance: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: max(48px, calc(1.5em + 1.3rem + 2px));
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23241a16' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  background-size: 1rem;
}

[dir="rtl"] .maivelo-product-summary__details .variations select {
  background-position: left .85rem center;
}

@media (forced-colors: active) {
  .maivelo-product-summary__details .variations select {
    appearance: auto;
    background-image: none;
  }
}

.maivelo-product-summary__details .single_variation_wrap {
  width: 100%;
  min-width: 0;
}

.maivelo-product-summary__details .woocommerce-variation-add-to-cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}

.maivelo-product-summary__details .reset_variations {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.maivelo-product-summary__details .single_add_to_cart_button:disabled,
.maivelo-product-summary__details .single_add_to_cart_button.disabled {
  opacity: .55;
  cursor: not-allowed;
}

.maivelo-product-summary__details :where(.stock, .woocommerce-variation-availability) {
  margin-block: .5rem 0;
  color: var(--maivelo-text-muted);
  font-weight: 700;
}

.maivelo-product-service-note {
  display: grid;
  gap: .375rem;
  padding-block: 1rem;
  padding-inline-start: 1rem;
  border-inline-start: 3px solid var(--maivelo-gold);
}

.maivelo-product-service-note > * {
  margin-block: 0;
}

.maivelo-product-service-note__title {
  color: var(--maivelo-bg);
  font-size: 1rem;
  line-height: 1.35;
}

.maivelo-product-service-note p {
  color: var(--maivelo-text-muted);
  font-size: .9375rem;
  line-height: 1.6;
}

.maivelo-product-delivery-time {
  margin-block: -.25rem .25rem;
  color: var(--maivelo-text-muted);
  font-size: .9375rem;
  line-height: 1.5;
}

.maivelo-product-delivery-time strong {
  color: var(--maivelo-bg);
  font-weight: 800;
}

.maivelo-product-meta {
  display: grid;
  gap: .5rem;
  overflow-wrap: anywhere;
}

.maivelo-product-meta > * {
  margin-block: 0;
}

.maivelo-product-summary__details .variations :where(th, td) {
  padding-block: .4rem;
  padding-inline: 0;
  text-align: start;
}

.maivelo-product-summary__details .quantity .qty,
.woocommerce .quantity .qty {
  width: 5rem;
  min-height: 44px;
  text-align: center;
}

.wp-block-woocommerce-product-meta {
  padding-block-start: 1rem;
  color: var(--maivelo-text-muted);
  border-block-start: 1px solid rgba(139, 107, 86, .3);
  font-size: .9375rem;
}

.maivelo-product-details,
.woocommerce-tabs,
.related.products,
.upsells.products {
  margin-block: clamp(2.5rem, 6vw, 5rem);
}

.maivelo-product-details :where(.wc-block-components-tabs__list, .wc-tabs) {
  border-block-end-color: rgba(139, 107, 86, .35);
}

/* Notices and intentional empty states. */
.woocommerce-notices-wrapper,
.wp-block-woocommerce-store-notices {
  width: 100%;
  max-width: var(--maivelo-container);
  margin-inline: auto;
}

.wp-block-woocommerce-store-notices:not(:has(.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner)) {
  display: none;
}

.woocommerce :where(.woocommerce-message, .woocommerce-info, .woocommerce-error),
.wc-block-components-notice-banner {
  padding: 1rem 1.125rem;
  color: var(--maivelo-text);
  background: var(--maivelo-white);
  border: 1px solid var(--maivelo-gold);
  border-inline-start-width: 4px;
  border-radius: var(--maivelo-radius-md);
  box-shadow: 0 .5rem 1.5rem rgba(36, 26, 22, .06);
  animation: maivelo-commerce-notice-in 240ms cubic-bezier(.2, .8, .2, 1) both;
}

.woocommerce .woocommerce-error,
.wc-block-components-notice-banner.is-error {
  border-color: var(--maivelo-bronze);
}

.maivelo-storefront__empty,
.woocommerce .cart-empty,
.woocommerce-info:only-child {
  max-width: 46rem;
  margin: clamp(1.5rem, 4vw, 3.5rem) auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem);
  text-align: center;
  border-block: 1px solid rgba(139, 107, 86, .38);
}

.maivelo-empty-state {
  position: relative;
}

.maivelo-empty-state::before {
  display: block;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1.25rem;
  content: '';
  border: 2px solid var(--maivelo-bronze);
  border-block-start-color: var(--maivelo-gold);
  border-radius: .625rem;
  transform: rotate(-3deg);
}

.maivelo-empty-state__title,
.wc-block-cart__empty-cart__title {
  margin-block: 0;
  color: var(--maivelo-bg);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.14;
  letter-spacing: -.025em;
}

.maivelo-empty-state__text {
  max-width: 40rem;
  margin: 1rem auto 0;
  color: var(--maivelo-text-muted);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.7;
}

.wp-block-woocommerce-empty-cart-block {
  max-width: 48rem;
  margin-block: clamp(1rem, 3vw, 2.5rem);
  margin-inline: auto;
  padding-block: clamp(2rem, 5vw, 4rem);
  text-align: center;
  border-block: 1px solid rgba(139, 107, 86, .3);
}

.maivelo-storefront--cart .wc-block-cart__empty-cart__title {
  max-width: 34rem;
  margin-inline: auto;
}

.maivelo-storefront--cart .maivelo-cart-empty__text {
  max-width: 34rem;
  margin-block: 1rem 0;
  margin-inline: auto;
  color: var(--maivelo-text-muted);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.7;
}

.maivelo-storefront--cart .maivelo-cart-empty__actions {
  margin-block-start: 1.5rem;
}

.maivelo-storefront--cart .maivelo-cart-empty__actions .wp-block-button__link {
  min-width: min(100%, 12rem);
}

.maivelo-storefront--cart .wc-block-cart__empty-cart__title.with-empty-cart-icon::before,
.maivelo-storefront--cart .wc-block-cart__empty-cart__title::before {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  content: none !important;
  background: none !important;
  border: 0 !important;
}

/* Cart, Checkout and order-facing components. */
.maivelo-storefront--cart > .wp-block-post-content,
.maivelo-storefront--checkout > .wp-block-post-content,
.maivelo-storefront--account > .wp-block-post-content,
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
  min-width: 0;
}

.maivelo-storefront--cart > .wp-block-post-content,
.maivelo-storefront--checkout > .wp-block-post-content,
.maivelo-storefront--account > .wp-block-post-content {
  width: 100%;
  max-width: var(--maivelo-container);
  margin-inline: auto;
}

.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
  margin-block: 0;
}

.maivelo-storefront--cart .wp-block-woocommerce-cart {
  width: 100%;
  max-width: var(--maivelo-container);
  margin-inline: auto;
}

.maivelo-storefront--cart .wc-block-cart {
  color: var(--maivelo-text);
}

.wc-block-components-sidebar-layout {
  gap: clamp(1.5rem, 3vw, 3rem);
}

.wc-block-components-main,
.wc-block-components-sidebar {
  min-width: 0;
}

.wc-block-components-sidebar,
.wc-block-components-totals-wrapper,
.woocommerce .cart_totals,
.woocommerce-checkout-review-order {
  background: var(--maivelo-white);
  border: 1px solid rgba(139, 107, 86, .3);
  border-radius: var(--maivelo-radius-md);
}

.wc-block-components-sidebar {
  align-self: start;
  padding: clamp(1rem, 2vw, 1.5rem);
}

.maivelo-storefront--cart .wc-block-components-sidebar {
  box-shadow: 0 .75rem 2rem rgba(36, 26, 22, .055);
}

.maivelo-storefront--cart .wc-block-components-sidebar .wc-block-components-totals-wrapper {
  background: transparent;
  border: 0;
  border-radius: 0;
}

.wc-block-cart__main,
.wc-block-checkout__main {
  min-width: 0;
}

.maivelo-storefront--cart .wc-block-cart-items {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  border-spacing: 0;
}

.maivelo-storefront--cart .wc-block-cart-items__header th {
  padding-block: 0 .75rem;
  color: var(--maivelo-text-muted);
  border-block-end: 1px solid rgba(139, 107, 86, .35);
  font-size: .8125rem;
  font-weight: 750;
  letter-spacing: .05em;
  text-align: start;
  text-transform: uppercase;
}

.maivelo-storefront--cart .wc-block-cart-items__row td {
  min-width: 0;
  padding-block: clamp(1rem, 2.5vw, 1.5rem);
  border-block-end: 1px solid rgba(139, 107, 86, .25);
  vertical-align: top;
}

.maivelo-storefront--cart .wc-block-cart-item__image {
  width: clamp(5.5rem, 9vw, 7.5rem);
  padding-inline-end: clamp(.875rem, 2vw, 1.5rem);
}

.maivelo-storefront--cart .wc-block-cart-item__image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--maivelo-white);
  border: 1px solid rgba(139, 107, 86, .22);
  border-radius: .625rem;
}

.maivelo-storefront--cart .wc-block-components-product-name {
  line-height: 1.35;
}

.maivelo-storefront--cart :where(.wc-block-components-product-metadata, .wc-block-components-product-details) {
  color: var(--maivelo-text-muted);
  font-size: .9375rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.maivelo-storefront--cart .wc-block-cart-item__quantity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.maivelo-storefront--cart .wc-block-components-quantity-selector {
  display: inline-grid;
  grid-template-columns: 44px minmax(2.75rem, auto) 44px;
  align-items: stretch;
  width: max-content;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  background: var(--maivelo-white);
  border: 1px solid rgba(139, 107, 86, .55);
  border-radius: .5rem;
}

.maivelo-storefront--cart .wc-block-components-quantity-selector__button {
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  min-height: 42px;
  margin: 0;
  padding: 0;
  color: var(--maivelo-bg);
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.maivelo-storefront--cart .wc-block-components-quantity-selector__button--minus {
  order: 1;
  border-inline-end: 1px solid rgba(139, 107, 86, .35);
}

.maivelo-storefront--cart .wc-block-components-quantity-selector__button--plus {
  order: 3;
  border-inline-start: 1px solid rgba(139, 107, 86, .35);
}

.maivelo-storefront--cart .wc-block-components-quantity-selector__input {
  order: 2;
  width: 2.75rem;
  min-width: 2.75rem;
  min-height: 42px;
  margin: 0;
  padding: 0 .25rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.maivelo-storefront--cart .wc-block-components-quantity-selector__button:focus-visible,
.maivelo-storefront--cart .wc-block-components-quantity-selector__input:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--maivelo-gold);
  outline-offset: -3px;
}

.maivelo-storefront--cart .wc-block-cart-item__remove-link {
  display: inline-flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: .5rem;
  color: var(--maivelo-text-muted);
  background: transparent;
  border: 0;
  border-radius: .375rem;
  font-size: .875rem;
  text-underline-offset: .2em;
}

.maivelo-storefront--cart .wc-block-cart-item__remove-link:hover,
.maivelo-storefront--cart .wc-block-cart-item__remove-link:focus-visible {
  color: var(--maivelo-bg);
}

.maivelo-storefront--cart :where(.wc-block-cart-item__total-price-and-sale-badge-wrapper, .wc-block-components-product-price) {
  font-variant-numeric: tabular-nums;
}

.maivelo-storefront--cart .wc-block-components-totals-coupon__button {
  min-height: 44px;
  color: var(--maivelo-bg);
  text-underline-offset: .2em;
}

.maivelo-storefront--cart .wc-block-cart__submit-button {
  min-height: 52px;
  margin-block-start: .5rem;
  font-weight: 800;
}

.wc-block-components-order-summary-item,
.wc-block-cart-items__row,
.woocommerce-cart-form__cart-item {
  border-color: rgba(139, 107, 86, .25);
}

.wc-block-components-product-name,
.woocommerce-cart-form__cart-item .product-name {
  color: var(--maivelo-bg);
  font-weight: 700;
  text-decoration: none;
}

.wc-block-components-totals-item__value,
.order-total .amount {
  font-variant-numeric: tabular-nums;
}

.wc-block-components-checkout-step {
  padding-block: clamp(1.25rem, 2.5vw, 2rem);
  border-color: rgba(139, 107, 86, .28);
}

.maivelo-storefront--checkout :where(.wc-block-components-text-input, .wc-block-components-combobox, .wc-block-components-address-form__country) {
  min-width: 0;
}

.maivelo-storefront--checkout :where(.wc-block-components-text-input input, .wc-block-components-combobox-control input, .wc-block-components-textarea) {
  min-height: 48px;
  color: var(--maivelo-text);
  background: var(--maivelo-white);
  border-color: rgba(139, 107, 86, .58);
  border-radius: var(--maivelo-radius-md);
}

.maivelo-storefront--checkout :where(.wc-block-components-validation-error, .woocommerce-invalid-required-field) {
  padding-inline-start: .75rem;
  border-inline-start: 3px solid var(--maivelo-bronze);
}

.maivelo-storefront--checkout :where(.wc-block-checkout__payment-method, .wc-block-components-checkout-return-to-cart-button, .wc-block-checkout__terms) {
  overflow-wrap: anywhere;
}

.maivelo-storefront--checkout :where(.wc-block-checkout__payment-method, .wc_payment_methods) {
  padding-block: clamp(1rem, 2vw, 1.5rem);
  background: transparent;
  border: 0;
  border-block-start: 1px solid rgba(139, 107, 86, .35);
  border-radius: 0;
}

.maivelo-storefront--checkout :where(.wc-block-checkout__terms, .woocommerce-terms-and-conditions-wrapper) {
  margin-block: 1.25rem;
  color: var(--maivelo-text);
  font-size: .9375rem;
  line-height: 1.7;
}

.wc-block-components-checkout-step__heading,
.woocommerce-billing-fields > h3,
.woocommerce-shipping-fields > h3 {
  color: var(--maivelo-bg);
}

.wc-block-components-checkout-place-order-button,
.woocommerce #place_order {
  width: 100%;
  min-height: 50px;
}

.woocommerce table.shop_table {
  width: 100%;
  border-collapse: collapse;
  background: var(--maivelo-white);
}

.woocommerce table.shop_table :where(th, td) {
  padding: .875rem;
  border: 1px solid rgba(139, 107, 86, .28);
  text-align: start;
  vertical-align: middle;
}

/* My Account keeps WooCommerce's account state and actions intact. */
.maivelo-storefront--account .wp-block-post-content > .woocommerce {
  width: 100%;
  max-width: none;
  margin: 0;
}

.maivelo-storefront--account .wp-block-post-content > .woocommerce:has(> .woocommerce-MyAccount-navigation) {
  display: grid;
  grid-template-columns: clamp(15rem, 21vw, 17.5rem) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.maivelo-storefront--account .wp-block-post-content > .woocommerce:has(> .woocommerce-MyAccount-navigation)::before,
.maivelo-storefront--account .wp-block-post-content > .woocommerce:has(> .woocommerce-MyAccount-navigation)::after,
.maivelo-storefront--account #customer_login::before,
.maivelo-storefront--account #customer_login::after {
  display: none;
  content: none;
}

.maivelo-storefront--account .wp-block-post-content > .woocommerce:has(> .woocommerce-MyAccount-navigation) > :where(.woocommerce-notices-wrapper, .woocommerce-message, .woocommerce-info, .woocommerce-error) {
  grid-column: 1 / -1;
}

.maivelo-storefront--account .wp-block-post-content > .woocommerce:has(> .woocommerce-MyAccount-navigation) > .woocommerce-MyAccount-navigation {
  grid-column: 1;
  float: none;
  width: 100%;
  margin: 0;
}

.maivelo-storefront--account .wp-block-post-content > .woocommerce:has(> .woocommerce-MyAccount-navigation) > .woocommerce-MyAccount-content {
  grid-column: 2;
  float: none;
  width: 100%;
  min-width: 0;
  max-width: 52rem;
  margin: 0;
}

.maivelo-storefront--account #customer_login {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}

.maivelo-storefront--account #customer_login > :where(.u-column1, .u-column2, .col-1, .col-2) {
  float: none;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.maivelo-storefront--account .woocommerce-form {
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.maivelo-storefront--account #customer_login > :where(.u-column2, .col-2) {
  padding-inline-start: clamp(1.5rem, 4vw, 3rem);
  border-inline-start: 1px solid rgba(139, 107, 86, .32);
}

.maivelo-storefront--account #customer_login > :where(.u-column2, .col-2) :where(a.button, button.button, input.button) {
  color: var(--maivelo-bg);
  background: transparent;
  border-color: var(--maivelo-bronze);
}

.maivelo-storefront--account .u-columns h2 {
  margin-block: 0 1rem;
  color: var(--maivelo-bg);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.2;
}

.woocommerce-MyAccount-navigation {
  float: none;
  width: 100%;
  margin: 0;
}

.woocommerce-MyAccount-navigation ul {
  margin: 0;
  padding: .375rem 0;
  list-style: none;
  border-block: 1px solid rgba(139, 107, 86, .32);
}

.woocommerce-MyAccount-navigation a {
  display: block;
  min-height: 44px;
  padding: .75rem 1rem;
  border-inline-start: 3px solid transparent;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.woocommerce-MyAccount-navigation .is-active a,
.woocommerce-MyAccount-navigation a:hover,
.woocommerce-MyAccount-navigation a:focus-visible {
  color: var(--maivelo-bg);
  background: rgba(215, 187, 144, .38);
  border-inline-start-color: var(--maivelo-bronze);
}

.woocommerce-MyAccount-content {
  min-width: 0;
  max-width: 52rem;
  overflow-wrap: break-word;
}

.woocommerce-MyAccount-content > :first-child {
  margin-block-start: 0;
}

.woocommerce-MyAccount-content :where(.woocommerce-info, .woocommerce-orders-table, .woocommerce-Addresses, .woocommerce-address-fields, .woocommerce-EditAccountForm) {
  max-width: 100%;
}

.woocommerce-MyAccount-content .woocommerce-info {
  margin-block: 0 1.5rem;
}

.woocommerce form :where(.form-row, .woocommerce-form-row) {
  margin-block-end: 1rem;
}

.woocommerce form label {
  display: inline-block;
  margin-block-end: .35rem;
  color: var(--maivelo-bg);
  font-weight: 650;
}

.woocommerce .required {
  color: var(--maivelo-text-muted);
  text-decoration: none;
}

/* Pagination, breadcrumbs and small navigation affordances. */
.woocommerce-breadcrumb,
.wp-block-woocommerce-breadcrumbs {
  color: var(--maivelo-text-muted);
  font-size: .9375rem;
}

.woocommerce-breadcrumb a,
.wp-block-woocommerce-breadcrumbs a {
  text-underline-offset: .18em;
}

.wp-block-query-pagination,
.woocommerce-pagination ul.page-numbers {
  gap: .5rem;
  margin-block-start: clamp(2rem, 4vw, 3.5rem);
}

.wp-block-query-pagination a,
.wp-block-query-pagination .current,
.woocommerce-pagination .page-numbers li > * {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: .5rem;
  color: var(--maivelo-bg);
  background: var(--maivelo-white);
  border: 1px solid rgba(139, 107, 86, .4);
  border-radius: var(--maivelo-radius-md);
  text-decoration: none;
}

.wp-block-query-pagination .current,
.woocommerce-pagination .page-numbers .current {
  background: var(--maivelo-gold);
  border-color: var(--maivelo-gold);
}

/* Logical properties keep commerce surfaces direction-safe. */
[dir="rtl"] .maivelo-storefront,
:lang(ar) .maivelo-storefront {
  font-family: var(--maivelo-font-arabic);
}

[dir="rtl"] .woocommerce .star-rating,
[dir="rtl"] .wc-block-components-product-rating,
:lang(ar) .woocommerce .star-rating,
:lang(ar) .wc-block-components-product-rating {
  direction: ltr;
  margin-inline-end: 0;
}

@keyframes maivelo-commerce-notice-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 64rem) {
  .maivelo-product-collection .wp-block-woocommerce-product-template,
  .woocommerce .products,
  .wc-block-grid__products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .maivelo-product-summary {
    gap: 2rem;
  }
}

@media (max-width: 48.875rem) {
  .maivelo-storefront {
    padding-block: clamp(2rem, 9vw, 4rem);
  }

  .maivelo-product-collection .wp-block-woocommerce-product-template,
  .woocommerce .products,
  .wc-block-grid__products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }


  .maivelo-storefront--cart .wc-block-components-sidebar {
    width: min(100%, 28rem);
    margin-inline-start: auto;
    padding: 1rem;
  }

  .maivelo-storefront--cart .wc-block-cart-item__image {
    width: clamp(4.5rem, 24vw, 6rem);
    padding-inline-end: .875rem;
  }

  .maivelo-storefront--cart .wc-block-cart-items__row td {
    padding-block: 1rem;
  }

  .woocommerce-MyAccount-navigation {
    width: 100%;
    margin: 0;
  }

  .woocommerce-MyAccount-content {
    width: 100%;
  }

  .maivelo-storefront--account .wp-block-post-content > .woocommerce:has(> .woocommerce-MyAccount-navigation) {
    display: block;
  }

  .maivelo-storefront--account #customer_login {
    grid-template-columns: minmax(0, 1fr);
  }

  .maivelo-storefront--account .woocommerce-form {
    height: auto;
  }

  .maivelo-storefront--account .wp-block-post-content > .woocommerce:has(> .woocommerce-MyAccount-navigation) > .woocommerce-MyAccount-navigation {
    margin-block-end: clamp(1.5rem, 5vw, 2.5rem);
  }

  .woocommerce-MyAccount-navigation ul {
    display: block;
    padding-block: .25rem;
  }

  .woocommerce-MyAccount-navigation li + li {
    border-block-start: 1px solid rgba(139, 107, 86, .2);
  }

  .maivelo-storefront--account #customer_login > :where(.u-column2, .col-2) {
    margin-block-start: clamp(2rem, 6vw, 3rem);
    padding-block-start: clamp(1.5rem, 5vw, 2.5rem);
    padding-inline-start: 0;
    border-block-start: 1px solid rgba(139, 107, 86, .32);
    border-inline-start: 0;
  }

  .woocommerce-cart-form,
  .woocommerce-order-details {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 42rem) {
  .wp-block-columns.maivelo-product-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .maivelo-product-summary__gallery {
    position: static;
  }
}

@media (max-width: 40rem) {
  .maivelo-storefront {
    padding-inline-start: max(16px, env(safe-area-inset-left));
    padding-inline-end: max(16px, env(safe-area-inset-right));
  }

  .maivelo-storefront :where(h1, h2, h3, p),
  .maivelo-storefront :where(label, .wc-block-components-product-name, .wc-block-components-product-metadata, .woocommerce-info) {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: auto;
  }

  .maivelo-storefront:not(.maivelo-storefront--product) h1,
  .woocommerce-products-header__title {
    font-size: clamp(2rem, 10vw, 2.5rem);
  }

  .maivelo-storefront__toolbar {
    align-items: stretch;
  }

  .maivelo-storefront__toolbar > * {
    width: 100%;
  }

  .maivelo-storefront__toolbar > :where(form, label, .wp-block-woocommerce-catalog-sorting, .woocommerce-ordering):last-child {
    flex-basis: 100%;
    width: 100%;
    margin-inline-start: 0;
  }

  .maivelo-storefront__toolbar select {
    width: 100%;
  }

  .maivelo-product-collection .wp-block-woocommerce-product-template,
  .woocommerce .products,
  .wc-block-grid__products {
    grid-template-columns: minmax(0, 1fr);
  }

  .maivelo-product-collection .wc-block-product,
  .woocommerce .products .product,
  .wc-block-grid__product {
    padding: 1rem;
  }

  .maivelo-product-summary__details form.cart,
  .maivelo-product-summary__details .variations_form {
    align-items: stretch;
  }

  .maivelo-product-summary__details .wp-block-post-title {
    font-size: clamp(1.25rem, 10vw, 1.75rem);
    word-break: normal;
    overflow-wrap: normal;
    hyphens: auto;
  }

  .maivelo-product-summary__details .woocommerce-variation-add-to-cart {
    display: grid;
    grid-template-columns: clamp(72px, 25vw, 80px) minmax(0, 1fr);
    align-items: end;
  }

  .maivelo-product-summary__details .woocommerce-variation-add-to-cart .quantity {
    display: grid;
    gap: .35rem;
    min-width: 0;
  }

  .maivelo-product-summary__details .woocommerce-variation-add-to-cart .single_add_to_cart_button {
    width: 100%;
    min-width: 0;
    padding: 12px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: auto;
  }

  .maivelo-storefront--cart .wc-block-components-sidebar {
    width: 100%;
    margin-inline-start: 0;
    padding: 16px;
  }

  .maivelo-storefront--cart .wc-block-cart-items,
  .maivelo-storefront--cart .wc-block-cart-items tbody {
    display: block;
    width: 100%;
  }

  .maivelo-storefront--cart .wc-block-cart-items__header {
    display: none;
  }

  .maivelo-storefront--cart .wc-block-cart-items__row {
    display: grid;
    grid-template-columns: clamp(72px, 22vw, 88px) minmax(0, 1fr);
    gap: .875rem 1rem;
    width: 100%;
    padding-block: 1rem;
    border-block-end: 1px solid rgba(139, 107, 86, .3);
  }

  .maivelo-storefront--cart .wc-block-cart-items__row td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
  }

  .maivelo-storefront--cart table.wc-block-cart-items .wc-block-cart-items__row > td.wc-block-cart-item__image {
    grid-column: 1;
    grid-row: 1;
    width: clamp(72px, 22vw, 88px);
    padding: 0;
  }

  .maivelo-storefront--cart .wc-block-cart-items__row td:nth-child(2) {
    display: flex;
    flex-wrap: wrap;
    grid-column: 2;
    grid-row: 1;
    align-content: start;
    align-items: center;
    gap: .5rem .75rem;
  }

  .maivelo-storefront--cart .wc-block-cart-items__row td:nth-child(2) > :where(.wc-block-components-product-name, .wc-block-components-product-metadata, .wc-block-components-product-details) {
    flex: 1 0 100%;
    margin: 0;
  }

  .maivelo-storefront--cart .wc-block-cart-items__row td:nth-child(2) > :where(.wc-block-cart-item__quantity, .wc-block-components-quantity-selector) {
    flex: 0 0 auto;
    margin: .25rem 0 0;
  }

  .maivelo-storefront--cart .wc-block-cart-item__quantity {
    gap: .5rem;
    margin: 0;
  }

  .maivelo-storefront--cart .wc-block-cart-items__row td:nth-child(2) > .wc-block-cart-item__remove-link,
  .maivelo-storefront--cart .wc-block-cart-item__quantity > .wc-block-cart-item__remove-link {
    flex: 0 1 auto;
    margin: 0;
  }

  .maivelo-storefront--cart .wc-block-cart-items__row td:last-child {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-block-start: .875rem;
    border-block-start: 1px solid rgba(139, 107, 86, .2);
    text-align: end;
  }

  .maivelo-storefront--cart .wc-block-cart-items__row td:last-child .wc-block-components-product-price {
    margin: 0;
  }

  .maivelo-storefront--cart .wc-block-components-sidebar h2 {
    font-size: clamp(1.25rem, 7vw, 1.75rem);
    hyphens: auto;
    overflow-wrap: normal;
  }

  .maivelo-storefront--cart .wc-block-components-sidebar :where(p, span, strong),
  .maivelo-storefront--cart :where(.wc-block-components-product-metadata, .wc-block-components-product-details) {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: auto;
  }

  .maivelo-product-summary__details .woocommerce-variation-add-to-cart .quantity .qty {
    width: 100%;
    min-width: 0;
  }

  .wc-block-cart__submit-button,
  .wc-block-components-checkout-place-order-button,
  .woocommerce #place_order {
    width: 100%;
  }

  .maivelo-storefront--cart .wp-block-woocommerce-empty-cart-block {
    padding-block: 1rem 1.5rem;
  }

  .maivelo-storefront--cart .maivelo-cart-empty__actions,
  .maivelo-storefront--cart .maivelo-cart-empty__actions .wp-block-button,
  .maivelo-storefront--cart .maivelo-cart-empty__actions .wp-block-button__link {
    width: 100%;
  }

  .woocommerce-MyAccount-navigation a {
    padding-inline: .875rem;
  }

  .maivelo-storefront--checkout .wc-block-components-sidebar {
    padding: 16px;
  }

  .maivelo-storefront--checkout :where(.wc-block-components-checkout-step__heading, .wc-block-components-sidebar h2),
  .maivelo-storefront--account .woocommerce-MyAccount-content h2 {
    font-size: clamp(1.25rem, 8vw, 1.75rem);
    word-break: normal;
    overflow-wrap: normal;
    hyphens: auto;
  }

  .maivelo-storefront--checkout :where(.wc-block-checkout__terms, .woocommerce-terms-and-conditions-wrapper),
  .maivelo-storefront--checkout .wc-block-components-sidebar,
  .maivelo-storefront--account .woocommerce-info {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: auto;
  }

  .maivelo-storefront--account .woocommerce-info {
    padding: 16px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .maivelo-product-collection .wc-block-product,
  .woocommerce .products .product,
  .wc-block-grid__product,
  .woocommerce :where(a.button, button.button, input.button),
  .maivelo-storefront .wp-element-button,
  .maivelo-storefront .wc-block-components-button,
  .maivelo-product-collection :where(img),
  .woocommerce-MyAccount-navigation a {
    transition: none;
  }

  .maivelo-product-collection .wc-block-product:hover,
  .woocommerce .products .product:hover,
  .wc-block-grid__product:hover {
    transform: none;
  }

  .woocommerce :where(.woocommerce-message, .woocommerce-info, .woocommerce-error),
  .wc-block-components-notice-banner {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* V38 live commerce shell: target both WordPress's real root and the saved
   commerce group. The :has() branch covers admin-visible/runtime renders that
   do not expose reliable WooCommerce body classes. */
:where(body.single-product, body.woocommerce-cart, body.woocommerce-checkout, body.woocommerce-page) > .wp-site-blocks,
body > .wp-site-blocks:has(> :where(.maivelo-commerce-layout, .maivelo-storefront--product, .maivelo-storefront--cart, .maivelo-storefront--checkout)) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  max-width: none;
  min-block-size: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background: var(--maivelo-cream-light);
}

@supports (min-block-size: 100svh) {
  :where(body.single-product, body.woocommerce-cart, body.woocommerce-checkout, body.woocommerce-page) > .wp-site-blocks,
  body > .wp-site-blocks:has(> :where(.maivelo-commerce-layout, .maivelo-storefront--product, .maivelo-storefront--cart, .maivelo-storefront--checkout)) {
    min-block-size: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
  }
}

:where(body.single-product, body.woocommerce-cart, body.woocommerce-checkout, body.woocommerce-page) > .wp-site-blocks > *,
body > .wp-site-blocks:has(> :where(.maivelo-commerce-layout, .maivelo-storefront--product, .maivelo-storefront--cart, .maivelo-storefront--checkout)) > * {
  margin-block-start: 0;
}

:where(body.single-product, body.woocommerce-cart, body.woocommerce-checkout, body.woocommerce-page) :where(
  header.wp-block-template-part,
  footer.wp-block-template-part,
  .site-header,
  .site-footer
),
body:has(> .wp-site-blocks > :where(.maivelo-commerce-layout, .maivelo-storefront--product, .maivelo-storefront--cart, .maivelo-storefront--checkout)) :where(
  header.wp-block-template-part,
  footer.wp-block-template-part,
  .site-header,
  .site-footer
) {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

:where(body.single-product, body.woocommerce-cart, body.woocommerce-checkout, body.woocommerce-page) footer.wp-block-template-part,
:where(body.single-product, body.woocommerce-cart, body.woocommerce-checkout, body.woocommerce-page) .site-footer,
body:has(> .wp-site-blocks > :where(.maivelo-commerce-layout, .maivelo-storefront--product, .maivelo-storefront--cart, .maivelo-storefront--checkout)) footer.wp-block-template-part,
body:has(> .wp-site-blocks > :where(.maivelo-commerce-layout, .maivelo-storefront--product, .maivelo-storefront--cart, .maivelo-storefront--checkout)) .site-footer {
  margin-block-end: 0;
}

:where(body.single-product, body.woocommerce-cart, body.woocommerce-checkout, body.woocommerce-page) .site-footer__inner > :last-child,
body:has(> .wp-site-blocks > :where(.maivelo-commerce-layout, .maivelo-storefront--product, .maivelo-storefront--cart, .maivelo-storefront--checkout)) .site-footer__inner > :last-child {
  margin-block-end: 0;
}

.wp-site-blocks > .maivelo-commerce-layout {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--maivelo-cream-light);
}

.wp-site-blocks > :where(.maivelo-storefront--product, .maivelo-storefront--cart, .maivelo-storefront--checkout) {
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--maivelo-cream-light);
}

.wp-site-blocks :where(.maivelo-storefront--product, .maivelo-storefront--cart, .maivelo-storefront--checkout) {
  max-width: none;
  margin-inline: 0;
  background: var(--maivelo-cream-light);
}

/* The WordPress wide-size is intentionally conservative for reading pages.
   On the product runtime only, let the navigation grid and product canvas use
   the available desktop width while preserving the shared responsive gutter. */
/*
 * The signed-in WooCommerce runtime can wrap the active template in its
 * coming-soon block. Neutralize only that confirmed wrapper path so the
 * global WordPress 76rem block constraint cannot box in this product shell.
 */
body.single-product > .wp-site-blocks > :where(
	.wp-block-woocommerce-coming-soon,
	.woocommerce-coming-soon-store-only
),
body.single-product > .wp-site-blocks > :where(
	.wp-block-woocommerce-coming-soon,
	.woocommerce-coming-soon-store-only
) > .maivelo-commerce-layout {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

body.single-product {
	--maivelo-product-canvas: 120rem;
}

/* WordPress' constrained-layout child rule otherwise caps the nested classic
   WooCommerce Shop wrapper at the 47.5rem reading width. The theme's existing
   container width remains the upper bound. */
body.post-type-archive-product main#primary.site-main.site-main--shop {
	max-width: var(--maivelo-container);
}

/* The classic WooCommerce wrapper inherits the global 76rem shop width.
   Only the single-product runtime needs the full canvas; its descendants
   retain the product-specific max-width and responsive gutters below. */
body.single-product main#primary.site-main.site-main--shop {
	width: 100%;
	padding-block: 0;
}

body.single-product .maivelo-header-part .site-header__inner,
body.single-product header.wp-block-template-part .site-header__inner,
.maivelo-commerce-layout:has(> .maivelo-storefront--product) .maivelo-header-part .site-header__inner {
	width: min(calc(100% - (2 * var(--maivelo-gutter))), var(--maivelo-product-canvas));
	max-width: var(--maivelo-product-canvas);
	margin-inline: auto;
}

.maivelo-storefront.maivelo-storefront--product > :where(
  .alignwide,
  .wp-block-woocommerce-breadcrumbs,
  .woocommerce-breadcrumb
) {
	width: 100%;
	max-width: var(--maivelo-product-canvas);
	margin-inline: auto;
}

@media (min-width: 48.9375rem) {
  .maivelo-storefront--cart .wc-block-components-sidebar-layout,
  .maivelo-storefront--checkout .wc-block-components-sidebar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(18rem, .95fr);
    align-items: start;
    gap: clamp(1.5rem, 3vw, 3rem);
  }

  .maivelo-storefront--cart .wc-block-components-sidebar-layout > :where(.wc-block-components-main, .wc-block-components-sidebar),
  .maivelo-storefront--checkout .wc-block-components-sidebar-layout > :where(.wc-block-components-main, .wc-block-components-sidebar) {
    width: auto;
    max-width: none;
    margin-inline: 0;
  }

  .maivelo-storefront--cart .wc-block-components-sidebar {
    align-self: start;
  }
}

@media (max-width: 48.875rem) {
  .maivelo-storefront--cart .wc-block-components-sidebar-layout,
  .maivelo-storefront--checkout .wc-block-components-sidebar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .maivelo-storefront--cart .wc-block-components-sidebar,
  .maivelo-storefront--checkout .wc-block-components-sidebar {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }
}

/* Final commerce hierarchy: WooCommerce remains the interaction owner. */
.maivelo-product-summary__details.maivelo-product-has-selected-variation > :where(.wp-block-woocommerce-product-price, .wc-block-components-product-price) {
  color: var(--maivelo-text-muted);
  font-size: 1rem;
  font-weight: 650;
}

.maivelo-product-summary__details .woocommerce-variation-price .price {
  display: block;
  margin-block-end: .75rem;
  color: var(--maivelo-bg);
  font-size: clamp(1.45rem, 2.5vw, 1.875rem);
  font-weight: 850;
  line-height: 1.2;
}

.maivelo-storefront--cart .wc-block-components-product-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .2rem .5rem;
  margin-block: .5rem;
}

.maivelo-storefront--cart .wc-block-components-product-details__name {
  color: var(--maivelo-text);
  font-weight: 700;
}

.maivelo-storefront--cart .wc-block-components-totals-footer-item {
  margin-block-start: .5rem;
  padding-block-start: 1rem;
  border-block-start: 2px solid var(--maivelo-gold);
}

.maivelo-storefront--cart .wc-block-components-totals-footer-item :where(.wc-block-components-totals-item__label, .wc-block-components-totals-item__value) {
  color: var(--maivelo-bg);
  font-size: 1.125rem;
  font-weight: 850;
}

.maivelo-storefront--checkout .wc-block-checkout__main {
  display: grid;
  align-content: start;
  gap: 0;
}

.maivelo-storefront--checkout .wc-block-components-checkout-step {
  margin: 0;
  border-block-end: 1px solid rgba(139, 107, 86, .28);
}

.maivelo-storefront--checkout .wc-block-components-checkout-step__heading {
  margin-block-end: .75rem;
}

.maivelo-storefront--checkout .wc-block-components-checkout-step__description {
  color: var(--maivelo-text-muted);
  line-height: 1.65;
}

.maivelo-storefront--checkout :where(.wc-block-components-text-input, .wc-block-components-combobox) {
  border-radius: var(--maivelo-radius-md);
}

.maivelo-storefront--checkout :where(.wc-block-components-text-input, .wc-block-components-combobox):focus-within {
  outline: 2px solid var(--maivelo-gold);
  outline-offset: 2px;
}

.maivelo-storefront--checkout :where(.has-error, .is-error) :where(input, select, textarea) {
  border-color: var(--maivelo-bronze);
}

.maivelo-storefront--checkout :where(.wc-block-components-radio-control__option, .wc-block-checkout__shipping-method-option) {
  padding-block: .875rem;
  border-block-end: 1px solid rgba(139, 107, 86, .22);
}

.maivelo-storefront--checkout :where(.wc-block-components-totals-coupon, .wc-block-components-order-summary) {
  border-block-start: 1px solid rgba(139, 107, 86, .28);
}

.maivelo-storefront--checkout .wc-block-components-totals-footer-item {
  padding-block-start: 1rem;
  border-block-start: 2px solid var(--maivelo-gold);
}

.maivelo-storefront--checkout .wc-block-components-totals-footer-item :where(.wc-block-components-totals-item__label, .wc-block-components-totals-item__value) {
  color: var(--maivelo-bg);
  font-size: 1.125rem;
  font-weight: 850;
}

.maivelo-storefront--checkout :where(.wc-block-components-totals-coupon__button, .wc-block-components-panel__button) {
  min-height: 44px;
}

.maivelo-storefront--checkout .wc-block-components-checkout-place-order-button {
  min-height: 54px;
  font-weight: 850;
}

@media (max-width: 40rem) {
  .maivelo-storefront--checkout .wc-block-components-checkout-step {
    padding-block: 1rem;
  }
}

@media (forced-colors: active) {
  .maivelo-storefront--checkout :where(.wc-block-components-text-input, .wc-block-components-combobox):focus-within {
    outline-color: Highlight;
  }
}

@media (forced-colors: active) {
  .maivelo-product-collection .wc-block-product,
  .woocommerce .products .product,
  .maivelo-product-summary__gallery,
  .wc-block-components-sidebar,
  .wc-block-components-totals-wrapper,
  .maivelo-storefront--checkout :where(.wc-block-checkout__payment-method, .wc_payment_methods),
  .maivelo-storefront--account .woocommerce-form {
    color: CanvasText;
    background: Canvas;
    border-color: CanvasText;
    box-shadow: none;
  }

  .woocommerce :where(.onsale, .wc-block-components-product-sale-badge),
  .wp-block-query-pagination .current,
  .woocommerce-pagination .page-numbers .current {
    color: HighlightText;
    background: Highlight;
    border-color: Highlight;
  }

  .maivelo-storefront :where(a, button, input, select, textarea):focus-visible,
  .woocommerce :where(a, button, input, select, textarea):focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 3px;
  }
}
/* V30 runtime remediation: short commerce pages and zero-product states. */
.maivelo-commerce-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow-x: clip;
  min-block-size: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}

@supports (min-block-size: 100svh) {
  .maivelo-commerce-layout {
    min-block-size: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
  }
}

.maivelo-commerce-layout > :where(main, .maivelo-storefront) {
  min-block-size: 0;
}

.maivelo-storefront__eyebrow {
  color: var(--maivelo-bronze);
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .13em;
  line-height: 1.3;
}

:where([dir="rtl"], :lang(ar)) .maivelo-storefront__eyebrow {
  letter-spacing: normal;
}

.maivelo-empty-state__actions {
  gap: .75rem;
  margin-block-start: 1.5rem;
}

.maivelo-empty-state__actions .wp-block-button__link {
  min-height: 44px;
  padding: .75rem 1.25rem;
}

.maivelo-empty-state__actions .is-style-outline .wp-block-button__link {
  color: var(--maivelo-bg);
  background: transparent;
  border-color: var(--maivelo-bronze);
}

.maivelo-storefront--archive:has(.wp-block-woocommerce-product-collection-no-results) {
  padding-block: clamp(1.5rem, 3vw, 3rem);
}

.maivelo-storefront--archive:has(.wp-block-woocommerce-product-collection-no-results) .maivelo-storefront__heading {
  margin-block-end: clamp(1.5rem, 3vw, 2.5rem);
}

.maivelo-storefront--archive:has(.wp-block-woocommerce-product-collection-no-results) .maivelo-storefront__toolbar {
  display: none;
}

.maivelo-storefront--archive .wp-block-woocommerce-product-collection-no-results {
  margin-block: 0;
}

.maivelo-storefront--archive .maivelo-storefront__empty {
  max-width: 50rem;
  margin: 0;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 3vw, 2.25rem);
  text-align: start;
  border-block: 0;
  border-inline-start: 3px solid var(--maivelo-gold);
}

.maivelo-storefront--archive .maivelo-empty-state::before {
  display: none;
}

.maivelo-storefront--archive .maivelo-empty-state__text {
  margin-inline: 0;
}

.maivelo-storefront--archive .maivelo-empty-state__actions {
  justify-content: flex-start;
}

.maivelo-storefront--cart .wp-block-woocommerce-empty-cart-block {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: none;
  padding-block: clamp(.5rem, 2vw, 1.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

/* The native Empty Cart block ships a four-column Newest Products block.
   Fit only the rendered recommendations so an unused fourth track cannot
   collapse the three current cards inside the empty-cart layout. */
.maivelo-storefront--cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__products {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.maivelo-storefront--cart .wp-block-woocommerce-empty-cart-block .wc-block-grid.has-4-columns .wc-block-grid__product {
  flex: 0 1 auto;
  width: 100%;
  max-width: none;
}

@media (max-width: 48.875rem) {
  .maivelo-storefront--cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .maivelo-storefront--cart .wp-block-woocommerce-empty-cart-block .wc-block-grid__products {
    grid-template-columns: minmax(0, 1fr);
  }
}

.maivelo-storefront--cart .wp-block-woocommerce-empty-cart-block > * {
  margin-block: 0;
}

.maivelo-storefront--cart .wp-block-woocommerce-empty-cart-block:not(:has(.wc-block-grid__product, .wc-block-product)) > :where(.wp-block-separator, .wp-block-heading:not(.wc-block-cart__empty-cart__title), .wp-block-woocommerce-product-new, .wc-block-grid) {
  display: none;
}

.maivelo-storefront--cart .maivelo-cart-empty__actions {
  margin-block-start: .5rem;
}

.maivelo-storefront--cart .maivelo-cart-empty__shop-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .75rem 1.25rem;
  color: var(--maivelo-bg);
  background: var(--maivelo-gold);
  border: 1px solid var(--maivelo-gold);
  border-radius: var(--maivelo-radius-md);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.maivelo-storefront--cart .maivelo-cart-empty__secondary-actions {
  justify-content: center;
  margin-block-start: -.25rem;
}

.maivelo-storefront--cart .maivelo-cart-empty__secondary-actions .wp-block-button__link {
  min-height: 44px;
  padding: .65rem 1.1rem;
  color: var(--maivelo-bg);
  background: transparent;
  border-color: var(--maivelo-bronze);
}

@media (max-width: 40rem) {
  .maivelo-storefront--cart .maivelo-cart-empty__secondary-actions,
  .maivelo-storefront--cart .maivelo-cart-empty__secondary-actions .wp-block-button,
  .maivelo-storefront--cart .maivelo-cart-empty__secondary-actions .wp-block-button__link,
  .maivelo-empty-state__actions,
  .maivelo-empty-state__actions .wp-block-button,
  .maivelo-empty-state__actions .wp-block-button__link {
    width: 100%;
  }
}

.maivelo-storefront--archive:has(.wp-block-woocommerce-product-collection-no-results) .maivelo-product-collection,
.maivelo-storefront--cart:has(.wp-block-woocommerce-empty-cart-block) > .wp-block-post-content {
  animation: none;
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .maivelo-storefront--archive .maivelo-storefront__empty,
  .maivelo-storefront--cart .wp-block-woocommerce-empty-cart-block {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
