.wcr-spc-product-options {
    --wcr-option-accent: var(--wcr-storefront-accent, #111827);
    margin: 24px 0;
    padding: 20px;
    border: 1px solid #d8dee9;
    border-radius: 8px;
    background: #fff;
    color: #111827;
}

.wcr-spc-product-options > header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.wcr-spc-product-options > header h3,
.wcr-spc-product-options > header p,
.wcr-spc-option legend,
.wcr-spc-option-description {
    margin: 0;
    letter-spacing: 0;
}

.wcr-spc-product-options > header h3 {
    font-size: 20px;
    line-height: 1.3;
}

.wcr-spc-product-options > header p,
.wcr-spc-option-description {
    margin-top: 4px;
    color: #667085;
    font-size: 14px;
}

.wcr-spc-option {
    min-width: 0;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.wcr-spc-option:last-child { margin-bottom: 0; }

.wcr-spc-option legend {
    width: 100%;
    padding: 0;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
}

.wcr-spc-option-image.is-main {
    display: block;
    width: 92px;
    margin: 10px 0;
}

.wcr-spc-option-image img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    object-fit: contain;
    background: #fff;
}

.wcr-spc-checkbox-card,
.wcr-spc-choice-card {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    border: 1px solid #d8dee9;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.wcr-spc-checkbox-card {
    min-height: 52px;
    padding: 12px 14px;
}

.wcr-spc-choice-card {
    padding: 10px;
}

.wcr-spc-checkbox-card:hover,
.wcr-spc-choice-card:hover { border-color: #98a2b3; }

.wcr-spc-checkbox-card.is-selected,
.wcr-spc-choice-card.is-selected {
    border-color: var(--wcr-option-accent);
    background: #f8fafc;
    box-shadow: 0 0 0 1px var(--wcr-option-accent);
}

.wcr-spc-choice-card.is-disabled {
    opacity: .48;
    cursor: not-allowed;
}

.wcr-spc-checkbox-card > input,
.wcr-spc-choice-card > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.wcr-spc-checkmark,
.wcr-spc-choice-indicator {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    box-sizing: border-box;
    border: 2px solid #98a2b3;
    border-radius: 4px;
    background: #fff;
}

.wcr-spc-option--single .wcr-spc-choice-indicator { border-radius: 50%; }

.is-selected > .wcr-spc-checkmark,
.is-selected > .wcr-spc-choice-indicator {
    border: 6px solid var(--wcr-option-accent);
}

.wcr-spc-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.wcr-spc-choice-card .wcr-spc-option-image {
    flex: 0 0 64px;
    width: 64px;
}

.wcr-spc-choice-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
    flex: 1;
}

.wcr-spc-choice-copy strong {
    overflow-wrap: anywhere;
    font-size: 14px;
    letter-spacing: 0;
}

.wcr-spc-option-price {
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.wcr-spc-checkbox-card .wcr-spc-option-price { margin-left: auto; }

.wcr-spc-selection-limit {
    display: block;
    margin-top: 7px;
    color: #667085;
}

.wcr-spc-option-input {
    display: block;
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    font-size: 16px;
}

.wcr-spc-image-reference {
    display: grid;
    width: min(100%, 620px);
    min-height: 0;
    margin-top: 12px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d8dee9;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    cursor: zoom-in;
    text-align: left;
    appearance: none;
}

.wcr-spc-image-reference:hover,
.wcr-spc-image-reference:focus-visible {
    border-color: var(--wcr-option-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--wcr-option-accent) 18%, transparent);
    outline: 0;
}

.wcr-spc-image-reference-media {
    display: grid;
    height: 240px;
    place-items: center;
    background: #f8fafc;
}

.wcr-spc-image-reference-preview {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: contain;
}

.wcr-spc-image-reference-action {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 700;
}

.wcr-spc-image-reference-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

body.wcr-spc-lightbox-open { overflow: hidden !important; }

.wcr-spc-image-lightbox {
    position: fixed;
    z-index: 1000000;
    inset: 0;
    display: grid;
    box-sizing: border-box;
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    place-items: center;
    background: rgba(15, 23, 42, .78);
}

.wcr-spc-image-lightbox-dialog {
    position: relative;
    display: grid;
    width: min(960px, 100%);
    max-height: calc(100dvh - 36px);
    box-sizing: border-box;
    gap: 12px;
    padding: 16px;
    overflow: auto;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .32);
}

.wcr-spc-image-lightbox-dialog img {
    display: block;
    width: 100%;
    max-height: calc(100dvh - 130px);
    object-fit: contain;
}

.wcr-spc-image-lightbox-dialog p {
    margin: 0;
    padding: 0 50px 0 2px;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
}

.wcr-spc-image-lightbox-close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid #d8dee9;
    border-radius: 50%;
    background: #fff;
    color: #111827;
    cursor: pointer;
    font: 400 28px/1 Arial, sans-serif;
}

@media (max-width: 640px) {
    .wcr-spc-product-options { margin: 18px 0; padding: 16px; }
    .wcr-spc-choice-grid { grid-template-columns: 1fr; }
    .wcr-spc-choice-card .wcr-spc-option-image { flex-basis: 58px; width: 58px; }
    .wcr-spc-image-reference-media { height: 190px; }
    .wcr-spc-image-reference-preview { max-height: 190px; }
    .wcr-spc-image-lightbox { padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
    .wcr-spc-image-lightbox-dialog { padding: 12px; }
}
