/**
 * Product Options Frontend Styles
 * Styles for displaying product options on the product page
 */

.price-adjustment {
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
}

/* Image Grid Style Options */
.option-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
}

.option-image-item {
    position: relative;
    cursor: pointer;
}

.option-image-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.image-wrapper {
    display: block;
    position: relative;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s;
    background: white;
}

.image-wrapper img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
    text-align: center;
    padding: 0.5rem;
}

.option-image-item:hover .image-wrapper {
    border-color: var(--primary-accent, #3b82f6);
}

.option-image-item:has(input:checked) .image-wrapper {
    border-color: var(--primary-accent, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.price-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Price Display */
.option-price-display {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--background-main, #f3f4f6);
    border-radius: 0.375rem;
}

.option-final-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-accent, #3b82f6);
}

.option-base-price {
    font-size: 0.875rem;
    color: var(--text-muted, #6b7280);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

/* Cart/Order Selected Options Display */
.selected-options {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.selected-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.selected-option-name {
    color: var(--text-muted, #6b7280);
}

.selected-option-value {
    font-weight: 500;
    color: var(--text-main, #374151);
}

.selected-option-image {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 640px) {
    .option-image-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    
    .image-wrapper img,
    .no-image {
        height: 70px;
    }
    
    .option-text-list {
        flex-direction: column;
        align-items: stretch;
    }
    
    .option-text-item {
        justify-content: center;
    }
}

/* Validation States */
.option-error {
    border-color: #ef4444 !important;
}

.option-error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
