/* Structured shopping cards: media, information, and a single purchase rail. */
body.mrdad-minimal {
  --md-red: #165443;
  --md-red-dark: #103e32;
  --md-action: #165443;
}
body.mrdad-minimal :is(button,.button,input[type=submit],.wc-block-components-button,.wd-btn,.mrdad-cartbar__btn,.mrdad-pdpbar__btn) {
  background-color: var(--md-action); border-color: var(--md-action); color: #fff;
}
body.mrdad-minimal :is(button,.button,input[type=submit],.wc-block-components-button,.wd-btn,.mrdad-cartbar__btn,.mrdad-pdpbar__btn):hover {
  background-color: #103e32; border-color: #103e32; color: #fff;
}
body.mrdad-minimal :is(a,button,input,select,textarea):focus { outline-color: #387c69; }
body.mrdad-minimal :is(a,button,input,select,textarea):focus-visible { outline: 2px solid #387c69; outline-offset: 3px; }
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product {
  display: flex; flex-direction: column; text-align: left; padding: 0;
  border: 1px solid #e0e8e2; border-radius: 12px; background: #fff;
  box-shadow: 0 3px 12px #183f2e05; overflow: visible; gap: 0;
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product:hover {
  border-color: #a9c6b9; box-shadow: 0 7px 22px #183f2e0d; transform: none;
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product > .woocommerce-loop-product__link {
  display: flex; flex-direction: column; flex: 1; min-width: 0; margin: 0;
}
body.mrdad-minimal ul.products li.product .md-product-media { display: block; position: relative; padding: 16px; border-bottom: 1px solid #edf1eb; background: #f9faf7; border-radius: 12px 12px 0 0; }
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-media img {
  width: 100%; height: 190px; aspect-ratio: 1; object-fit: contain; padding: 0;
  margin: 0; background: #fff; border-radius: 4px; box-shadow: none;
}
body.mrdad-minimal ul.products li.product .md-product-info { display: flex; flex-direction: column; padding: 16px 16px 12px; flex: 1; min-width: 0; }
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .woocommerce-loop-product__title {
  padding: 0; margin: 0 0 6px; min-height: 0; font-size: 15px; line-height: 1.45;
  font-weight: 600; letter-spacing: -.015em; color: #253c32;
  display: block; overflow: visible; -webkit-line-clamp: unset;
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .mdi-name-zh {
  padding: 0; margin: 0 0 10px; font-size: 11px; line-height: 1.5; color: #78827c;
  white-space: normal; overflow-wrap: anywhere;
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .mds-badge {
  margin: auto 0 0; padding: 8px 0 0 12px; border: 0; max-width: 100%;
  background: none; font-size: 10px; color: #63766b; line-height: 1.5;
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .mds-badge::before { top: 13px; left: 0; width: 5px; height: 5px; background: #387c69; }
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .mds-badge__main { font-size: 10px; line-height: 1.5; white-space: normal; }
body.mrdad-minimal ul.products li.product .md-product-purchase {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  margin: 0 16px; padding: 12px 0 16px; border-top: 1px solid #edf1eb;
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase .price {
  padding: 0; margin: 0; min-width: 0; color: #253c32; font-size: 20px; font-weight: 700; line-height: 1.2;
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .price ins { color: #165443; }
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button {
  position: static; margin: 0; padding: 10px 12px; width: auto; max-width: 100%; min-height: 40px; height: auto;
  background: #165443; color: #fff; border: 1px solid #165443; border-radius: 7px;
  font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: 0; text-indent: 0;
  white-space: normal; box-shadow: none; text-align: center;
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button:hover { background: #103e32; }
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button::before,
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button::after { display: none; }
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button.added { background: #e9f3ee; color: #165443; border-color: #bad5c7; }
/* No "View cart" link on tiles (client, 2026-09-30): the tile's own stepper shows the basket
   quantity, and the floating cart bar / tab badge carry the way to the cart. */
body.mrdad-minimal ul.products li.product a.added_to_cart { display: none !important; }
body.mrdad-minimal .mrdad-savepill { background: #eaf4ee; color: #165443; border-color: #c5dace; }
body.mrdad-minimal.single-product div.product .summary {
  background: #f8faf7; border: 1px solid #e0e8e2; border-radius: 12px; padding: 24px;
}
body.mrdad-minimal.single-product div.product .summary .price { color: #253c32; }
body.mrdad-minimal.single-product div.product .summary form.cart {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 20px; border-top: 1px solid #dce6df;
}
body.mrdad-minimal.single-product div.product .summary form.cart .quantity { margin: 0; }
body.mrdad-minimal.single-product .single_add_to_cart_button { flex: 1; border-radius: 8px; }
@media (max-width: 599px) {
  body.mrdad-minimal ul.products, body.mrdad-minimal .md-shelf ul.products,
  body.mrdad-minimal.mrdad-aisle-browse .mrdad-browse ul.products { grid-template-columns: minmax(0,1fr) !important; gap: 12px; }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product { padding: 12px; }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product > .woocommerce-loop-product__link {
    display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 14px; flex: none;
  }
  body.mrdad-minimal ul.products li.product .md-product-media { padding: 8px; align-self: start; border: 0; border-radius: 8px; }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-media img { height: 90px; }
  body.mrdad-minimal ul.products li.product .md-product-info { padding: 0; }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .woocommerce-loop-product__title { font-size: 14px; }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .mdi-name-zh { font-size: 10px; margin-bottom: 6px; }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .mds-badge { padding-top: 4px; }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .mds-badge::before { top: 9px; }
  body.mrdad-minimal ul.products li.product .md-product-purchase { margin: 10px 0 0 110px; padding: 10px 0 0; gap: 6px; }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase .price { font-size: 18px; }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button { padding: 9px 8px; font-size: 10px; }
  body.mrdad-minimal.single-product div.product .summary { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product { transition: none; } }
/* Shared product layout and jade selection states. */
body.mrdad-minimal ul.products { display: grid !important; }
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product > .woocommerce-loop-product__link { align-items: stretch; }
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-media { grid-column: 1 !important; grid-row: 1; }
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-info { grid-column: 2 !important; grid-row: 1; }
body.mrdad-minimal :is(.mrdad-aisles__item.is-active,.mrdad-sort__pill.is-active) { background: #eaf3ed; color: #165443; border-color: #c4d8cb; }
@media (min-width: 600px) and (max-width: 991px) {
  body.mrdad-minimal ul.products { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.mrdad-minimal ul.products li.product .md-product-purchase { grid-template-columns: 1fr; }
}
/* Mobile archives retain the complete desktop category index beside products. */
@media (max-width: 599px) {
  body.mrdad-minimal.mrdad-aisle-browse .mrdad-browse {
    display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 12px; align-items: start;
  }
  body.mrdad-minimal.mrdad-aisle-browse .mrdad-browse > ul.products { width: 100%; min-width: 0; }
  body.mrdad-minimal.mrdad-aisle-browse .mrdad-aisles {
    position: sticky; top: calc(var(--mrdad-header-h, 96px) + 8px);
    display: flex; flex-direction: column; width: 100%; min-width: 0; max-width: 100%;
    max-height: calc(100dvh - var(--mrdad-header-h, 96px) - 82px);
    overflow-x: hidden; overflow-y: auto; padding: 6px; gap: 4px;
    border: 1px solid #e0e8e2; border-radius: 10px; background: #f8faf7;
    overscroll-behavior-y: contain; scroll-padding-block: 8px;
  }
  body.mrdad-minimal .mrdad-aisles__group {
    display: block; flex-shrink: 0; margin: 10px 2px 3px; padding: 0 0 6px;
    border-bottom: 1px solid #dce6df; font-size: 9px; line-height: 1.4;
    letter-spacing: .03em; color: #63766b; text-align: center;
  }
  body.mrdad-minimal .mrdad-aisles__item {
    flex: 0 0 auto; min-height: 72px; padding: 8px 4px; gap: 5px;
    flex-direction: column; justify-content: center; border-radius: 7px;
  }
  body.mrdad-minimal .mrdad-aisles__label { font-size: 10px; line-height: 1.4; white-space: normal; }
  body.mrdad-minimal .mrdad-aisles__ic img { width: 32px; height: 32px; }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product { padding: 0; overflow: visible; }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product > .woocommerce-loop-product__link {
    display: flex; flex-direction: column; gap: 0; flex: 1;
  }
  body.mrdad-minimal ul.products li.product .md-product-media {
    width: 100%; align-self: stretch; padding: 6px; background: #fff; border-radius: 12px 12px 0 0;
  }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-media img {
    width: 100%; height: auto; max-height: 220px; aspect-ratio: 1; object-fit: contain;
    padding: 0; background: #fff; border-radius: 0;
  }
  body.mrdad-minimal ul.products li.product .md-product-media .mrdad-keep {
    position: absolute; top: 10px; left: 10px; margin: 0;
  }
  body.mrdad-minimal ul.products li.product .md-product-info { padding: 8px 12px 0; }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .mds-badge { padding-top: 3px; }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .mds-badge::before { top: 8px; }
  body.mrdad-minimal ul.products li.product .md-product-purchase {
    grid-template-columns: minmax(0,1fr) auto; margin: 10px 12px 0; padding: 10px 0 12px; gap: 8px;
  }
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button {
    width: auto; max-width: 104px; min-height: 44px; padding: 8px; font-size: 11px;
  }
}
/* Explicit legacy hover colours must not revive the old red action palette. */
body.mrdad-minimal .site-header .site-search button[type=submit]:hover,
body.mrdad-minimal .site-header .widget_shopping_cart .buttons .button.checkout:hover,
body.mrdad-minimal .mrdad-promo__cta:hover { background: #103e32; border-color: #103e32; color: #fff; }
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .mds-badge { min-height: 0; justify-content: flex-start; align-items: flex-start; }
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .mdi-name-zh { min-height: 0; }

/* One image-led card system for homepage shelves and category results. */
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase {
  grid-template-columns: minmax(0, 1fr) auto;
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button {
  justify-self: end;
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button.ajax_add_to_cart {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 46px; min-width: 46px; height: 46px; min-height: 46px; padding: 0;
  border-radius: 50%; font-size: 0; line-height: 0;
  color: #165443; border: 1px solid #cadfd3;
  background: linear-gradient(145deg, #f5faf5, #e0eee5);
  box-shadow: inset 0 1px 0 #fff, 0 3px 7px #16544314;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button.ajax_add_to_cart::before {
  content: ''; display: block; position: static; width: 23px; height: 23px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h3l2.5 12h11l2-8H6'/%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='18' cy='20' r='1'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button.ajax_add_to_cart:hover {
  color: #fff; background: #165443; border-color: #165443;
  box-shadow: 0 4px 10px #16544326; transform: translateY(-1px);
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button.ajax_add_to_cart.added {
  background: #165443; color: #fff; border-color: #165443;
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button.ajax_add_to_cart.added::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E");
}
body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button.ajax_add_to_cart.loading {
  opacity: .55; cursor: progress;
}
@media (prefers-reduced-motion: reduce) {
  body.mrdad-minimal :is(.md-shelf, .mrdad-browse, .site-main) ul.products li.product .md-product-purchase a.button.ajax_add_to_cart { transition: none; transform: none; }
}
