/* ===================================
   Adaptive Logo Styling (CSS Media Queries)
   =================================== */

/* 
  Адаптивная верстка логотипа через CSS:
  - Мобильные (< 576px): 50px высота
  - Маленькие планшеты (576px - 767px): 60px высота
  - Планшеты (768px - 991px): 70px высота
  - Маленькие десктопы (992px - 1199px): 80px высота
  - Большие десктопы (1200px - 1399px): 90px высота
  - Ультра-большие (≥ 1400px): 100px высота
  
  Преимущества:
  - Оптимальная читаемость на всех устройствах
  - Плавное масштабирование через CSS
  - Увеличенный размер для лучшей видимости бренда
  - Один файл изображения (logo.png)
  - Эффект hover для улучшения UX
*/

.main-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  width: 100%;
}

.main-logo a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.main-logo img {
  /* Базовый размер для мобильных */
  max-height: 70px;
  height: auto;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.main-logo a:hover img {
  opacity: 0.85;
  transform: scale(1.02);
}

/* Footer Logo Base */
.footer-logo {
  max-height: 45px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
  display: block;
  transition: opacity 0.3s ease;
}

/* ===================================
   Responsive Logo Breakpoints
   =================================== */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .main-logo {
    justify-content: flex-start;
  }

  .main-logo img {
    max-height: 60px;
    max-width: 240px;
  }

  .footer-logo {
    max-height: 50px;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .main-logo img {
    max-height: 70px;
    max-width: 280px;
  }

  .footer-logo {
    max-height: 55px;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .main-logo img {
    max-height: 80px;
    max-width: 320px;
  }

  .footer-logo {
    max-height: 60px;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .main-logo img {
    max-height: 90px;
    max-width: 360px;
  }

  .footer-logo {
    max-height: 65px;
  }
}

/* Ultra large devices (extra large desktops, 1400px and up) */
@media (min-width: 1400px) {
  .main-logo img {
    max-height: 120px;
    max-width: 250px;
  }

  .footer-logo {
    max-height: 90px;
  }
}

/* ===================================
   Header Styling & Alignment
   =================================== */

/* Remove gap between header and hero section */
header {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

header .row:last-child {
  padding-bottom: 0 !important;
}

/* Header vertical alignment */
header .row.align-items-center {
  min-height: 90px;
}

/* Second row in header (navigation) */
header .row.pt-3 {
  border-top: 1px solid #f0f0f0;
}

/* Search bar alignment */
.search-bar {
  align-items: center;
}

.search-bar .form-control {
  font-size: 14px;
  padding: 0.5rem;
}

.search-bar .form-select {
  font-size: 14px;
  padding: 0.5rem;
}

/* Header icons styling */
header .rounded-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  transition: all 0.3s ease;
}

header .rounded-circle:hover {
  background-color: #e9ecef !important;
  transform: translateY(-2px);
}

/* Cart button styling */
.cart button {
  line-height: 1.3;
  transition: all 0.3s ease;
}

.cart button:hover {
  opacity: 0.8;
}

.cart .cart-total {
  min-width: 80px;
  text-align: right;
}

.cart .dropdown-toggle {
  font-size: 13px;
}

/* Responsive header adjustments */
@media (min-width: 768px) {
  header .row.align-items-center {
    min-height: 95px;
  }
}

@media (min-width: 992px) {
  header .row.align-items-center {
    min-height: 105px;
  }
}

@media (min-width: 1200px) {
  header .row.align-items-center {
    min-height: 115px;
  }

  .search-bar .form-control,
  .search-bar .form-select {
    font-size: 15px;
    padding: 0.6rem;
  }
}

@media (min-width: 1400px) {
  header .row.align-items-center {
    min-height: 125px;
  }

  .search-bar .form-control,
  .search-bar .form-select {
    font-size: 16px;
    padding: 0.7rem;
  }

  header .rounded-circle {
    width: 50px;
    height: 50px;
  }

  .cart .dropdown-toggle {
    font-size: 14px;
  }

  .cart .cart-total {
    font-size: 1.25rem;
  }
}

/* Hero Banner 4:3 Aspect Ratio Container */
.banner-blocks {
  display: block;
  width: 100%;
  margin: 0 auto;
}

.banner-blocks .banner-ad.large {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 600px;
  overflow: visible;
  border-radius: 24px;
  background: #f5f7fa;
}

.banner-blocks .main-swiper {
  width: 100%;
  height: 100%;
}

.banner-blocks .main-swiper .swiper-slide {
  min-height: unset;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-blocks .banner-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
}

.banner-blocks .banner-content .content-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  z-index: 2;
  max-width: 55%;
  padding-right: 2rem;
  width: 100%;
}

/* ===================================
   Вариант 1: Цветная капсула с градиентом
   =================================== */

.banner-blocks .banner-content .categories {
  display: inline-block;
  width: fit-content;
  padding: 0.3rem 1rem;
  margin-bottom: 0.5rem;
  font-size: clamp(0.7rem, 1.2vw, 0.8rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.banner-blocks .banner-content h3 {
  color: #1a1a1a;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  max-width: 20ch;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.banner-blocks .banner-content p {
  color: rgba(0, 0, 0, 0.65);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  line-height: 1.6;
  margin: 0 0 1rem 0;
  max-width: 45ch;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.banner-blocks .banner-content .btn {
  width: fit-content;
  padding: 0.875rem 2rem;
  background: transparent;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.banner-blocks .banner-content .btn:hover {
  background: #1a1a1a;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Image wrapper (desktop: right side, tablets: bottom, mobile: hidden) */
.banner-blocks .img-wrapper {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 35%;
  height: 75%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: transform 0.4s ease;
}

/* Добавляем светящийся ореол за изображением */
.banner-blocks .img-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  filter: blur(30px);
  transition: opacity 0.4s ease;
}


.banner-blocks .img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Многослойная тень для объемного эффекта */
  filter:
    drop-shadow(0 10px 25px rgba(0, 0, 0, 0.15)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12)) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.08));
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   Hover эффекты для изображений
   =================================== */

/* При hover на слайд: изображение увеличивается и поднимается */
.banner-blocks .swiper-slide:hover .img-wrapper img {
  transform: scale(1.08) translateY(-5px);
  filter:
    drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2)) drop-shadow(0 12px 20px rgba(0, 0, 0, 0.15)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.1));
}

/* При hover: включается свечение за изображением */
.banner-blocks .swiper-slide:hover .img-wrapper::before {
  opacity: 0.6;
}

/* Swiper Pagination Styling */
.main-swiper .swiper-pagination {
  bottom: 20px;
  z-index: 10;
}

.main-swiper .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: rgba(0, 0, 0, 0.25);
  opacity: 1;
  transition: all 0.3s ease;
}

.main-swiper .swiper-pagination-bullet-active {
  background: #0d6efd;
  width: 30px;
  border-radius: 5px;
}

/* Адаптивная pagination для мобильных */
@media (max-width: 767.98px) {
  .main-swiper .swiper-pagination {
    bottom: 12px;
  }

  .main-swiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 3px !important;
  }

  .main-swiper .swiper-pagination-bullet-active {
    width: 24px;
  }
}

@media (max-width: 575.98px) {
  .main-swiper .swiper-pagination {
    bottom: 10px;
  }

  .main-swiper .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    margin: 0 2px !important;
  }

  .main-swiper .swiper-pagination-bullet-active {
    width: 20px;
  }
}

/* ===================================
   Banner Slide Backgrounds (Colorful)
   Using class selectors for Swiper loop compatibility
   =================================== */

/* Slide 1: Orzax - Soft blue gradient (health, trust) */
.banner-blocks .swiper-slide.slide-orzax {
  background: linear-gradient(135deg, #dbe9f7 0%, #b8d4f1 100%);
}

/* Градиентная капсула Orzax 
   Используем полный селектор и !important, чтобы переопределить 
   style.css:441 (.banner-ad.large .banner-content .categories { color: var(--accent-color); })
*/
.banner-blocks .banner-ad.large .slide-orzax .banner-content .categories {
  background: linear-gradient(135deg, rgba(74, 144, 226, 0.12) 0%, rgba(74, 144, 226, 0.18) 100%);
  color: #000000 !important;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

/* Orzax: цветное голубое свечение при hover */
.banner-blocks .slide-orzax:hover .img-wrapper img {
  transform: scale(1.08) translateY(-5px);
  filter:
    drop-shadow(0 20px 40px rgba(74, 144, 226, 0.3)) drop-shadow(0 12px 20px rgba(74, 144, 226, 0.2)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.1));
}

/* Slide 2: SwissBork - Pastel green gradient (vitality, nature) */
.banner-blocks .swiper-slide.slide-swissbork {
  background: linear-gradient(135deg, #e3f5e1 0%, #c8e6c3 100%);
}

/* Градиентная капсула SwissBork */
.banner-blocks .banner-ad.large .slide-swissbork .banner-content .categories {
  background: linear-gradient(135deg, rgba(92, 168, 98, 0.12) 0%, rgba(92, 168, 98, 0.18) 100%);
  color: #000000 !important;
  box-shadow: 0 2px 8px rgba(92, 168, 98, 0.15);
}

/* SwissBork: цветное зеленое свечение при hover */
.banner-blocks .slide-swissbork:hover .img-wrapper img {
  transform: scale(1.08) translateY(-5px);
  filter:
    drop-shadow(0 20px 40px rgba(92, 168, 98, 0.3)) drop-shadow(0 12px 20px rgba(92, 168, 98, 0.2)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.1));
}

/* Slide 3: Shiffa Home - Peach gradient (beauty, warmth) */
.banner-blocks .swiper-slide.slide-shiffa {
  background: linear-gradient(135deg, #ffe8db 0%, #ffd4bc 100%);
}

/* Градиентная капсула Shiffa Home */
.banner-blocks .banner-ad.large .slide-shiffa .banner-content .categories {
  background: linear-gradient(135deg, rgba(232, 125, 62, 0.12) 0%, rgba(232, 125, 62, 0.18) 100%);
  color: #000000 !important;
  box-shadow: 0 2px 8px rgba(232, 125, 62, 0.15);
}

/* Shiffa Home: цветное персиковое свечение при hover */
.banner-blocks .slide-shiffa:hover .img-wrapper img {
  transform: scale(1.08) translateY(-5px);
  filter:
    drop-shadow(0 20px 40px rgba(232, 125, 62, 0.3)) drop-shadow(0 12px 20px rgba(232, 125, 62, 0.2)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.1));
}

/* ===================================
   Banner Responsive Adjustments
   =================================== */

/* Desktop (≥ 992px): Images on the right side */
@media (min-width: 992px) {
  .banner-blocks .img-wrapper {
    display: flex;
  }

  .banner-blocks .banner-content .content-wrapper {
    max-width: 55%;
  }
}

/* Tablets (768px - 991px): Show images on the right, text on the left */
@media (max-width: 991.98px) and (min-width: 768px) {
  .banner-blocks .banner-ad.large {
    max-height: 500px;
  }

  .banner-blocks .banner-content {
    flex-direction: row;
    text-align: left;
    align-items: center;
    padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
  }

  .banner-blocks .banner-content .content-wrapper {
    max-width: 58%;
    padding-right: 1.5rem;
    align-items: flex-start;
  }

  .banner-blocks .banner-content .categories {
    align-self: flex-start;
  }

  .banner-blocks .banner-content h3 {
    max-width: 20ch;
    font-size: clamp(1.6rem, 2.8vw, 2rem);
  }

  .banner-blocks .banner-content p {
    max-width: 45ch;
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  }

  /* Images on the right side for tablets */
  .banner-blocks .img-wrapper {
    display: flex;
    position: absolute;
    right: 3%;
    top: 50%;
    transform: translateY(-50%);
    width: 38%;
    height: 70%;
  }

  .banner-blocks .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

/* Medium mobile devices (576px - 768px): Hide images, center text */
@media (max-width: 767.98px) and (min-width: 576px) {
  .banner-blocks .banner-ad.large {
    min-height: 400px;
    max-height: none;
    height: auto;
    aspect-ratio: unset;
    overflow: visible;
    border-radius: 16px;
  }

  .banner-blocks .main-swiper {
    height: auto;
    min-height: 400px;
  }

  .banner-blocks .main-swiper .swiper-slide {
    height: auto;
    min-height: 400px;
  }

  .banner-blocks .banner-content {
    padding: 2.25rem 1.75rem;
    text-align: center;
    flex-direction: column;
    justify-content: center;
    height: auto;
    min-height: 400px;
  }

  .banner-blocks .banner-content .content-wrapper {
    max-width: 100%;
    padding-right: 0;
    align-items: center;
    gap: 0.8rem;
  }

  .banner-blocks .banner-content .categories {
    align-self: center;
    font-size: 0.72rem;
    padding: 0.29rem 0.95rem;
    margin-bottom: 0.5rem;
  }

  .banner-blocks .banner-content h3 {
    font-size: clamp(1.4rem, 4.5vw, 1.9rem);
    max-width: 100%;
    line-height: 1.3;
    margin-bottom: 0.8rem;
  }

  .banner-blocks .banner-content p {
    max-width: 100%;
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
    line-height: 1.5;
    margin-bottom: 1.1rem;
    padding: 0 0.75rem;
  }

  .banner-blocks .banner-content .btn {
    padding: 0.75rem 1.6rem;
    font-size: 0.92rem;
    margin-top: 0.5rem;
  }

  /* HIDE IMAGES ON MEDIUM MOBILE */
  .banner-blocks .img-wrapper {
    display: none !important;
  }
}


/* Extra small mobile devices (< 576px) */
@media (max-width: 575.98px) {
  .banner-blocks .banner-ad.large {
    min-height: 420px;
    max-height: none;
    /* Убираем ограничение */
    height: auto;
    aspect-ratio: unset;
    /* Отключаем aspect-ratio */
    overflow: visible;
    border-radius: 12px;
  }

  .banner-blocks .main-swiper {
    height: auto;
    min-height: 420px;
  }

  .banner-blocks .main-swiper .swiper-slide {
    height: auto;
    min-height: 420px;
  }

  .banner-blocks .banner-content {
    padding: 1.75rem 1rem;
    min-height: 420px;
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .banner-blocks .banner-content .content-wrapper {
    gap: 0.6rem;
    /* Еще компактнее */
    max-width: 100%;
    padding-right: 0;
    align-items: center;
  }

  .banner-blocks .banner-content .categories {
    align-self: center;
    font-size: 0.65rem;
    padding: 0.26rem 0.85rem;
    margin-bottom: 0.4rem;
  }

  .banner-blocks .banner-content h3 {
    font-size: clamp(1.2rem, 6vw, 1.6rem);
    line-height: 1.25;
    margin-bottom: 0.6rem;
  }

  .banner-blocks .banner-content p {
    font-size: clamp(0.85rem, 3.5vw, 0.95rem);
    line-height: 1.45;
    max-width: 100%;
    margin-bottom: 0.85rem;
    padding: 0 0.25rem;
  }

  .banner-blocks .banner-content .btn {
    padding: 0.65rem 1.35rem;
    font-size: 0.85rem;
    margin-top: 0.4rem;
  }

  /* HIDE IMAGES ON SMALL MOBILE */
  .banner-blocks .img-wrapper {
    display: none !important;
  }
}

/* Очень маленькие экраны (< 400px) */
@media (max-width: 399.98px) {
  .banner-blocks .banner-ad.large {
    min-height: 450px;
  }

  .banner-blocks .main-swiper,
  .banner-blocks .main-swiper .swiper-slide,
  .banner-blocks .banner-content {
    min-height: 450px;
  }

  .banner-blocks .banner-content {
    padding: 1.5rem 0.85rem;
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .banner-blocks .banner-content .content-wrapper {
    max-width: 100%;
    padding-right: 0;
    align-items: center;
  }

  .banner-blocks .banner-content .categories {
    align-self: center;
    font-size: 0.62rem;
    padding: 0.24rem 0.8rem;
  }

  .banner-blocks .banner-content h3 {
    font-size: clamp(1.1rem, 6vw, 1.45rem);
    line-height: 1.3;
  }

  .banner-blocks .banner-content p {
    font-size: clamp(0.8rem, 3.8vw, 0.9rem);
    line-height: 1.4;
  }

  .banner-blocks .banner-content .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
  }

  /* HIDE IMAGES ON EXTRA SMALL MOBILE */
  .banner-blocks .img-wrapper {
    display: none !important;
  }
}

/* Cart Styles */

/* Cart offcanvas header styling */
#offcanvasCart .offcanvas-header {
  border-bottom: 1px solid #e9ecef;
  padding: 1.25rem 1.5rem;
}

#offcanvasCart .offcanvas-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #212529;
}

#offcanvasCart .offcanvas-title .badge {
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
  font-weight: 600;
}

#offcanvasCart .btn-close {
  padding: 0.5rem;
  margin: 0;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#offcanvasCart .btn-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Cart items list */
#cart-items {
  max-height: 450px;
  overflow-y: auto;
  padding: 0;
  margin-bottom: 1rem;
}

#cart-items::-webkit-scrollbar {
  width: 6px;
}

#cart-items::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

#cart-items::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

#cart-items::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

#cart-items .list-group-item {
  border: none;
  border-bottom: 1px solid #e9ecef;
  padding-left: 0;
  padding-right: 0;
}

#cart-items .list-group-item:last-child {
  border-bottom: none;
}

.cart-qty-minus,
.cart-qty-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.cart-qty-minus:hover,
.cart-qty-plus:hover {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: white;
  transform: scale(1.05);
}

.cart-remove {
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.cart-remove:hover {
  color: #dc3545 !important;
  text-decoration: underline;
}

#cart-empty {
  padding: 2rem 0;
  text-align: center;
  color: #6c757d;
  font-style: italic;
}

/* Product item add to cart button animation */
.product-item a.nav-link {
  transition: all 0.3s ease;
}

.product-item a.nav-link:active {
  transform: scale(0.95);
}

/* Temporary subtle feedback when adding from product card */
.product-item a.nav-link.cart-added-temp {
  background-color: #eef1f6 !important;
  border-color: #d9dce3 !important;
  color: #212529 !important;
}

/* Cart badge animation */
.cart-count {
  transition: all 0.3s ease;
}

@keyframes bounce {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

.cart-count.updated {
  animation: bounce 0.5s ease;
}

/* ===================================
   Wishlist (Избранное) Styles
   =================================== */

/* Wishlist Offcanvas Header */
#offcanvasWishlist .offcanvas-header {
  border-bottom: 1px solid #e9ecef;
  padding: 1.25rem 1.5rem;
}

#offcanvasWishlist .offcanvas-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #212529;
}

#offcanvasWishlist .offcanvas-title .badge {
  background-color: #dc3545 !important;
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
  font-weight: 600;
}

#offcanvasWishlist .btn-close {
  padding: 0.5rem;
  margin: 0;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#offcanvasWishlist .btn-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Wishlist Items List */
#wishlist-items {
  max-height: 500px;
  overflow-y: auto;
  padding: 0;
  margin-bottom: 1rem;
}

#wishlist-items::-webkit-scrollbar {
  width: 6px;
}

#wishlist-items::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

#wishlist-items::-webkit-scrollbar-thumb {
  background: #ffc1c8;
  border-radius: 10px;
}

#wishlist-items::-webkit-scrollbar-thumb:hover {
  background: #ff8a95;
}

#wishlist-items .list-group-item {
  border: none;
  border-bottom: 1px solid #e9ecef;
  padding: 1rem 0;
}

#wishlist-items .list-group-item:last-child {
  border-bottom: none;
}

.wishlist-item-image {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 8px;
  background: #f8f9fa;
  padding: 0.5rem;
  flex-shrink: 0;
}

.wishlist-remove {
  color: #6c757d;
  text-decoration: none;
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 300;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.wishlist-remove:hover {
  color: #dc3545;
  background: #fff5f5;
  transform: scale(1.1);
}

#wishlist-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: #6c757d;
  font-style: italic;
}

/* Add to cart from wishlist button */
.wishlist-add-to-cart {
  transition: all 0.3s ease;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.wishlist-add-to-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

.wishlist-add-to-cart:active {
  transform: scale(0.95);
}

/* Heart icon states */
.heart-icon {
  transition: all 0.3s ease;
  color: #6c757d;
}

.heart-icon.filled {
  color: #dc3545;
}

.heart-icon.filled path {
  fill: #dc3545;
}

.heart-icon:not(.filled) path {
  fill: none;
}

/* Product card heart button */
.product-item .wishlist-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.product-item .wishlist-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #fff5f5;
}

.product-item .wishlist-toggle svg {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
  color: #6c757d;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.product-item .wishlist-toggle:hover svg {
  color: #dc3545;
}

/* Активное состояние - красное заполненное сердечко */
.product-item .wishlist-toggle.active {
  background: #fff5f5;
}

.product-item .wishlist-toggle.active svg {
  color: #dc3545;
  fill: #dc3545;
  stroke: #dc3545;
  animation: heartBeat 0.4s ease;
}

/* Анимация сердца */
@keyframes heartBeat {
  0% {
    transform: scale(1);
  }

  25% {
    transform: scale(1.3);
  }

  50% {
    transform: scale(1);
  }

  75% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
  }
}

/* Wishlist count badge в header */
.wishlist-count {
  transition: all 0.3s ease;
}

.wishlist-count.updated {
  animation: badgePop 0.6s ease;
}

@keyframes badgePop {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.3);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Скрыть badge когда счетчик = 0 */
.wishlist-count:empty,
.wishlist-count[style*="0"] {
  display: none !important;
}

/* Add all to cart button */
#add-all-to-cart {
  transition: all 0.3s ease;
}

#add-all-to-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 110, 253, 0.25);
}

#add-all-to-cart svg {
  vertical-align: middle;
}

/* ===================================
   Product Filters Styles
   =================================== */

/* ===================================
   Product Filters Styles
   =================================== */

/* Premium Custom Checkboxes (Sidebar) */
.sidebar-widget {
  transition: all 0.3s ease;
}

.filter-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 0;
  background: none;
  border: none;
  border-bottom: 1px solid #eee;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #888;
  transition: color 0.2s ease;
}

.filter-toggle-btn:hover {
  color: #212529;
}

.filter-toggle-btn:not(.collapsed) {
  color: #212529;
  border-bottom-color: transparent;
}

.filter-toggle-icon {
  width: 12px;
  height: 12px;
  transition: transform 0.3s ease;
}

.filter-toggle-btn:not(.collapsed) .filter-toggle-icon {
  transform: rotate(180deg);
}

.accordion-body::-webkit-scrollbar {
  width: 4px;
}

.accordion-body::-webkit-scrollbar-track {
  background: #f8f9fa;
}

.accordion-body::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 10px;
}

.filters-content .form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  border-color: #dee2e6;
  background-position: center;
  background-size: 60%;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  margin-top: 0.2rem;
}

.filters-content .form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  box-shadow: 0 2px 5px rgba(255, 196, 63, 0.3);
  /* Uses primary color */
}

.filters-content .form-check-input:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(255, 196, 63, 0.15);
  outline: none;
}

.filters-content .form-check {
  padding-left: 1.75rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  border-radius: 6px;
  transition: background-color 0.15s ease;
  margin-bottom: 0.6rem;
  cursor: pointer;
}

.filters-content .form-check:hover {
  background-color: #f8f9fa;
}

.filters-content .form-check-label {
  font-size: 0.925rem;
  color: #495057;
  font-weight: 400;
  transition: color 0.2s ease;
  padding-left: 0.4rem;
  width: 100%;
  cursor: pointer;
  line-height: 1.5;
}

.filters-content .form-check-input:checked~.form-check-label {
  color: #212529;
  font-weight: 600;
}

/* Professional Show More Button */
.show-more-btn {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0d6efd;
  cursor: pointer;
  transition: all 0.2s ease;
}

.show-more-btn:hover {
  text-decoration: underline;
  color: #0a58ca;
}

/* Active Filter Chips (Dynamic Row) */
#active-filters-container {
  min-height: 0;
  transition: all 0.3s ease;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 50px;
  color: #495057;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  line-height: 1.2;
}

.filter-chip:hover {
  background-color: #e9ecef;
  border-color: #dee2e6;
  color: #212529;
  transform: translateY(-1px);
}

.filter-chip span {
  font-size: 1.1rem;
  line-height: 0.8;
  margin-left: 0.5rem;
  color: #adb5bd;
  transition: color 0.2s ease;
}

.filter-chip:hover span {
  color: #dc3545;
}

/* Clear All Button */
.btn-clear-filters {
  border-radius: 999px;
  border: 1px solid #dc3545;
  color: #dc3545;
  background-color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  line-height: 1.2;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-clear-filters:hover {
  background-color: #f8d7da;
  color: #c82333;
  border-color: #c82333;
}

.product-item {
  display: flex;
  flex-direction: column;
}

.product-item .product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  width: 100%;
}

.product-item .product-actions>* {
  min-width: 0;
}

.product-item .product-qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 0 0 auto;
  width: auto;
  min-width: 84px;
}

.product-item .product-qty .btn-number,
.product-item .product-qty .input-number {
  height: 34px;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1;
}

.product-item .product-qty .btn-number {
  width: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.product-item .product-qty .input-number {
  width: 45px;
  max-width: 45px;
  flex: 0 0 45px;
  text-align: center;
  border-radius: 8px;
  margin: 0 2px;
}

.product-item .add-to-cart-btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
  padding: 0.45rem 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.product-item .add-to-cart-text {
  display: inline-block;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .product-item .product-actions {
    gap: 0.35rem;
    flex-wrap: wrap;
    row-gap: 0.4rem;
  }

  .product-item .product-qty {
    min-width: 80px;
  }

  .product-item .add-to-cart-btn {
    flex: 1 1 100%;
    white-space: normal;
    text-align: center;
    font-size: 0.93rem;
    padding: 0.4rem 0.55rem;
  }
}

.filter-chip.filter-chip-summary {
  background: #e9ecef;
  color: #495057;
  cursor: default;
}

/* Product pagination */
.product-pagination-wrapper {
  margin-top: 1.5rem;
}

.product-pagination .page-item {
  margin: 0 4px;
}

.product-pagination .page-link {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #dee2e6;
  background-color: #f8f9fa;
  color: #495057;
  font-weight: 600;
  transition: all 0.15s ease;
}

.product-pagination .page-link:hover {
  background-color: #e9ecef;
  color: #212529;
  border-color: #ced4da;
}

.product-pagination .page-item.active .page-link {
  background-color: #198754;
  border-color: #198754;
  color: #fff;
}

.product-pagination .page-item.disabled .page-link {
  background-color: #f8f9fa;
  color: #adb5bd;
  border-color: #e9ecef;
  cursor: default;
}

.product-pagination .page-link:focus {
  box-shadow: none;
}

#siteHeader {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  transition: box-shadow 0.2s ease;
}

#siteHeader.is-scrolled {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

@media (max-width: 991.98px) {
  #siteHeader .row.pt-3 {
    display: none !important;
  }
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 140px;
  padding: 1rem;
  border: 1px solid #e9ecef;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.category-item .category-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.category-item .category-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
  max-width: 100%;
}

.category-item .category-title-text {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

@media (max-width: 575.98px) {
  .category-item {
    min-height: 120px;
    padding: 0.85rem;
  }

  .category-item .category-title {
    font-size: 0.9rem;
  }
}

.is-hidden {
  display: none !important;
}

#searchEmptyState {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem 1rem;
  color: #6c757d;
  text-align: center;
  font-size: 0.95rem;
}

@media (max-width: 767.98px) {
  .active-filters-panel {
    display: none !important;
  }
}

/* FAQ */
.faq-accordion .accordion-item {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background-color: #fff;
}

.faq-accordion .accordion-button {
  background-color: #fff;
  padding: 0.85rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #212529;
}

.faq-accordion .accordion-button:not(.collapsed) {
  background-color: #f8f9fa;
  box-shadow: none;
}

.faq-accordion .accordion-button:focus {
  box-shadow: none;
}

.faq-accordion .accordion-body {
  font-size: 0.9rem;
  color: #495057;
  padding: 0.9rem 1.1rem 1rem;
}

/* Filters Sidebar (Desktop) */
.filters-sidebar {
  padding-right: 2rem;
}

.filters-wrapper {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
}

.filters-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.5rem;
  margin-right: -0.5rem;
}

.filters-content::-webkit-scrollbar {
  width: 6px;
}

.filters-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.filters-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

.filters-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.filters-footer {
  flex-shrink: 0;
}

/* Accordion Styling */
.filters-content .accordion {
  --bs-accordion-border-color: transparent;
  --bs-accordion-border-radius: 0;
  --bs-accordion-inner-border-radius: 0;
}

.filters-content .accordion-item {
  background: transparent;
  border: none;
  margin-bottom: 0.5rem;
}

.filters-content .accordion-button {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px !important;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #212529;
  box-shadow: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filters-content .accordion-button:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.filters-content .accordion-button:not(.collapsed) {
  background: #e9ecef;
  color: #212529;
  box-shadow: none;
}

.filters-content .accordion-button:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
  outline: none;
}

.filters-content .accordion-button:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.filters-content .accordion-button::after {
  width: 1rem;
  height: 1rem;
  background-size: 1rem;
}

.filters-content .accordion-collapse {
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filters-content .accordion-body {
  padding: 1rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 300px;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filters-content .accordion-body::-webkit-scrollbar {
  width: 4px;
}

.filters-content .accordion-body::-webkit-scrollbar-track {
  background: #f8f9fa;
}

.filters-content .accordion-body::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 2px;
}

/* Form Check Styling */
.filters-content .form-check {
  padding-left: 1.75rem;
  margin-bottom: 0.5rem;
}

.filters-content .form-check-input {
  margin-top: 0.25rem;
  cursor: pointer;
  width: 1.1em;
  height: 1.1em;
  border: 2px solid #dee2e6;
  transition: all 0.2s ease;
}

.filters-content .form-check-input:hover {
  border-color: #adb5bd;
}

.filters-content .form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.filters-content .form-check-input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
  outline: none;
}

.filters-content .form-check-input:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.filters-content .form-check-label {
  cursor: pointer;
  font-size: 0.875rem;
  color: #495057;
  user-select: none;
  line-height: 1.5;
  padding-left: 0.5rem;
  transition: color 0.2s ease;
}

.filters-content .form-check-label:hover {
  color: #212529;
}

.filters-content .form-check-input:checked~.form-check-label {
  color: #212529;
  font-weight: 500;
}

/* Price Range Inputs */
.filters-content .form-label {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.filters-content .form-control-sm {
  font-size: 0.875rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}

.filters-content .form-control-sm:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Mobile Filters Button */
.btn[data-bs-toggle="offcanvas"][data-bs-target="#offcanvasFilters"] {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
}

/* Mobile Filters Offcanvas */
#offcanvasFilters {
  max-width: 320px;
}

#offcanvasFilters .offcanvas-header {
  padding: 1.25rem 1.5rem;
  flex-shrink: 0;
}

#offcanvasFilters .offcanvas-title {
  font-size: 1.25rem;
}

#offcanvasFilters .offcanvas-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#offcanvasFilters .filters-content {
  padding: 1rem 1.5rem;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#offcanvasFilters .filters-footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
  padding: 1rem 1.5rem;
}

/* Filter Count */
#filter-count-desktop,
#filter-count-mobile,
#filter-count-mobile-fruits,
#filter-count-mobile-juices {
  font-size: 0.875rem;
  color: #6c757d;
}

#filter-count-value,
#filter-count-value-mobile,
#filter-count-value-fruits,
#filter-count-value-juices {
  font-weight: 600;
  color: #212529;
}

/* Filter Buttons */
.filters-footer .btn {
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.filters-footer .btn-outline-secondary {
  border: 1.5px solid #dee2e6;
}

.filters-footer .btn-outline-secondary:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

.filters-footer .btn-primary {
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

.filters-footer .btn-primary:hover {
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
  transform: translateY(-1px);
}

/* Responsive adjustments */

/* Tablet and below (< 992px): use offcanvas for filters */
@media (max-width: 991.98px) {
  .filters-wrapper {
    padding: 1rem;
  }

  #offcanvasFilters {
    max-width: 85%;
  }

  #offcanvasFilters .filters-content {
    padding: 0.75rem 1rem;
  }

  #offcanvasFilters .filters-footer {
    padding: 1rem;
  }
}

/* Mobile specific (< 768px) */
@media (max-width: 767.98px) {
  #offcanvasFilters {
    max-width: 100%;
  }

  /* Active filters chips on mobile */
  .active-filters-panel {
    padding: 0.5rem 0.75rem;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .filter-chip {
    font-size: 0.8125rem;
    padding: 0.25rem 0.625rem;
  }

  .clear-all-filters {
    font-size: 0.8125rem;
  }
}

/* iPad Mini portrait and similar (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .active-filters-panel {
    padding: 0.625rem 1rem;
  }

  .filter-chip {
    font-size: 0.875rem;
  }
}

/* ===================================
   Product Cards Equal Height Layout
   =================================== */

/* Make Bootstrap columns flex containers */
.product-grid .col {
  display: flex;
  flex-direction: column;
}

/* Make product items fill the column height */
.product-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
  /* Remove margin as grid gap will handle spacing */
}

/* Fixed height for product images */
.product-item figure {
  min-height: 220px;
  max-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.product-item figure img {
  max-height: 200px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Fixed minimum height for product titles */
.product-item h3 {
  min-height: 50px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.5rem;
}

/* Spacing for quantity */
.product-item .qty {
  display: block;
  margin-bottom: 0.75rem;
}

/* Hide rating if it exists
.product-item .rating {
  display: none !important;
} */

/* Price styling */
.product-item .price {
  margin-bottom: 1rem;
  margin-top: 0.25rem;
}

/* Push action buttons to the bottom */
.product-item>.d-flex:last-child {
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .product-item figure {
    min-height: 180px;
    max-height: 180px;
  }

  .product-item figure img {
    max-height: 160px;
  }

  .product-item h3 {
    font-size: 0.95rem;
    min-height: 40px;
    -webkit-line-clamp: 2;
  }

  .product-item .qty {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }

  .product-item .price {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
}

/* ===================================
   Product Details Gallery (scoped)
   =================================== */

#offcanvasProductDetails .pd-gallery {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

#offcanvasProductDetails .pd-swiper {
  width: 100%;
  height: 300px;
  /* Fixed height container */
}

/* Slide inner wrapper to center image */
#offcanvasProductDetails .pd-gallery-slide-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  /* Match bg-light */
  padding: 1rem;
}

#offcanvasProductDetails .pd-gallery-slide-inner img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* Pagination bullets */
#offcanvasProductDetails .pd-swiper-pagination {
  bottom: 10px;
}

#offcanvasProductDetails .pd-swiper-pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: rgba(0, 0, 0, 0.2);
  opacity: 1;
  margin: 0 4px;
  transition: all 0.3s ease;
}

#offcanvasProductDetails .pd-swiper-pagination .swiper-pagination-bullet-active {
  background: #0d6efd;
  width: 24px;
  border-radius: 4px;
}

/* Navigation buttons */
#offcanvasProductDetails .pd-swiper-prev,
#offcanvasProductDetails .pd-swiper-next {
  color: #0d6efd;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

#offcanvasProductDetails .pd-swiper-prev:hover,
#offcanvasProductDetails .pd-swiper-next:hover {
  background: #fff;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

#offcanvasProductDetails .pd-swiper-prev::after,
#offcanvasProductDetails .pd-swiper-next::after {
  font-size: 14px;
  font-weight: 800;
}


/* Checkout drawer (scoped) */
#offcanvasCheckout .checkout-summary {
  font-size: 0.95rem;
}

#offcanvasCheckout .checkout-item-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  border-bottom: 1px dashed #e0e0e0;
  padding-bottom: 0.25rem;
}

#offcanvasCheckout .checkout-item-row:last-child {
  border-bottom: none;
}

#offcanvasCheckout .form-control:focus,
#offcanvasCheckout .form-check-input:focus {
  border-color: #ffc43f;
  box-shadow: 0 0 0 0.25rem rgba(255, 196, 63, 0.25);
}

/* Product Details Offcanvas (Scoped) */
#offcanvasProductDetails .offcanvas-body::-webkit-scrollbar {
  width: 6px;
}

#offcanvasProductDetails .offcanvas-body::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#offcanvasProductDetails .offcanvas-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

#offcanvasProductDetails .nav-tabs .nav-link {
  color: #6c757d;
  font-weight: 600;
  border: none;
  border-bottom: 2px solid transparent;
}

#offcanvasProductDetails .nav-tabs .nav-link.active {
  color: #212529;
  border-bottom-color: #ffc43f;
  background: transparent;
}

#offcanvasProductDetails .spec-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

#offcanvasProductDetails .spec-row:last-child {
  border-bottom: none;
}

#offcanvasProductDetails .spec-label {
  font-weight: 600;
  color: #212529;
}

#offcanvasProductDetails .spec-value {
  color: #6c757d;
  text-align: right;
}

/* Sidebar Wishlist Button (Mirrors .wishlist-toggle) */
#offcanvasProductDetails #pd-wishlist-btn {
  background: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  color: #6c757d;
}

#offcanvasProductDetails #pd-wishlist-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #fff5f5;
  color: #dc3545;
}

#offcanvasProductDetails #pd-wishlist-btn svg {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

#offcanvasProductDetails #pd-wishlist-btn.active {
  background: #fff5f5;
  color: #dc3545;
}

#offcanvasProductDetails #pd-wishlist-btn.active svg {
  fill: currentColor;
  stroke: currentColor;
  animation: heartBeat 0.4s ease;
}

/* ===================================
   Site Footer Styling (Scoped)
   =================================== */

.site-footer {
  background-color: #fff;
  font-size: 0.95rem;
  color: #212529;
}

.site-footer a {
  text-decoration: none;
  color: #212529;
  transition: all 0.2s ease;
}

.site-footer a:hover {
  text-decoration: underline;
  color: #0d6efd;
}

.site-footer h5 {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  color: #212529;
}

.site-footer .footer-logo {
  max-height: 50px;
  width: auto;
  margin-bottom: 1rem;
}

.site-footer .pickup-info {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.site-footer .pickup-note {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.75rem;
  font-style: italic;
}

.site-footer .social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  background-color: #f8f9fa;
  color: #212529;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid #dee2e6;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.site-footer .social-link:hover {
  background-color: #e9ecef;
  text-decoration: none;
  transform: translateY(-1px);
}

.site-footer .footer-bottom-bar {
  font-size: 0.85rem;
  color: #6c757d;
}

/* Product Details Fullscreen Viewer */
body.pd-fs-open {
  overflow: hidden !important;
}

.pd-fs-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  /* Higher than Bootstrap offcanvas (1045) and backdrop (1040) */
  background-color: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pd-fs-overlay.active {
  opacity: 1;
  visibility: visible;
}

.pd-fs-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E") no-repeat center center;
  background-size: 24px;
  border: none;
  cursor: pointer;
  z-index: 2010;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.pd-fs-close:hover {
  opacity: 1;
}

.pd-fs-swiper {
  width: 100%;
  height: 100%;
}

.pd-fs-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.pd-fs-swiper .swiper-slide img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.pd-fs-prev,
.pd-fs-next {
  color: #fff;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.pd-fs-prev:hover,
.pd-fs-next:hover {
  opacity: 1;
}

.pd-fs-prev::after,
.pd-fs-next::after {
  font-size: 2rem;
}


/* Old Price Styling */
.product-item .price .old-price {
  color: #999999 !important;
  text-decoration: line-through;
  font-weight: 400;
  font-size: 0.9em;
  margin-right: 8px;
}

/* ===================================
   Filter Sidebar Accordion & Icons ("iHerb" Style)
   =================================== */

.filter-toggle-btn {
  background: transparent;
  border: none;
  padding: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--heading-color, #212529);
  cursor: pointer;
  user-select: none;
  font-size: 1rem;
}

/* Sidebar Categories Spacing & Borders */
.filter-group {
  border-bottom: 1px solid #f0f0f0 !important;
  margin-bottom: 1.25rem !important;
  padding-bottom: 1rem !important;
}

.filter-group:last-child {
  border-bottom: none !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.filter-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 0;
  background: none;
  border: none;
  font-weight: 700;
  color: #212529;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
}

.filter-toggle-btn:focus {
  outline: none;
  box-shadow: none;
}

.filter-toggle-icon {
  width: 12px;
  height: 12px;
  opacity: 0.6;
  transition: transform 0.3s ease;
  color: currentColor;
  flex-shrink: 0;
}

/* Rotate when expanded (aria-expanded="true") */
.filter-toggle-btn[aria-expanded="true"] .filter-toggle-icon {
  transform: rotate(180deg);
}

.show-more-btn {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.825rem;
  font-weight: 600;
  color: #888;
  /* Calm Gray */
  cursor: pointer;
  text-decoration: none;
  margin-top: 0.75rem;
  padding-left: 1.75rem;
  /* Align with checkbox text */
  transition: color 0.2s ease;
}

.show-more-btn:hover {
  text-decoration: underline;
  color: #212529;
}

/* Product Details Fullscreen Overlay */
#pdFullscreenOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#pdFullscreenOverlay.active {
  display: flex;
  opacity: 1;
}

.pd-fs-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  line-height: 1;
  z-index: 3000;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.pd-fs-close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(90deg);
}

.pd-fs-swiper {
  width: 100%;
  height: 100%;
}

.pd-fs-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-fs-swiper .swiper-slide img {
  max-height: 90vh;
  max-width: 90vw;
  object-fit: contain;
}

.pd-fs-next,
.pd-fs-prev {
  color: white;
}

/* --- Fix Fullscreen Close Button --- */
.pd-fs-close {
  /* 1. Position & Size */
  position: absolute;
  top: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  z-index: 2005;
  /* High z-index to sit on top of image */

  /* 2. The Circle */
  background-color: rgba(0, 0, 0, 0.5) !important;
  /* Semi-transparent black */
  border: 2px solid rgba(255, 255, 255, 0.5);
  /* White border ring */
  border-radius: 50%;
  cursor: pointer;

  /* 3. Centering the X */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.pd-fs-close:hover {
  background-color: #dc3545 !important;
  /* Red on hover */
  border-color: #dc3545;
  transform: rotate(90deg);
  /* Spin effect */
}

/* 4. Draw the "X" using pure CSS */
.pd-fs-close::before,
.pd-fs-close::after {
  content: '';
  position: absolute;
  width: 24px;
  /* Length of the lines */
  height: 2px;
  /* Thickness of the lines */
  background-color: #ffffff;
  /* White color */
  border-radius: 2px;
}

.pd-fs-close::before {
  transform: rotate(45deg);
}

.pd-fs-close::after {
  transform: rotate(-45deg);
}

/* ===================================
   Product Card Standardization (Grid Layout)
   =================================== */

/* Enforce 1:1 Aspect Ratio for all product images */
.product-item figure {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  /* Optional: ensures clean background for transparent PNGs */
}

.product-item figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Ensures the whole product is visible without cropping */
  transition: transform 0.3s ease;
}

.product-item figure:hover img {
  transform: scale(1.05);
  /* Subtle zoom effect on hover */
}

/* Enforce Fixed Height & Line Clamping for Titles */
.product-item h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* max 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 3em;
  /* roughly 2 lines height */
  line-height: 1.5em;
  margin-bottom: 0.5rem;
}

/* Enforce Fixed Height & Line Clamping for Descriptions */
.product-item .qty {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* max 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 3em;
  /* roughly 2 lines height */
  line-height: 1.5em;
  color: #6c757d;
  margin-bottom: 1rem;
  display: block;
  /* Required for line-clamp to work on spans */
}

/* Flex container to push buttons to the bottom */
.product-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

/* Fix Description Text Style */
.product-item .qty {
  text-transform: none !important;
  /* Disables ALL CAPS */
  letter-spacing: normal;
  /* Fixes wide spacing often used with caps */
  font-weight: 400;
  /* Ensures it's not too bold */
  font-size: 0.9rem;
  /* Optional: Adjust size for better readability */
}

/* Category Carousel Micro-interactions */
.category-item {
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  padding: 20px;
  min-height: 180px;
  gap: 0.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

/* Larger Category Icons */
.category-item .category-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
}

/* Responsive adjustment for mobile */
@media (max-width: 575.98px) {
  .category-item .category-icon {
    width: 72px;
    height: 72px;
  }

  .category-item {
    min-height: 150px;
  }
}

.category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-color);
}

.category-item:active {
  transform: scale(0.98);
}

/* --- Brand Carousel Fixes --- */

/* 1. Force Equal Height for Slides */
.brand-carousel .swiper-slide {
  height: auto;
  display: flex;
  /* Ensures the card fills the slide height */
  padding: 10px;
  /* Add breathing room for the shadow */
}

/* 2. Card Styling & Animation */
.brand-carousel .card {
  width: 100%;
  height: 100%;
  border: 1px solid #f0f0f0 !important;
  /* Clean border */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  /* Smooth Physics */
  overflow: hidden;
}

/* 3. The "Lift" Hover Effect */
.brand-carousel .card:hover {
  transform: translateY(-5px);
  /* Moves up */
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
  /* Soft Glow */
  border-color: var(--accent-color) !important;
}

/* 4. Fix Logo Sizing (Balanced for Readability) */
.brand-carousel .card img {
  width: auto;
  /* Prevents stretching */
  max-width: 100%;
  /* Fits within the column */
  height: 85px;
  /* Increased from 60px for better visibility */
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  display: block;
}

/* 5. Fix Text Overflow */
.brand-carousel .card-title {
  font-size: 0.9rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
}

/* ===================================
   Professional Brand Card Design (Vertical Flex Layout)
   =================================== */

.brand-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.25rem 1rem;
    border: 1px solid #f0f0f0;
    border-radius: 16px; /* Softer, modern corners */
    background: #fff;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    gap: 1rem; /* Consistent space between logo and text */
}

/* Hover Effect: Lift & Glow */
.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: var(--accent-color, #ffc107);
}

/* Logo Container: Defines the "Stage" for the logo */
.brand-logo-container {
    height: 80px; /* Fixed height ensures alignment across all cards */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.brand-logo-container img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    object-fit: contain; /* Optional: Makes it look uniform/premium initially */
    opacity: 0.8;
    transition: all 0.3s ease;
}

.brand-card:hover .brand-logo-container img {
    filter: grayscale(0%); /* Color on hover */
    opacity: 1;
    transform: scale(1.05);
}

/* Typography */
.brand-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #212529;
    margin: 0;
    line-height: 1.2;
}

.brand-desc {
    font-size: 0.8rem;
    margin: 0.25rem 0 0 0;
    line-height: 1.4;
}

/* Mobile Optimization (< 576px) */
@media (max-width: 575.98px) {
    .brand-card {
        padding: 1rem 0.5rem;
        border-radius: 12px;
    }
    .brand-logo-container {
        height: 60px; /* Smaller stage for mobile */
    }
    .brand-name {
        font-size: 0.85rem; /* Readable but compact */
    }
}