/* Compact catalog cards. Supersedes the older homepage/archive card spacing. */
:is(.home-main, .woocommerce) ul.products li.product.ml-product-card {
  background: #fff; border: 1px solid #e2e8ef; border-radius: 16px; min-height: 0; padding: 0 0 12px;
  overflow: hidden; box-shadow: 0 2px 8px #07305708; transition: box-shadow .18s ease, border-color .18s ease;
}
@media (hover:hover) {
  :is(.home-main, .woocommerce) ul.products li.product.ml-product-card:hover { border-color: #aabed1; box-shadow: 0 8px 24px #07305718; }
  .ml-card-image:hover img { transform: scale(1.025); }
}
.ml-product-card:focus-within { border-color: #809fb9; }
:is(.home-main, .woocommerce) ul.products li.product.ml-product-card .ml-card-image { display: block; flex: none; position: relative; overflow: hidden; border-radius: 15px 15px 12px 12px; margin: 0 0 12px; }
:is(.home-main, .woocommerce) ul.products li.product.ml-product-card .ml-card-image img { display: block; width: 100%; height: auto; aspect-ratio: 1.8; object-fit: cover; border-radius: 0; margin: 0; transition: transform .2s ease; }
:is(.home-main, .woocommerce) ul.products li.product.ml-product-card .woocommerce-loop-product__title { margin: 0 12px 8px; padding: 0; min-height: 0; font-size: 20px; font-weight: 650; line-height: 1.2; color: #101e2c; overflow-wrap: anywhere; }
.ml-product-card .woocommerce-loop-product__title a { text-decoration: none; }
.ml-product-card .woocommerce-loop-product__title a:hover { color: #175888; text-decoration: underline; text-underline-offset: 3px; }
:is(.home-main, .woocommerce) ul.products li.product.ml-product-card .product-pack { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-height: 0; margin: 0 12px 12px; padding: 0; font-size: 13px; line-height: 1.4; color: #526272; }
.product-pack > span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.product-pack svg { width: 16px; height: 16px; flex: none; color: #7b8996; }
:is(.home-main, .woocommerce) ul.products li.product.ml-product-card .price { align-self: flex-start; margin: 0 12px 12px; padding: 8px 12px; min-height: 0; background: #edf5fc; border-radius: 8px; color: #073057; font-size: 23px; font-weight: 700; line-height: 1.2; max-width: calc(100% - 24px); }
.ml-product-card .price del { font-size: 14px; font-weight: 400; }
.ml-product-card .price ins { text-decoration: none; }
:is(.home-main, .woocommerce) ul.products li.product.ml-product-card .product-storage { min-height: 0; padding: 12px 0; margin: 0 12px; border-top: 1px solid #e9edf2; font-size: 13px; line-height: 1.45; color: #526272; }
.ml-product-card .product-storage p { display: flex; align-items: flex-start; gap: 8px; margin: 0; }
.ml-product-card .product-storage p + p { margin-top: 8px; }
.ml-product-card .product-storage svg { flex: 0 0 20px; color: #668ca8; }
.ml-product-card .product-storage .ml-icon-leaf { color: #548653; }
:is(.home-main, .woocommerce) ul.products li.product.ml-product-card .ml-card-purchase { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 8px 12px; align-items: center; margin: auto 12px 0; padding-top: 12px; border-top: 1px solid #e9edf2; }
.ml-product-card .ml-quantity { grid-template-columns: 40px minmax(0, 1fr) 40px; border-color: #dde5ed; border-radius: 8px; }
.ml-product-card .ml-quantity button { background: #f5f8fb; font-size: 22px; min-height: 46px; }
body .ml-product-card .ml-quantity input.qty { height: 46px; min-height: 46px; font-size: 16px; font-weight: 500; }
:is(.home-main, .woocommerce) ul.products li.product.ml-product-card .ml-card-purchase .ml-add-button { grid-column: 2; position: relative; display: flex; align-items: center; justify-content: center; width: 56px; min-height: 48px; height: 48px; margin: 0; padding: 0; border-radius: 8px; background: #073057; }
.ml-product-card .ml-add-button svg { width: 24px; height: 24px; }
.ml-product-card .ml-add-button.is-loading svg { visibility: hidden; }
.ml-product-card .ml-add-button.is-loading::after { content: ''; position: absolute; width: 20px; height: 20px; border: 2px solid #ffffff60; border-top-color: white; border-radius: 50%; animation: ml-cart-spin .7s linear infinite; }
:is(.home-main, .woocommerce) ul.products li.product.ml-product-card .ml-card-status { grid-column: 1 / -1; min-height: 0; font-size: 12px; }
.ml-card-status:empty { display: none; }
:is(.home-main, .woocommerce) ul.products li.product.ml-product-card .product-rating-badge { position: absolute; left: 12px; bottom: 12px; top: auto; padding: 4px 8px; font-size: 14px; gap: 4px; border-radius: 8px; background: #fff; }
.ml-product-card .product-rating-badge > span { font-size: 16px; }
:is(.home-main, .woocommerce) ul.products li.product.ml-product-card > .button { margin: auto 12px 0; }
@keyframes ml-cart-spin { to { transform: rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .ml-product-card, .ml-card-image img { transition: none !important; } .ml-product-card .ml-add-button.is-loading::after { animation: none; } }
/* Keep the same usable control width in shop/category rows. */
.woocommerce .product-carousel ul.products li.product.ml-product-card { flex-basis: calc((100% - 72px) / 4); max-width: none; }
@media (max-width:1200px) { .woocommerce .product-carousel ul.products li.product.ml-product-card { flex-basis: calc((100% - 48px) / 3); } }
@media (max-width:900px) { .woocommerce .product-carousel ul.products li.product.ml-product-card { flex-basis: calc((100% - 24px) / 3); } }
@media (max-width:600px) {
  .woocommerce .product-carousel ul.products li.product.ml-product-card { flex-basis: 76%; max-width: 280px; }
  .woocommerce ul.products:not(.product-carousel ul.products) { grid-template-columns: 1fr; }
}

/* Scroll containers clip both axes. Reserve paint space inside the scrollport. */
body :is(.home-main, .woocommerce) .product-carousel ul.products {
  padding: 24px;
  margin: -24px;
  scroll-padding-inline: 24px;
}
@media (hover: hover) {
  :is(.home-main, .woocommerce) ul.products li.product.ml-product-card:hover { box-shadow: 0 6px 16px -4px #07305730; }
}
@media (max-width: 900px) {
  body :is(.home-main, .woocommerce) .product-carousel ul.products { padding-inline: 12px; margin-inline: -12px; scroll-padding-inline: 12px; }
}

/* Buttons retain their own palettes; hover and press feedback is shared. */
body :is(.button, .hero-arrow, .carousel-next, .ml-quantity button, .product-search button, .menu-toggle, .ml-cart-notice > button) {
  transition: background-color .16s ease, border-color .2s ease, color .2s ease, filter .2s ease;
}
@media (hover: hover) {
  body :is(.button, .hero-arrow, .carousel-next, .product-search button):not(:disabled):not(.loading):hover {
    filter: brightness(.88);
  }
  body .ml-product-card .ml-quantity button:not(:disabled):hover { background: #deebf4; color: #073057; }
  body :is(.menu-toggle, .ml-cart-notice > button):hover { background: #7a9cba30; border-radius: 8px; }
}
body :is(.button, .hero-arrow, .carousel-next, .ml-quantity button, .product-search button):not(:disabled):active {
  filter: brightness(.8);
}
body :is(.button, .hero-arrow, .carousel-next, .ml-quantity button, .product-search button):focus-visible { outline: 3px solid #ee9b59; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  body :is(.button, .hero-arrow, .carousel-next, .ml-quantity button, .product-search button, .menu-toggle, .ml-cart-notice > button) { transition: none; transform: none; }
}

/* Override WooCommerce's fixed quantity width in archives as well as homepage cards. */
body.woocommerce ul.products li.product .ml-quantity .quantity input.qty,body .products li.product .ml-quantity .quantity input.qty { width:100%; max-width:none; min-width:0; height:44px; padding:4px; margin:0; border:0; border-radius:0; box-shadow:none; text-align:center; }
body .products li.product .ml-quantity .quantity { width:100%; min-width:0; }
