.honarposh-extra-wrap{
  margin: 18px 0 6px;
  direction: rtl;
  font-family: inherit;
}

.honarposh-field{ margin: 18px 0; }
.honarposh-field__head{
  display:flex; align-items:center; justify-content:space-between;
}
.honarposh-title{
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}
.honarposh-help{
  font-size: 14px;
  color: #ff2e2e;
  text-decoration: none;
}

.honarposh-size-grid{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
}

.honarposh-print-grid{
  display:flex;
  gap: 18px;
  justify-content: flex-start;
}

.honarposh-hidden{ display:none; }

.honarposh-pill{
  min-width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 2px solid #111;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  user-select:none;
}

.honarposh-pill--wide{
  min-width: 150px;
}

.honarposh-hidden:checked + .honarposh-pill{
  background: #000;
  border-color: #000;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.15);
}

/* ===== استایل گزینه‌های ناموجود ===== */
.honarposh-pill--out-of-stock,
.honarposh-pill--out-of-stock:hover {
  position: relative;
  cursor: not-allowed !important;
  user-select: none;
  pointer-events: none;
  background-color: #fff !important;
  color: #ccc !important;
  border-color: #ddd !important;
}

.honarposh-pill--out-of-stock::after {
  content: "✕";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  font-weight: 700;
  color: #e74c3c;
  line-height: 1;
  pointer-events: none;
}

.honarposh-color--out-of-stock,
.honarposh-color--out-of-stock:hover {
  position: relative;
  cursor: not-allowed !important;
  user-select: none;
  pointer-events: none;
  opacity: 0.6;
}

.honarposh-color--out-of-stock .honarposh-color__dot {
  position: relative;
}

.honarposh-color--out-of-stock .honarposh-color__dot::after {
  content: "✕";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  font-weight: 700;
  color: #e74c3c;
  line-height: 1;
  pointer-events: none;
}

.honarposh-color--out-of-stock .honarposh-color__label {
  color: #bbb;
  text-decoration: line-through;
}

.honarposh-color-grid{
  display:flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
}

.honarposh-color{
  display:flex;
  flex-direction: column;
  align-items:center;
  gap: 8px;
  cursor:pointer;
  user-select:none;
}

.honarposh-color__dot{
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 2px solid #111;
  position: relative;
  display:block;
}

.honarposh-hidden:checked + .honarposh-color .honarposh-color__dot{
  border-color: #55206f;
  box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px #55206f;
}

.honarposh-hidden:checked + .honarposh-color .honarposh-color__dot::before{
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: 18px;
  height: 10px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: translate(-50%, -50%) rotate(-45deg);
  transform-origin: center;
  z-index: 1;
}

.honarposh-hidden:checked + .honarposh-color--white .honarposh-color__dot::before{
  border-color: #000;
}

.honarposh-color__label{
  font-size: 16px;
  font-weight: 700;
}

.honarposh-upload{
  width: 100%;
  max-width: 480px;
  border: 2px solid #111;
  border-radius: 14px;
  padding: 10px;
}

.honarposh-note{
  font-size: 13px;
  opacity: 0.75;
  margin-top: 6px;
}

.hpeo-upload-status{
  display: none;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  direction: rtl;
}

.hpeo-upload-status.is-uploading,
.hpeo-upload-status.is-done,
.hpeo-upload-status.is-error{
  display: flex;
}

.hpeo-upload-status::before{
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  flex: 0 0 14px;
}

.hpeo-upload-status.is-uploading{
  background: #fff8e5;
  color: #7a4d00;
  border: 1px solid #f0c36d;
}

.hpeo-upload-status.is-uploading::before{
  border: 2px solid #d69a00;
  border-top-color: transparent;
  animation: hpeo-spin 0.8s linear infinite;
}

.hpeo-upload-status.is-done{
  background: #ecf8ef;
  color: #176c2e;
  border: 1px solid #93d3a3;
}

.hpeo-upload-status.is-done::before{
  background: #1f9d45;
  box-shadow: inset 0 0 0 4px #ecf8ef;
}

.hpeo-upload-status.is-error{
  background: #fdecea;
  color: #9f2f25;
  border: 1px solid #e2a19a;
}

.hpeo-upload-status.is-error::before{
  background: #c9352a;
}

@keyframes hpeo-spin{
  to{ transform: rotate(360deg); }
}

.honarposh-liveprice{
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.hpeo-live-price-value,
.hpeo-sticky-cart-price{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  direction: ltr;
}

.hpeo-cart-action-row{
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin-top: 16px;
}

.hpeo-cart-action-row .hpeo-live-price{
  flex: 0 0 auto;
  min-width: 112px;
  max-width: 42%;
}

.hpeo-cart-action-row .single_add_to_cart_button{
  flex: 0 1 auto !important;
  max-width: 58% !important;
  box-sizing: border-box !important;
  white-space: nowrap;
}

.hpeo-live-price-current{
  color: #000;
  font-size: clamp(14px, 4.2vw, 20px);
  font-weight: 800;
  line-height: 1.05;
}

.hpeo-live-price-discount{
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6f6f82;
  font-size: clamp(10px, 3vw, 14px);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.hpeo-live-price-discount del{
  color: inherit;
  text-decoration-thickness: 2px;
}

.hpeo-sticky-cart-bar{
  display: none;
}

/* ===== اصلاحات نسخه ۵ ===== */

/* فاصله ۲۴ پیکسل بین هر فیلد */
.honarposh-field {
  margin-top: 24px;
  margin-bottom: 0;
}

/* موبایل: همه اندازه‌ها ۴ پیکسل کمتر */
@media (max-width: 767px) {
  body.hpeo-sticky-cart-active{
    padding-bottom: 86px;
  }

  .honarposh-title        { font-size: 16px;  margin-bottom: 6px; }
  .honarposh-help         { font-size: 10px; }
  .honarposh-size-grid    { gap: 10px; }
  .honarposh-print-grid   { gap: 14px; }
  .honarposh-color-grid   { gap: 18px; }
  .honarposh-color        { gap: 4px; }
  .honarposh-color__dot   { width: 50px; height: 50px; }
  .honarposh-color__label { font-size: 12px; }
  .honarposh-pill         { min-width: 60px; height: 60px; border-radius: 14px; font-size: 14px; }
  .honarposh-pill--wide   { min-width: 146px; }
  .honarposh-upload       { border-radius: 10px; padding: 6px; }
  .honarposh-note         { font-size: 9px;  margin-top: 2px; }
  .honarposh-liveprice    { margin-top: 10px; font-size: 14px; }

  .honarposh-size-grid,
  .honarposh-color-grid{
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .honarposh-size-grid::-webkit-scrollbar,
  .honarposh-color-grid::-webkit-scrollbar{
    display: none;
  }

  .honarposh-pill,
  .honarposh-color{
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .hpeo-live-price-current{
    font-size: clamp(14px, 4.4vw, 18px);
  }

  .hpeo-live-price-discount{
    font-size: clamp(10px, 3vw, 12px);
    gap: 5px;
  }

  .hpeo-cart-action-row{
    width: 100% !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-top: 18px;
    direction: ltr;
  }

  .hpeo-cart-action-row .hpeo-live-price{
    flex: 0 0 min(38vw, 128px) !important;
    min-width: 0;
    max-width: min(38vw, 128px);
  }

  .hpeo-cart-action-row .single_add_to_cart_button{
    flex: 0 1 auto !important;
    min-width: 0;
    max-width: calc(62vw - 24px) !important;
  }

  .hpeo-cart-action-row .quantity{
    display: none;
  }

  .hpeo-sticky-cart-bar{
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9998;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 12px !important;
    align-items: center !important;
    min-height: 70px;
    padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.08);
    transform: translateY(105%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
    direction: ltr;
  }

  .hpeo-sticky-cart-bar.is-visible{
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .hpeo-sticky-cart-price{
    flex: 0 0 min(38vw, 128px) !important;
    min-width: 0;
    max-width: min(38vw, 128px);
  }

  .hpeo-sticky-cart-button{
    flex: 0 1 auto !important;
    min-width: 0;
    max-width: calc(62vw - 24px) !important;
    box-sizing: border-box !important;
    white-space: nowrap;
  }

  .hpeo-sticky-cart-button.is-disabled,
  .hpeo-sticky-cart-button:disabled{
    cursor: not-allowed;
    opacity: 0.55;
  }
}

/* ===== پیام خطای اعتبارسنجی فیلدهای اجباری ===== */
.hpeo-validation-error {
  direction: rtl;
  text-align: right;
  background: #fdecea;
  color: #b94e48;
  border: 1px solid #c00;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.8;
  box-shadow: 0 2px 4px rgba(187, 78, 72, 0.15);
}

.hpeo-validation-error::before {
  content: '⚠️ ';
  font-size: 16px;
}

/* استایل دکمه دانلود فایل در سفارش */
.hpeo-order-file-download {
  direction: rtl;
  text-align: right;
}

.hpeo-order-file-download a {
  display: inline-block;
  padding: 8px 16px;
  background: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: background 0.2s;
}

.hpeo-order-file-download a:hover {
  background: #005177;
  color: #fff;
}

.hpeo-admin-file-download {
  margin-top: 8px;
  padding: 8px 12px;
  background: #eef6ff;
  border: 1px solid #b7d1f0;
  border-radius: 4px;
  direction: rtl;
}

.hpeo-admin-file-download a {
  text-decoration: none;
  font-size: 13px;
}

.hpeo-admin-file-download a:hover {
  text-decoration: underline;
}
