.top-bar {
  background-color: #8B0000;
  color: #333;
  padding: 10px 0;
  font-size: 0.9rem;
}

.top-bar a {
  color: #FFD700;
  margin-right: 15px;
  text-decoration: none;
}

.top-bar a:hover {
  text-decoration: underline;

}

.navbar {
  background-color: #FAF3F3;
}

.navbar a{
  color: #303030 !important;
}

.navbar a:hover{
  color: #C10917 !important;
}

.navbar-toggler {
  margin-left: 0;
}



/* Container to space out the items */
.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Ensure equal spacing between logo, icons, and hamburger menu */
.d-flex {
  display: flex;
  align-items: center;
}

.me-auto {
  margin-right: auto;
}

.ms-auto {
  margin-left: auto;
}

/* Adjust the positioning of the icons */
.nav-link {
  position: relative;
}

.navbar-brand {
  color: #FFD700;
  font-weight: bold;
  font-size: 1.5rem;
}

.navbar-nav .nav-link {
  color: #fff;
}

.navbar-nav .nav-link:hover {
  color: #C10917;
}

.newsletter {
  background-color: #8B0000;
  color: #fff;
  padding: 40px 0;
  text-align: center;
}

.newsletter h4 {
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: #FFD700;
}

.newsletter form input {
  margin-bottom: 20px;
  border-radius: 50px;
  border: none;
  padding: 10px 20px;
  width: 50%;
  font-size: 1rem;
  outline: none;
}

.newsletter form input[type="email"] {
  text-align: center;
}

.newsletter form button {
  border-radius: 50px;
  background-color: #FFD700;
  color: #8B0000;
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
}

.newsletter form button:hover {
  background-color: #fff;
  color: #8B0000;
}

.footer {
  background-color: #aaa69d;
  color: #fff;
  padding: 20px 0;
  text-align: center;
}

.footer p {
  margin: 0;
}

.footer a {
  color: #fff;
  text-decoration: none;
}

.footer a:hover {
  color: #FFD700;
  text-decoration: none;
}


/*start slider */
.slider {
  width: 100%;
  height: 200px;
}

.collection-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
}

.stick-slide {
  width: 24.5%;
  overflow: hidden;
  border: 1px solid #303030;
  box-shadow: 0px 3px 3px #303030;
  border-radius: 5px;
}

.stick-slide img {
  display: block;
  margin: 0 auto;
  width: 100%;
  height: 350px;
}

.stick-slide:hover img {
  -ms-transform: scale(1.1);
  /* IE 9 */
  transform: scale(1.1);
  /* Standard syntax */
  transition: all 0.3s ease-in-out;
}

@media (max-width: 992px) {
  /* Hide the static images when screen is small */
  .collection-box .stick-slide {
      display: none;
  }

  /* Show the carousel on small screens */
  #imageCarousel {
      display: block;
  }
}

@media (min-width: 993px) {
  /* Hide the carousel on larger screens */
  #imageCarousel {
      display: none;
  }
}

/*end slider*/


.btn-primary {
  background-color: #b33939;
  border-color: #b33939;
}

.btn-primary:hover {
  background-color: #A52A2A;
  border-color: #A52A2A;
}

.btn-primary:focus,
.btn-primary:active,
.btn-primary:focus:active,
.btn-primary:focus-visible {
  background-color: #b33939 !important; /* مطابق با hover */
  border-color: #b33939 !important;
  box-shadow: none !important;
  outline: none !important;
}

.invoice {
  background-color: #FDEDEC;
  padding: 20px;
  border-radius: 10px;
}

.equal-height {
  display: flex;
  align-items: stretch;
} 

.equal-height > .col-md-6 {
  display: flex;
  align-items: stretch;
}


.product-selection h3 {
  color: #8B0000;
}

.product-selection, .invoice {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #FDEDEC;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

/* Push the button to the bottom of its container */
.product-selection button,
.invoice button {
  margin-top: auto;
}

.reviews {
  margin-top: 40px;
  background-color: #FDF5F5;
  padding: 20px;
  border-radius: 10px;
}

.reviews h3 {
  color: #8B0000;
}

.review-item {
  margin-bottom: 20px;
}

.review-item .review-author {
  font-weight: bold;
  color: #8B0000;
}

.review-item .review-date {
  font-size: 0.9rem;
  color: #777;
}



/* استایل برای کل نوار */
.price-bar {
  display: flex;
  background-color: #8B0000;
  padding: 10px 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  font-size: 1rem;
  color: #FFD700;
}

/* بخش ثابت */
.fixed-section {
  flex: 0 0 auto;
  padding-left: 15px;
  font-weight: bold;
  margin-right: 2rem;
  white-space: nowrap;
  direction: rtl; /* جهت راست به چپ برای متن ثابت */
}

/* بخش متحرک */
.marquee-section {
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
  direction: ltr; /* جهت چپ به راست برای حرکت نوار */
}

/* محتوای متحرک */
.marquee-content {
  display: inline-block;
  white-space: nowrap;
  padding-right: 100%; /* فاصله اضافه برای جلوگیری از قطع شدن */
  animation: marquee 80s linear infinite; /* انیمیشن برای حرکت پیوسته */
}

.separator {
  margin: 0 15px;
  color: #aaa;
}

.marquee-section:hover .marquee-content {
  animation-play-state: paused; /* Pauses the animation on hover */
}

/* انیمیشن برای حرکت محتوای متحرک از چپ به راست */
@keyframes marquee {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(50%); }
}

.zoom-hover {
  transition: transform 0.3s ease;
}

.zoom-hover:hover {
  transform: scale(1.2); /* Adjust the scale factor as needed */
}


.active {
  background-color: #0d6efd;
  color: white;
}

.section-content {
  display: none;
}

.custom-radio-label {
  border: 2px solid transparent;
  padding: 5px;
  border-radius: 5px;
  transition: border-color 0.3s ease;
  cursor: pointer;
}

.custom-radio-label.selected-product {
  border: 3px solid #8B0000;
  font-weight: bold !important;
  color: #8B0000 !important;
  
}

.fixed-table {
  table-layout: fixed;
  width: 100%;
}

.fixed-table th,
.fixed-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.col-small { width: 60px; }
.col-medium { width: 120px; }
.col-large { width: 180px; }

.quantity-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem; /* Small spacing */
  width: 100%;
  overflow: hidden;
}

.quantity-wrapper span {
  min-width: 20px;
  text-align: center;
  white-space: nowrap;
}

.cart-qty-btn:focus {
  outline: none !important;
  box-shadow: none !important;
  transition: transform 0.1s ease;
}

.quantity-wrapper .btn {
  flex-shrink: 0;
  padding: 0.25rem 0.5rem;
}


#cart-hover-box {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: block !important; /* برای جلوگیری از flicker */
}

@media (max-width: 768px) {
  #cart-hover-box {
    display: none !important;
  }
}

#cart-hover-box.show {
  opacity: 1;
  visibility: visible;
}


.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  display: block !important; /* برای جلوگیری از flicker */
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
}

 /* Toast css */
.my-toast .toast-close {
  margin-left: 0.3rem;
  color: black;
  align-items: center;
}


/* sorting suggeestion products */
/* موبایل: مخفی کردن لیست گزینه‌ها */
@media (max-width: 767.98px) {
  .sorting-options {
    display: none; /* مخفی به صورت پیش‌فرض */
    flex-direction: column;
    background: white;
    position: absolute;
    border: 1px solid #ddd;
    padding: 10px;
    margin-top: 5px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    z-index: 1000;
  }
  
  /* استایل کلی دکمه مرتب سازی */
  .sorting-label {
    cursor: pointer;
    user-select: none;
  }

  /* وقتی باز شد */
  .sorting-options.active {
    display: flex;
  }
}

/* دسکتاپ: لیست همیشه نمایش داده شود */
@media (min-width: 768px) {
  .sorting-options {
    display: flex !important;
    flex-direction: row;
    position: static;
    box-shadow: none;
    border: none;
    padding: 0;
  }

  .sorting-label {
    cursor: default;
  }
}



.product-image {
  width: 150px;
  aspect-ratio: 1 / 1 !important; /* مربع */
  object-fit: cover;
}



/* image styles */
.image-wrapper {
  position: relative;
  overflow: hidden;
  width: 640px;
  max-width: 100%;
  margin: 0 auto;
}

/* حفظ نسبت تصویر قبل از لود */
.image-wrapper::before {
  content: "";
  display: block;
  padding-top: 75%; /* نسبت 16:9 → برای نسبت دیگر تغییر بده */
}

.image-wrapper picture,
.image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.lqip {
  filter: blur(20px);
  transform: scale(1.1);
  z-index: 2;
}

.main-image {
  z-index: 1;
}


/* موبایل → تمام عرض */
@media (max-width: 768px) {
  .image-wrapper {
    width: 100%;
  }
}

.carousel-item {
  position: relative;
}

.carousel-image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-image-wrapper .lqip {
 position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  filter: blur(20px);
  transform: scale(1.1);
  z-index: 2;
}

.carousel-image-wrapper .main-image {
  width: 100%;
  height: auto; /* مهم: ارتفاع طبیعی */
  display: block;
  position: relative;
  z-index: 1;
}

.content-wrapper {
  padding-top: 7rem;
}


/* اگر هدر fixed-top دارید، ارتفاعش را اینجا تنظیم کنید */
:root { --header-offset: 0px; }

/* هیرو */
.hero-saffron{
  direction: rtl;
  width: 100%;
  min-height: clamp(48vh, 64vh, 72vh);
  padding-top: calc(var(--header-offset) + 2rem);
  display: grid;
  align-items: center;
  position: relative;
}

/* پس‌زمینه */
.hero-bg{ position:absolute; inset:0; }
.hero-img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.03);
  transform: scale(1.02); /* کمی کراپ برای حذف لبه‌ها در ریسپانسیو */
}

/* گرادیان برای خوانایی بهتر متن */
.hero-overlay{
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.25) 40%, rgba(0,0,0,.55) 100%);
  pointer-events:none;
}

/* محتوا */
.hero-content{
  max-width: 48rem; /* ~768px */
}
.hero-title{ font-size: clamp(1.6rem, 2.8vw + 1rem, 3rem); line-height: 1.2; }
.hero-subtitle{ font-size: clamp(0.95rem, 1vw + .6rem, 1.25rem); opacity: .95; }

.hero-bullets li{
  font-size: .95rem;
  background: rgba(0,0,0,.25);
  padding: .5rem .75rem;
  border-radius: 999px;
}

/* بهینه‌سازی موبایل */
@media (max-width: 576px){
  .hero-saffron{
    min-height: 56vh;
    padding-top: calc(var(--header-offset) + 1.25rem);
  }
}

