/* Haika Product Hub — frontend styles */

.haika-hub-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
    direction: rtl;
}

.haika-hub-swatch {
    position: relative;
    width: 44px;
    height: 44px;
    padding: 2px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.haika-hub-swatch:hover {
    border-color: #999;
    transform: translateY(-1px);
}

.haika-hub-swatch.is-selected {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1 inset;
}

.haika-hub-swatch.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

.haika-hub-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}

.haika-hub-swatch-placeholder {
    font-size: 11px;
    color: #555;
    font-weight: 600;
}

.haika-hub-swatch-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 10;
}

.haika-hub-swatch:hover .haika-hub-swatch-label {
    opacity: 1;
}

.haika-hub-swatch--pattern {
    border-color: #d4a017;
}

.haika-hub-swatch--pattern.is-selected {
    border-color: #d4a017;
    box-shadow: 0 0 0 1px #d4a017 inset;
}

/* فیلتر سایدبار */
.haika-hub-pattern-filter {
    padding: 6px 10px;
    background: linear-gradient(135deg, #fff7e6, #fff);
    border-right: 3px solid #d4a017;
    margin-bottom: 4px;
}
.haika-hub-pattern-filter.chosen {
    background: #d4a017;
    color: #fff;
}
.haika-hub-pattern-filter.chosen a {
    color: #fff;
}
.haika-hub-pattern-filter a {
    color: #b8860b;
    text-decoration: none;
    font-weight: 600;
}

/* === Loop Card Swatches === */
.haika-hub-loop-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0;
    direction: rtl;
}
.haika-hub-loop-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-block;
    border: 1px solid #ddd;
    line-height: 0;
    transition: transform 0.15s;
}
.haika-hub-loop-swatch:hover {
    transform: scale(1.15);
    border-color: #2271b1;
}
.haika-hub-loop-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.haika-hub-loop-swatch-more {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #555;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}
