/* Hide the default radio button */
input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* For color swatches */
.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 2px solid #ddd; /* Default border */
    display: inline-block;
    cursor: pointer;
    position: relative; /* Required for positioning the tick mark */
    transition: transform 0.2s, border-color 0.2s;
}

/* Show the tick mark when the color is selected */
.color-swatch-input:checked + .color-swatch::after {
    color: white; /* Tick mark color */
    font-size: 18px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.5); /* Optional: background behind the tick mark */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* On hover, change the scale */
.color-swatch:hover {
    transform: scale(1.1);
}

/* When a color swatch is selected */
.color-swatch-input:checked + .color-swatch {
    border-color: #000; /* Change border color on selection */
    transform: scale(1.1); /* Slightly enlarge the swatch */
}


/* Align the size options and color swatches in a single line */
.size-options, .color-options {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping to the next line if needed */
    gap: 10px; /* Space between the items */
}

.color-swatch-wrapper, .size-option-wrapper {
    display: inline-block;
    margin-right: 4px;
}

/* Mobile-only styles */
@media (max-width: 768px) {
    .size-options, .color-options {
        gap: 4px; /* Space between the items */
    }
    
}
