.color-swatch-link {
    width: 34px;
    height: 34px;
    border: 1px solid #e5e7eb; /* Light gray explicitly */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    position: relative;
    outline: none !important; /* Force no outline */
}

.color-swatch-link:visited {
    border-color: #e5e7eb;
}

.color-swatch-link:hover {
    transform: scale(1.1);
    border-color: #b0b0b0;
    z-index: 2;
}

.color-swatch-link.active {
    transform: scale(1.25);
    border: none !important; /* No border at all */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important; /* Only outer shadow */
    z-index: 10;
}

/* Ensure white/light colors are always visible */
.color-swatch-link[style*="background: #fff"],
.color-swatch-link[style*="background: #white"],
.color-swatch-link[style*="background: #F5F5DC"] {
    border: 1px solid rgba(0,0,0,0.1) !important; /* Minimal border for white only */
}

/* Fix for focus persistency - Prevents double borders on click */
.color-swatch-link:focus, 
.color-swatch-link:active:focus {
    outline: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important; /* Reset shadow on focus */
}

/* Ensure only class .active has the ring */
.color-swatch-link:not(.active) {
    border-color: rgba(0,0,0,0.15) !important;
}

.product-price-detail {
    background: linear-gradient(135deg, #111 0%, #333 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.cursor-pointer { cursor: pointer; }
.thumbnail-container:hover { border-color: #000 !important; }
.main-image-container img { transition: transform 0.5s ease; }
.main-image-container:hover img { transform: scale(1.05); }

/* Stock Error Animations */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
.shake { animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; }

.btn-error {
    background-color: #dc3545 !important; /* Red */
    border-color: #dc3545 !important;
    color: white !important;
}

.variant-error {
    border-color: #dc3545 !important; /* Red Border */
    color: #dc3545 !important; /* Red Text */
    background-color: #fff5f5 !important;
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

/* Favorite Button Active State */
#main-product-favorite.active i {
    color: #dc3545 !important;
}
#main-product-favorite i {
    transition: color 0.3s ease, transform 0.3s ease;
}
#main-product-favorite:hover i {
    transform: scale(1.2);
}
