/**
 * Product Selector Block Frontend Styles
 */

.product-selector-block {
  position: relative;
  width: 100%;
}

/* Common Styles */
.product-selector-content-wrapper {
  padding: 20px 0;
}

.product-selector-divider {
  display: block;
}

.product-selector-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

/* Image Styles */
.product-selector-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-selector-image-container {
  position: relative;
  overflow: hidden;
}

/* Fade Transition */
.product-selector-fade-enter {
  opacity: 0;
}

.product-selector-fade-enter-active {
  opacity: 1;
  transition: opacity 300ms ease-in;
}

.product-selector-fade-exit {
  opacity: 1;
}

.product-selector-fade-exit-active {
  opacity: 0;
  transition: opacity 300ms ease-out;
}

/* ============================================
   VARIATION 1: ACCORDION
   ============================================ */

.product-selector-accordion .accordion-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.product-selector-accordion .accordion-list {
  display: flex;
  flex-direction: column;
}

.product-selector-accordion .accordion-item {
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-selector-accordion .accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  font-weight: 600;
  user-select: none;
}

.product-selector-accordion .accordion-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.product-selector-accordion .accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.product-selector-accordion .accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 20px;
}

.product-selector-accordion .accordion-item.active .accordion-content {
  max-height: 2000px;
  padding: 0 20px 20px;
}

.product-selector-accordion .accordion-image-desktop {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
}

.product-selector-accordion .accordion-image-mobile {
  display: none;
  margin-top: 15px;
}

.product-selector-accordion .accordion-image-mobile img {
  width: 100%;
  height: auto;
}

.product-selector-accordion .product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 300ms ease-in-out;
}

.product-selector-accordion .product-image.active {
  opacity: 1;
}

/* ============================================
   VARIATION 2: AUTO TAB BUBBLES
   ============================================ */

.product-selector-auto-tab-bubbles .auto-tabs-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.product-selector-auto-tab-bubbles .auto-tabs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.product-selector-auto-tab-bubbles .auto-tab-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  padding: 10px 15px;
}

.product-selector-auto-tab-bubbles .auto-tab-icon-bubble {
  position: relative;
  border-radius: 50%;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.product-selector-auto-tab-bubbles .auto-tab-icon-bubble img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

.product-selector-auto-tab-bubbles .auto-tab-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.product-selector-auto-tab-bubbles .auto-tab-progress-bar {
  height: 100%;
  width: 0%;
  transition: width 100ms linear;
}

.product-selector-auto-tab-bubbles .auto-tab-name {
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.product-selector-auto-tab-bubbles .auto-tab-content {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-selector-auto-tab-bubbles .auto-tab-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 300ms ease-in-out;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.product-selector-auto-tab-bubbles .auto-tab-overlay-color {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.product-selector-auto-tab-bubbles .auto-tab-product-details {
  position: relative;
  z-index: 2;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.product-selector-auto-tab-bubbles .auto-tab-overlay.active {
  opacity: 1;
}

/* ============================================
   VARIATION 3: SIDE TABS
   ============================================ */

/* Header: side-by-side on desktop */
.product-selector-side-tabs .side-tabs-header {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 30px;
}

.product-selector-side-tabs .side-tabs-header-left {
  flex: 0 0 50%;
  max-width: 50%;
}

.product-selector-side-tabs .side-tabs-header-right {
  flex: 1 1 auto;
}

.product-selector-side-tabs .side-tabs-vertical-divider {
  flex: 0 0 auto;
  align-self: stretch;
}

/* Products: tabs on left, content on right */
.product-selector-side-tabs .side-tabs-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
}

.product-selector-side-tabs .side-tabs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
}

.product-selector-side-tabs .side-tab-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  white-space: nowrap;
}

.product-selector-side-tabs .side-tab-icon-bubble {
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.product-selector-side-tabs .side-tab-icon-bubble img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

.product-selector-side-tabs .side-tab-name {
  font-weight: 400;
  transition: color 0.3s ease;
}

.product-selector-side-tabs .side-tab-content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 400px;
}

.product-selector-side-tabs .side-tab-overlay {
  position: relative;
  grid-row: 1;
  grid-column: 1;
  opacity: 0;
  transition: opacity 300ms ease-in-out;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.product-selector-side-tabs .side-tab-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.product-selector-side-tabs .side-tab-overlay-color {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.product-selector-side-tabs .side-tab-product-details {
  position: relative;
  z-index: 2;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

@media (max-width: 990px) {
  /* Accordion Mobile */
  .product-selector-accordion .accordion-layout {
    grid-template-columns: 1fr;
  }

  .product-selector-accordion .accordion-image-desktop {
    display: none;
  }

  .product-selector-accordion .accordion-image-mobile {
    display: block;
  }

  .product-selector-accordion .accordion-content {
    padding: 0 15px;
  }

  .product-selector-accordion .accordion-item.active .accordion-content {
    padding: 0 15px 15px;
  }

  /* Auto Tab Bubbles Mobile */
  .product-selector-auto-tab-bubbles .auto-tabs-list {
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .product-selector-auto-tab-bubbles .auto-tabs-list::-webkit-scrollbar {
    display: none;
  }

  .product-selector-auto-tab-bubbles .auto-tab-item {
    flex-direction: column;
    flex-shrink: 0;
    padding: 10px;
    min-width: calc((100% - 20px) / 3);
  }

  .product-selector-auto-tab-bubbles .auto-tab-name {
    text-align: center;
  }

  .product-selector-auto-tab-bubbles .auto-tab-product-details {
    padding: 20px;
  }

  /* Side Tabs Mobile */
  .product-selector-side-tabs .side-tabs-vertical-divider {
    display: none;
  }

  .product-selector-side-tabs .side-tabs-header {
    flex-direction: column;
    gap: 15px;
  }

  .product-selector-side-tabs .side-tabs-header-left {
    max-width: 100%;
  }

  .product-selector-side-tabs .side-tabs-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .product-selector-side-tabs .side-tabs-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 10px 0;
    gap: 5px;
  }

  .product-selector-side-tabs .side-tab-item {
    flex: 0 0 auto;
    padding: 10px 15px;
    min-width: auto;
  }

  .product-selector-side-tabs .side-tab-name {
    text-align: center;
    font-size: 14px;
  }

  .product-selector-side-tabs .side-tab-product-details {
    padding: 20px;
  }
}

/* Button Styles - inherits from Theme Settings CSS variables (.hero-button classes in blocks.css) */
.product-selector-block .button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
