/* AvvalStock Product System v23.0 — clean mobile design layer.
 * This file is the ONLY owner of card visuals at <=767px.
 * Desktop master styles remain in product-system-card.css / elementor-products-v192.css.
 */
@media (max-width:767px){
  .avs-product-system{--avs-card-radius:14px;--avs-card-row-radius:8px;--avs-card-shadow:0 5px 16px rgba(23,32,51,.05)}
  .avs-product-system *, .avs-product-system *::before, .avs-product-system *::after{box-sizing:border-box}

  .avs-product-system ul.products>li.product.avs-product-card{
    min-height:0!important;height:auto!important;border-color:#dfe6ef!important;border-radius:14px!important;
    box-shadow:var(--avs-card-shadow)!important;overflow:hidden!important;background:#fff!important;
  }

  /* Promo rail: intentionally larger than v22 while staying compact. */
  .avs-product-system .avs-product-card__promo{height:42px!important;min-height:42px!important;padding:5px 5px!important;border-bottom:1px solid #ffe0e6!important;background:#fffafb!important}
  .avs-product-system .avs-product-card__promo.is-regular{visibility:hidden!important}
  .avs-product-system .avs-product-card__promo-spacer{height:30px!important}
  .avs-product-system .avs-sale-timer--rail{display:flex!important;align-items:center!important;width:100%!important;min-height:32px!important;gap:4px!important;direction:rtl!important}
  .avs-product-system .avs-sale-timer__title{flex:0 0 50px!important;width:50px!important;height:28px!important;padding:0 4px!important;border-radius:999px!important;font-size:8.4px!important;font-weight:950!important;order:1!important}
  .avs-product-system .avs-sale-timer__countdown{display:flex!important;flex:1 1 auto!important;align-items:center!important;justify-content:center!important;gap:3px!important;min-width:0!important;order:2!important;direction:rtl!important}
  .avs-product-system .avs-time-unit{flex:0 0 23px!important;width:23px!important;height:30px!important;padding:2px 1px!important;border-radius:6px!important}
  .avs-product-system .avs-time-unit b{font-size:10.5px!important;line-height:1!important;font-weight:950!important}
  .avs-product-system .avs-time-unit i{margin-top:2px!important;font-size:5.2px!important;line-height:1!important;font-weight:800!important}
  .avs-product-system .avs-sale-timer__flame{flex:0 0 22px!important;width:22px!important;height:22px!important;margin:0!important;order:3!important;border-radius:999px!important;background:#ffe8ee!important;box-shadow:0 3px 8px rgba(255,73,103,.16)!important;color:#ff4d6f!important}
  .avs-product-system .avs-sale-timer__flame svg{width:13px!important;height:13px!important;fill:currentColor!important}

  /* Compact media + title. */
  .avs-product-system .avs-product-card__image{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;aspect-ratio:1.34/1!important;min-height:0!important;margin:0!important;padding:6px 6px 1px!important;overflow:hidden!important}
  .avs-product-system .avs-product-card__image img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}
  .avs-product-system .avs-product-card__body{display:flex!important;flex:0 0 auto!important;flex-direction:column!important;width:100%!important;min-width:0!important;padding:0 6px 5px!important}
  .avs-product-system .avs-product-card__title{display:-webkit-box!important;width:100%!important;min-height:28px!important;height:28px!important;max-height:28px!important;margin:0 0 4px!important;padding:0 1px!important;overflow:hidden!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;white-space:normal!important;color:#344054!important;font-size:10.1px!important;line-height:1.34!important;font-weight:680!important;text-align:center!important}
  .avs-product-system .avs-product-card__decision{display:flex!important;flex:0 0 auto!important;flex-direction:column!important;min-width:0!important}

  /* Specs stay readable but compact. */
  .avs-product-system .avs-product-card__specs{display:grid!important;grid-template-columns:1fr!important;gap:3px!important;width:100%!important;margin:0 0 4px!important}
  .avs-product-system .avs-product-card__spec{display:grid!important;grid-template-columns:18px minmax(28px,.68fr) minmax(39px,1fr) minmax(30px,.72fr)!important;grid-template-rows:19px!important;align-items:center!important;min-height:28px!important;height:28px!important;padding:3px 4px!important;border:1px solid #e7edf4!important;border-radius:8px!important;background:#fff!important;overflow:hidden!important}
  .avs-product-system .avs-product-card__spec-icon{display:flex!important;align-items:center!important;justify-content:center!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;padding:2px!important;border-radius:5px!important}
  .avs-product-system .avs-product-card__spec-icon svg{display:block!important;width:11px!important;height:11px!important;min-width:11px!important;min-height:11px!important;max-width:11px!important;max-height:11px!important}
  .avs-product-system .avs-product-card__spec-label{font-size:8.2px!important;line-height:1!important;font-weight:900!important}
  .avs-product-system .avs-product-card__spec-primary{font-size:9.5px!important;line-height:1!important;font-weight:950!important}
  .avs-product-system .avs-product-card__spec-secondary{font-size:7.9px!important;line-height:1!important;font-weight:850!important}

  /* TRUE mobile commerce grid.
   * price wrappers become transparent grid participants via display:contents.
   * Row 1 = discount/old price. Row 2 = live price + CTA.
   */
  .avs-product-system .avs-product-card__footer{
    display:grid!important;grid-template-columns:minmax(0,1fr) 40px!important;grid-template-rows:18px 40px!important;
    grid-template-areas:"meta ." "base cta"!important;align-items:end!important;column-gap:6px!important;row-gap:0!important;
    width:100%!important;min-width:0!important;min-height:58px!important;margin:0!important;padding:3px 0 0!important;
    border-top:1px solid #eef2f6!important;background:#fff!important;direction:ltr!important;
  }
  .avs-product-system .avs-product-card__price,.avs-product-system .avs-product-price{display:contents!important}
  .avs-product-system .avs-product-price__off{grid-area:meta!important;position:static!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;align-self:center!important;width:100%!important;min-width:0!important;min-height:18px!important;margin:0!important;padding:0!important;gap:5px!important;direction:ltr!important;text-align:left!important;overflow:visible!important}
  .avs-product-system .avs-product-price__off.is-placeholder{visibility:hidden!important}
  .avs-product-system .avs-product-price__off del{order:2!important;display:inline-flex!important;align-items:center!important;margin:0!important;color:#99a3b4!important;font-size:15px!important;line-height:1!important;font-weight:800!important;white-space:nowrap!important}
  .avs-product-system .avs-product-price__discount{order:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:38px!important;height:22px!important;padding:0 6px!important;border-radius:7px!important;background:var(--avs-card-accent)!important;box-shadow:0 3px 8px rgba(255,73,103,.15)!important;color:#fff!important;font-size:11.5px!important;line-height:1!important;font-weight:950!important;white-space:nowrap!important}
  .avs-product-system .avs-product-price__base{grid-area:base!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;align-self:center!important;width:100%!important;min-width:0!important;min-height:40px!important;margin:0!important;padding:0!important;gap:2px!important;direction:ltr!important;text-align:left!important;white-space:nowrap!important;overflow:visible!important}
  .avs-product-system .avs-product-price__base>span{display:inline-flex!important;align-items:baseline!important;gap:0!important;color:#111827!important;font-size:18.8px!important;line-height:1!important;font-weight:950!important;white-space:nowrap!important}
  .avs-product-system .avs-product-price__base .woocommerce-Price-amount,.avs-product-system .avs-product-price__base bdi{font-size:inherit!important;line-height:inherit!important;font-weight:inherit!important;direction:ltr!important;unicode-bidi:isolate!important}
  .avs-product-system .woocommerce-Price-currencySymbol{order:-1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;margin-inline:0 2px!important;font-size:.46em!important;line-height:1!important}
  .avs-product-system .avs-product-card__cta{grid-area:cta!important;display:flex!important;align-items:center!important;justify-content:center!important;justify-self:end!important;align-self:center!important;width:40px!important;min-width:40px!important;height:40px!important;margin:0!important;padding:0!important;border-radius:9px!important;font-size:0!important;gap:0!important;box-shadow:0 4px 12px rgba(255,76,112,.15)!important}
  .avs-product-system .avs-product-card__cta-icon{width:18px!important;height:18px!important;flex-basis:18px!important}
  .avs-product-system .avs-cta-label-full,.avs-product-system .avs-cta-label-grid{display:none!important}

  /* No-price cards use the exact same main row. */
  .avs-product-system .avs-product-card--no-price .avs-product-card__footer{grid-template-rows:0 40px!important;min-height:43px!important}
  .avs-product-system .avs-product-card--no-price .avs-product-card__price--contact,.avs-product-system .avs-product-card--no-price .avs-product-price{display:contents!important}
  .avs-product-system .avs-product-card--no-price .avs-price-contact{grid-area:base!important;display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;align-self:center!important;width:max-content!important;height:24px!important;min-height:24px!important;margin:0!important;padding:0 8px!important;border-radius:7px!important;background:#f3f5f8!important;color:#344054!important;font-size:12.5px!important;line-height:1!important;font-weight:950!important;white-space:nowrap!important}

  /* Elementor mobile rail layout belongs here too. */
  .avs-ew-products{--avs-ew-gap:8px!important}
  .avs-ew-products__header{margin-bottom:10px!important;padding-bottom:9px!important}
  .avs-ew-products__title{font-size:16px!important}
  .avs-ew-products__all{font-size:9.5px!important}
  .avs-ew-products__viewport{overflow-x:hidden!important;overflow-y:visible!important;padding-inline:0!important}
  .avs-ew-products ul.products.avs-ew-products__track{grid-auto-columns:calc((100% - var(--avs-ew-gap)) / 2)!important;gap:var(--avs-ew-gap)!important;scroll-snap-type:x proximity!important;scroll-behavior:auto!important;touch-action:pan-x pan-y!important;scroll-padding-inline:2px!important}
  .avs-ew-products__nav{display:none!important}
  .avs-ew-products ul.products.avs-ew-products__track a,.avs-ew-products ul.products.avs-ew-products__track button{-webkit-user-drag:none!important;touch-action:manipulation!important}
}

@media (max-width:389px){
  .avs-product-system .avs-product-card__image{aspect-ratio:1.29/1!important;padding:5px 5px 1px!important}
  .avs-product-system .avs-product-card__title{font-size:9.8px!important}
  .avs-product-system .avs-product-card__spec{grid-template-columns:17px minmax(25px,.64fr) minmax(35px,1fr) minmax(28px,.68fr)!important}
  .avs-product-system .avs-product-card__spec-label{font-size:7.8px!important}
  .avs-product-system .avs-product-card__spec-primary{font-size:9px!important}
  .avs-product-system .avs-product-card__spec-secondary{font-size:7.5px!important}
  .avs-product-system .avs-product-price__off del{font-size:14px!important}
  .avs-product-system .avs-product-price__discount{min-width:36px!important;height:21px!important;font-size:10.6px!important}
  .avs-product-system .avs-product-price__base>span{font-size:17.2px!important}
}
