/* ==========================================================================
   FRAME SELECTOR - Component Styles
   ========================================================================== */

.frame-selector {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 30px;
  min-width: 600px;
  flex: 1;
}

/* Desktop: Frame selector is on the left */
@media (max-width: 1025px) {
  .frame-selector {
    order: 2; /* First on desktop (left side) */
  }
}

/* Section Title */
.frame-selector__title {
  color: #eaf1ff;
  font-size: 32px;
  font-weight: 700;
  line-height: normal;
  margin: 0;
}

/* Frame Selection Section */
.frame-selection {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.frame-selection__title {
  color: #eaf1ff;
  font-size: 24px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.24px;
  margin: 0;
}

/* Frame Choices Grid */
.frame-choices {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
}

.frame-choice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
}

/* Frame Container */
.frame-choice__container {
  position: relative;
  width: 70px;
  height: 70px;
  cursor: pointer;
  transition: transform 0.3s ease;
  border-radius: 6px;
  overflow: hidden;
}

.frame-choice__container:hover {
  transform: translateY(-5px);
}

.frame-choice__container:active {
  transform: translateY(-3px);
}

/* Frame Image */
.frame-choice__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* Price Tag */
.frame-choice__price {
  position: absolute;
  bottom: 5px;
  left: 5px;
  background: rgba(14, 17, 24, 0.8);
  padding: 4px 8px;
  border-radius: 3px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.3s ease;
  width: calc(100% - 10px); /* Subtracting position 5px left same for the right */
  height: 20px;
}

.frame-choice__container:hover .frame-choice__price {
  display: flex;
  animation: fadeInPrice 0.3s ease forwards;
}

.frame-choice__price-label,
.frame-choice__price-value {
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

/* Check Icon */
.frame-choice__check {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Selected State */
.frame-choice__container.selected {
  transform: translateY(0);
  box-shadow: 0 0 0 2px #016bff;
}

.frame-choice__container.selected::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 100%);
  z-index: 1;
}

.frame-choice__container.selected .frame-choice__check {
  display: block;
}

.frame-choice__container.selected .frame-choice__price {
  display: none;
}

/* Frame Name */
.frame-choice__name {
  width: 70px;
  color: #eaf1ff;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  word-wrap: break-word;
}

/* Thickness Selection */
.thickness-selection {
  display: flex;
  flex-direction: column;
  gap: 31px;
}

.thickness-selection__title {
  color: #eaf1ff;
  font-size: 24px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.24px;
  margin: 0;
}

/* Custom Slider */
.thickness-slider {
  position: relative;
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
}

.thickness-slider__track {
  position: absolute;
  width: 100%;
  height: 2px;
  background: #22293a;
  border-radius: 1px;
}

.thickness-slider__labels {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-between;
  z-index: 2;
}

.thickness-slider__label {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  /* padding: 10px 0 22px 0; */
  cursor: pointer;
}

.thickness-slider__label input[type="radio"] {
  display: none;
}

.thickness-slider__dot {
  width: 20px;
  height: 20px;
  border: 1px solid #909090;
  background: #22293A;
  border-radius: 50%;
  transition: all 0.3s ease;
  margin: 10px 0 30px 0;
}

.thickness-slider__label:hover .thickness-slider__dot {
  transform: scale(1.1);
}

.thickness-slider__label input[type="radio"]:checked ~ .thickness-slider__dot {
  background: #016bff;
  transform: scale(1.15);
  /* box-shadow: 0 0 0 4px rgba(1, 107, 255, 0.2); */
}

.thickness-slider__text {
  display: block;
  color: #909090;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: color 0.3s ease;
}

.thickness-slider__label input[type="radio"]:checked ~ .thickness-slider__text {
  color: #eaf1ff;
}

/* Footer */
.frame-selector__footer {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.frame-selector__divider {
  width: 100%;
  height: 2px;
  background-color: #22293a;
  border-radius: 2px;
}

/* Animations */
@keyframes fadeInPrice {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .frame-selector {
    min-width: auto;
    padding: 20px;
    order: 2; /* Between image and info on mobile */
  }

  .frame-selector__title {
    font-size: 24px;
  }

  .frame-selection__title,
  .thickness-selection__title {
    font-size: 18px;
  }

  .frame-choices {
    gap: 15px;
  }
}
