/* ============================================
   LENVIBE COLOR VARIANT SYSTEM
   Cross-browser compatible color swatches & dots
   ============================================ */

/* Product Image Wrapper (for product pages) */
.product-image-wrapper {
  text-align: center;
  position: relative;
}

.product-image {
  width: 100%;
  max-width: 420px;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
}

/* Color Swatches (Product Pages) */
.color-swatches {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.swatch {
  padding: 6px 12px;
  border-radius: 6px;
  border: 2px solid #ddd;
  cursor: pointer;
  background-color: #fff;
  position: relative;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  min-width: 70px;
  text-align: center;
}

.swatch:focus {
  outline: none;
}

/* Color Dots (Grid & Carousel) */
.color-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
  min-height: 20px;
}

.color-dots:empty {
  min-height: 20px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid #ddd;
  flex-shrink: 0;
  background-color: #fff;
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .color-swatches {
    gap: 8px;
    margin-top: 12px;
  }
  
  .swatch {
    padding: 8px 14px;
    font-size: 14px;
    min-width: 75px;
  }
  
  .color-dots {
    gap: 5px;
    margin-top: 6px;
  }
  
  .dot {
    width: 10px;
    height: 10px;
  }
}

/* Desktop fine-tuning */
@media (min-width: 1024px) {
  .swatch {
    padding: 5px 10px;
    font-size: 12px;
    min-width: 60px;
  }
  
  .color-swatches {
    gap: 8px;
  }
}

/* Cross-browser support */
.swatch,
.dot {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  
  -webkit-tap-highlight-color: transparent;
}

/* Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  .swatch,
  .dot {
    -webkit-touch-callout: none;
  }
}

/* Firefox specific optimizations */
@-moz-document url-prefix() {
  .swatch,
  .dot {
    image-rendering: -moz-crisp-edges;
  }
}

/* Edge/IE fallbacks */
@supports (-ms-ime-align:auto) {
  .swatch,
  .dot {
    -ms-user-select: none;
    user-select: none;
  }
}
