/* Saba Markazi / shared product card system / test release v9.
   Source of truth for category, laser, home, all products and related sliders.
   Loaded AFTER earlier card styles: no model, price, order or slider JS changes. */
:root {
  --smx-orange:#ff7900;
  --smx-orange-dark:#e86a00;
  --smx-soft-orange:#fff2e5;
  --smx-card-border:#d6dde6;
  --smx-card-photo:#e9edf2;
  --smx-line:#e8ebef;
  --smx-price-surface:#f8f9fb;
  --smx-radius:19px;
}
/* Unified frame. Use an inset ring instead of outline; the latter was clipped
   by overflow:hidden on both product cards and horizontal scroll containers. */
:is(.welding-card,.smc-product-card,.sma-card,.featured-card,.related-product-card){
  position:relative!important;
  box-sizing:border-box!important;
  border:1px solid var(--smx-card-border)!important;
  border-radius:var(--smx-radius)!important;
  overflow:hidden!important;
  background:#fff!important;
  outline:0!important;
  box-shadow:0 6px 20px rgba(20,34,54,.055)!important;
  transform:none!important;
  isolation:isolate;
  transition:box-shadow .2s ease, border-color .2s ease!important;
}
:is(.welding-card,.smc-product-card,.sma-card,.featured-card,.related-product-card)::after{
  content:"";
  position:absolute;
  inset:0;
  border:3px solid transparent;
  border-radius:inherit;
  pointer-events:none;
  z-index:9;
  transition:border-color .18s ease;
}
:is(.welding-card,.smc-product-card,.sma-card,.featured-card,.related-product-card):is(:hover,:focus-within,:active,.sm-card-touching){
  border-color:var(--smx-orange)!important;
  outline:0!important;
  transform:none!important;
  box-shadow:0 9px 26px rgba(255,121,0,.14),0 5px 14px rgba(20,34,54,.07)!important;
}
:is(.welding-card,.smc-product-card,.sma-card,.featured-card,.related-product-card):is(:hover,:focus-within,:active,.sm-card-touching)::after{
  border-color:var(--smx-orange);
}
/* Common consistent photo panel; retains original photo aspect ratio. */
:is(.welding-card-image,.smc-product-image,.sma-card-image,.featured-card .product-image,.related-product-image){
  position:relative;
  box-sizing:border-box;
  background:var(--smx-card-photo)!important;
  border-bottom:1px solid var(--smx-card-border)!important;
}
:is(.welding-card-image>img,.smc-product-image>img,.sma-card-image>img,.featured-card .product-image>img,.related-product-image>img){
  box-sizing:border-box!important;
  object-fit:contain!important;
  border:1px solid #e0e5eb!important;
  background:#fff!important;
  padding:5px!important;
  border-radius:10px!important;
  box-shadow:0 4px 12px rgba(20,34,49,.055)!important;
}
/* Admin-managed subtype labels from the model (MMA, TIG, etc.). */
.smx-card-tags,.welding-type-badges{
  position:absolute!important;
  z-index:6!important;
  inset-block-start:11px!important;
  inset-inline-start:11px!important;
  inset-inline-end:auto!important;
  display:flex!important;
  flex-wrap:wrap;
  width:auto;
  max-width:calc(100% - 22px);
  gap:5px!important;
  pointer-events:none;
}
.smx-card-tag,.welding-type-badge{
  display:inline-block;
  max-width:100%;
  border-radius:999px!important;
  padding:4px 9px!important;
  background:var(--smx-soft-orange)!important;
  color:#df6500!important;
  border:1px solid rgba(255,121,0,.32)!important;
  font-size:10px!important;
  font-weight:800!important;
  line-height:1.4!important;
  white-space:normal!important;
  overflow-wrap:anywhere;
}
/* The original laser card doesn't contain a subtype relationship in the admin:
   the registered Series name provides a meaningful pill instead. */
/* Independent uniform price + CTA markup. No absolutely positioned discount
   labels: eliminates percentage, old-price and final-price collisions. */
:is(.welding-card-footer,.smc-product-bottom,.sma-card-footer,.featured-card .product-bottom,.related-product-bottom).smx-card-footer{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  direction:rtl;
  align-items:stretch!important;
  justify-content:stretch!important;
  gap:9px!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  margin-top:auto!important;
  padding-top:13px!important;
  border-top:1px solid var(--smx-line)!important;
}
.smx-card-footer>.smx-price,
.smx-card-footer>.smx-card-cta{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:65px!important;
  border-radius:10px!important;
  margin:0!important;
  transition:background .17s ease, border-color .17s ease;
}
.smx-price{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:stretch;
  gap:3px;
  padding:7px 9px;
  color:#242a33;
  background:var(--smx-price-surface);
  border:1px solid #e2e6eb;
  text-align:right;
  overflow:hidden;
}
.smx-price-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:4px;
  min-height:16px;
}
.smx-price-label{font-size:10px;color:#848b95;white-space:nowrap;line-height:1.3;}
.smx-price-discount{
  font-size:9px;
  font-weight:850;
  color:#fff;
  line-height:1.35;
  white-space:nowrap;
  background:#e33a42;
  padding:2px 5px;
  border-radius:5px;
}
.smx-price-before{
  display:block;
  text-align:right;
  color:#939ba5;
  text-decoration:line-through;
  text-decoration-color:#dc5156;
  font-size:10px;
  line-height:1.35;
  white-space:nowrap;
}
.smx-price-before small{font-size:9px;}
.smx-price-final{
  display:block;
  line-height:1.35;
  font-size:clamp(12px,1.05vw,16px);
  font-weight:900;
  text-align:right;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.smx-price-final.is-discounted{color:#ea6900;}
.smx-price-final small{font-size:9px;font-weight:500;color:#858d96;}
.smx-price-inquiry{font-size:12px;color:#e36a00;}
.smx-stock{font-size:9px;font-weight:700;}
.smx-stock.is-in{color:#12834f;}
.smx-stock.is-out{color:#b65353;}
.smx-card-footer>.smx-card-cta{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  gap:5px;
  padding:8px!important;
  border:1px solid var(--smx-orange)!important;
  background:var(--smx-orange)!important;
  color:white!important;
  font-weight:850!important;
  font-size:12px!important;
  line-height:1.45!important;
  white-space:normal!important;
  text-align:center!important;
  text-decoration:none!important;
}
.smx-card-cta::after{content:"←";font-size:12px;font-weight:900;}
.smx-card-footer>.smx-card-cta:is(:hover,:focus-visible){background:var(--smx-orange-dark)!important;border-color:var(--smx-orange-dark)!important;}
/* Related/featured cards: keep swipe and grid behavior unchanged. */
.featured-track .featured-card .product-details,
.related-products-grid .related-product-content,
.smc-catalog-grid .smc-product-details,
.sma-page .sma-card-body{
  min-width:0;
  display:flex;
  flex-direction:column;
}
.featured-track .featured-card .smx-card-footer,
.related-products-grid .related-product-card .smx-card-footer{flex-shrink:0;}
/* Header cart: compact, crisp SVG with clear count badge. */
.site-header .cart{border-radius:13px;gap:9px;}
.site-header .cart-icon{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border:1px solid #ffddb9;
  border-radius:11px;
  color:#202b39;
  background:#fff6eb;
  flex:0 0 auto;
}
.site-header .cart-icon .sm-cart-svg{width:24px!important;height:24px!important;}
.site-header .cart-icon .cart-badge{
  top:-7px!important;
  inset-inline-start:-7px!important;
  left:auto!important;
  right:auto!important;
  display:grid;
  place-items:center;
  min-width:19px;
  height:19px;
  line-height:1;
  border:2px solid #fff;
  border-radius:999px;
  background:var(--smx-orange)!important;
  color:#fff;
  box-sizing:content-box;
  font-size:10px;
}
@media(max-width:700px){
  :is(.welding-card-footer,.smc-product-bottom,.sma-card-footer,.featured-card .product-bottom,.related-product-bottom).smx-card-footer{
    grid-template-columns:minmax(0,1fr)!important;
    gap:6px!important;
    padding-top:9px!important;
  }
  .smx-card-footer>.smx-price{min-height:59px!important;padding:7px 8px;}
  .smx-card-footer>.smx-card-cta{min-height:37px!important;font-size:11px!important;padding:6px!important;}
  .smx-price-final{font-size:clamp(11px,2.6vw,15px);}
  .smx-price-discount{font-size:8px;padding:2px 4px;}
  .smx-price-before{font-size:9px;}
  .smx-card-tag,.welding-type-badge{font-size:9px!important;padding:3px 6px!important;}
  .smx-card-tags,.welding-type-badges{inset-block-start:7px!important;inset-inline-start:7px!important;max-width:calc(100% - 14px);}
}
@media(prefers-reduced-motion:reduce){
  :is(.welding-card,.smc-product-card,.sma-card,.featured-card,.related-product-card),
  :is(.welding-card,.smc-product-card,.sma-card,.featured-card,.related-product-card)::after{transition:none!important;}
}
