/* =========================================================
   Oud Units — تنسيق أزرار الوحدات (RTL)
   OpenCart 3.x
   ========================================================= */

.product-unit-options {
  direction: rtl;
  text-align: right;
  margin: 18px 0;
}
.product-unit-options > label.control-label {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}
.product-unit-options .unit-hint {
  display: block;
  color: #9a9a9a;
  font-size: 13px;
  margin-bottom: 12px;
}

.product-unit-options .unit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}
.product-unit-options .radio {
  margin: 0;
  padding: 0;
}
.product-unit-options .radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* الزرار = اللابل، فيه اسم الوحدة فوق وسعرها تحت */
.product-unit-options .radio label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 96px;
  min-height: 72px;
  padding: 12px 18px;
  margin: 0;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.product-unit-options .radio label:hover {
  border-color: #888;
}
.product-unit-options .radio .unit-name {
  font-weight: 600;
  font-size: 16px;
  color: #222;
}
.product-unit-options .radio .unit-price-tag {
  font-size: 14px;
  font-weight: 700;
  color: #e23b3b;
}
/* أيقونة الريال السعودي الجديدة */
.unit-price-tag .price-currency,
.prodprices .price-currency {
  display: inline-flex;
  align-items: center;
}
.unit-price-tag .curreny_icon,
.prodprices .curreny_icon,
.price-currency .curreny_icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.12em;
  margin-inline-start: 2px;
}
.product-unit-options .radio.is-selected label {
  border-color: var(--primary-color, #111);
  border-width: 2px;
  box-shadow: 0 0 0 1px var(--primary-color, #111) inset;
}
.product-unit-options .radio label:active {
  transform: scale(.98);
}

/* كارت الكمية */
.unit-qty-card {
  direction: rtl;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  min-height: 72px;
  padding: 10px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  background: #fff;
}
.unit-qty-card .unit-qty-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #222;
}
.unit-qty-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.unit-qty-control input {
  width: 42px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e23b3b;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}
.unit-qty-control input::-webkit-outer-spin-button,
.unit-qty-control input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}
.unit-qty-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #d7d7d7;
  border-radius: 50%;
  background: #fff;
  color: #555;
  line-height: 20px;
  font-weight: 600;
  cursor: pointer;
}
.unit-qty-btn:hover {
  border-color: #999;
  color: #222;
}

.unit-cart-note {
  direction: rtl;
  text-align: right;
  margin: 8px 0 14px;
  color: #777;
  font-size: 13px;
  line-height: 1.7;
}

/* إخفاء الكمية اليدوية */
.product-unit-hide-qty #input-quantity,
.product-unit-hide-qty .quantity_box {
  display: none !important;
}
