/* =========================================================
   CAVES À CIGARES — SÉLECTEUR DE DÉCLINAISONS
   ========================================================= */

/* ---------- Cartes « Nos créations » cliquables ---------- */
.caves-product-card {
  cursor: pointer;
}

.caves-product-card:focus-visible {
  outline: 1px solid rgba(193, 170, 119, .7);
  outline-offset: 3px;
}

.caves-product-card::after {
  content: "Voir les déclinaisons";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 16px 16px;
  font-family: 'FonteLoewTech', sans-serif;
  font-size: .68rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  text-align: center;
  color: #f5f0e8;
  background: linear-gradient(0deg, rgba(13, 15, 16, .9) 0%, rgba(13, 15, 16, .55) 45%, transparent 100%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
}

.caves-product-card:hover::after,
.caves-product-card:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   DROPDOWN DES DÉCLINAISONS — fin, sombre et doré
   ========================================================= */
.humidor-dropdown {
  position: fixed;
  z-index: 2000;
  width: min(720px, calc(100vw - 24px));
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s ease;
  pointer-events: none;
}

.humidor-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.humidor-dropdown.is-above {
  transform: translateY(6px);
}

.humidor-dropdown.is-above.is-open {
  transform: translateY(0);
}

.humidor-dropdown__panel {
  position: relative;
  background: rgba(11, 13, 14, .97);
  border: 1px solid rgba(193, 170, 119, .32);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .6), 0 2px 10px rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Petit losange qui relie le panneau à la photo */
.humidor-dropdown__panel::before {
  content: "";
  position: absolute;
  top: -5px;
  left: var(--caret-left, 50%);
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  background: #0b0d0e;
  border-left: 1px solid rgba(193, 170, 119, .32);
  border-top: 1px solid rgba(193, 170, 119, .32);
}

.humidor-dropdown.is-above .humidor-dropdown__panel::before {
  top: auto;
  bottom: -5px;
  border-left: 0;
  border-top: 0;
  border-right: 1px solid rgba(193, 170, 119, .32);
  border-bottom: 1px solid rgba(193, 170, 119, .32);
}

/* Ligne supérieure : intitulé + déclinaison courante + fermeture */
.humidor-dropdown__top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px 9px 16px;
  border-bottom: 1px solid rgba(193, 188, 167, .12);
}

.humidor-dropdown__eyebrow {
  font-family: 'FonteLoewTech', sans-serif;
  font-size: .5rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(193, 170, 119, .6);
  white-space: nowrap;
}

.humidor-dropdown__current {
  flex: 1;
  min-width: 0;
  font-family: 'FonteLoewTech', sans-serif;
  font-size: .56rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-align: center;
  color: #c1bca7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.humidor-dropdown__close {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(193, 188, 167, .7);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: color .3s ease, border-color .3s ease;
}

.humidor-dropdown__close:hover,
.humidor-dropdown__close:focus {
  color: #f5f0e8;
  border-color: rgba(193, 170, 119, .4);
  outline: none;
}

/* Bandeau de vignettes */
.humidor-dropdown__rail {
  position: relative;
  padding: 10px 38px;
}

.humidor-dropdown__strip {
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.humidor-dropdown__strip::-webkit-scrollbar {
  display: none;
}

.humidor-strip-group {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 12px;
  border-left: 1px solid rgba(193, 188, 167, .12);
}

.humidor-strip-group:first-child {
  padding-left: 0;
  border-left: 0;
}

.humidor-strip-group__title {
  margin-right: 12px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'FonteLoewTech', sans-serif;
  font-size: .46rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(193, 170, 119, .65);
}

.humidor-strip-group__items {
  display: flex;
  gap: 6px;
}

.humidor-variant {
  flex: 0 0 auto;
  width: 66px;
  padding: 0;
  border: 1px solid rgba(193, 188, 167, .14);
  background: #15191a;
  cursor: pointer;
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}

.humidor-variant:hover,
.humidor-variant:focus-visible {
  border-color: rgba(193, 170, 119, .6);
  outline: none;
  transform: translateY(-2px);
}

.humidor-variant.is-active {
  border-color: #c1bca7;
  box-shadow: 0 0 0 1px rgba(193, 170, 119, .35);
}

.humidor-variant img {
  display: block;
  width: 100%;
  height: 50px;
  object-fit: contain;
  background: #101314;
}

/* Flèches */
.humidor-dropdown__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 26px;
  height: 50px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(193, 188, 167, .2);
  background: rgba(11, 13, 14, .95);
  color: #c1bca7;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color .3s ease, border-color .3s ease, background .3s ease, opacity .3s ease;
}

.humidor-dropdown__nav:hover,
.humidor-dropdown__nav:focus {
  color: #f5f0e8;
  border-color: rgba(193, 170, 119, .7);
  background: rgba(193, 170, 119, .08);
  outline: none;
}

.humidor-dropdown__nav:disabled {
  opacity: .25;
  cursor: default;
}

.humidor-dropdown__nav--prev {
  left: 6px;
}

.humidor-dropdown__nav--next {
  right: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
  .humidor-dropdown {
    width: calc(100vw - 16px);
  }

  .humidor-dropdown__top {
    padding: 8px 10px 8px 12px;
    gap: 10px;
  }

  .humidor-dropdown__eyebrow {
    font-size: .44rem;
    letter-spacing: .24em;
  }

  .humidor-dropdown__current {
    font-size: .5rem;
    letter-spacing: .14em;
  }

  .humidor-dropdown__rail {
    padding: 8px 32px;
  }

  .humidor-strip-group {
    padding: 0 9px;
  }

  .humidor-strip-group__title {
    margin-right: 9px;
    font-size: .42rem;
    letter-spacing: .2em;
  }

  .humidor-strip-group__items {
    gap: 5px;
  }

  .humidor-variant {
    width: 58px;
  }

  .humidor-variant img {
    height: 44px;
  }

  .humidor-dropdown__nav {
    width: 22px;
    height: 44px;
    font-size: 16px;
  }

  .humidor-dropdown__nav--prev {
    left: 4px;
  }

  .humidor-dropdown__nav--next {
    right: 4px;
  }
}
