/* =======================================================
   NATUREFOOD – VARIANT B / v1.1.0
   Targets the REAL homepage markup created by the current
   product listing: .nf-home-products-grid > .nf-home-product-card
   Not generic .product-grid (v1.0 mistake).
   No changes to WooCommerce prices, inventory or images.
   ======================================================= */

body.home .nf-home-products-grid > .nf-home-product-card,
body.home .nf-home-featured .nf-home-product-card {
  box-sizing: border-box !important;
  min-width: 0 !important;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(208, 163, 97, .50) !important;
  border-radius: 7px !important;
  background: linear-gradient(155deg, #211a14, #100d0a 64%) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,245,224,.04);
  transition: box-shadow .24s ease, border-color .24s ease, transform .24s ease;
}
body.home .nf-home-products-grid > .nf-home-product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(241, 200, 131, .78) !important;
  box-shadow: 0 17px 34px rgba(0,0,0,.37), 0 0 0 1px rgba(236,196,123,.08) inset;
}
/* The background itself is a real SVG asset; original photos are untouched.
   Existing opaque beige/white photo backgrounds remain visible in the centre. */
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-image,
body.home .nf-home-featured .nf-home-product-card .nf-home-product-image {
  box-sizing: border-box !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width:0 !important;
  width:100% !important;
  height: clamp(205px, 17vw, 280px) !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  padding: 13px 13px 8px !important;
  border-bottom:1px solid rgba(204,164,100,.30) !important;
  background: #ccb08c url("scene-sandstone.svg") center center / cover no-repeat !important;
  overflow: hidden !important;
}
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-image::after {
  content:"";
  pointer-events:none;
  position:absolute;
  z-index:3;
  inset:0;
  background: linear-gradient(90deg, rgba(67,44,26,.10) 0%, transparent 12%, transparent 88%, rgba(67,44,26,.10) 100%);
}
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-image img,
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-image .nf-home-original-photo,
body.home .nf-home-featured .nf-home-product-card .nf-home-product-image img {
  display:block !important;
  position:relative !important;
  z-index:2 !important;
  object-fit:contain !important;
  object-position:center !important;
  box-sizing:border-box !important;
  max-width:100% !important;
  max-height:100% !important;
  width:100% !important;
  height:100% !important;
  /* Hide the harsh rectangular edge of already-backgrounded packshots.
     Center (the actual product) stays opaque and sharp. */
  -webkit-mask-image: radial-gradient(ellipse 74% 75% at center, #000 73%, transparent 100%);
  mask-image: radial-gradient(ellipse 74% 75% at center, #000 73%, transparent 100%);
  filter:none !important;
  transform:none !important;
}
/* Preserve existing product-number and wishlist widgets. */
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-number { z-index:4 !important; }
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-info,
body.home .nf-home-featured .nf-home-product-card .nf-home-product-info {
  box-sizing:border-box !important;
  display:flex !important;
  flex:1 1 auto !important;
  flex-direction:column !important;
  min-width:0 !important;
  gap:0 !important;
  padding:16px 16px 15px !important;
  background:linear-gradient(180deg, #19130f 0%, #100d0b 100%) !important;
}
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-category,
body.home .nf-home-featured .nf-home-product-card .nf-home-product-category {
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  min-height:0 !important;
  margin:0 0 14px !important;
  font: 700 9px/1.3 system-ui,-apple-system,"Segoe UI",sans-serif !important;
  text-transform:uppercase !important;
  letter-spacing:.155em !important;
  color:#d5a966 !important;
}
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-category::after {
  content:"";
  flex: 1 1 auto;
  height:1px;
  background:linear-gradient(90deg, rgba(218,177,112,.56), transparent);
}
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-brand { font-size:10px!important; color:#bfae96!important; }
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-info h3,
body.home .nf-home-products-grid .nf-home-product-card .wr4-card-heading,
body.home .nf-home-featured .nf-home-product-card .nf-home-product-info h3 {
  display:-webkit-box !important;
  -webkit-line-clamp:3;
  line-clamp:3;
  -webkit-box-orient:vertical;
  min-height:3.63em !important;
  max-height:3.63em !important;
  overflow:hidden !important;
  margin:0 0 16px !important;
  padding:0 !important;
  font-family:Georgia,"Times New Roman",serif !important;
  font-weight:400 !important;
  font-size:clamp(16px, 1.16vw, 20px) !important;
  line-height:1.21 !important;
  letter-spacing:-.012em !important;
  color:#f7ebdc !important;
  overflow-wrap:break-word !important;
  word-break:normal !important;
}
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-info h3 a { color:inherit!important; text-decoration:none!important; }
/* Variant B intentionally reduces the large product descriptions in cards.
   Full descriptions stay on product detail pages. */
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-info > p:not(.nf-home-availability),
body.home .nf-home-products-grid .nf-home-product-card .nf-product-description,
body.home .nf-home-products-grid .nf-home-product-card .product-description { display:none !important; }
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-info .nf-home-availability {
  font-size:10px!important;
  line-height:1.3!important;
  padding-bottom:8px!important;
  color:#f1bc7d!important;
}
body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-bottom,
body.home .nf-home-featured .nf-home-product-card .nf-home-product-bottom {
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  margin-top:auto !important;
  width:100% !important;
  min-height:45px !important;
  padding:13px 0 0 !important;
  border-top:1px solid rgba(218,174,106,.32) !important;
  background:none !important;
}
body.home .nf-home-products-grid .nf-home-product-card .nf-home-price,
body.home .nf-home-products-grid .nf-home-product-card .nf-home-price .woocommerce-Price-amount,
body.home .nf-home-products-grid .nf-home-product-card .nf-home-price .amount,
body.home .nf-home-products-grid .nf-home-product-card .nf-home-price bdi {
  font-family:Georgia,"Times New Roman",serif !important;
  font-size:clamp(19px,1.25vw,24px) !important;
  font-weight:600!important;
  line-height:1.2!important;
  color:#f1c583 !important;
  white-space:nowrap !important;
}
body.home .nf-home-products-grid .nf-home-product-card a.nf-home-product-more,
body.home .nf-home-featured .nf-home-product-card a.nf-home-product-more {
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  width:auto!important;
  max-width:100%!important;
  min-height:35px!important;
  margin:0 0 0 auto!important;
  padding:9px 11px!important;
  border:1px solid rgba(234,190,124,.80)!important;
  border-radius:4px!important;
  background:linear-gradient(180deg,#241a13,#110d0a)!important;
  color:#f1c583!important;
  font:700 9px/1.15 system-ui,-apple-system,"Segoe UI",sans-serif!important;
  letter-spacing:.075em!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
  text-decoration:none!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05)!important;
}
body.home .nf-home-products-grid .nf-home-product-card a.nf-home-product-more:hover {
  background:linear-gradient(180deg,#332218,#19120d)!important;
  border-color:#f4cf95!important;
}
/* Currency/compact product plugins may annotate nested wrappers: keep the
   card controls usable rather than putting a price on top of a button. */
body.home .nf-home-products-grid .nf-home-product-card .wr4-price-footer,
body.home .nf-home-products-grid .nf-home-product-card .wcd-price-action-row {
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
@media (max-width:1050px){
  body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-image {height:clamp(200px,24vw,260px)!important;}
  body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-info {padding:13px 13px 14px!important;}
  body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-info h3 {font-size:17px!important;}
}
@media (max-width:700px){
  /* Keep existing two-column mobile layout and usable tap targets. */
  body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-image {height:clamp(145px,36vw,230px)!important;padding:8px!important;}
  body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-info {padding:10px 9px 12px!important;}
  body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-info h3 {font-size:15px!important;min-height:3.6em!important;max-height:3.6em!important;margin-bottom:10px!important;}
  body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-category {font-size:8px!important;margin-bottom:9px!important;letter-spacing:.085em!important;}
  body.home .nf-home-products-grid .nf-home-product-card .nf-home-product-bottom {flex-direction:column!important;align-items:stretch!important;gap:9px!important;}
  body.home .nf-home-products-grid .nf-home-product-card a.nf-home-product-more {margin-left:0!important;width:100%!important;}
  body.home .nf-home-products-grid .nf-home-product-card .nf-home-price,
  body.home .nf-home-products-grid .nf-home-product-card .nf-home-price .woocommerce-Price-amount,
  body.home .nf-home-products-grid .nf-home-product-card .nf-home-price bdi {font-size:20px!important;}
}
@media(prefers-reduced-motion:reduce){body.home .nf-home-products-grid .nf-home-product-card{transition:none!important;}}
