/* Product Slider CSS */

/* Slider Container */
.product-slider-wrapper {
  margin: 30px 0;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.product-slider-title {
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
}
.selected-text {
  font-size: var(--e-global-typography-text-font-size);
}
.product-slider-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: transparent;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  padding-bottom: 90px;
  z-index: 0;
}

/* Category Dropdown */
.category-dropdown-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 0;
  text-align: center;
}

.category-label {
  margin-right: 10px;
}

.custom-category-dropdown {
  position: relative;
  min-width: 100px;
  user-select: none;
  visibility: hidden; /* Initially hidden until JS initializes it */
  z-index: 1;
}

.selected-category {
  display: flex;
  align-items: center;
  justify-content: center;
  /* padding: 10px 15px; */
  border-radius: 0;
  /* border: 1px solid #dddddd; */
  background-color: #ffffff;
  color: #333333;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  border-bottom: 1px solid white !important;
  padding: 0 12px;
}

.selected-category:hover {
  border-color: #4caf50;
}

.dropdown-icon {
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.custom-category-dropdown.open .dropdown-icon {
  transform: rotate(180deg);
}

.category-options {
  position: absolute;
  top: 100%;
  /* left: 0; */
  right: 0;
  max-height: 0;
  overflow: hidden;
  background-color: #ffffff;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 100;
  transition: all 0.3s ease;
  opacity: 0;
  display: none;
  background-color: black !important;
  width: 16vw;
  min-width: 250px;
}

.custom-category-dropdown.open .category-options {
  max-height: 40vw;
  opacity: 1;
  overflow-y: auto;
  border: 1px solid #dddddd;
  border-top: none;
  display: block;
}

.category-option {
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: block;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
}

.category-option:hover {
  background-color: #f5f5f5;
}

.category-option.selected {
  background-color: #e8f5e9;
  color: #b18d59 !important;
  font-weight: 600;
  box-shadow: inset 5px 0 0 #b18d59;
}

/* Product Slider */
.product-slider {
  display: flex;
  margin: 0 50px;
  max-width: calc(100% - 100px);
  justify-content: flex-start;
  align-items: center;
  transition: opacity 0.3s ease-in-out;
  width: 100%;
}

.slider-transitioning {
  opacity: 0.5;
}
.button-text:empty {
  display: none;
}
.button-text {
  margin-left: 0.4em;
}
/* Product Slide */
.product-slide {
  flex: 0 0 calc(100% / 3);
  padding: 15px;
  background-color: transparent;
  border-radius: 6px;
  margin: 0 10px;
  transition: all 0.2s ease-in-out;
  position: relative;
  transform: scale(0.85);
  /* opacity: 0.7; */
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(0.85) translateY(0);
  }
}

/* Focus effect for the left product */
.product-slide.focused {
  transform: scale(1);
  opacity: 1;
  z-index: 2;
  transition: all 0.2s ease-in-out;
  animation: focusIn 0.2s ease-in-out;
}

@keyframes focusIn {
  from {
    transform: scale(0.85);
  }
  to {
    transform: scale(1);
  }
}

/* Overlay for non-focused products */
/* .product-slide:not(.focused)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  z-index: 1;
  pointer-events: none;
} */

.product-image {
  text-align: center;
  margin-bottom: 15px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: black;
  border-radius: 40rem;
}

.product-image img {
  max-height: 100%;
  max-width: 100%;
  object-fit: cover;
  height: 100%;
  border-radius: 190rem;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.product-slide.focused .product-image img {
  opacity: 1;
}

.product-slide .product-details {
  padding: 0 !important;
  text-align: center;
  margin: 0 !important;
  /* ---- */
  position: absolute;
  top: 42px;
  height: 61%;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  align-content: space-between;
  justify-content: space-between;
  transition: top 0.3s;
  width: 84%;
}
.product-slide.focused .product-details {
  top: 95%;
  height: auto;
}

.product-title {
  font-size: 18px !important;
  font-weight: 400;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-price {
  font-size: 18px;
  /* font-weight: 700; */
  /* color: #e83e8c; */
  margin-bottom: 15px;
}

.product-actions {
  margin-top: 15px;
  position: absolute;
  top: 69%;
  left: 50%;
  transform: translateX(-50%);
}

/* Add to Cart Button */
.add-to-cart-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 15px;
  background-color: black;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  padding: 1em !important;
  border-radius: 20rem !important;
}

.add-to-cart-button:hover {
  background-color: #45a049;
}

.button-icon {
  display: inline-flex;
  align-items: center;
}

.button-icon-after {
  margin-left: 8px;
}

/* Navigation Buttons */
.slider-nav {
  position: absolute;
  top: 84%;
  transform: translateY(-50%);
  z-index: 10;
}

.slider-nav-button svg {
  width: 24px;
  height: 24px;
}

.slider-nav-prev {
  /* left: 0; */
  right: 40%;
}

.slider-nav-next {
  right: 30%;
}

.slider-nav-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #333333;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.slider-nav-button:hover {
  background-color: #f0f0f0;
  transform: scale(1.4);
}

.slider-nav-button:focus {
  outline: none;
}

/* Pagination - Hidden as requested */
.slider-pagination {
  display: none;
}

/* No Products Message */
.no-products {
  padding: 30px;
  text-align: center;
  font-size: 16px;
  color: #666666;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .product-slider {
    margin: 0 40px;
    max-width: calc(100% - 80px);
  }

  .product-slide {
    flex: 0 0 100%;
    margin: 0 auto;
  }

  /* Ocultar productos no enfocados en móvil */
  .product-slide:not(.focused) {
    display: none;
  }

  /* Ajustar tamaño del producto enfocado en móvil */
  .product-slide.focused {
    transform: scale(1);
    max-width: 280px;
  }

  /* Ajustar posición de los botones de navegación */
  .slider-nav {
    top: 50%;
  }

  .slider-nav-prev {
    left: -5px;
  }

  .slider-nav-next {
    right: -5px;
  }

  .slider-nav-button {
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.8);
  }
  .custom-category-dropdown.open .category-options {
    min-height: 400px;
  }
}

@media (max-width: 480px) {
  .product-slider {
    margin: 0 25px;
    max-width: calc(100% - 50px);
  }

  .product-slide.focused {
    max-width: 240px;
  }
}

/* style scroll */

.category-options {
  overflow: auto; /* Es crucial para que el scrollbar aparezca */
  scrollbar-width: thin; /* 'auto' | 'thin' | 'none' */
  scrollbar-color: #888 #f1f1f1; /* color-thumb color-track */
}

/* Estilos de la barra de scroll para navegadores Webkit */
.category-options::-webkit-scrollbar {
  width: 12px; /* Ancho de la barra de desplazamiento vertical */
  height: 12px; /* Altura de la barra de desplazamiento horizontal */
}

.category-options::-webkit-scrollbar-track {
  background: #f1f1f1; /* Color del fondo de la pista */
  border-radius: 10px;
}

.category-options::-webkit-scrollbar-thumb {
  background: #888; /* Color del "pulgar" (la parte arrastrable) */
  border-radius: 10px;
}

.category-options::-webkit-scrollbar-thumb:hover {
  background: #555; /* Color del "pulgar" al pasar el ratón */
}

/* Opcional: Para la esquina de la barra de desplazamiento (donde se encuentran horizontal y vertical) */
.category-options::-webkit-scrollbar-corner {
  background: #f1f1f1;
}
