@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;700&display=swap');

/* ----- ساختار کلی ----- */
#ali-tabs {
  direction: rtl;
  font-family: 'Vazirmatn', sans-serif;
}

/* ---------- تب‌های دسته‌ها ---------- */
.ali-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 10px 0;
}

/* هر تب دایره‌ای با عنوان زیر آن */
.ali-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  color: #444;
}

/* آیکون دایره‌ای */
.ali-tab img {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  object-fit: cover;
  border: 2px solid transparent;
  background: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}


/* عنوان زیر عکس */
.ali-tab span {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
}

/* افکت هاور */
.ali-tab:hover img {
  transform: scale(1.05);
  box-shadow: 0 0 9px rgba(0,0,0,0.15);
}

/* حالت فعال */
.ali-tab.active img {
  border-color: #00a368;
  transform: scale(1.1);
  border: 2px solid #00a368;
}

.ali-tab.active span {
  color: #00a368;
  font-weight: 700;
}

/* ---------- محتوای تب ---------- */
.ali-tab-content {
  min-height: 120px;
}

/* ---------- لیست محصولات ---------- */
.ali-products {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* کارت محصول */
.ali-product {
  display: grid;
  grid-template-columns: 80px 1fr 70px 100px; /* عکس | متن | تعداد | دکمه+قیمت */
  gap: 10px;
  align-items: center;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  transition: all 0.25s ease;
}

.ali-product:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

/* عکس محصول */
.ali-product img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px !important;
}

/* اطلاعات محصول */
.ali-product .info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ali-product .title {
  font-size: 14px;
  font-weight: bold;
}

.ali-product .desc {
  font-size: 12px;
  color: #555;
  line-height: 1.4;
}

/* ورودی تعداد */
.ali-product .qty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ali-product .qty input {
  width: 50px;
  text-align: center;
  font-size: 12px;
}

/* بخش دکمه و قیمت */
.ali-product .actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* دکمه افزودن به سبد */
.ali-product .add-btn.button.add_to_cart_button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #4caf50;
  color: #fff;
  font-size: 20px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  display: inline-block;
  transition: all 0.3s ease;
}

.ali-product .add-btn.button.add_to_cart_button:hover {
  transform: scale(1.1);
  background: #e63673;
  border: none;
  box-shadow: none;
}

/* قیمت محصول */
.ali-product .price {
  font-size: 12px;
  color: #007a3d;
  white-space: nowrap;
}

/* استایل فیلدهای فرم احتمالی */
.ali-product input[type=date],
.ali-product input[type=email],
.ali-product input[type=number],
.ali-product input[type=password],
.ali-product input[type=search],
.ali-product input[type=tel],
.ali-product input[type=text],
.ali-product input[type=url],
.ali-product select,
.ali-product textarea {
  border: 1px solid #666;
  padding: .5rem 0.1rem !important;
  transition: all .3s;
  width: 100%;
}

.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: rgba(255,255,255,0.6);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

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

.add_to_cart_button.loading {
  pointer-events: none;
  opacity: 0.8;
}

.cart-prompt-fixed {
  position: fixed;
  bottom: 40px; /* فاصله از پایین صفحه */
  left: 100px;   /* فاصله از سمت چپ */
  background-color: #ff9800;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.cart-prompt-fixed::before {
  content: '';
  position: absolute;
  left: -8px; /* فلش سمت چپ */
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #ff9800;
}

.cart-prompt-fixed.show {
  opacity: 1;
  transform: translateY(0);
  animation: pulseEffect 1s infinite;
}

@keyframes pulseEffect {
  0% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(255, 152, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0); }
}
