/* ===============================
   🔧 GLOBAL FONT FIX
=============================== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@700&family=Marcellus&family=Montserrat:wght@400;500;600;700&display=swap');

/* H1–H3 */
h1, h2, h3 {
  font-family: 'Manrope', sans-serif !important;
  font-weight: 700 !important;
  color: #005F87 !important;
  letter-spacing: -0.3px !important;
}

/* Категории слева (Marcellus) */
.side-menu,
.side-menu .top-cat-list,
.side-menu .cat-header .cat-text,
.side-menu .subcat-list li,
.side-menu .subcat-list li a {
  font-family: 'Marcellus', serif !important;
}

/* Меню, описание товаров и характеристики — Montserrat */
.navbar,
.navbar .nav-link,
.dropdown-menu,
.dropdown-menu .dropdown-item,
.product-info,
.product-info .product-name,
.product-info .price-block,
.product-card .card-title,
.product-card .card-text,
.category-card .btn,
.product-card .btn,
.action-buttons button,
#filter-panel,
#brandCheckboxes label,
.order-items-list,
.cart-item-title {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 1rem !important;
  line-height: 1.4 !important;
}

/* ===============================
   🧱 PRODUCT CARD STRUCTURE FIX
=============================== */
/* Card as flex column */
.product-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

/* Body grows, stacks content */
.product-card .card-body {
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
}

/* Push bottom buttons down */
.product-card .mt-auto,
.product-card .action-buttons {
  margin-top: auto !important;
}

/* ===============================
   📦 PRODUCT ITEM MIN HEIGHT (optional)
=============================== */
/* You can remove if flex handles it */
.product-item {
  min-height: 460px;
}

/* ===============================
   🎯 PRODUCT TITLE FULL DISPLAY
=============================== */
.card.product-card .card-title {
  display: block !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  white-space: normal !important;
  word-break: break-word !important;
  font-weight: 600 !important;
}

/* ===============================
   🧩 PRODUCT LABELS FLEX
=============================== */
.product-labels {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  margin-bottom: .5rem !important;
}

/* ===============================
   📱 MOBILE PATCHES
=============================== */
@media (max-width: 576px) {
  .logo-container {
    font-size: 4.6vw !important;
    max-width: 55vw !important;
  }
  .product-card .btn,
  .category-card .btn,
  .action-buttons button {
    font-size: .88rem !important;
    line-height: 1.2 !important;
    padding: 6px 10px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .product-info,
  .product-info .product-name,
  .product-info .price-block,
  .product-card .card-text {
    font-size: .9rem !important;
    line-height: 1.3 !important;
  }
  .product-card .card-text {
    font-size: .85rem !important;
    line-height: 1.2 !important;
  }
  .product-card {
    padding: 8px !important;
  }
  .cart-badge {
    font-size: .6rem !important;
    padding: 1px 4px !important;
  }
  .navbar .dropdown.language-dropdown {
    margin-right: 4px !important;
  }
  .navbar .cart-button {
    margin-right: 6px !important;
  }
}

/* ===============================
   🧤 BUTTON STYLE MINOR FIX
=============================== */
.btn,
.btn-primary,
.product-card .btn,
.category-card .btn,
.action-buttons button {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
}

/* ===============================
   🧭 NAVBAR LOGO & FLAGS
=============================== */
.navbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.navbar .logo-container {
  order: 1;
  margin: 0 auto;
  text-align: center;
  max-width: 60vw;
  font-size: 1.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.navbar .dropdown.language-dropdown {
  order: 2;
  margin-left: auto !important;
  margin-right: 10px !important;
}
.navbar .cart-button {
  order: 3;
}

/* ------------------------------------
   1) Global & Body
------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Roboto', sans-serif;
  background-color: #f8f9fa;
}

/* ------------------------------------
   Premium, Smooth, Subtle Animations
------------------------------------- */
@keyframes premiumCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes premiumImageFadeIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes premiumFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-grid .product-card,
.category-grid .category-card {
  opacity: 0;
  animation: premiumCardFadeIn 0.6s ease-out forwards;
}

.product-grid .product-card:nth-child(1) { animation-delay: 0.05s; }
.product-grid .product-card:nth-child(2) { animation-delay: 0.1s; }
.product-grid .product-card:nth-child(3) { animation-delay: 0.15s; }

.category-grid .category-card:nth-child(1) { animation-delay: 0.05s; }
.category-grid .category-card:nth-child(2) { animation-delay: 0.1s; }
.category-grid .category-card:nth-child(3) { animation-delay: 0.15s; }

/* Apply to images inside cards */
.product-card .card-img-top,
.category-card .card-img-top {
  opacity: 0;
  animation: premiumImageFadeIn 0.6s ease-out forwards;
}

/* Staggered delays for images */
.product-grid .product-card:nth-child(1) .card-img-top { animation-delay: 0.1s; }
.product-grid .product-card:nth-child(2) .card-img-top { animation-delay: 0.15s; }
.product-grid .product-card:nth-child(3) .card-img-top { animation-delay: 0.2s; }

.category-grid .category-card:nth-child(1) .card-img-top { animation-delay: 0.1s; }
.category-grid .category-card:nth-child(2) .card-img-top { animation-delay: 0.15s; }
.category-grid .category-card:nth-child(3) .card-img-top { animation-delay: 0.2s; }

/* Premium hover effect: subtle lift */
.product-card,
.category-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover,
.category-card:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Smooth fade-in for buttons */
.product-card .card-body .btn {
  opacity: 0;
  animation: premiumFadeIn 0.8s ease-out forwards;
  animation-delay: 0.4s;
}

.category-card .card-body .btn {
  opacity: 0;
  animation: premiumFadeIn 0.3s ease-out forwards;
  animation-delay: 0.4s;
}

/* Mobile adjustments for card images */
@media (max-width: 576px) {
  .product-card .card-img-top,
  .category-card .card-img-top {
    transform: translateY(2px);
  }
}

/* Footer Fade In Animation */
@keyframes footerFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

footer {
  opacity: 0;
  animation: footerFadeIn 1s ease-out forwards;
  animation-delay: 1s;
}

/* ------------------------------------
   3) Product Listing Scroll Margin
------------------------------------- */
#product-listing {
  scroll-margin-top: 80px;
}


.btn-primary {
  background-color: #7A33FF !important;
  border-color: #7A33FF !important;
}
/* ------------------------------------
   2) Navbar & Toggler
------------------------------------- */
.navbar {
  background-color: #7A33FF; /* your new violet color */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  color: #fff;
  /* IMPORTANT: No border-radius here, so the navbar remains a rectangle. */
}
.navbar .container {
  max-width: 1140px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}
.navbar.navbar-dark .navbar-brand,
.navbar.navbar-dark .nav-link,
.navbar.navbar-dark .navbar-toggler-icon {
  color: #fff !important;
}
.navbar-toggler {
  border: none;
  cursor: pointer;
  margin-right: 5px;
}
.navbar-toggler:focus {
  outline: none;
  box-shadow: none;
}
.navbar-toggler-icon {
  /* Force the toggler icon to be white (if needed) */
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* ------------------------------------
   3) Logo (centered)
------------------------------------- */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 34px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* Make the logo text white */
.logo-shop {
  font-weight: 900;
  color: #fff !important;
}
.logo-separator {
  font-weight: 700;
  color: #fff;
  margin: 0 2px;
  opacity: 0.9;
}
.logo-filtre {
  font-weight: 800;
  color: #fff !important;
}

/* ------------------------------------
   Footer Logo in Blue
------------------------------------- */
.logo-shop-footer {
  font-weight: 900;
  color: #8A2BE2 !important;
}
.logo-filtre-footer {
  font-weight: 800;
  color: #8A2BE2 !important;
}
.logo-separator-footer {
  font-weight: 700;
  color: #8A2BE2 !important;
  margin: 0 2px;
  opacity: 0.9;
}

/* ------------------------------------
   4) Side Menu
------------------------------------- */
.side-menu {
  position: fixed;
  left: -300px;
  top: 0;
  width: 300px;
  height: 100vh;
  background: #fff;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  transition: left 0.3s ease;
  z-index: 1050;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
}
.side-menu.active {
  left: 0;
}
.side-menu .categories {
  margin-top: 56px;
}
.side-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.side-menu ul li {
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
}
.side-menu ul li a {
  color: #2c3e50;
  text-decoration: none;
  display: block;
  padding: 12px 0;
  transition: color 0.3s ease;
}
.side-menu ul li a:hover {
  color: #3498db;
}

/* ------------------------------------
   5) Top-level category toggles
------------------------------------- */
.top-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.top-cat-item {
  position: relative;
  margin-bottom: 6px;
  border-bottom: 1px solid #eee;
  padding: 6px 0;
}
.cat-header {
  display: flex;
  align-items: center;
  padding: 6px 0;
}
.cat-header .cat-text {
  flex: 0 0 auto;
  display: inline-block;
  color: #333;
  text-decoration: none;
  margin-right: 8px;
}
.toggle-arrow {
  flex: 0 0 auto;
  font-size: 1.6em;
  margin-left: auto;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.top-cat-item.open .toggle-arrow {
  transform: rotate(90deg);
}
.subcat-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  list-style: none;
  margin: 0;
  padding-left: 0;
}
.top-cat-item.open .subcat-list {
  max-height: 500px;
  margin-top: 6px;
}
.subcat-list li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #eee;
}
.subcat-list li:last-child {
  border-bottom: none;
}
.subcat-list li a {
  display: block;
  padding: 6px 10px;
  text-decoration: none;
  color: #333;
  text-align: left;
  background-color: #fafafa;
  border-radius: 20px;
  transition: background 0.2s ease;
}
.subcat-list li a:hover {
  background: #f2f2f2;
}

/* ------------------------------------ 
   6) Product Cards
------------------------------------- */

/* ------------------------------------ 
   6) Product Cards
------------------------------------- */

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

.card-title {
  min-height: 3.2em; /* enough for 2 lines */
  line-height: 1.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .card-img-top {
  height: 200px; /* You can adjust this value */
  width: 100%;
  object-fit: contain; /* or 'cover' depending on your needs */
  object-position: center;
}

@media (max-width: 576px) {
  .product-item {
    padding-left: 5px;
    padding-right: 5px;
  }

  .product-grid {
    margin-left: -5px;
    margin-right: -5px;
  }
}

/* ------------------------------------ 
   Grid Layout for Product Cards (Responsive)
------------------------------------- */
.products-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns on desktop */
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 576px) {
  .products-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1px; /* Was 16px → reduced for mobile tightness */
  }

  .product-card {
    margin: 0; /* Ensure no extra margin inside grid item */
  }
}


.product-card {
  border: 1px solid #ddd;
  position: relative;
  overflow: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  transition: all 0.3s ease;
  border-radius: 20px; /* manual border-radius for product-card */
}
.product-card img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 12px;
  border-radius: 20px; /* keep consistent rounding for images in card */
}
/* SKIDKA label */
.skidka-label {
  position: absolute;
  top: 15px;
  left: 8px;
  background: red;
  color: #fff;
  padding: 4px 8px;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 2;
  border-radius: 3px;
  transform: rotate(-15deg);
}
/* Color circle in product description */
.color-circle {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin-left: 6px;
  margin-right: 5px;
  vertical-align: middle;
  border: 1px solid #999;
}
@media (max-width: 576px) {
  .color-circle {
    width: 10px;
    height: 10px;
    margin-left: 4px;
    margin-right: 3px;
  }
}

.product-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}
.product-info .product-name {
  font-size: 0.95rem; /* было 1.1rem */
  line-height: 1.4rem;
}
.product-info .price-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.discount-badge {
  background-color: red;
  color: #fff;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 0.85rem;
  margin-top: 6px;
}
.color-info {
  margin-top: 10px;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
@media (max-width: 576px) {
  .color-info {
    margin-top: 5px;
    font-size: 0.6rem;
  }
  .product-info .product-name {
    font-size: 0.9rem; /* было 1rem */
    line-height: 1.3rem;
  }
  .product-info .price-block {
    gap: 6px;
  }
  .discount-badge {
    font-size: 0.75rem;
    padding: 2px 4px;
    margin-top: 4px;
  }
}

/* Buttons in product card */
.action-buttons {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.action-buttons button {
  padding: 8px 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-radius: 20px; /* manual border-radius for buttons */
}
.action-buttons button:hover {
  background-color: #007bff;
  color: white;
}
.product-card .product-info,
.product-card .action-buttons {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

/* Cart badge */
.cart-badge {
  background: #dc3545;
  color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.7rem;
  position: absolute;
  top: -5px;
  right: 0;
}

.product-card:hover {
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

@media (max-width: 576px) {
  .action-buttons {
    margin-top: 8px;
  }
  .action-buttons button {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
  .cart-badge {
    padding: 1px 4px;
    font-size: 0.6rem;
  }
}

/* ------------------------------------ 
   Category Cards
------------------------------------- */
.category-card {
  margin-bottom: 20px;
  border: 1px solid #ddd;
  overflow: hidden;
  padding: 12px;
  transition: all 0.3s ease;
  border-radius: 20px; /* manual border-radius for category-card */
}
.category-card .btn {
  margin-top: 12px;
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 20px;
  transition: background-color 0.3s ease;
}
.category-card .btn:hover {
  background-color: #007bff;
  color: #fff;
}
@media (max-width: 576px) {
  .category-card {
    padding: 10px;
    margin-bottom: 16px;
  }
  .category-card .btn {
    font-size: 0.9rem;
    padding: 6px 12px;
    margin-top: 8px;
  }
}
.category-card img {
  border-radius: 20px;
  max-width: 100%;
  display: block;
}

/* ------------------------------------
   7) Banners => 20px border radius
------------------------------------- */
/* Round each carousel image */
.carousel-inner img {
  border-radius: 20px;
}

/* (Or optionally round the container & hide overflow)
.carousel-inner {
  border-radius: 20px;
  overflow: hidden;
}
*/

/* ------------------------------------
   8) Language Switcher => 20px
------------------------------------- */
#languageDropdown.btn,
.btn-link.dropdown-toggle {
  border-radius: 20px !important;
}
/* The entire dropdown menu */
.dropdown-menu {
  border-radius: 20px !important;
}

/* ------------------------------------
   9) Search Bar => 20px
------------------------------------- */
/* ------------------------------------
   9) Search Bar => 20px
------------------------------------- */
.form-control {
  border-radius: 20px !important;
}

/* Добавим отступ между строкой поиска и кнопкой */
.input-group-append .btn,
.input-group .input-group-btn .btn {
  border-radius: 20px !important;
  margin-left: 8px; /* 🔧 вот это создаёт нужный "пробел" */
}

/* ------------------------------------ 
   Mobile Responsiveness 
------------------------------------- */
@media (max-width: 576px) {
  .product-card {
    padding: 8px;
  }
  .product-card img {
    margin-bottom: 8px;
  }
  .action-buttons button {
    padding: 6px 12px;
  }
  /* Shrink the centered logo on phone */
  .logo-container {
    font-size: 20px;
  }
}

/* -------------------------------------------
   9) PRIVACY BANNER (Old Style, with fade-out)
------------------------------------------- */
.privacy-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #f2f2f2;
  padding: 10px 20px;
  z-index: 9999;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
  text-align: center;
  border-radius: 20px; /* 20px border-radius */
  transition: opacity 0.5s ease-out; /* fade-out transition */
  opacity: 1;
}
.privacy-banner p {
  margin: 0;
  display: inline-block; /* helps with centering text/button together */
}
.privacy-banner button {
  margin-left: 10px;
  border-radius: 20px;
}

/* ------------------------------------
   10) Romanian Flag & Contact Buttons
------------------------------------- */
@media (max-width: 576px) {
  .d-flex.align-items-center[style*="margin-right: 4px;"] {
    margin-right: 0px !important;
  }
  .dropdown[style*="margin-right: 1rem;"] {
    margin-right: 0.8rem !important;
  }
  /* Hide language text on mobile, keep only flag & arrow */
  #languageDropdown {
    font-size: 0;
    padding: 0;
    margin: 0;
    line-height: 1;
    color: #fff;
  }
  #languageDropdown img {
    margin-right: 3px;
    vertical-align: middle;
  }
  #languageDropdown::after {
    font-size: 14px;
    margin-left: 0;
    vertical-align: middle;
  }
}

/* Footer contact buttons */
.button-container {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: calc(0.3vh + 0.3vw);
  justify-content: center;
  max-width: 400px;
  margin: auto;
}
.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: min(2.5vw, 12px);
  padding: calc(0.3vh + 0.3vw) calc(0.5vh + 0.5vw);
  width: min(32vw, 130px);
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border-radius: 20px; /* round the contact buttons */
}
.contact-btn i {
  margin-right: 4px;
  font-size: 1em;
}
.contact-btn:hover {
  background-color: #343a40;
  transform: scale(1.05);
}

/* ✅ Основной стиль для заголовков категорий */
.side-menu .top-cat-list .cat-header {
  padding: 1px 2px;               /* Минимум вертикали */
  font-size: 1rem;
  font-weight: 600;              /* ЖИРНЕЕ! */
  line-height: 1.1;              /* Компактнее по вертикали */
  word-break: break-word;        /* Перенос по словам */
  white-space: normal;
}

/* ✅ Текст категории */
.side-menu .top-cat-list .cat-header .cat-text {
  font-size: 1rem;
  font-weight: 700;              /* Ещё жирнее текст */
  line-height: 1.2;
  margin-right: 0.4rem;
  word-break: break-word;
}

/* ✅ Стиль для подкатегорий */
.side-menu .top-cat-list .subcat-list {
  padding-left: 12px;
  margin-top: 4px;
}

.side-menu .top-cat-list .subcat-list li {
  font-size: 0.9rem;
  line-height: 1.1;
  margin-bottom: 2px;
  list-style-type: disc;        /* Буллеты */
  font-weight: 500;
  color: #444;
}

/* ✅ Уменьшаем отступы снизу */
.side-menu .bottom-links {
  padding: 10px 14px;
  font-size: 0.9rem;
  line-height: 1.3;
}

/* ✅ Убираем горизонтальный скролл */
.side-menu {
  overflow-x: hidden;
  scrollbar-width: thin;
  word-break: break-word;
}


.dropdown-menu .dropdown-item {
  border-radius: 6px; /* скругление при наведении */
}

.dropdown-menu .dropdown-item:hover {
  background-color: #f1f1f1; /* или любой нужный тебе */
  border-radius: 6px; /* обязательно дублируем и здесь! */
}
/* 1) Фиксируем заголовок ровно на 3 строки */
.card.product-card .card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;       /* обрезаем до 3 строк */
  overflow: hidden;            /* прячем остальное */
  line-height: 1.2em;          /* ваш текущий line-height */
  height: calc(1.2em * 3);     /* ровно 3 строки */
}

/* 2) Делаем колонки и карточки flex-контейнерами */
.product-item {
  display: flex;               /* колонка растянется под размер строки */
}

.card.product-card {
  display: flex;
  flex-direction: column;      /* внутренности по вертикали */
  flex: 1;                     /* чтобы занимать всю высоту .product-item */
}

/* 3) «Растягиваем» тело карточки, чтобы кнопки всегда были внизу */
.card.product-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}
 /* -------------------- FILTER PANEL STYLES -------------------- */
  #filter-panel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
  }
  .filter-section {
    flex: 1 1 250px;
  }
  .filter-section h6 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
  }
  #brandCheckboxes {
    max-height: 150px;
    overflow-y: auto;
  }
  #brandCheckboxes label {
    text-transform: uppercase;
    margin-right: 10px;
  }
  #active-filters {
    margin-bottom: 1rem;
  }
  #active-filters .badge {
    margin-right: 0.5rem;
  }
  /* Full-width select for subcategories */
  #subcategorySelect {
    width: 100%;
  }
  /* Container for reset-filters button, hidden by default */
  #reset-filters-container {
    width: 100%;
    text-align: right;
    margin-top: 10px;
    display: none;
  }

  /* -------------------- FILTER TOGGLE BUTTON (MOBILE) -------------------- */
  #toggle-filter-panel {
    display: none;
    width: 100%;
    padding: 10px 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 1rem;
    text-align: left;
  }
  #toggle-filter-panel .filter-icon {
    vertical-align: middle;
    margin-right: 8px;
  }

  /* -------------------- MOBILE STYLES -------------------- */
  @media (max-width: 576px) {
    #filter-panel {
      display: none;
    }
    #toggle-filter-panel {
      display: block;
    }
    #filter-panel.mobile-open {
      display: flex;
    }
    .filter-section {
      flex: 1 1 100%;
    }
    .filter-section h6 {
      font-size: 1rem;
      margin-bottom: 5px;
      padding-bottom: 3px;
    }
    #brandCheckboxes label {
      margin-right: 5px;
    }
  }

  /* -------------------- COMPACT PRODUCT CARD STYLES -------------------- */
  .product-item {
    margin-bottom: 1rem !important;
  }
  .card.product-card .card-body {
    padding: 0.75rem !important;
  }
  .card.product-card .card-title {
    font-size: 0.9rem !important;
    font-weight: bold !important;
    margin-bottom: 0 !important;
  }
  .card.product-card .card-text {
    margin: 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.2 !important;
  }

  /* ==== DESKTOP: larger color dot & text ==== */
  .card.product-card .color-circle {
    width: 12px !important;
    height: 12px !important;
    margin: 0 8px !important;
  }
  .card.product-card .d-inline-flex span.ml-1 {
    font-size: 1rem !important;
    line-height: 1.2 !important;
  }

  .price-block {
    margin-bottom: 0.5rem !important;
  }

  /* -------------------- MOBILE OVERRIDES FOR PRODUCT CARD ---- */
  @media (max-width: 576px) {
    /* keep brand & color stacked */
    .card.product-card .d-flex.justify-content-between {
      display: flex !important;
      flex-direction: column !important;
      align-items: flex-start !important;
    }
    .card.product-card .d-flex.justify-content-between .card-text {
      margin-bottom: 0.25rem !important;
    }
    .card.product-card .d-flex.justify-content-between .d-inline-flex {
      align-self: flex-end !important;
    }

    /* mobile dot & text same as before */
    .card.product-card .color-circle {
      width: 10px !important;
      height: 10px !important;
      margin: 0 6px !important;
    }
    .card.product-card .d-inline-flex span.ml-1 {
      font-size: 0.9rem !important;
      line-height: 1.2 !important;
    }
  }

  /* -------------------- SEARCH SUGGESTIONS -------------------- */
  #search-suggestions-category {
    max-height: 400px;
    overflow-y: auto;
  }

  /* -------------------- SCROLL HINT OVERLAY -------------------- */
  .scroll-hint-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s ease;
  }
  .scroll-hint .arrow {
    font-size: 28px;
    font-weight: bold;
    color: #000;
    animation: arrowSlide 1.5s infinite;
    pointer-events: auto;
    cursor: pointer;
  }
  @keyframes arrowSlide {
    0% {
      transform: translateY(0);
      opacity: 1;
    }
    50% {
      transform: translateY(30px);
      opacity: 0.7;
    }
    100% {
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* -------------------- PAGINATION -------------------- */
  .pagination-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 10px;
    margin-top: 1rem;
  }
  .pagination {
    flex-wrap: nowrap;
    gap: 6px;
    display: inline-flex;
    white-space: nowrap;
  }
  @media (max-width: 576px) {
    .pagination-nav {
      justify-content: flex-start !important;
    }
    .pagination .page-link {
      padding: 6px 10px;
      font-size: 0.85rem;
    }
    .pagination .disabled span,
    .pagination .page-item.disabled .page-link {
      display: none;
    }
  }
  @media (max-width: 576px) {
  #cartModal .modal-content {
    padding: 10px;
  }

  #cartModal .modal-body {
    padding: 5px 10px;
  }

  #cart-items > div {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  #cart-items img {
    width: 40px;
    height: auto;
    border-radius: 4px;
  }

  #cart-items .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
  }

  #cart-items .quantity-control {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
  }

  #cart-items .quantity-control button {
    width: 28px;
    height: 28px;
    font-size: 1rem;
    padding: 0;
    border-radius: 6px;
  }

  #cart-items .remove-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #dc3545;
  }

  .cart-total {
    font-size: 1rem;
    font-weight: bold;
    text-align: right;
    padding-top: 10px;
  }

  .modal-footer .btn {
    font-size: 0.9rem;
    padding: 8px 14px;
  }
}
@media (max-width: 576px) {
  .side-menu .top-cat-list .cat-header .cat-text {
    font-size: 0.85rem !important;
    line-height: 1.2em !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;         /* максимум 3 строки */
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: calc(1.2em * 3);        /* высота точно на 3 строки */
    word-break: break-word;
  }
}
.order-items-scroll {
  max-height: 120px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
}
.order-items-scroll::-webkit-scrollbar {
  width: 4px;
}
.order-items-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.order-items-list {
  list-style-type: upper-roman;         /* I, II, III */
  font-size: 0.9rem;
  padding-left: 20px;
  list-style-position: inside;
}

.order-items-list li::marker {
  font-weight: bold;
  color: #333;
}

@media (max-width: 576px) {
  /* Make all Bootstrap modals full‐width on small screens */
  .modal-dialog {
    max-width: 100% !important;
    margin: 0 0.5rem;       /* small gutter each side */
  }
  .modal-content {
    border-radius: 16px;     /* keep your rounding */
    overflow: hidden;
  }
}
.side-menu .top-cat-list .subcat-list li a {
  display: inline-block !important;
  padding: 6px 10px !important;
  text-decoration: none !important;
  color: #333 !important;
  background-color: #f2f2f2 !important; /* ← более насыщенный серый фон */
  border-radius: 14px !important;
  transition: color 0.2s ease !important; /* ← текст плавно меняется */
}

.side-menu .top-cat-list .subcat-list li a:hover {
  color: #007bff !important; /* ← подсветка текста (синий) при наведении */
}
@media (max-width: 767.98px) {
  .category-card .card-title {
    font-size: 0.88rem !important;
    line-height: 1.2 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 3.6em !important;
  }
}
@media (max-width: 768px) {
  #cart-items .cart-item-title {
    font-size: 0.8rem !important;
    line-height: 1.1 !important;
    white-space: normal !important;
    word-break: break-word !important;
    max-height: 2.2em !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    text-align: left !important;
  }
}
.modal-header .close {
  padding: 0.5rem 0.75rem !important;
  margin: 0 !important;
  font-size: 1.5rem !important;
  line-height: 1 !important;
  text-align: center !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
}
.cart-item-title {
  font-size: 0.82rem !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  max-height: 2.4em !important;
  cursor: pointer !important;
}
