/* Product Extras Category Swatches Styles */
.pewc-category-swatches {
    margin: 10px 0;
    width: 100%;
}

.pewc-swatch-group {
    margin-bottom: 10px;
}

.pewc-swatch-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
    text-align: center;
}

.pewc-category-swatches-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.pewc-category-swatch {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 3px;
    border: 1px solid var(--fs-border-color, #ddd);
    overflow: hidden;
    margin: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pewc-category-swatch a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.pewc-category-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pewc-category-swatch .pewc-hex {
    display: block;
    width: 100%;
    height: 100%;
}

.pewc-category-swatch .pewc-hex span {
    display: block;
    width: 100%;
    height: 100%;
}

.pewc-category-swatch .pewc-text {
    font-size: 11px;
    color: #666;
    text-align: center;
    line-height: 1.2;
    padding: 2px;
}

.pewc-category-swatch-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 3px;
    background: var(--fs-color-light, #f7f7f7);
    border: 1px dashed var(--fs-border-color, #ddd);
    margin: 2px;
    position: relative;
    overflow: visible;
}

.pewc-category-swatch-more a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--fs-color-secondary, #666);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.pewc-category-swatch-more a span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Focus styles for accessibility */
.pewc-category-swatch-more a:focus {
    outline: none;
}

.pewc-category-swatch-more a:focus-visible {
    outline: 2px solid var(--pewc-hover-bg-color, #0073aa);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pewc-category-swatch img,
    .pewc-category-swatch .pewc-hex,
    .pewc-category-swatch-more {
        width: 25px;
        height: 25px;
    }
    
    .pewc-category-swatches-wrapper {
        gap: 3px;
    }
}

/* Column layouts */
.pewc-category-swatches-wrapper.pewc-columns-2 .pewc-category-swatch,
.pewc-category-swatches-wrapper.pewc-columns-3 .pewc-category-swatch,
.pewc-category-swatches-wrapper.pewc-columns-4 .pewc-category-swatch,
.pewc-category-swatches-wrapper.pewc-columns-5 .pewc-category-swatch {
    flex: 0 0 auto;
}

/* Integration with Flatsome theme */
.box-image .pewc-category-swatches {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    z-index: 2;
    background: var(--fs-color-light, rgba(255, 255, 255, 0.9));
    padding: 5px;
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

/* Alternative layout - below image */
.product-small .pewc-category-swatches {
    margin-top: 8px;
    margin-bottom: 5px;
}

/* Hide on very small screens if needed */
@media (max-width: 480px) {
    .pewc-category-swatches {
        display: none;
    }
}

/* Focus styles for accessibility - removed a:focus as anchors were removed */ 