/* Noor Naksha v1.11.21 — focused regression fixes; existing stable styles untouched. */
/* UX-09: each reusable Woo product section has independently editable, responsive heading gap. */
.nn-product-section-v17 .nn-section-head{
  margin-bottom:var(--nn-v1121-heading-gap-d,16px)!important;
}
@media (min-width:721px) and (max-width:1024px){
  .nn-product-section-v17 .nn-section-head{margin-bottom:var(--nn-v1121-heading-gap-t,16px)!important}
}
@media (max-width:720px){
  .nn-product-section-v17 .nn-section-head{margin-bottom:var(--nn-v1121-heading-gap-m,16px)!important}
}
/* BUG-09: a 1–4 card Auto Fit creates wider cards, but must not enlarge/crop
   the entire original calligraphy artwork. This is intentionally limited to
   fewer-product grids; the verified six-product presentation is unchanged. */
.nn-product-section-v17.nn-product-auto-fit-v1120.nn-v1121-fit-few.nn-product-layout-grid .nn-product-grid-v17 .nn-product-image{
  background-size:contain!important;
  background-position:center center!important;
  background-repeat:no-repeat!important;
}
/* BUG-03B: the Related Products thumbnail stage was taller than its card
   content region. Tighten only the single-product related/upsell stage. */
@media (min-width:1025px){
  body.single-product .related.products ul.products li.product .nn-shop-product-image-v18,
  body.single-product .upsells.products ul.products li.product .nn-shop-product-image-v18{
    height:clamp(155px,15vw,205px)!important;
    line-height:0!important;
    padding:0!important;
    flex-shrink:0!important;
  }
  body.single-product .related.products ul.products li.product .nn-shop-product-info-v18,
  body.single-product .upsells.products ul.products li.product .nn-shop-product-info-v18{
    height:auto!important;
    min-height:0!important;
    padding-top:9px!important;
    margin-top:0!important;
  }
}
/* BUG-07: mobile product names must never be clipped merely because they
   exceed the four-line design assumption. Button alignment is kept by the
   existing flex-column/auto-margin geometry, not by hiding text. */
@media (max-width:720px){
  body:not(.nn-v1121-custom-title-lines) .nn-product-card .nn-product-info h3,
  body:not(.nn-v1121-custom-title-lines) .nn-shop-product-info-v18 h2.woocommerce-loop-product__title,
  body:not(.nn-v1121-custom-title-lines) .nn-empty-product-info-v1112 h3{
    display:block!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    -webkit-line-clamp:unset!important;
    line-clamp:unset!important;
    overflow:visible!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    line-height:1.4!important;
  }
  .nn-product-card .nn-product-info,
  .nn-shop-product-card-v18 .nn-shop-product-info-v18{
    height:auto!important;
    min-height:0!important;
    flex:1 1 auto!important;
  }
  .nn-product-card .nn-price,
  .nn-shop-product-card-v18 .nn-shop-product-price-v18{flex-shrink:0!important}
  .nn-product-card .nn-purchase-buttons-v1117,
  .nn-shop-product-card-v18 .nn-shop-product-action-v18{margin-top:auto!important}
}
/* BUG-08: Woo .button.alt and mobile button state colors must not override
   the approved deep-green/white Buy Now visual. No geometry/transaction changes. */
body.woocommerce.single-product form.cart button.nn-single-buy-now-v1117,
body.woocommerce.single-product form.cart button.nn-single-buy-now-v1117:hover,
body.woocommerce.single-product form.cart button.nn-single-buy-now-v1117:focus,
body.woocommerce.single-product form.cart button.nn-single-buy-now-v1117:active{
  background-color:var(--nn-green,#0c4034)!important;
  background-image:none!important;
  border-color:var(--nn-green,#0c4034)!important;
  color:#ffffff!important;
}
/* Never change the already-working Cart/Checkout controls or body overlays. */
