/* Nilooshop — isolated category description card + More/Less.
 * Built on the frozen v1.4.22 baseline. No product-page rules are changed.
 */
body.nilooshop-front-catalog .woocommerce-products-header__description,
body.nilooshop-front-catalog .term-description{
  position:relative;
  box-sizing:border-box;
  margin:18px auto 20px;
  padding:20px 22px 22px;
  width:100%;
  border:1px solid rgba(25,180,126,.28);
  border-radius:20px;
  background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(242,253,248,.97));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 8px 24px rgba(20,120,88,.08),
    0 0 24px rgba(25,180,126,.13);
  overflow:hidden;
}

body.nilooshop-front-catalog .woocommerce-products-header__description::before,
body.nilooshop-front-catalog .term-description::before{
  content:"";
  position:absolute;
  top:0;
  left:8%;
  right:8%;
  height:3px;
  border-radius:0 0 999px 999px;
  background:linear-gradient(90deg,transparent,#19b47e,#8ff0cf,#19b47e,transparent);
  box-shadow:0 0 14px rgba(25,180,126,.28);
  pointer-events:none;
}

body.nilooshop-front-catalog .woocommerce-products-header__description > :first-child,
body.nilooshop-front-catalog .term-description > :first-child{margin-top:0}

body.nilooshop-front-catalog .woocommerce-products-header__description.nlo-cat-desc-collapsed,
body.nilooshop-front-catalog .term-description.nlo-cat-desc-collapsed{
  max-height:150px;
  overflow:hidden;
}

body.nilooshop-front-catalog .woocommerce-products-header__description.nlo-cat-desc-collapsed::after,
body.nilooshop-front-catalog .term-description.nlo-cat-desc-collapsed::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:52px;
  background:linear-gradient(to bottom,rgba(242,253,248,0),rgba(242,253,248,.98));
  pointer-events:none;
}

body.nilooshop-front-catalog .nlo-cat-desc-toggle{
  display:block;
  margin:10px auto 22px;
  padding:8px 18px;
  border:1px solid rgba(25,180,126,.32);
  border-radius:999px;
  background:rgba(255,255,255,.96);
  color:#168d68;
  font:inherit;
  font-weight:700;
  line-height:1.4;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(20,120,88,.08);
  transition:box-shadow .18s ease,transform .18s ease,background .18s ease;
}

body.nilooshop-front-catalog .nlo-cat-desc-toggle:hover{
  background:#f2fff9;
  box-shadow:0 6px 18px rgba(20,120,88,.13);
}

body.nilooshop-front-catalog .nlo-cat-desc-toggle:active{transform:translateY(1px)}

@media(max-width:767px){
  body.nilooshop-front-catalog .woocommerce-products-header__description,
  body.nilooshop-front-catalog .term-description{
    margin:14px auto 16px;
    padding:17px 15px 19px;
    border-radius:17px;
  }
  body.nilooshop-front-catalog .woocommerce-products-header__description.nlo-cat-desc-collapsed,
  body.nilooshop-front-catalog .term-description.nlo-cat-desc-collapsed{max-height:112px}
  body.nilooshop-front-catalog .nlo-cat-desc-toggle{margin:8px auto 18px;padding:7px 16px;font-size:14px}
}

@media(prefers-reduced-motion:reduce){
  body.nilooshop-front-catalog .nlo-cat-desc-toggle{transition:none}
}

/* Catalog titles use the active Woodmart/theme font; do not force the bundled Compset font. */
body.nilooshop-front-catalog .wd-page-title .breadcrumbs,
body.nilooshop-front-catalog .wd-breadcrumbs,
body.nilooshop-front-catalog .wd-breadcrumbs-container,
body.nilooshop-front-catalog .woocommerce-result-count,
body.nilooshop-front-catalog .woocommerce-products-header + .shop-loop-head .woocommerce-result-count{
  display:none!important;
}

body.nilooshop-front-catalog .product-grid-item .product-element-bottom .wd-entities-title,
body.nilooshop-front-catalog .product-grid-item .product-element-bottom .wd-entities-title a,
body.nilooshop-front-catalog .product-grid-item .woocommerce-loop-product__title{
  font-size:16px!important;
  font-weight:700!important;
  line-height:1.65!important;
  margin-inline-start:0!important;
  margin-inline-end:0!important;
  margin-bottom:4.15em!important;
  font-synthesis:none;
}

/* Soft card halo only; no dimensions or overflow are added to the page. */
body.nilooshop-front-catalog .product-grid-item{
  box-shadow:0 0 26px rgba(25,180,126,.12);
}

/* RTL order: label first, then amount; shift the complete price block inward from the right. */
body.nilooshop-front-catalog .product-grid-item .product-element-bottom .nlo-cat-price{
  display:inline-flex!important;
  align-items:baseline;
  flex-direction:row;
  direction:rtl!important;
  gap:4px!important;
  white-space:nowrap!important;
  position:relative!important;
  right:auto!important;
  inset-inline-start:auto!important;
  margin-inline-start:0!important;
  margin-inline-end:0!important;
  transform:none!important;
  color:transparent!important;
  background:linear-gradient(100deg,#087d59 0%,#16b77d 30%,rgba(255,255,255,.72) 48%,#16b77d 62%,#087d59 100%);
  background-size:300% 100%;
  -webkit-background-clip:text;
  background-clip:text;
  animation:nloPriceShimmer 5.8s ease-in-out infinite alternate!important;
}
body.nilooshop-front-catalog .nlo-cat-price-label,
body.nilooshop-front-catalog .nlo-cat-price-value,
body.nilooshop-front-catalog .nlo-cat-price-value .price,
body.nilooshop-front-catalog .nlo-cat-price-value .amount,
body.nilooshop-front-catalog .nlo-cat-price-value bdi,
body.nilooshop-front-catalog .nlo-cat-price-value .woocommerce-Price-currencySymbol{
  color:inherit!important;
  background:inherit;
  -webkit-background-clip:text;
  background-clip:text;
}
body.nilooshop-front-catalog .nlo-cat-price-label{
  direction:rtl!important;
  unicode-bidi:isolate;
  white-space:nowrap;
}
body.nilooshop-front-catalog .nlo-cat-price-value{
  display:inline!important;
  direction:rtl!important;
  unicode-bidi:isolate;
  white-space:nowrap!important;
}
body.nilooshop-front-catalog .nlo-cat-price-value .price{display:inline!important;margin:0!important}
body.nilooshop-front-catalog .nlo-cat-price-value bdi{direction:rtl!important;unicode-bidi:isolate!important;display:inline!important}
body.nilooshop-front-catalog .nlo-cat-price-value .woocommerce-Price-currencySymbol{margin:0!important;white-space:nowrap}

@keyframes nloPriceShimmer{
  0%{background-position:100% 0}
  100%{background-position:0% 0}
}

@media(prefers-reduced-motion:reduce){body.nilooshop-front-catalog .nlo-cat-price{animation:none!important}}


/* v1.4.47: WooCommerce price HTML is wrapped directly in .nlo-cat-price-value;
   it does not always contain a nested .price element. Target both markup shapes. */
body.nilooshop-front-catalog .nlo-cat-price:has(.nlo-cat-price-value del):has(.nlo-cat-price-value ins) {
  display:inline-flex!important;
  align-items:center!important;
  flex-direction:column!important;
  vertical-align:middle!important;
  white-space:normal!important;
  gap:2px!important;
}
body.nilooshop-front-catalog .nlo-cat-price-value:has(del):has(ins) {
  display:inline-flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:normal!important;
  line-height:1.25!important;
  min-width:0!important;
}
body.nilooshop-front-catalog .nlo-cat-price-value:has(del):has(ins) > del,
body.nilooshop-front-catalog .nlo-cat-price-value:has(del):has(ins) .price del {
  display:block!important;
  order:0!important;
  max-width:100%!important;
  color:#9aa3a0!important;
  opacity:1!important;
  text-decoration:line-through!important;
  text-decoration-color:#9aa3a0!important;
  text-decoration-thickness:1.5px!important;
  font-size:.82em!important;
  line-height:1.35!important;
  white-space:normal!important;
  margin:0!important;
}
body.nilooshop-front-catalog .nlo-cat-price-value:has(del):has(ins) > ins,
body.nilooshop-front-catalog .nlo-cat-price-value:has(del):has(ins) .price ins {
  display:block!important;
  order:1!important;
  margin:0!important;
  text-decoration:none!important;
  line-height:1.4!important;
  white-space:normal!important;
}
body.nilooshop-front-catalog .nlo-cat-price-value:has(del):has(ins) del .amount,
body.nilooshop-front-catalog .nlo-cat-price-value:has(del):has(ins) del .amount bdi {
  text-decoration:line-through!important;
  text-decoration-color:#9aa3a0!important;
  text-decoration-thickness:1.5px!important;
}


/* v1.4.54: mobile-only internal alignment. Keep the card skin unchanged.
   No fixed card height or decorative sub-boxes; align title, price and CTA
   within the naturally stretched product row. */
@media (max-width: 767px) {
  body.nilooshop-front-catalog .product-grid-item {
    height: auto !important;
    min-height: 0 !important;
    align-self: stretch !important;
  }
  body.nilooshop-front-catalog .product-grid-item .product-element-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
    height: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }
  body.nilooshop-front-catalog .product-grid-item .product-element-bottom .wd-entities-title,
  body.nilooshop-front-catalog .product-grid-item .product-element-bottom .wd-entities-title a,
  body.nilooshop-front-catalog .product-grid-item .woocommerce-loop-product__title {
    box-sizing: border-box !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    overflow: hidden !important;
    min-height: 4.8em !important;
    max-height: 4.8em !important;
    height: 4.8em !important;
    line-height: 1.6 !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
  }
  body.nilooshop-front-catalog .product-grid-item .product-element-bottom .nlo-cat-price,
  body.nilooshop-front-catalog .product-grid-item .product-element-bottom > .price {
    box-sizing: border-box !important;
    min-height: 3.8em !important;
    height: auto !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
  }
  body.nilooshop-front-catalog .product-grid-item .product-element-bottom .wd-add-btn,
  body.nilooshop-front-catalog .product-grid-item .product-element-bottom .add-to-cart-loop,
  body.nilooshop-front-catalog .product-grid-item .product-element-bottom .wd-add-btn-replace {
    margin-top: auto !important;
  }
}
