/* -----------------------------------------------------
   1. Story-Carousel של קטגוריות בעיגולים (לדף הבית)
------------------------------------------------------ */
.category-carousel-section {
  padding: 18px 0 6px;
}

.story-carousel {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 16px 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.story-carousel::-webkit-scrollbar {
  height: 6px;
}

.story-carousel::-webkit-scrollbar-thumb {
  background: #d8d8e6;
  border-radius: 10px;
}

.story-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  scroll-snap-align: start;
  width: 76px;
}

.story-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  flex-shrink: 0;
}

.story-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  display: block;
}

.story-label {
  font-size: 12px;
  color: var(--color-text);
  text-align: center;
  white-space: nowrap;
}

.story-item.active .story-ring {
  background: linear-gradient(135deg, #ffd76a, var(--color-accent));
}

@media (min-width: 700px) {
  .story-carousel { padding: 6px 30px 16px; gap: 24px; }
  .story-item { width: 88px; }
  .story-ring { width: 80px; height: 80px; }
}

/* -----------------------------------------------------
   2. מוצרים נוספים שעשויים לעניין אותך (דף מוצר)
   גלילה אנכית: רשת שגוללת למטה יחד עם שאר העמוד, ולא לרוחב
------------------------------------------------------ */
.related-products {
  max-width: 1200px;
  margin: 10px auto 40px;
  padding: 0 20px;
}

.related-title {
  font-size: 20px;
  font-weight: 700;
  margin: 30px 0 16px;
  color: var(--color-primary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 640px) {
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .related-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1300px) {
  .related-grid { grid-template-columns: repeat(5, 1fr); }
}

.related-card { min-width: 0; }
.related-card .product-card { height: 100%; }

.related-empty {
  color: var(--color-text-light);
  font-size: 14px;
  padding: 16px 0 30px;
}

.related-load-more {
  display: block;
  margin: 24px auto 10px;
  background-color: #fff;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  padding: 11px 26px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.related-load-more:hover {
  background-color: var(--color-primary);
  color: #fff;
}

/* -----------------------------------------------------
   3. גודל הדר מותאם: קטן יותר בדף הבית, גדול יותר בשאר העמודים
   (הכל רספונסיבי עם clamp - מתאים את עצמו לגודל המסך)
------------------------------------------------------ */

/* דף הבית - הדר קצת יותר קומפקטי מהגודל הנוכחי (84px) */
body.home-page .site-header {
  padding: clamp(22px, 6vw, 36px) 15px clamp(20px, 5vw, 34px);
}

body.home-page .site-header .site-logo {
  height: clamp(52px, 14vw, 84px);
}

/* שאר העמודים (about / product) - הדר וללוגו גדולים יותר מהיום */
body:not(.home-page) .site-header {
  padding: clamp(30px, 7vw, 42px) 15px clamp(28px, 6vw, 40px);
}

body:not(.home-page) .site-header .site-logo {
  height: clamp(60px, 18vw, 100px);
}

/* פס דביק (sticky-topbar) - לוגו קטן אך ברור בכל העמודים */
.sticky-logo {
  height: clamp(32px, 8vw, 44px);
}

/* הלוגו כקישור - שלא ייראה כמו קישור טקסט רגיל (גם בפס העליון וגם בפס הדביק) */
.logo-home-link {
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}

/* -----------------------------------------------------
   4. סינון לפי מותג (Brand Filter) - דף הבית
------------------------------------------------------ */
.filter-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 10px;
  display: flex;
  justify-content: flex-start;
  position: relative;
  z-index: 55;
}

.brand-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #fff;
  border: 1.5px solid #e0e0ea;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 24px;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.brand-filter-toggle:hover {
  border-color: var(--color-primary);
}

.brand-filter-toggle.has-selection {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.brand-filter-toggle .chevron {
  font-size: 11px;
  transition: transform 0.25s ease;
}

.brand-filter-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.brand-filter-count {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  background-color: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.brand-filter-toggle.has-selection .brand-filter-count {
  background-color: #fff;
  color: var(--color-accent);
}

.brand-filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 16px;
  width: min(300px, 86vw);
  background-color: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 14px;
  z-index: 130;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand-filter-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.brand-filter-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text);
}

.brand-filter-item:hover {
  background-color: #f6f6fb;
}

.brand-filter-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.brand-filter-item-label {
  flex-grow: 1;
}

.brand-filter-item-count {
  color: var(--color-text-light);
  font-size: 12px;
}

.brand-filter-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.brand-filter-clear,
.brand-filter-apply {
  flex: 1;
  border: none;
  border-radius: 20px;
  padding: 9px 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.brand-filter-clear {
  background-color: #f0f0f5;
  color: var(--color-text);
}

.brand-filter-clear:hover {
  background-color: #e6e6f0;
}

.brand-filter-apply {
  background-color: var(--color-primary);
  color: #fff;
}

.brand-filter-apply:hover {
  background-color: var(--color-accent);
}

/* תג מותג על כרטיס מוצר - פינה שמאלית תחתונה, שונה מתג הקטגוריה (ימין למעלה) */
.brand-badge {
  top: auto;
  right: auto;
  bottom: 10px;
  left: 10px;
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
  border: 1px solid rgba(26, 26, 46, 0.12);
}

/* -----------------------------------------------------
   5. תצוגה מחולקת לקטגוריות בדף הבית (כאשר נבחר "הכל")
   כל קטגוריה מקבלת כותרת ורשת מוצרים משלה, זו מתחת לזו,
   במקום רשת אחת מעורבת של כל המוצרים.
------------------------------------------------------ */
#products-grid.grouped-view {
  display: block !important;
  padding: 16px !important;
}

.category-section {
  margin-bottom: 34px;
}

.category-section:last-child {
  margin-bottom: 10px;
}

.category-section-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ececf5;
}

.category-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 640px) {
  .category-products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .category-products-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1200px) {
  .category-products-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 1500px) {
  .category-products-grid { grid-template-columns: repeat(6, 1fr); }
}

/* -----------------------------------------------------
   6. גלריית תמונות בדף המוצר - חצים משני צידי התמונה + החלקה (swipe)
------------------------------------------------------ */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: rgba(26, 26, 46, 0.55);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.gallery-arrow:hover {
  background-color: rgba(26, 26, 46, 0.8);
}

.gallery-arrow:active {
  transform: translateY(-50%) scale(0.92);
}

.gallery-arrow-prev { right: 10px; }
.gallery-arrow-next { left: 10px; }

@media (max-width: 500px) {
  .gallery-arrow { width: 34px; height: 34px; font-size: 16px; }
}

/* -----------------------------------------------------
   7. נקודות אינדיקציה על כרטיס מוצר בקטלוג (בלי כפתורים) -
   מציגות שיש מספר תמונות שאפשר להחליק ביניהן על גבי התמונה
------------------------------------------------------ */
.thumb-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 4;
  pointer-events: none;
}

.thumb-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.thumb-dot.active {
  background-color: #fff;
  transform: scale(1.3);
}
.category-drawer {
  height: 100dvh; /* גובה דינמי שמתחשב בסרגלי הדפדפן בנייד */
}

.drawer-links {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 40px;
}