/* Shared WooCommerce category and product cards. Corporate UI colors are
   independent of the decorative Bauhaus palette. */
:root {
  --lge-card-gold:#a98225;
  --lge-card-ink:#111;
  --lge-card-border:#ded8cd;
  --lge-card-radius:8px;
  --lge-card-shadow:0 4px 12px rgba(0,0,0,.12);
}

body :is(ul.products li.product, .wc-block-grid__product) {
  --lge-card-pad:16px;
  --lge-card-image-height:190px;
  box-sizing:border-box;
  position:relative;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  min-width:0;
  min-height:0!important;
  height:auto!important;
  padding:var(--lge-card-pad)!important;
  border:2px solid var(--lge-card-border)!important;
  border-radius:var(--lge-card-radius)!important;
  background:#fff!important;
  box-shadow:none!important;
  text-align:center!important;
  transform:none!important;
  transition:border-color .15s ease,box-shadow .15s ease;
}
body .lge-home-products :is(ul.products li.product, .wc-block-grid__product) {--lge-card-image-height:180px}
body .related.products li.product,
body .upsells.products li.product,
body .cross-sells.products li.product {--lge-card-image-height:160px}

body :is(ul.products li.product .woocommerce-LoopProduct-link,ul.products li.product.product-category>a,.wc-block-grid__product .wc-block-grid__product-link) {
  display:flex!important;
  flex:1 1 auto;
  flex-direction:column!important;
  min-width:0;
  width:100%;
  text-align:center!important;
  text-decoration:none!important;
}
body :is(ul.products li.product > a.woocommerce-LoopProduct-link > img,ul.products li.product-category > a > img,.wc-block-grid__product-image img) {
  display:block!important;
  box-sizing:border-box;
  width:100%!important;
  height:var(--lge-card-image-height)!important;
  max-width:100%!important;
  max-height:none!important;
  margin:0 0 12px!important;
  border-radius:0!important;
  background:#fff;
  object-fit:contain!important;
  transform:none!important;
}
body .wc-block-grid__product-image {
  display:grid!important;
  place-items:center;
  width:100%;
  height:var(--lge-card-image-height)!important;
  margin:0 0 12px!important;
  background:#fff;
}
body .wc-block-grid__product-image img {height:100%!important;margin:0!important}

/* The name surface exists at rest so the hover never changes geometry. */
body :is(ul.products li.product .woocommerce-loop-product__title,.wc-block-grid__product .wc-block-grid__product-title) {
  display:block!important;
  box-sizing:border-box;
  width:100%;
  min-height:0!important;
  margin:0!important;
  padding:12px 10px!important;
  border-radius:4px;
  background:color-mix(in srgb,var(--lge-surface-gold-soft,#E9DDD0) 25%,#fff);
  color:var(--lge-card-ink)!important;
  font-size:18px!important;
  font-weight:600!important;
  line-height:1.35!important;
  text-align:center!important;
  text-transform:none!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  -webkit-line-clamp:unset!important;
  -webkit-box-orient:initial!important;
}
body :is(ul.products li.product .woocommerce-loop-product__title,.wc-block-grid__product .wc-block-grid__product-title)::after {
  content:"";
  display:block;
  width:32px;
  height:2px;
  margin:12px auto 0;
  background:var(--lge-card-gold);
}
body :is(ul.products li.product .price,.wc-block-grid__product .wc-block-grid__product-price) {
  display:block!important;
  width:100%;
  min-width:0;
  margin:auto 0 0!important;
  padding:14px 0 0!important;
  color:var(--lge-card-ink)!important;
  font-size:25px!important;
  font-weight:700!important;
  line-height:1.2!important;
  text-align:center!important;
  white-space:normal!important;
}
body :is(ul.products li.product .price,.wc-block-grid__product .wc-block-grid__product-price) .woocommerce-Price-amount.amount {
  color:var(--lge-card-ink)!important;
  font-size:25px!important;
  font-weight:700!important;
}
body :is(ul.products li.product .price,.wc-block-grid__product .wc-block-grid__product-price) .woocommerce-price-suffix {
  display:inline-block;
  margin-left:3px;
  color:#4f4f4f!important;
  font-size:13.5px!important;
  font-weight:500!important;
  line-height:1.3;
  white-space:normal!important;
}
body :is(ul.products li.product .price,.wc-block-grid__product .wc-block-grid__product-price) del {
  display:block!important;
  margin:0 0 3px!important;
  color:#777!important;
  font-size:15px!important;
  font-weight:500!important;
  line-height:1.3;
  opacity:1!important;
}
body :is(ul.products li.product .price,.wc-block-grid__product .wc-block-grid__product-price) del .woocommerce-Price-amount.amount {color:#777!important;font-size:15px!important;font-weight:500!important}
body :is(ul.products li.product .price,.wc-block-grid__product .wc-block-grid__product-price) ins {color:var(--lge-card-ink)!important;font-weight:700!important;text-decoration:none!important}

/* Category title and visible action share one tinted lower panel inside the only link. */
body ul.products li.product-category .lge-card-category-info {
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  width:100%;
  min-width:0;
  margin-top:2px;
  padding:8px;
  border-radius:0 0 4px 4px;
  background:color-mix(in srgb,var(--lge-surface-gold-soft,#E9DDD0) 25%,#fff);
}
body ul.products li.product-category .woocommerce-loop-category__title {
  display:block!important;
  width:100%;
  min-height:0!important;
  margin:0!important;
  padding:12px 8px!important;
  border-radius:4px;
  background:transparent;
  color:var(--lge-card-ink)!important;
  font-size:21px!important;
  font-weight:600!important;
  line-height:1.3!important;
  text-align:center!important;
  text-transform:none!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

/* Existing commercial buttons keep their labels and destinations. */
body :is(ul.products li.product,.wc-block-grid__product) :is(.lge-card-action,a.button,.wc-block-grid__product-add-to-cart .wp-block-button__link) {
  box-sizing:border-box;
  display:flex!important;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:44px;
  margin:14px 0 0!important;
  padding:9px 13px!important;
  border:1px solid var(--lge-card-ink)!important;
  border-radius:7px!important;
  background:var(--lge-card-ink)!important;
  color:#fff!important;
  font-size:16px!important;
  font-weight:600!important;
  line-height:1.3!important;
  text-align:center!important;
  text-decoration:none!important;
  white-space:normal!important;
  cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease,color .15s ease;
}
body ul.products li.product.product-category > a > .lge-card-category-info > .lge-card-action {margin-top:auto!important}
body ul.products li.product:has(>a.button) .woocommerce-LoopProduct-link .lge-card-action,
body ul.products li.product:has(>button) .woocommerce-LoopProduct-link .lge-card-action {display:none!important}
body :is(ul.products li.product,.wc-block-grid__product) .lge-card-arrow {display:inline-block;margin-left:5px;transition:transform .15s ease}

@media(hover:hover) {
  body :is(ul.products li.product,.wc-block-grid__product):hover {border-color:var(--lge-card-gold)!important;box-shadow:var(--lge-card-shadow)!important}
  body :is(ul.products li.product,.wc-block-grid__product):hover :is(.woocommerce-loop-product__title,.wc-block-grid__product-title,.woocommerce-loop-category__title) {background:color-mix(in srgb,var(--lge-card-gold) 13%,#fff);color:var(--lge-card-ink)!important}
  body :is(ul.products li.product,.wc-block-grid__product):hover :is(.lge-card-action,a.button,.wc-block-grid__product-add-to-cart .wp-block-button__link) {border-color:var(--lge-card-gold)!important;background:var(--lge-card-gold)!important;color:#fff!important}
  body :is(ul.products li.product,.wc-block-grid__product):hover .lge-card-arrow {transform:translateX(3px)}
}
body :is(ul.products li.product,.wc-block-grid__product):focus-within {border-color:var(--lge-card-gold)!important;box-shadow:var(--lge-card-shadow)!important}
body :is(ul.products li.product,.wc-block-grid__product):focus-within :is(.woocommerce-loop-product__title,.wc-block-grid__product-title,.woocommerce-loop-category__title) {background:color-mix(in srgb,var(--lge-card-gold) 13%,#fff);color:var(--lge-card-ink)!important}
body :is(ul.products li.product,.wc-block-grid__product):focus-within :is(.lge-card-action,a.button,.wc-block-grid__product-add-to-cart .wp-block-button__link) {border-color:var(--lge-card-gold)!important;background:var(--lge-card-gold)!important;color:#fff!important}
body :is(ul.products li.product,.wc-block-grid__product):focus-within .lge-card-arrow {transform:translateX(3px)}
body :is(ul.products li.product,.wc-block-grid__product) a:focus-visible {outline:3px solid var(--lge-card-ink)!important;outline-offset:3px}

@media(max-width:700px) {
  body :is(ul.products li.product,.wc-block-grid__product) {--lge-card-pad:12px;--lge-card-image-height:142px}
  body :is(ul.products li.product .woocommerce-loop-product__title,.wc-block-grid__product .wc-block-grid__product-title) {font-size:16px!important}
  body ul.products li.product-category .woocommerce-loop-category__title {font-size:18px!important}
}
@media(max-width:500px) {
  body :is(ul.products li.product,.wc-block-grid__product) {--lge-card-image-height:190px}
}
@media(prefers-reduced-motion:reduce) {
  body :is(ul.products li.product,.wc-block-grid__product),
  body :is(ul.products li.product,.wc-block-grid__product) :is(.lge-card-action,a.button,.lge-card-arrow) {transition:none!important}
}
