/* Gutenmerce Variation Swatches Styles */

.gutenmerce-swatches-wrapper {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
    align-items: center;
}

.gutenmerce-swatch-option {
    position: relative;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
    background: #fff;
    overflow: hidden;
    display: inline-block;
    min-width: 40px;
    min-height: 40px;
}

.gutenmerce-swatch-option:hover {
    border-color: #000 !important;
}

.gutenmerce-swatch-option.selected {
    border-color: #000 !important;
}

.gutenmerce-swatch-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(100%);
}

/* Color Swatches */
.gutenmerce-swatch-color {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    position: relative;
}

.gutenmerce-swatch-color-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}

/* Image swatches */
.gutenmerce-swatch-image {
    width: 91px;
    height: 115px;
    padding: 3px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    border-radius: 8px;
    overflow: hidden;
}

.gutenmerce-swatch-image img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

.gutenmerce-swatch-label {
    font-size: 11px;
    color: #666;
    text-align: center;
    line-height: 1.2;
    word-wrap: break-word;
    max-width: 100%;
}

.gutenmerce-swatch-option.selected .gutenmerce-swatch-label {
    color: #000;
    font-weight: 600;
}

/* Text Swatches */
.gutenmerce-swatch-text {
    padding: 0px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-align: center;
    white-space: nowrap;
}



.gutenmerce-swatch-text.selected {
    color: #000 !important;
    border: 1px solid black;
}

/* Hide original select - Multiple selectors for safety */
.gutenmerce-swatches-wrapper + select,
select[style*="display: none"],
.variations select[style*="display: none"] {
    display: none !important;
}

/* Reset variations link */
.reset_variations[style*="visibility: hidden"] {
    display: none !important;
}

/* Hide "Choose an option" */
.variations select option[value=""] {
    display: none !important;
}

/* Block editor inline swatches */
.gutenmerce-inline-swatch {
    display: inline-block !important;
    margin-right: 8px;
    vertical-align: middle;
}

/* Label styling */
.variations .label,
.variations label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: #333;
}

/* Tooltip */
.gutenmerce-swatch-option[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    min-width: 36px;
    height: 24px;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 9999999 !important;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    .gutenmerce-swatches-wrapper {
        gap: 8px;
    }
    
    .gutenmerce-swatch-color {
        width: 40px;
        height: 40px;
    }
    
    .gutenmerce-swatch-image {
        width: 50px;
        height: 50px;
    }
    
    .gutenmerce-swatch-text {
        padding: 8px 12px;
        font-size: 12px;
    }
}

.woocommerce-loop-product .gutenmerce-swatch-color {
    width: 30px;
    height: 30px;
}

.woocommerce-loop-product .gutenmerce-swatch-image {
    width: 35px;
    height: 35px;
}

.woocommerce-loop-product .gutenmerce-swatch-text {
    padding: 5px 8px;
    font-size: 12px;
}

/* Loading state */
.gutenmerce-swatches-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error state */
.gutenmerce-swatches-wrapper.error .gutenmerce-swatch-option {
    border-color: #dc3232;
}
.variations{
    margin: 0 !important;
}
.variations tr{
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 !important;
    padding:0 !important;
}
.variations th{
    margin: 0 !important;
    padding:0 !important;
}
.variations th.label{
    font-size: 14px !important;
}
.variations label{
    margin: 0 !important;
}