/* -------------------------------------------------------------
   19. Shop by Department (Oralyze Luxury Atelier / Wonder Replica)
   ------------------------------------------------------------- */
.wonder-departments-section,
.nook-departments-section {
  background-color: #FFFFFF;
  padding: 56px 0 68px;
  border-bottom: 1px solid var(--color-border, #EAE6DF);
  scroll-margin-top: 130px;
  position: relative;
  z-index: 5;
  width: 100%;
}

/* 3-Dots Decorative Indicator */
.department-dots-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.department-dots-indicator .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #D6D3CC;
  display: inline-block;
}

.department-dots-indicator .dot.active {
  background-color: #1A1815;
  width: 6px;
  height: 6px;
}

/* Main Heading */
.departments-heading,
.department-main-heading {
  font-family: var(--font-base, 'Mona Sans', -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #1A1815;
  text-align: center;
  margin: 0 0 36px;
}

/* Departments Container & Grid */
.departments-carousel-container {
  width: 100%;
  position: relative;
}

/* Navigation Chevrons */
.dept-carousel-nav {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid #ECE7E1;
  color: #1A1815;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  outline: none;
}

.dept-carousel-nav:hover {
  background: #1A1815;
  color: #FFFFFF;
  border-color: #1A1815;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.dept-carousel-nav.dept-nav-prev {
  left: -20px;
}

.dept-carousel-nav.dept-nav-next {
  right: -20px;
}

.dept-carousel-nav:disabled,
.dept-carousel-nav.is-disabled {
  opacity: 0;
  pointer-events: none;
}

.departments-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(24px, 4.5vw, 56px);
  max-width: 1140px;
  margin: 0 auto;
  flex-wrap: wrap;
  padding: 0;
  transition: transform 0.2s ease;
}

/* Slider Track Mode (Desktop & Multi-item) */
.departments-grid.is-slider-mode {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: flex-start;
  padding-inline: 4px;
  cursor: grab;
}

.departments-grid.is-slider-mode:active {
  cursor: grabbing;
}

.departments-grid.is-slider-mode::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.departments-grid.is-slider-mode .department-card,
.departments-grid.is-slider-mode .department-card-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* Individual Department Card */
.department-card,
.department-card-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: #1A1815;
  min-width: 80px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  background: transparent;
  border: none;
}

/* Base Image Wrapper */
.department-img-wrap,
.department-thumb-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

/* Base Image */
.department-thumb,
.department-img {
  display: block;
  object-fit: contain;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 100%;
  max-height: 100%;
}

/* Hover effect on card */
.department-card:hover .department-thumb,
.department-card-item:hover .department-img {
  transform: translateY(-4px) scale(1.06);
}

/* ==========================================================================
   ELEMENT SHAPES SYSTEM
   ========================================================================== */

/* 1. Default / Unconstrained: takes whole image with natural aspect ratio */
.department-img-wrap.shape-default,
.department-thumb-wrap.shape-default {
  height: 80px;
  width: auto;
  min-width: 80px;
  border-radius: 0;
  background-color: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.department-img-wrap.shape-default .department-thumb,
.department-thumb-wrap.shape-default .department-img {
  max-height: 74px;
  max-width: 110px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* 2. Circle (1:1 Perfect Round) */
.department-img-wrap.shape-circle,
.department-thumb-wrap.shape-circle {
  width: 90px;
  height: 90px;
  border-radius: 50% !important;
  background-color: #F6F4F0;
  border: 1px solid #ECE7E1;
  overflow: hidden;
  padding: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.department-img-wrap.shape-circle .department-thumb,
.department-thumb-wrap.shape-circle .department-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.department-card:hover .department-img-wrap.shape-circle,
.department-card-item:hover .department-thumb-wrap.shape-circle {
  transform: translateY(-5px);
  background-color: #FFFFFF;
  border-color: #1A1A1A;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
}

/* 3. Architectural Square (1:1 Sharp) */
.department-img-wrap.shape-square,
.department-thumb-wrap.shape-square {
  width: 90px;
  height: 90px;
  border-radius: 0px !important;
  background-color: #F6F4F0;
  border: 1px solid #ECE7E1;
  overflow: hidden;
  padding: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.department-img-wrap.shape-square .department-thumb,
.department-thumb-wrap.shape-square .department-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.department-card:hover .department-img-wrap.shape-square,
.department-card-item:hover .department-thumb-wrap.shape-square {
  transform: translateY(-5px);
  background-color: #FFFFFF;
  border-color: #1A1A1A;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
}

/* 4. Rounded Square / Squircle */
.department-img-wrap.shape-rounded_square,
.department-thumb-wrap.shape-rounded_square {
  width: 90px;
  height: 90px;
  border-radius: 20px !important;
  background-color: #F6F4F0;
  border: 1px solid #ECE7E1;
  overflow: hidden;
  padding: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.department-img-wrap.shape-rounded_square .department-thumb,
.department-thumb-wrap.shape-rounded_square .department-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.department-card:hover .department-img-wrap.shape-rounded_square,
.department-card-item:hover .department-thumb-wrap.shape-rounded_square {
  transform: translateY(-5px);
  background-color: #FFFFFF;
  border-color: #1A1A1A;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
}

/* 5. Soft Rounded */
.department-img-wrap.shape-soft_rounded,
.department-thumb-wrap.shape-soft_rounded {
  width: 90px;
  height: 90px;
  border-radius: 10px !important;
  background-color: #F6F4F0;
  border: 1px solid #ECE7E1;
  overflow: hidden;
  padding: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.department-img-wrap.shape-soft_rounded .department-thumb,
.department-thumb-wrap.shape-soft_rounded .department-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.department-card:hover .department-img-wrap.shape-soft_rounded,
.department-card-item:hover .department-thumb-wrap.shape-soft_rounded {
  transform: translateY(-5px);
  background-color: #FFFFFF;
  border-color: #1A1A1A;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
}

/* 6. Pill Capsule */
.department-img-wrap.shape-pill,
.department-thumb-wrap.shape-pill {
  width: 110px;
  height: 80px;
  border-radius: 9999px !important;
  background-color: #F6F4F0;
  border: 1px solid #ECE7E1;
  overflow: hidden;
  padding: 10px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.department-img-wrap.shape-pill .department-thumb,
.department-thumb-wrap.shape-pill .department-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.department-card:hover .department-img-wrap.shape-pill,
.department-card-item:hover .department-thumb-wrap.shape-pill {
  transform: translateY(-5px);
  background-color: #FFFFFF;
  border-color: #1A1A1A;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
}

/* 7. Custom Shape */
.department-img-wrap.shape-custom,
.department-thumb-wrap.shape-custom {
  width: 90px;
  height: 90px;
  background-color: #F6F4F0;
  border: 1px solid #ECE7E1;
  overflow: hidden;
  padding: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.department-img-wrap.shape-custom .department-thumb,
.department-thumb-wrap.shape-custom .department-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.department-card:hover .department-img-wrap.shape-custom,
.department-card-item:hover .department-thumb-wrap.shape-custom {
  transform: translateY(-5px);
  background-color: #FFFFFF;
  border-color: #1A1A1A;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
}

/* Category Label Text */
.department-title,
.department-label-text {
  font-family: var(--font-base, 'Mona Sans', -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
  color: #1A1815;
  letter-spacing: -0.01em;
  transition: color 0.2s ease, opacity 0.2s ease;
  margin-top: 12px;
  text-decoration: none;
  display: block;
}

.department-card:hover .department-title,
.department-card-item:hover .department-label-text {
  color: #173FD6;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .departments-grid {
    gap: 28px 24px;
  }
}

@media (max-width: 768px) {
  .wonder-departments-section,
  .nook-departments-section {
    padding: 36px 0 44px;
  }
  .departments-heading,
  .department-main-heading {
    margin-bottom: 22px;
    font-size: 1.35rem;
  }
  .departments-carousel-container {
    position: relative;
    width: 100%;
    overflow: visible;
  }
  .elementor-widget-oralyze-shop-by-department .departments-grid,
  .elementor .elementor-element .departments-grid,
  .wonder-departments-section .departments-grid,
  .nook-departments-section .departments-grid,
  .departments-carousel-container .departments-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    gap: 16px !important;
    padding-inline: 16px !important;
    margin-inline: -16px !important;
    padding-bottom: 8px !important;
    padding-top: 4px !important;
    box-sizing: border-box !important;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
  }
  .departments-grid:active {
    cursor: grabbing;
  }
  .departments-grid::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .department-card,
  .department-card-item {
    flex: 0 0 auto !important;
    width: 92px !important;
    min-width: 84px !important;
    max-width: 104px !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: normal !important;
    text-align: center !important;
  }
  .department-img-wrap,
  .department-thumb-wrap {
    margin-bottom: 8px;
  }
  .department-img-wrap.shape-default,
  .department-thumb-wrap.shape-default {
    height: 64px !important;
    width: auto !important;
    min-width: 64px !important;
  }
  .department-img-wrap.shape-default .department-thumb,
  .department-thumb-wrap.shape-default .department-img {
    max-height: 56px !important;
    max-width: 86px !important;
  }
  .department-title,
  .department-label-text {
    font-size: 13px !important;
    margin-top: 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    width: 100% !important;
  }
  .dept-carousel-nav {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .department-card,
  .department-card-item {
    width: 86px !important;
    min-width: 78px !important;
  }
  .department-title,
  .department-label-text {
    font-size: 12px !important;
  }
}

@media (max-width: 360px) {
  .departments-grid {
    gap: 12px !important;
  }
  .department-card,
  .department-card-item {
    width: 80px !important;
    min-width: 74px !important;
  }
  .department-img-wrap.shape-default,
  .department-thumb-wrap.shape-default {
    height: 52px !important;
  }
  .department-img-wrap.shape-default .department-thumb,
  .department-thumb-wrap.shape-default .department-img {
    max-height: 44px !important;
    max-width: 74px !important;
  }
  .department-title,
  .department-label-text {
    font-size: 11.5px !important;
  }
}
