/* Sepahan 2.2.3: view-only product cards + stable legacy-style variation controls. */
.sepahan-view-product-action{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  text-decoration:none!important;
}
.sepahan-view-product-action svg{
  width:20px!important;
  height:20px!important;
  flex:0 0 auto!important;
}
.sepahan-card-actions .sepahan-view-product-action.sepahan-card-btn-icon svg{
  width:22px!important;
  height:22px!important;
}
.sepahan-product-carousel-add-to-cart.sepahan-view-product-action svg,
ul.products li.product .sepahan-view-product-action svg{
  width:18px!important;
  height:18px!important;
}

/* Keep WooCommerce's native select usable until the visual controls exist. */
body.single-product .sepahan-nikan-cart form.variations_form:not(.sepahan-stable-buttons-ready) table.variations select[name^="attribute_"]{
  position:static!important;
  display:block!important;
  width:100%!important;
  min-width:0!important;
  height:42px!important;
  margin:0!important;
  padding:0 12px!important;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
  overflow:visible!important;
  clip:auto!important;
  clip-path:none!important;
  border:1px solid var(--sepahan-border,#e2e8f0)!important;
  border-radius:11px!important;
  background:var(--sepahan-card,#fff)!important;
  color:var(--sepahan-text,#111827)!important;
}

/* Once the stable buttons are ready, keep the canonical WooCommerce select in
   the DOM for its variation engine and accessibility, without showing it twice. */
body.single-product .sepahan-nikan-cart form.variations_form.sepahan-stable-buttons-ready table.variations select[name^="attribute_"]{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  margin:-1px!important;
  padding:0!important;
  border:0!important;
  opacity:0!important;
  visibility:visible!important;
  overflow:hidden!important;
  pointer-events:none!important;
  clip:rect(0 0 0 0)!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
}

body.single-product .sepahan-nikan-cart .sepahan-stable-variation-buttons{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:6px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  max-height:none!important;
  overflow:visible!important;
}
body.single-product .sepahan-nikan-cart .sepahan-stable-variation-buttons .sepahan-variation-btn{
  position:relative!important;
  z-index:1!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:38px!important;
  height:30px!important;
  min-height:30px!important;
  padding:0 10px!important;
  border:1px solid var(--sepahan-border,#dbe3ed)!important;
  border-radius:10px!important;
  background:var(--sepahan-card,#fff)!important;
  color:var(--sepahan-text,#111827)!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1!important;
  white-space:nowrap!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  user-select:none!important;
  box-shadow:none!important;
  transition:border-color .16s ease,background-color .16s ease,color .16s ease,opacity .16s ease!important;
}
body.single-product .sepahan-nikan-cart .sepahan-stable-variation-buttons .sepahan-variation-btn:hover:not(:disabled){
  border-color:var(--sepahan-blue,#2563eb)!important;
}
body.single-product .sepahan-nikan-cart .sepahan-stable-variation-buttons .sepahan-variation-btn.is-active{
  border-color:var(--sepahan-blue,#2563eb)!important;
  background:#eff6ff!important;
  color:var(--sepahan-blue,#2563eb)!important;
}
body.single-product .sepahan-nikan-cart .sepahan-stable-variation-buttons .sepahan-variation-btn.is-disabled,
body.single-product .sepahan-nikan-cart .sepahan-stable-variation-buttons .sepahan-variation-btn:disabled{
  opacity:.38!important;
  cursor:not-allowed!important;
  pointer-events:none!important;
}
.dark body.single-product .sepahan-nikan-cart .sepahan-stable-variation-buttons .sepahan-variation-btn,
body.dark.single-product .sepahan-nikan-cart .sepahan-stable-variation-buttons .sepahan-variation-btn{
  background:#111827!important;
  border-color:#334155!important;
  color:#e5e7eb!important;
}
.dark body.single-product .sepahan-nikan-cart .sepahan-stable-variation-buttons .sepahan-variation-btn.is-active,
body.dark.single-product .sepahan-nikan-cart .sepahan-stable-variation-buttons .sepahan-variation-btn.is-active{
  background:#172554!important;
  border-color:#60a5fa!important;
  color:#bfdbfe!important;
}

@media(max-width:767px){
  body.single-product .sepahan-nikan-cart .sepahan-stable-variation-buttons .sepahan-variation-btn{
    min-width:34px!important;
    height:28px!important;
    min-height:28px!important;
    padding:0 8px!important;
    font-size:11px!important;
  }
}
