.pwigs-mode2-options {
    margin: 1.25rem 0;
}

.pwigs-mode2-field {
    min-width: 0;
    margin: 0 0 1.25rem;
    padding: 0;
    border: 0;
}

.pwigs-mode2-field legend {
    display: block;
    width: 100%;
    margin: 0 0 0.55rem;
    padding: 0;
    color: #333;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    text-transform: uppercase;
}

.pwigs-mode2-current-value {
    margin-left: 0.35em;
    color: #888;
    font-weight: 400;
}

.pwigs-mode2-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: flex-start;
    overflow: visible;
}

.pwigs-mode2-option {
    position: relative;
    display: inline-flex;
    margin: 0;
    cursor: pointer;
    overflow: visible;
}

.pwigs-mode2-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.pwigs-mode2-option-label {
    display: inline-flex;
    min-width: 3.9rem;
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.85rem;
    color: #333;
    background: #fff;
    border: 1px solid #cfcfcf;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pwigs-mode2-option:hover .pwigs-mode2-option-label {
    border-color: #777;
}

.pwigs-mode2-input:focus-visible + .pwigs-mode2-option-label {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.pwigs-mode2-input:checked + .pwigs-mode2-option-label {
    border-color: #111;
    box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px #111;
}

.pwigs-mode2-option--image .pwigs-mode2-option-label {
    width: 3.45rem;
    min-width: 3.45rem;
    height: 3.15rem;
    min-height: 3.15rem;
    padding: 0.18rem;
}

.pwigs-mode2-thumbnail {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pwigs-mode2-option--image .pwigs-mode2-option-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.pwigs-mode2-tooltip,
.pwigs-mode2-preview {
    position: absolute;
    z-index: 100;
    display: none;
    pointer-events: none;
}

.pwigs-mode2-tooltip {
    bottom: calc(100% + 9px);
    left: 50%;
    padding: 0.35rem 0.55rem;
    color: #222;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transform: translateX(-50%);
}

.pwigs-mode2-tooltip::after {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-top-color: #fff;
    content: '';
    transform: translateX(-50%);
}

.pwigs-mode2-preview {
    top: calc(100% + 10px);
    left: 0;
    width: min(260px, calc(100vw - 24px));
    padding: 0.5rem;
    background: #fff;
    border: 1px solid #d5d5d5;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
}

.pwigs-mode2-preview img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
}

.pwigs-mode2-preview > span {
    display: block;
    padding: 0.45rem 0.15rem 0.1rem;
    color: #222;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.pwigs-mode2-option.is-previewing .pwigs-mode2-tooltip,
.pwigs-mode2-option.is-previewing .pwigs-mode2-preview {
    display: block;
}

.pwigs-mode2-selected-price {
    color: #111;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.75rem 0;
}

@media (max-width: 549px) {
    .pwigs-mode2-choices {
        gap: 0.55rem;
    }

    .pwigs-mode2-option-label {
        min-width: 3.6rem;
        padding-right: 0.7rem;
        padding-left: 0.7rem;
    }
}
