/*
Theme Name: Kadiner Theme
Theme URI: https://kadiner.ir
Author: Abolfaazl
Description: Kadiner Custom Theme
Version: 1.4.5
Text Domain: kadiner.ir
*/

@font-face {
  font-family: 'Yekan Bakh VF';
  src: url('assets/fonts/YekanBakh-VF.woff2');
}

.logo-kdnr {
  height: 2.5rem !important;
}
.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1816;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  padding-right: 1rem;
}

body {
  font-feature-settings: 'ss01';
}
.entry-content h2::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 4px;
  background-color: #fdcf00;
  border-radius: 4px;
}
.entry-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2d2a26;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.entry-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: #4b5563;
  text-align: justify;
}
.entry-content ul {
  margin-bottom: 1.5rem;
  list-style: disc;
  padding-right: 1.5rem;
  color: #4b5563;
}
.entry-content li {
  margin-bottom: 0.5rem;
}
.entry-content strong {
  color: #1a1816;
  font-weight: 800;
}
/* استایل لینک‌های داخل متن */
.entry-content a {
  color: #e6bc00;
  text-decoration: underline;
  text-decoration-style: dashed;
}
.entry-content a:hover {
  color: #fdcf00;
}
/* تگ‌های پست */
.entry-content + div a[rel='tag'] {
  display: inline-block;
  background: #f3f4f6;
  color: #4b5563;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  transition: all 0.2s;
}
.entry-content + div a[rel='tag']:hover {
  background: #fdcf00;
  color: #000;
}

.entry-content + div a[rel='tag'] {
  display: inline-block;
  background-color: #f3f4f6; /* bg-gray-100 */
  color: #4b5563; /* text-gray-600 */
  padding: 0.25rem 0.75rem; /* py-1 px-3 */
  border-radius: 0.25rem; /* rounded */
  font-size: 0.875rem; /* text-sm */
  transition:
    background-color 0.2s,
    color 0.2s;
  margin-left: 0.5rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
}

.entry-content + div a[rel='tag']:hover {
  background-color: #fdcf00; /* bg-brand */
  color: #000000; /* text-black */
}

/* WooCommerce Form Field Styling Override */
.woocommerce-input-wrapper input,
.woocommerce-input-wrapper textarea,
.woocommerce-input-wrapper select {
  width: 100%;
  background-color: #f9fafb; /* bg-gray-50 */
  border: 1px solid #e5e7eb; /* border-gray-200 */
  border-radius: 0.75rem; /* rounded-xl */
  padding: 0.75rem 1rem; /* py-3 px-4 */
  outline: none;
  transition: all 0.2s;
}

.woocommerce-input-wrapper input:focus,
.woocommerce-input-wrapper textarea:focus {
  border-color: #fdcf00; /* border-brand */
  box-shadow: 0 0 0 1px #fdcf00; /* ring-brand */
}

/* مخفی کردن لیبل‌های اضافی اگر نیاز است */
.woocommerce-form__label-for-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* =========================================
   WooCommerce Mini Cart - Fixed Layout (RTL)
   ========================================= */

/* کانتینر اصلی */
.widget_shopping_cart_content {
  @apply text-sm;
}

/* لیست آیتم‌ها */
.widget_shopping_cart_content .woocommerce-mini-cart {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  max-height: 350px;
  overflow-y: auto;
  @apply space-y-2 p-2;
}

/* آیتم تکی - تنظیم فضا برای تصویر */
.widget_shopping_cart_content .woocommerce-mini-cart-item {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important; /* متن‌ها زیر هم قرار بگیرند */
  justify-content: center !important;
  min-height: 80px; /* حداقل ارتفاع برابر با تصویر */
  padding: 12px 85px 12px 12px !important; /* 85px از راست خالی برای تصویر */
  @apply bg-gray-50 rounded-xl border border-gray-100 transition-colors hover:border-gray-300;
}

/* تصویر محصول - ثابت در سمت راست */
.widget_shopping_cart_content .woocommerce-mini-cart-item img {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 60px !important;
  height: 60px !important;
  object-fit: cover;
  margin: 0 !important;
  float: none !important;
  @apply rounded-lg border border-gray-200 shadow-sm;
}

/* عنوان محصول */
.widget_shopping_cart_content .woocommerce-mini-cart-item a:not(.remove) {
  display: block !important;
  font-weight: 800;
  color: #1f2937;
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 4px;
  font-size: 0.9rem;
  padding-left: 20px; /* فاصله از دکمه حذف اگر متن طولانی شد */
}

/* قیمت و تعداد (زیر عنوان) */
.widget_shopping_cart_content .woocommerce-mini-cart-item .quantity {
  display: block !important;
  font-size: 0.8rem;
  color: #6b7280;
  /*font-family: sans-serif; /* برای نمایش بهتر اعداد انگلیسی/فارسی */
}

/* رنگ قیمت */
.widget_shopping_cart_content .woocommerce-mini-cart-item .quantity .amount {
  font-weight: 700;
  color: #1a1816; /* رنگ تیره */
  @apply bg-white px-2 py-0.5 rounded border border-gray-200 text-xs shadow-sm;
}

/* دکمه حذف (×) - سمت چپ */
.widget_shopping_cart_content .woocommerce-mini-cart-item .remove {
  position: absolute !important;
  left: 20px !important;
  top: 63% !important;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #fee2e2 !important; /* قرمز روشن */
  color: #ef4444 !important; /* قرمز تیره */
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s;
}

.widget_shopping_cart_content .woocommerce-mini-cart-item .remove:hover {
  background-color: #ef4444 !important;
  color: white !important;
}

/* بخش جمع کل */
.widget_shopping_cart_content .woocommerce-mini-cart__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5px;
  border-top: 2px dashed #e5e7eb;
  margin-top: 10px !important;
  margin-bottom: 5px !important;
}

.widget_shopping_cart_content .woocommerce-mini-cart__total strong {
  font-weight: 800;
  font-size: 1rem;
}

.widget_shopping_cart_content .woocommerce-mini-cart__total .amount {
  font-weight: 900;
  font-size: 1.2rem;
  color: #eab308; /* رنگ زرد برند */
}

/* دکمه‌ها */
.widget_shopping_cart_content .woocommerce-mini-cart__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.widget_shopping_cart_content .woocommerce-mini-cart__buttons .button {
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.widget_shopping_cart_content .woocommerce-mini-cart__buttons .button:not(.checkout) {
  background-color: #f3f4f6;
  color: #374151;
}
.widget_shopping_cart_content .woocommerce-mini-cart__buttons .button:not(.checkout):hover {
  background-color: #e5e7eb;
}

.widget_shopping_cart_content .woocommerce-mini-cart__buttons .button.checkout {
  background-color: #fdcf00;
  color: #000;
  box-shadow: 0 4px 6px -1px rgba(253, 207, 0, 0.4);
}
.widget_shopping_cart_content .woocommerce-mini-cart__buttons .button.checkout:hover {
  background-color: #e6bc00;
  transform: translateY(-2px);
}

.woocommerce-cart-form table {
  width: 100%;
  border-collapse: collapse;
}
.woocommerce-cart-form th {
  text-align: right;
  padding: 15px;
  background-color: #f9fafb; /* gray-50 */
  font-weight: 800;
}
.woocommerce-cart-form td {
  padding: 15px;
  border-bottom: 1px solid #f3f4f6; /* gray-100 */
}
.woocommerce-cart-form img {
  width: 60px;
  border-radius: 8px;
}
.woocommerce-cart-form .actions .button {
  background-color: #1a1816 !important; /* dark-900 */
  color: white !important;
  padding: 10px 20px;
  border-radius: 10px;
}
.cart_totals {
  margin-top: 30px;
}
.wc-proceed-to-checkout .checkout-button {
  background-color: #fdcf00 !important; /* brand */
  color: black !important;
  display: block;
  text-align: center;
  padding: 15px;
  border-radius: 12px;
  font-weight: 800;
}

/* =========================================
   WooCommerce Checkout Custom Styling
   ========================================= */

/* استایل‌دهی به فیلدهای ورودی */
.woocommerce-input-wrapper input,
.woocommerce-input-wrapper textarea,
.select2-selection--single {
  background-color: #f9fafb !important; /* bg-gray-50 */
  border: 1px solid #e5e7eb !important; /* border-gray-200 */
  border-radius: 0.75rem !important; /* rounded-xl */
  padding: 12px 16px !important;
  font-size: 0.875rem !important;
  color: #1f2937 !important;
  transition: all 0.2s;
  height: auto !important;
  min-height: 48px;
}

.woocommerce-input-wrapper input:focus,
.woocommerce-input-wrapper textarea:focus {
  border-color: #fdcf00 !important; /* brand */
  box-shadow: 0 0 0 1px #fdcf00 !important;
  background-color: #fff !important;
}

/* اصلاح سلکت باکس‌ها (Select2) */
.select2-container .select2-selection--single {
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 46px !important;
  left: 10px !important;
  right: auto !important;
}

/* لیبل فیلدها */
.woocommerce-form-row label {
  font-weight: 700;
  color: #374151; /* text-gray-700 */
  margin-bottom: 8px;
  font-size: 0.875rem;
}
.required {
  color: #ef4444; /* text-red-500 */
  text-decoration: none;
}

/* باکس "اشتراک طلایی" (سایدبار چپ) */
#order_review_heading {
  display: none; /* مخفی کردن تیتر پیش‌فرض */
}

/* استایل اختصاصی برای باکس "سفارش شما" */
.woocommerce-checkout-review-order-table {
  border: none !important;
  margin-bottom: 20px !important;
}
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
  border: none !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid #f3f4f6 !important;
}
.woocommerce-checkout-review-order-table thead {
  display: none; /* مخفی کردن هدر جدول */
}

/* دکمه پرداخت */
#place_order {
  background-color: #fdcf00 !important;
  color: #000 !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  padding: 16px !important;
  width: 100%;
  font-size: 1rem;
  transition: all 0.2s;
  margin-top: 20px;
  box-shadow: 0 4px 6px -1px rgba(253, 207, 0, 0.4);
}
#place_order:hover {
  background-color: #e6bc00 !important;
  transform: translateY(-2px);
}

/* حذف حاشیه‌های اضافی جدول پرداخت */
.woocommerce-checkout #payment {
  background: transparent !important;
  border-radius: 0 !important;
}
.woocommerce-checkout #payment ul.payment_methods {
  border-bottom: none !important;
  padding: 0 !important;
}
.wc_payment_method {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 15px !important;
  margin-bottom: 10px !important;
}
.wc_payment_method.input-radio:checked + label {
  font-weight: bold;
}

/* اسکرول بار لیست محصولات در سایدبار */
.product-name {
  font-size: 0.85rem;
  color: #4b5563;
}
.product-total {
  font-weight: bold;
  color: #1f2937;
}

/* اصلاح گرید فرم تسویه حساب */
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* دو ستونه */
  gap: 1rem;
}

/* فیلدها تمام عرض */
.form-row {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

/* فیلدهای خاصی که باید تمام عرض باشند (مثل آدرس و توضیحات) */
#billing_address_1_field,
#billing_address_2_field,
#billing_email_field,
#order_comments_field {
  grid-column: span 2;
}

/* موبایل: همه چیز تک ستونه */
@media (max-width: 768px) {
  .woocommerce-billing-fields__field-wrapper,
  .woocommerce-shipping-fields__field-wrapper {
    grid-template-columns: 1fr;
  }
  #billing_address_1_field,
  #billing_address_2_field {
    grid-column: span 1;
  }
}

/* استایل اینپوت‌ها */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
  padding: 12px 16px;
  background-color: #f9fafb; /* bg-gray-50 */
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem; /* rounded-xl */
  line-height: 1.5;
}
.woocommerce form .form-row input.input-text:focus {
  border-color: #fdcf00;
  background-color: #fff;
  outline: none;
  box-shadow: 0 0 0 1px #fdcf00;
}

/* تمیز کردن جدول خلاصه سفارش در سایدبار */
#order_review table.shop_table {
  border: none;
  margin: 0;
}
#order_review table.shop_table th,
#order_review table.shop_table td {
  border: none;
  border-bottom: 1px dashed #e5e7eb;
  padding: 15px 0;
  background: transparent;
}
#order_review table.shop_table tr:last-child th,
#order_review table.shop_table tr:last-child td {
  border-bottom: none;
}
#order_review .product-name {
  font-weight: 500;
  color: #4b5563;
}
#order_review .product-total {
  font-weight: 800;
  color: #1f2937;
}
#order_review .order-total .amount {
  font-size: 1.25rem;
  color: #fdcf00; /* رنگ برند */
}

/* استایل ویژگی‌های اشتراک طلایی در سایدبار */
.vip-features-list ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.vip-features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #d1d5db; /* text-gray-300 */
}

/* اضافه کردن آیکون تیک سبز قبل از هر li */
.vip-features-list li::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234ade80' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'%3E%3C/path%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* اصلاح جهت نمایش قیمت‌ها در جدول فاکتور */
.woocommerce-checkout-review-order-table .amount {
  direction: ltr !important;
  unicode-bidi: embed !important;
  display: inline-block;
}

/* اصلاح چیدمان ردیف‌های جدول */
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
  vertical-align: middle;
}

/* رنگ و فونت قیمت نهایی */
.woocommerce-checkout-review-order-table .order-total .amount {
  font-weight: 900;
  color: #fdcf00; /* رنگ زرد برند */
  font-size: 1.3rem;
}

/* =========================================
   Modern Checkout Error Styling
   ========================================= */

/* 1. استایل باکس خطای کلی (بالای صفحه) */
.woocommerce-error {
  background-color: #ffffff !important;
  border: 1px solid #fee2e2 !important; /* red-200 */
  border-right: 4px solid #ef4444 !important; /* red-500 (نوار قرمز سمت راست) */
  border-radius: 12px !important;
  padding: 20px !important;
  margin-bottom: 30px !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05) !important;
  list-style: none !important;
  position: relative;
}

/* آیکون خطا قبل از باکس */
.woocommerce-error::before {
  content: '!';
  position: absolute;
  right: -15px; /* تنظیم موقعیت برای RTL */
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-weight: bold;
  font-family: sans-serif;
  border: 2px solid white;
  display: none; /* اگر دوست داشتید فعال کنید */
}

/* متن آیتم‌های خطا */
.woocommerce-error li {
  font-size: 0.9rem !important;
  color: #b91c1c !important; /* red-700 */
  font-weight: 700 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px !important;
}

.woocommerce-error li:last-child {
  margin-bottom: 0 !important;
}

/* اضافه کردن آیکون کوچک کنار هر خط خطا */
.woocommerce-error li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #ef4444;
  border-radius: 50%;
}

/* 2. استایل فیلدهای قرمز شده (Inline Validation) */
/* ووکامرس وقتی فیلدی خالی باشد کلاس woocommerce-invalid را به آن می‌دهد */

.woocommerce-invalid input,
.woocommerce-invalid select,
.woocommerce-invalid textarea {
  border-color: #ef4444 !important; /* قرمز */
  background-color: #fef2f2 !important; /* پس‌زمینه قرمز خیلی روشن */
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important; /* سایه قرمز */
  animation: shake 0.3s ease-in-out; /* انیمیشن لرزش */
}

.woocommerce-invalid label {
  color: #ef4444 !important;
}

/* انیمیشن لرزش برای جلب توجه */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* آیکون خطا داخل فیلد (اختیاری - پیشرفته) */
.woocommerce-invalid .woocommerce-input-wrapper::after {
  content: '!';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #ef4444;
  font-weight: bold;
  font-family: sans-serif;
  pointer-events: none;
}
.woocommerce-input-wrapper {
  position: relative; /* برای اینکه آیکون بالا کار کند */
}

.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1816;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  padding-right: 1rem;
}
.entry-content h2::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 4px;
  background-color: #fdcf00;
  border-radius: 4px;
}
.entry-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2d2a26;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.entry-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: #4b5563;
  text-align: justify;
}
.entry-content ul {
  margin-bottom: 1.5rem;
  list-style: disc;
  padding-right: 1.5rem;
  color: #4b5563;
}
.entry-content li {
  margin-bottom: 0.5rem;
}
.entry-content a {
  color: #d97706; /* amber-600 */
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 4px;
}
.entry-content a:hover {
  color: #fdcf00;
}

/* =========================================
   2. MODERN FORM FIELDS (The Beautifier)
   ========================================= */

/* استایل کلی برای تمام اینپوت‌ها */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.select2-container .select2-selection--single {
  background-color: #fcfcfc !important; /* خیلی روشن، نزدیک به سفید */
  border: 1px solid #e2e8f0 !important; /* gray-200 */
  border-radius: 12px !important; /* گوشه‌های گرد مدرن */
  padding: 12px 16px !important;
  font-size: 0.95rem !important;
  color: #1f2937 !important; /* gray-800 */
  line-height: 1.5 !important;
  min-height: 50px !important; /* ارتفاع استاندارد مدرن */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.2s ease-in-out !important;
  width: 100%;
  outline: none !important;
}

/* حالت فوکوس (وقتی کاربر کلیک می‌کند) */
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.select2-container--default.select2-container--open .select2-selection--single {
  background-color: #fff !important;
  border-color: #fdcf00 !important; /* رنگ برند */
  box-shadow: 0 0 0 3px rgba(253, 207, 0, 0.2) !important; /* هاله زرد */
}

/* لیبل‌ها (عنوان فیلدها) */
.woocommerce form .form-row label {
  font-weight: 700 !important;
  color: #374151 !important; /* gray-700 */
  margin-bottom: 8px !important;
  font-size: 0.9rem !important;
  display: block;
}

/* ستاره قرمز ضروری */
.woocommerce form .form-row .required {
  color: #ef4444 !important; /* red-500 */
  text-decoration: none !important;
  font-weight: 900;
  margin-right: 4px;
}

/* =========================================
   3. SELECT2 CUSTOMIZATION (Dropdowns)
   ========================================= */
/* هماهنگ کردن سلکت‌باکس‌های ووکامرس با بقیه فیلدها */

.select2-container .select2-selection--single {
  height: 50px !important; /* هم‌ارتفاع با اینپوت‌ها */
  display: flex !important;
  align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 50px !important;
  padding-right: 0 !important; /* اصلاح پدینگ راست در RTL */
  color: #1f2937 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 48px !important;
  top: 1px !important;
  left: 10px !important; /* آیکون فلش سمت چپ */
  right: auto !important;
}

/* منوی بازشونده */
.select2-dropdown {
  border: 1px solid #fdcf00 !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
  overflow: hidden;
}

.select2-results__option--highlighted[aria-selected] {
  background-color: #fdcf00 !important; /* هاور زرد */
  color: #000 !important;
}

/* =========================================
   4. CHECKOUT LAYOUT GRID
   ========================================= */

/* گرید دو ستونه برای فیلدها */
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem; /* فاصله عمودی و افقی */
}

/* فیلدها به صورت پیش‌فرض تمام عرض ستون خود را بگیرند */
.form-row {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

/* فیلدهای خاص که باید تمام عرض (دو ستونه) باشند */
#billing_first_name_field,
#billing_last_name_field {
  grid-column: span 1;
} /* نام و نام خانوادگی کنار هم */
#billing_country_field {
  grid-column: span 2;
}
#billing_address_1_field {
  grid-column: span 2;
}
#billing_address_2_field {
  grid-column: span 2;
}
#billing_city_field {
  grid-column: span 1;
}
#billing_state_field {
  grid-column: span 1;
}
#billing_postcode_field {
  grid-column: span 1;
}
#billing_phone_field {
  grid-column: span 1;
}
#billing_email_field {
  grid-column: span 2;
}
#order_comments_field {
  grid-column: span 2;
}

/* ریسپانسیو: در موبایل همه چیز تک ستونه */
@media (max-width: 768px) {
  .woocommerce-billing-fields__field-wrapper,
  .woocommerce-shipping-fields__field-wrapper {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .form-row {
    grid-column: span 1 !important;
  }
}

/* =========================================
   5. ORDER REVIEW & SIDEBAR
   ========================================= */

/* جدول محصولات */
#order_review table.shop_table {
  border: none;
  margin: 0;
}
#order_review table.shop_table th,
#order_review table.shop_table td {
  border: none;
  border-bottom: 1px dashed #e5e7eb; /* خط چین ظریف */
  padding: 15px 0;
  background: transparent;
}
#order_review .product-name {
  color: #4b5563;
  font-weight: 500;
}
#order_review .product-total {
  color: #1f2937;
  font-weight: 800;
}

/* فیکس کردن جهت قیمت (RTL Fix) */
.amount {
  direction: ltr !important;
  unicode-bidi: embed !important;
  display: inline-block;
}

/* جمع کل */
.woocommerce-checkout-review-order-table .order-total .amount {
  font-weight: 900;
  font-size: 1.4rem;
  color: #fdcf00; /* رنگ برند */
}

/* =========================================
   6. PAYMENT METHODS BOX
   ========================================= */

#payment {
  background: transparent !important;
}
#payment ul.payment_methods {
  border: none !important;
  padding: 0 !important;
}
.wc_payment_method {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 15px !important;
  margin-bottom: 10px !important;
  transition: all 0.2s;
}
/* وقتی روش پرداخت انتخاب شد */
.wc_payment_method.input-radio:checked + label {
  font-weight: bold;
  color: #000;
}
/* باکس توضیحات روش پرداخت */
.payment_box {
  background-color: #f3f4f6 !important; /* خاکستری روشن */
  padding: 15px !important;
  border-radius: 8px;
  margin-top: 10px !important;
  font-size: 0.85rem;
  color: #4b5563;
  position: relative;
}
.payment_box::before {
  display: none !important; /* حذف مثلث پیش‌فرض زشت */
}

/* دکمه ثبت سفارش */
#place_order {
  background-color: #fdcf00 !important;
  color: #000 !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  padding: 18px !important;
  width: 100%;
  font-size: 1.1rem;
  margin-top: 20px;
  box-shadow: 0 4px 10px rgba(253, 207, 0, 0.3);
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}
#place_order:hover {
  background-color: #e6bc00 !important;
  transform: translateY(-2px);
}

/* =========================================
   7. WOOCOMMERCE ERROR NOTICES
   ========================================= */

.woocommerce-error {
  background-color: #fff !important;
  border: 1px solid #fee2e2 !important;
  border-right: 4px solid #ef4444 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  margin-bottom: 30px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.woocommerce-error li {
  font-weight: 700;
  color: #b91c1c; /* red-700 */
  display: flex;
  align-items: center;
  gap: 8px;
}
/* فیلد نامعتبر */
.woocommerce-invalid input,
.woocommerce-invalid select {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

/* =========================================
   8. MINI CART (WIDGET)
   ========================================= */

.widget_shopping_cart_content .woocommerce-mini-cart-item {
  padding: 12px 85px 12px 12px !important;
  min-height: 80px;
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: 10px;
  position: relative;
  border: 1px solid #f3f4f6;
}
.widget_shopping_cart_content .woocommerce-mini-cart-item img {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%);
  width: 60px !important;
  height: 60px !important;
  border-radius: 8px;
}
.widget_shopping_cart_content .woocommerce-mini-cart__buttons .button.checkout {
  background-color: #fdcf00;
  color: #000;
  border-radius: 12px;
  font-weight: 800;
}

/* =========================================
   1. اصلاح رنگ دکمه افزودن به سبد خرید (تبدیل بنفش به زرد)
   ========================================= */
button.single_add_to_cart_button,
.woocommerce button.button.alt {
  background-color: #fdcf00 !important; /* زرد برند */
  color: #000000 !important; /* متن مشکی */
  border: none !important;
  border-radius: 12px !important;
  padding: 15px 30px !important;
  font-weight: 800 !important;
  font-size: 1rem !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 10px rgba(253, 207, 0, 0.3) !important;
  width: 100%; /* تمام عرض مثل طرح */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

button.single_add_to_cart_button:hover,
.woocommerce button.button.alt:hover {
  background-color: #e6bc00 !important; /* زرد تیره‌تر */
  transform: translateY(-2px);
}

/* =========================================
   2. اصلاح استایل شمارنده تعداد (Quantity)
   ========================================= */
/* مخفی کردن دکمه‌های زشت مرورگر */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* کانتینر اصلی شمارنده */
.quantity {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 2px solid #e5e7eb !important; /* حاشیه طوسی */
  border-radius: 12px !important;
  background-color: #fff !important;
  overflow: hidden;
  width: 80px !important; /* عرض ثابت */
  height: 48px !important;
  margin-left: 10px !important; /* فاصله از دکمه */
  float: left; /* قرارگیری کنار دکمه */
}

/* فیلد عدد */
.quantity input.qty {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  background: transparent !important;
  text-align: center !important;
  font-weight: 800 !important;
  font-size: 1.2rem !important;
  color: #1a1816 !important;
  padding: 0 !important;
  -moz-appearance: textfield; /* فایرفاکس */
}

/* =========================================
   3. اصلاح استایل باکس توضیحات (Typography)
   ========================================= */
.prose {
  font-size: 0.95rem;
  line-height: 1.9;
  color: #4b5563; /* خاکستری متون */
  text-align: justify;
}

.prose p {
  margin-bottom: 1.5rem;
}

.prose h2,
.prose h3,
.prose h4 {
  color: #1a1816;
  font-weight: 900;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

/* لیست‌ها با بولت پوینت مربعی یا رنگی */
.prose ul {
  list-style: none; /* حذف بولت پیش‌فرض */
  padding: 0;
  margin-bottom: 1.5rem;
}

.prose ul li {
  position: relative;
  padding-right: 20px;
  margin-bottom: 8px;
}

.prose ul li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background-color: #fdcf00; /* نقطه زرد */
  border-radius: 50%;
}

/* --- FIX WOOCOMMERCE DEFAULT BUTTONS --- */
.single_add_to_cart_button {
  background-color: #fdcf00 !important; /* Yellow Brand */
  color: #000 !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  padding: 14px 20px !important;
  width: 100% !important;
  border: none !important;
  transition: all 0.2s !important;
  box-shadow: 0 4px 10px rgba(253, 207, 0, 0.2);
}
.single_add_to_cart_button:hover {
  background-color: #e6bc00 !important;
  transform: translateY(-2px);
}

/* --- HIDE DEFAULT QUANTITY & VARIATIONS --- */
.woocommerce-variation-add-to-cart {
  display: flex !important;
  flex-direction: column-reverse; /* دکمه بالا، تعداد پایین */
  gap: 10px;
}
.quantity {
  width: 100% !important;
}
.qty-wrapper input {
  text-align: center;
  border: none !important;
  width: 100% !important;
  font-weight: bold;
  font-size: 1.1rem;
}
/* Hide default woo elements */
.variations {
  display: none !important;
}
.reset_variations {
  display: none !important;
}
.woocommerce-variation-price {
  display: none !important;
}

@media (max-width: 768px) {
  /* غیرفعال کردن حالت استیکی در موبایل */
  .sticky {
    position: relative !important;
    top: 0 !important;
    height: auto !important;
  }

  /* تنظیم ارتفاع خودکار برای کانتینر اصلی */
  .product-container-book,
  .product-container-account {
    overflow: visible !important;
    height: auto !important;
  }

  /* اطمینان از اینکه هیچ المانی جلوی اسکرول بادی را نمی‌گیرد */
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }
}

.contact-form-wrapper input,
.contact-form-wrapper textarea,
.contact-form-wrapper select {
  width: 100%;
  background-color: #f9fafb; /* bg-gray-50 */
  border: 1px solid #e5e7eb; /* border-gray-200 */
  border-radius: 0.75rem; /* rounded-xl */
  padding: 0.75rem 1rem;
  outline: none;
  transition: all 0.2s;
  margin-bottom: 1rem;
}
.contact-form-wrapper input:focus,
.contact-form-wrapper textarea:focus {
  border-color: #fdcf00;
}
.contact-form-wrapper input[type='submit'] {
  background-color: #fdcf00;
  color: black;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.contact-form-wrapper input[type='submit']:hover {
  background-color: #e6bc00;
  transform: translateY(-2px);
}

.hide-scroll::-webkit-scrollbar {
  display: none;
}
.hide-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* انیمیشن دراور (پنل کشویی) */
.drawer-overlay {
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease-in-out;
}
.drawer-overlay.open {
  visibility: visible;
  opacity: 1;
}

.drawer-panel {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.drawer-panel.open {
  transform: translateX(0);
}

/* پنل سبد خرید (از چپ میاد) */
.cart-panel {
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-panel.open {
  transform: translateX(0);
}

/* استایل زیرمنوهای موبایل (آکاردئونی) */
.mobile-menu ul.sub-menu {
  display: none;
  background-color: #f9fafb;
  padding-right: 15px;
  border-right: 2px solid #e5e7eb;
  margin-top: 5px;
  margin-bottom: 5px;
}
.mobile-menu ul.sub-menu.sub-open {
  display: block;
  animation: slideDown 0.3s ease;
}

/* دکمه فلش برای باز کردن زیرمنو */
.submenu-toggle {
  float: left;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
}
.submenu-toggle.active {
  transform: rotate(180deg);
  background: #fdcf00;
  color: black;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* استایل دکمه‌های متغیر */
.var-btn {
  transition: all 0.2s ease;
  border: 2px solid #f3f4f6;
  background: #fff;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.var-btn:hover {
  border-color: #e5e7eb;
}
.var-btn.active {
  background-color: #1a1816;
  color: white;
  border-color: #1a1816;
}

/* مخفی کردن المان‌های پیش‌فرض ووکامرس */
form.cart,
.variations,
.woocommerce-variation-price,
.woocommerce-variation-add-to-cart {
  display: none !important;
}

body {
  overflow-x: hidden !important;
}
.hide-scroll::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-menu > ul > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
  }
  .desktop-menu > ul > li > a {
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    color: #4b5563;
    font-weight: 700;
    transition: color 0.2s;
    font-size: 0.95rem;
  }
  .desktop-menu > ul > li:hover > a {
    color: #000;
    border-bottom: 3px solid #fdcf00;
  }

  .desktop-menu ul.sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 240px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-radius: 0 0 12px 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    padding: 8px 0;
    list-style: none;
    margin: 0;
  }

  .desktop-menu li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .desktop-menu ul.sub-menu li a {
    display: block;
    padding: 15px 15px !important;
    color: #4b5563;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid transparent;
  }
  .desktop-menu ul.sub-menu li a:hover {
    background: #fffdf5;
    color: black;
    padding-right: 25px !important;
    border-color: #fdcf00;
  }
}
.drawer-overlay {
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}
.drawer-overlay.active {
  visibility: visible;
  opacity: 1;
}
.drawer-panel {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.drawer-panel.active {
  transform: translateX(0);
}

.cart-panel {
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-panel.active {
  transform: translateX(0);
}
.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu li {
  border-bottom: 1px solid #f9fafb;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.mobile-menu li > a {
  flex-grow: 1;
  padding: 14px 5px;
  font-weight: 700;
  color: #374151;
  font-size: 0.95rem;
}

.submenu-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
  margin: 4px 0;
}
.submenu-toggle.active {
  background-color: #fdcf00;
  color: #000;
  transform: rotate(180deg);
}

.mobile-menu ul.sub-menu {
  display: none;
  width: 100%;
  background-color: #fcfcfc;
  padding-right: 15px;
  border-right: 2px solid #fdcf00;
  margin-bottom: 10px;
}
.mobile-menu ul.sub-menu.is-open {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- اصلاح نمایش دکمه خرید --- */
/* پیش‌فرض: دکمه افزودن دیده شود، کنترلر مخفی باشد */
#action-area .add-btn-main {
  display: flex !important;
}
#action-area .qty-controller {
  display: none !important;
}

/* حالت اضافه شده: دکمه افزودن مخفی، کنترلر دیده شود */
#action-area.is-added .qty-controller {
  display: flex;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}
.animate-float {
  animation: float 3s ease-in-out infinite;
}

.pagination-wrapper .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background-color: white;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  font-weight: bold;
  transition: all 0.2s;
}
.pagination-wrapper .page-numbers.current {
  background-color: #fdcf00; /* brand color */
  color: black;
  border-color: #fdcf00;
}
.pagination-wrapper .page-numbers:hover:not(.current) {
  border-color: #fdcf00;
}

.active-tab {
  background-color: #1a1816;
  color: white;
  border-color: #1a1816;
}
.inactive-tab {
  background-color: white;
  color: #4b5563;
  border-color: #e5e7eb;
}
.inactive-tab:hover {
  border-color: #fdcf00;
  color: #1a1816;
}

/* استایل صفحه‌بندی (مشابه آرشیو) */
.pagination-wrapper .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background-color: white;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  font-weight: bold;
  transition: all 0.2s;
}
.pagination-wrapper .page-numbers.current {
  background-color: #fdcf00;
  color: black;
  border-color: #fdcf00;
}
.pagination-wrapper .page-numbers:hover:not(.current) {
  border-color: #fdcf00;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #fdcf00;
  animation: confetti-fall 3s linear infinite;
}
@keyframes confetti-fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}
.bg-pattern {
  background-image: radial-gradient(#fdcf00 1px, transparent 1px);
  background-size: 20px 20px;
}

.woocommerce-mini-cart-item > span.quantity {
  display: flex;
  align-content: center;
  align-items: center;
  padding: 1em;
}

.price-label {
  font-size: 11px;
  color: #888;
  margin-left: 3px;
  font-weight: normal;
}
.woocommerce .woocommerce-ordering,
.woocommerce .woocommerce-result-count {
  margin: 0 !important;
}

a.added_to_cart.wc-forward {
  display: none !important;
}

/* 2. استایل دکمه وقتی محصول اضافه شد (سبز شدن) */
.ajax_add_to_cart.added {
  background-color: #10b981 !important; /* رنگ سبز */
  color: white !important;
  border-color: #10b981 !important;
  transition: all 0.3s ease;
}

/* 3. تغییر متن دکمه به تیک (اختیاری - با فونت آیکون یا کاراکتر) */
.ajax_add_to_cart.added span {
  display: none; /* مخفی کردن متن "افزودن" */
}

.ajax_add_to_cart.added::before {
  content: '✓'; /* نمایش تیک */
  font-size: 16px;
  font-weight: bold;
}

/* مخفی کردن اسکرول بار اما حفظ قابلیت اسکرول */
.hide-scroll::-webkit-scrollbar {
  display: none;
}
.hide-scroll {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.z-50:hover {
  z-index: 9999 !important;
}

@keyframes kenburns {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.hero-bg-anim {
  animation: kenburns 20s ease-in-out infinite;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.custom-sorting-wrapper form {
  margin: 0;
}

.custom-sorting-wrapper select.orderby {
  appearance: none;
  background-color: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.75rem 2.5rem 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  width: 100%;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.custom-sorting-wrapper select.orderby:hover {
  background-color: #ffffff;
  border-color: #d1d5db;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.custom-sorting-wrapper select.orderby:focus {
  outline: none;
  border-color: #ffd700;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.pagination-custom .woocommerce-pagination ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pagination-custom .woocommerce-pagination ul li .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #4b5563;
  background-color: transparent;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
}
.pagination-custom .woocommerce-pagination ul li span.current {
  background-color: #0a0a0a;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.pagination-custom .woocommerce-pagination ul li a.page-numbers:hover {
  background-color: #f3f4f6;
  color: #111827;
  transform: translateY(-2px);
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.widget ul li {
  padding: 0.75rem 0;
  border-bottom: 1px dashed #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.widget ul li:last-child {
  border-bottom: none;
}
.widget ul li a {
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.widget ul li a:hover {
  color: #0a0a0a;
  padding-left: 0.25rem;
}
.widget .count {
  font-size: 0.75rem;
  color: #111827;
  background: #f3f4f6;
  padding: 0.15rem 0.6rem;
  border-radius: 1rem;
  font-weight: 700;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.desktop-menu .menu-item {
  position: relative;
}

.desktop-menu .sub-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  background-color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid #f3f4f6;
  border-radius: 0.75rem;
  transition: all 0.2s ease-in-out;
  z-index: 100;
  padding: 0.5rem;
}

.desktop-menu .menu-item:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
}

.desktop-menu .sub-menu .sub-menu {
  top: 0;
  right: 100%;
  margin-right: 0.25rem;
}

.desktop-menu .sub-menu .menu-item > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: #374151;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.desktop-menu .sub-menu .menu-item > a:hover {
  background-color: #f9fafb;
  color: #000000;
}
/* خنثی کردن باگ جای خالی در گرید محصولات ووکامرس */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none !important;
}

/* برای اطمینان از اینکه ووکامرس پهنای محصولات را خراب نمی‌کند */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  clear: none !important;
}

.ordbydiv {
  margin-right: 1em !important;
}

input#kadiner-search-input {
  padding-right: 3em !important;
}

.smooth-corner {
  overflow: hidden;
}

@keyframes cartIconFlyRightDynamic {
  0% {
    transform: translateX(0) skewX(0);
    opacity: 1;
  }
  15% {
    transform: translateX(10px) skewX(5deg);
    opacity: 0.7;
  }
  100% {
    transform: translateX(200px) skewX(20deg);
    opacity: 0;
  }
}

.cartIcon-fly-away {
  transform-origin: bottom center !important;
  animation: cartIconFlyRightDynamic 1s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards !important;
}

.woocommerce-checkout .form-row.woocommerce-invalid input.input-text,
.woocommerce-checkout .form-row.woocommerce-invalid select,
.woocommerce-checkout .form-row.woocommerce-invalid textarea {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px #ef4444 !important;
  transition: all 0.3s ease;
}

.woocommerce-checkout .form-row.woocommerce-invalid label {
  color: #ef4444 !important;
}

.woocommerce-checkout .form-row.woocommerce-invalid label::after {
  content: '' !important;
  display: none !important;
}
