/* استایل ناوبری پایین */
.bottom-nav {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px; /* هماهنگ با mobile-wrapper */
  height: 56px; /* کمی کوچکتر برای موبایل */
  background: var(--theme-color-adjusted-10);
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
  border-radius: 25px;
  z-index: 1000;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-color-adjusted-10);
  width: 33.33%;
  height: 100%;
  justify-content: center;
  border-radius: 25px;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.nav-item:hover {
  background: var(--items-color-adjusted-20);
  transform: translateY(-2px); /* افکت بالا آمدن برای نرمی */
}

.nav-item i {
  font-size: 1.3rem; /* کمی کوچکتر برای موبایل */
  margin-bottom: 3px;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.nav-item:hover i {
  transform: scale(1.08); /* افکت ظریف */
}

.nav-item span {
  font-size: 0.85rem; /* کوچکتر برای موبایل */
  font-weight: 500;
  opacity: 0.9;
  transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.nav-item:hover span {
  opacity: 1;
}

/* استایل مودال سبد خرید */
.cart-modal {
  position: fixed;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%) translateY(20px); /* افکت محو شدن آرام */
  width: 100%;
  max-width: 480px; /* هماهنگ با mobile-wrapper */
  height: 85vh;
  background: var(--theme-color);
  z-index: 1002;
  transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن انیمیشن */
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.25);
  border-radius: 25px 25px 0 0;
  overflow: hidden;
  opacity: 0;
}

.cart-modal.active {
  bottom: 0;
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.cart-modal-content {
  width: 100%;
  height: 100%;
  padding: 20px; /* کمی کمتر برای موبایل */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  direction: rtl;
  background: var(--theme-color);
  border-radius: 25px 25px 0 0;
  transition: background 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  transition: border-color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.cart-header h2 {
  font-size: 1.5rem; /* کمی کوچکتر برای موبایل */
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  letter-spacing: 0.5px;
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.close-cart-btn {
  background: var(--theme-color-adjusted-10);
  border: none;
  width: 40px; /* کوچکتر برای موبایل */
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
}

.close-cart-btn:hover {
  background: var(--theme-color);
  transform: scale(1.08); /* افکت ظریف‌تر */
}

.close-cart-btn i {
  font-size: 1.4rem;
  color: var(--text-color);
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.cart-guide {
  padding: 12px 0;
  text-align: center;
}

.cart-guide p {
  font-size: 0.9rem; /* کوچکتر برای موبایل */
  color: var(--text-color-adjusted-10);
  margin: 0;
  font-weight: 400;
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.cart-footer {
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  transition: border-color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.total-price {
  font-size: 1.2rem; /* کوچکتر برای موبایل */
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
  display: inline-block;
}

@keyframes priceFade {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.total-price.changing {
  animation: priceFade 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; /* نرم‌تر کردن انیمیشن */
}

/* استایل مودال پروفایل */
.profile-modal {
  position: fixed;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%) translateY(20px); /* افکت محو شدن آرام */
  width: 100%;
  max-width: 480px; /* هماهنگ با mobile-wrapper */
  height: 60vh;
  background: var(--theme-color);
  z-index: 1002;
  transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن انیمیشن */
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.25);
  border-radius: 25px 25px 0 0;
  overflow: hidden;
  opacity: 0;
}

.profile-modal.active {
  bottom: 0;
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.profile-modal-content {
  width: 100%;
  height: 100%;
  padding: 20px; /* کمی کمتر برای موبایل */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  direction: rtl;
  background: var(--theme-color);
  border-radius: 25px 25px 0 0;
  transition: background 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  transition: border-color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.profile-header h2 {
  font-size: 1.5rem; /* کوچکتر برای موبایل */
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  letter-spacing: 0.5px;
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.close-profile-btn {
  background: var(--theme-color-adjusted-10);
  border: none;
  width: 40px; /* کوچکتر برای موبایل */
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
}

.close-profile-btn:hover {
  background: var(--theme-color);
  transform: scale(1.08); /* افکت ظریف‌تر */
}

.close-profile-btn i {
  font-size: 1.4rem;
  color: var(--text-color);
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.profile-form {
  padding: 20px 0; /* کمی کمتر */
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-form label {
  font-size: 1.1rem; /* کوچکتر برای موبایل */
  color: var(--text-color);
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.profile-form input {
  width: 90%; /* کمی بیشتر برای پر کردن فضا */
  padding: 10px;
  font-size: 1rem; /* کوچکتر برای موبایل */
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
  background: var(--items-color);
  color: var(--text-color);
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
}

.profile-form input:focus {
  border-color: var(--theme-color-adjusted-10);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  outline: none;
}

.profile-form button {
  background: var(--items-color-adjusted-20);
  color: var(--text-color);
  border: none;
  padding: 10px 25px; /* کوچکتر برای موبایل */
  border-radius: 12px;
  font-size: 1rem; /* کوچکتر برای موبایل */
  font-weight: 600;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-form button:hover {
  background: var(--items-color);
  transform: translateY(-2px); /* افکت بالا آمدن */
}

/* استایل دکمه پرداخت */
.checkout-btn {
  background: var(--theme-color-adjusted-10);
  color: var(--text-color);
  border: none;
  padding: 10px 25px; /* کوچکتر برای موبایل */
  border-radius: 12px;
  font-size: 1rem; /* کوچکتر برای موبایل */
  font-weight: 600;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.checkout-btn:hover {
  background: var(--theme-color);
  transform: translateY(-2px); /* افکت بالا آمدن */
}

.checkout-btn:disabled {
  background: var(--items-color-adjusted-30);
  cursor: not-allowed;
  box-shadow: none;
}

/* استایل مودال تحویل */
#delivery-modal {
  position: fixed;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%) translateY(20px); /* افکت محو شدن آرام */
  width: 100%;
  max-width: 480px; /* هماهنگ با mobile-wrapper */
  height: 70vh;
  background: var(--theme-color);
  z-index: 1002;
  transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن انیمیشن */
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.25);
  border-radius: 25px 25px 0 0;
  overflow: hidden;
  opacity: 0;
}

#delivery-modal.active {
  bottom: 0;
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

body.drawer-open {
  overflow: hidden;
}

.modal-content {
  width: 100%;
  height: 100%;
  padding: 15px; /* کمی کمتر برای موبایل */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  direction: rtl;
  background: var(--theme-color);
  border-radius: 25px 25px 0 0;
  transition: background 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  transition: border-color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.modal-header h3 {
  font-size: 1.5rem; /* کوچکتر برای موبایل */
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  letter-spacing: 0.5px;
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

#close-delivery-modal-btn {
  background: var(--theme-color-adjusted-10);
  border: none;
  width: 36px; /* کوچکتر برای موبایل */
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
}

#close-delivery-modal-btn:hover {
  background: var(--theme-color);
  transform: scale(1.08); /* افکت ظریف‌تر */
}

#close-delivery-modal-btn i {
  font-size: 1.3rem;
  color: var(--text-color);
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

/* استایل گزینه‌های تحویل */
.delivery-option {
  padding: 10px 12px; /* کوچکتر برای موبایل */
  border-radius: 8px;
  margin: 6px 0;
  background: var(--items-color);
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
}

.delivery-option:hover {
  background: var(--items-color-adjusted-20);
  transform: translateY(-2px); /* افکت بالا آمدن */
}

.delivery-option input[type="radio"] {
  margin-left: 8px;
}

.delivery-option label {
  font-size: 1rem; /* کوچکتر برای موبایل */
  color: var(--text-color);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.delivery-option-group {
  margin: 8px 0;
}

.sub-options {
  padding-right: 15px; /* کمی کمتر */
}

/* استایل بخش آدرس‌ها */
#address-selection {
  margin-top: 12px;
  padding: 12px;
  background: var(--items-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
}

#address-selection h4 {
  font-size: 1.2rem; /* کوچکتر برای موبایل */
  color: var(--text-color);
  margin: 0 0 8px 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

#address-selection h4 i {
  font-size: 1.3rem;
  color: var(--theme-color-adjusted-10); /* جایگزینی #3498db */
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

#address-selection .address-list {
  max-height: 140px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--items-color);
}

#address-selection .delivery-option {
  background: var(--items-color-adjusted-20);
  border: 1px solid var(--border-color);
  padding: 8px;
  margin: 4px 0;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
}

/* استایل دکمه‌ها */
#confirm-delivery-btn {
  background: var(--theme-color-adjusted-10);
  color: var(--text-color);
  border: none;
  padding: 10px 25px; /* کوچکتر برای موبایل */
  border-radius: 12px;
  font-size: 1rem; /* کوچکتر برای موبایل */
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
}

#confirm-delivery-btn:hover {
  background: var(--theme-color);
  transform: translateY(-2px); /* افکت بالا آمدن */
}

#add-address-btn {
  background: var(--theme-color-adjusted-10);
  color: var(--text-color);
  border: none;
  padding: 10px 25px; /* کوچکتر برای موبایل */
  border-radius: 12px;
  font-size: 1rem; /* کوچکتر برای موبایل */
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
}

#add-address-btn:hover {
  background: var(--theme-color);
  transform: translateY(-2px); /* افکت بالا آمدن */
}

.delivery-guide {
  font-size: 0.85rem; /* کوچکتر برای موبایل */
  color: var(--text-color-adjusted-10);
  margin: 12px 0;
  line-height: 1.4;
  font-weight: 400;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.delivery-guide i {
  color: var(--theme-color-adjusted-10); /* جایگزینی #3498db */
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

/* انیمیشن ورود و خروج */
@keyframes slideUp {
  0% {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
  }
}

.cart-modal.active,
.profile-modal.active,
#delivery-modal.active {
  animation: slideUp 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; /* نرم‌تر کردن انیمیشن */
}

.cart-modal:not(.active),
.profile-modal:not(.active),
#delivery-modal:not(.active) {
  animation: slideDown 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; /* نرم‌تر کردن انیمیشن */
}

/* استایل پشتیبانی */
.support-contact {
  text-align: center;
  margin-top: 12px;
  padding: 8px;
  background: var(--items-color);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییرات */
}

.support-contact p {
  font-size: 0.9rem; /* کوچکتر برای موبایل */
  color: var(--text-color-adjusted-10);
  margin: 0;
  font-weight: 500;
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.support-link {
  color: var(--theme-color-adjusted-10); /* جایگزینی #e74c3c */
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.support-link i {
  font-size: 1.1rem;
  color: var(--theme-color-adjusted-10);
  transition: color 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.support-link:hover {
  color: var(--theme-color);
}

.support-link:hover i {
  color: var(--theme-color);
}

/* اسکرول‌بار سفارشی */
.cart-items::-webkit-scrollbar,
.profile-modal-content::-webkit-scrollbar,
#address-selection .address-list::-webkit-scrollbar {
  width: 5px; /* نازک‌تر برای موبایل */
}

.cart-items::-webkit-scrollbar-thumb,
.profile-modal-content::-webkit-scrollbar-thumb,
#address-selection .address-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
  transition: background 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* نرم‌تر کردن تغییر */
}

.cart-items::-webkit-scrollbar-thumb:hover,
.profile-modal-content::-webkit-scrollbar-thumb:hover,
#address-selection .address-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-color-adjusted-10);
}
