.vg-cropper-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, .76);
}

.vg-cropper-modal[hidden] {
    display: none;
}

.vg-cropper-dialog {
    width: min(560px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    box-sizing: border-box;
    padding: 24px;
    border-radius: 16px;
    background: #fff;
    color: #181818;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
    text-align: center;
}

.vg-cropper-dialog h2 {
    margin: 0 0 6px;
    font-size: 25px;
}

.vg-cropper-dialog p {
    margin: 0 0 18px;
}

.vg-cropper-stage {
    position: relative;
    width: min(420px, 82vw);
    aspect-ratio: 1;
    margin: 0 auto 18px;
    overflow: hidden;
    border-radius: 50%;
    background: #e9e9e9;
    box-shadow: 0 0 0 3px #111, 0 0 0 11px rgba(0, 0, 0, .12);
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.vg-cropper-stage.is-dragging {
    cursor: grabbing;
}

.vg-cropper-stage canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.vg-cropper-guide {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 50%;
    box-sizing: border-box;
    border: 2px dashed rgba(255, 255, 255, .9);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35);
}

.vg-cropper-guide::before,
.vg-cropper-guide::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, .72);
}

.vg-cropper-guide::before {
    left: 50%; top: 0; bottom: 0; width: 1px;
}

.vg-cropper-guide::after {
    top: 50%; left: 0; right: 0; height: 1px;
}

.vg-cropper-zoom {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin: 0 auto 20px;
    max-width: 420px;
}

.vg-cropper-zoom input {
    width: 100%;
}

.vg-cropper-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.vg-cropper-actions button {
    min-width: 130px;
    padding: 12px 18px;
    border: 1px solid #202020;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 700;
}

.vg-cropper-cancel {
    background: #fff;
    color: #202020;
}

.vg-cropper-apply {
    background: #111;
    color: #fff;
}

.vg-cropper-file-note {
    margin-top: 12px !important;
    font-size: 12px;
    color: #666;
}

body.vg-cropper-open {
    overflow: hidden;
}

/* Clear Side A / Side B selector for the centre-label preview. */
.vg-label-side-switch {
    display: inline-flex !important;
    align-items: center;
    gap: 4px !important;
    margin: 4px 0 24px !important;
    padding: 4px !important;
    border: 1px solid #d8deea;
    border-radius: 999px;
    background: #eef1f7;
    box-shadow: inset 0 1px 2px rgba(24, 39, 75, 0.08);
}

.vg-label-side-switch .vg-label-side-option {
    min-width: 92px;
    margin: 0 !important;
    padding: 10px 20px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: #33405c !important;
    font: inherit;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.vg-label-side-switch .vg-label-side-option:hover {
    background: rgba(63, 81, 181, 0.09) !important;
}

.vg-label-side-switch .vg-label-side-option.is-active {
    background: #3f51b5 !important;
    color: #fff !important;
    box-shadow: 0 3px 9px rgba(63, 81, 181, 0.28) !important;
}

.vg-label-side-switch .vg-label-side-option:focus-visible {
    outline: 3px solid rgba(63, 81, 181, 0.3) !important;
    outline-offset: 2px;
}

.vg-record-disc-layer {
    transform-style: preserve-3d;
    will-change: transform;
}

.vg-record-disc-layer.vg-vinyl-flip-out,
#vinyl-preview.vg-vinyl-flip-out {
    transform: perspective(1200px) rotateY(90deg) !important;
    transition: transform 280ms cubic-bezier(.55, .05, .9, .45) !important;
}

.vg-record-disc-layer.vg-vinyl-flip-reset,
#vinyl-preview.vg-vinyl-flip-reset {
    transform: perspective(1200px) rotateY(-90deg) !important;
    transition: none !important;
}

.vg-record-disc-layer.vg-vinyl-flip-in,
#vinyl-preview.vg-vinyl-flip-in {
    transform: perspective(1200px) rotateY(0deg) !important;
    transition: transform 280ms cubic-bezier(.1, .55, .35, 1) !important;
}

/* Polished Labels / Tracks order steps. */
.vg-workflow-tabs {
    position: relative !important;
    z-index: 20 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 6px !important;
    width: min(100%, 520px);
    margin: 0 auto 18px !important;
    padding: 6px !important;
    border: 1px solid #dce2ee;
    border-radius: 14px;
    background: #eef1f7;
    box-shadow: inset 0 1px 2px rgba(24, 39, 75, 0.07);
    overflow: hidden;
    background-image: none !important;
}

.vg-workflow-tabs::before,
.vg-workflow-tabs::after {
    display: none !important;
    content: none !important;
}

.vg-workflow-tabs #tab-labels,
.vg-workflow-tabs #tab-tracks {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    margin: 0 !important;
    padding: 10px 18px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #4b566f !important;
    font: inherit;
    font-weight: 700 !important;
    text-transform: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background-color 170ms ease, color 170ms ease, box-shadow 170ms ease;
}

.vg-workflow-tabs #tab-labels:hover,
.vg-workflow-tabs #tab-tracks:hover {
    background: rgba(63, 81, 181, 0.08) !important;
}

.vg-workflow-tabs #tab-labels.current,
.vg-workflow-tabs #tab-tracks.current {
    background: #3f51b5 !important;
    color: #fff !important;
    box-shadow: 0 5px 14px rgba(63, 81, 181, 0.26) !important;
}

.vg-workflow-tabs .vg-step-number {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(75, 86, 111, 0.12);
    font-size: 12px;
    line-height: 1;
}

.vg-workflow-tabs .current .vg-step-number {
    background: rgba(255, 255, 255, 0.2);
}

/* Pull the product preview into the step controls instead of leaving it
   floating low in the right-hand column. */
#vinyl-preview {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 18px !important;
}

/* Keep the large picture-disc artwork below the Labels / Tracks control. */
#vinyl-preview.vg-preview-picture {
    margin-top: 18px !important;
}

/* White cardboard sleeve on the right; the vinyl begins inside it and slides
   left into view. The sleeve stays still when the record flips sides. */
#vinyl-preview.vg-record-stage {
    position: relative !important;
    overflow: visible;
}

.vg-record-sleeve {
    position: absolute;
    z-index: 3;
    top: 14%;
    right: 1%;
    width: 72%;
    height: 72%;
    overflow: hidden;
    border: 1px solid #dedede;
    border-radius: 2px;
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.018), transparent 36%),
        linear-gradient(315deg, rgba(0, 0, 0, 0.025), transparent 40%),
        repeating-linear-gradient(0deg, rgba(0,0,0,.009) 0, rgba(0,0,0,.009) 1px, transparent 1px, transparent 4px),
        #fff;
    box-shadow: 0 18px 34px rgba(22, 29, 43, 0.17), 0 3px 8px rgba(22, 29, 43, 0.1);
}

.vg-sleeve-window {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 35%;
    height: 35%;
    transform: translate(-50%, -50%);
    border: 1px solid #e7e7e7;
    border-radius: 50%;
    background: #f0f1f3;
    box-shadow: inset 0 4px 12px rgba(30, 37, 49, 0.12);
}

.vg-sleeve-seam {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 32%;
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
    transform: rotate(-45deg) translate(10%, -18px);
    transform-origin: right center;
}

.vg-record-disc-layer {
    position: absolute;
    z-index: 2;
    top: 11%;
    left: -10%;
    width: 78%;
    height: 78%;
}

.vg-record-disc-layer > img:first-child {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

.vg-record-disc-layer #label-overlay {
    width: 23.4% !important;
    height: 23.4% !important;
}

.vg-record-disc-layer.vg-record-entering {
    transform: translateX(47%);
    transition: transform 950ms cubic-bezier(.16, .78, .25, 1) !important;
}

.vg-record-disc-layer.vg-record-entering.vg-record-ready {
    transform: translateX(0);
}

/* Full builder polish. Body class is only added when the Vinyl Groove order
   controls are present, keeping these styles away from cart and checkout. */
.vg-shop-ui #disc-size,
.vg-shop-ui #disc-color,
.vg-shop-ui #disc-rpm {
    min-height: 40px;
    padding: 7px 34px 7px 12px !important;
    border: 1px solid #ccd4e2 !important;
    border-radius: 9px !important;
    background-color: #fff !important;
    color: #20283a;
    font: inherit;
    box-shadow: 0 2px 7px rgba(30, 45, 75, 0.06);
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.vg-shop-ui #disc-size:hover,
.vg-shop-ui #disc-color:hover,
.vg-shop-ui #disc-rpm:hover {
    border-color: #8795b2 !important;
}

.vg-shop-ui #disc-size:focus,
.vg-shop-ui #disc-color:focus,
.vg-shop-ui #disc-rpm:focus {
    border-color: #3f51b5 !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.16) !important;
}

.vg-shop-ui .vg-label-upload-row {
    display: grid !important;
    grid-template-columns: 54px auto minmax(0, 1fr) 34px;
    align-items: center !important;
    gap: 10px !important;
    width: min(100%, 520px);
    margin: 0 auto 12px !important;
    min-height: 58px;
    padding: 9px 11px !important;
    border: 1px solid #e0e5ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(30, 45, 75, 0.06);
    text-align: left;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.vg-shop-ui .vg-label-upload-row:focus-within {
    border-color: #8795d8;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.11), 0 5px 16px rgba(30, 45, 75, 0.08);
}

.vg-shop-ui .vg-upload-label {
    margin: 0 !important;
    color: #303a50;
    font-size: 14px;
    font-weight: 700 !important;
}

.vg-shop-ui .vg-native-file-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.vg-shop-ui .vg-file-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin: 0 !important;
    padding: 8px 13px;
    border: 1px solid #c8d0df;
    border-radius: 8px;
    background: #f4f6fa;
    color: #28344c;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.vg-shop-ui .vg-file-trigger:hover {
    border-color: #3f51b5;
    background: #eef0ff;
    color: #3044af;
}

.vg-shop-ui .vg-file-status {
    min-width: 0;
    overflow: hidden;
    color: #667087;
    font-size: 13px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vg-shop-ui .vg-polished-file-input {
    width: 100% !important;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #58637a;
    font: inherit;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vg-shop-ui .vg-polished-file-input::file-selector-button,
.vg-shop-ui .vg-polished-file-input::-webkit-file-upload-button {
    margin-right: 10px;
    padding: 9px 13px;
    border: 1px solid #c8d0df;
    border-radius: 8px;
    background: #f4f6fa;
    color: #28344c;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.vg-shop-ui .vg-polished-file-input:hover::file-selector-button,
.vg-shop-ui .vg-polished-file-input:hover::-webkit-file-upload-button {
    border-color: #3f51b5;
    background: #eef0ff;
    color: #3044af;
}

.vg-shop-ui .vg-label-clear {
    display: none !important;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #f0cfd3 !important;
    border-radius: 50% !important;
    background: #fff5f6 !important;
    color: #b42335 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background-color 150ms ease, transform 150ms ease;
}

.vg-shop-ui .vg-label-upload-row.has-file .vg-label-clear {
    display: grid !important;
}

.vg-shop-ui .vg-label-clear:hover {
    background: #ffe5e8 !important;
    transform: scale(1.04);
}

.vg-shop-ui .drop-zone {
    border: 2px dashed #aeb8ca !important;
    border-radius: 14px !important;
    background: #f8faff !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    transition: border-color 170ms ease, background-color 170ms ease, transform 170ms ease, box-shadow 170ms ease !important;
}

.vg-shop-ui .drop-zone:hover,
.vg-shop-ui .drop-zone:focus-within {
    border-color: #3f51b5 !important;
    background: #f0f3ff !important;
    box-shadow: 0 7px 18px rgba(63, 81, 181, 0.1);
    transform: translateY(-1px);
}

.vg-shop-ui .track-item {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 50px;
    margin: 0 0 8px !important;
    padding: 11px 54px 11px 14px !important;
    border: 1px solid #e0e5ee;
    border-radius: 12px !important;
    background: #fff !important;
    color: #20283a;
    font-size: 15px !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere;
    box-shadow: 0 2px 8px rgba(30, 45, 75, 0.05);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease !important;
}

.vg-shop-ui .track-item .delete-track {
    position: absolute !important;
    top: 50%;
    right: 12px;
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e1e6ef !important;
    border-radius: 50% !important;
    background: #f3f5f9 !important;
    color: #667087 !important;
    font: 700 18px/28px Arial, sans-serif !important;
    text-align: center;
    box-shadow: none !important;
    cursor: pointer;
    transform: translateY(-50%) !important;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms ease !important;
}

.vg-shop-ui .track-item .delete-track:hover {
    border-color: #efc8cd !important;
    background: #fff0f2 !important;
    color: #b42335 !important;
    transform: translateY(-50%) scale(1.06) !important;
}

.vg-shop-ui .track-item .delete-track:focus-visible {
    outline: 3px solid rgba(63, 81, 181, 0.25) !important;
    outline-offset: 2px;
}

.vg-shop-ui .track-item:hover {
    border-color: #aeb8ca;
    box-shadow: 0 5px 13px rgba(30, 45, 75, 0.09);
    transform: translateY(-1px);
}

.vg-shop-ui .pricing-summary {
    border: 1px solid #dce2ee !important;
    border-radius: 12px !important;
    background: #f7f9fd !important;
    box-shadow: 0 3px 12px rgba(30, 45, 75, 0.05);
}

.vg-shop-ui #vg-submit-build,
.vg-shop-ui #submit-vinyl-order {
    position: relative;
    top: -10px;
    min-height: 50px;
    padding: 13px 30px !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: #d97706 !important;
    color: #fff !important;
    font: inherit;
    font-weight: 800 !important;
    box-shadow: 0 7px 18px rgba(217, 119, 6, 0.28) !important;
    cursor: pointer;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease !important;
}

.vg-shop-ui #vg-submit-build:hover,
.vg-shop-ui #submit-vinyl-order:hover {
    background: #b85f00 !important;
    box-shadow: 0 9px 22px rgba(184, 95, 0, 0.34) !important;
    transform: translateY(-2px);
}

.vg-shop-ui #vg-submit-build:disabled,
.vg-shop-ui #submit-vinyl-order:disabled {
    background: #bcc3d3 !important;
    top: -10px;
    box-shadow: none !important;
    cursor: not-allowed;
    transform: none;
}

/* Red and white use Brent's detailed black-groove artwork with a colour
   treatment; clear and picture-disc selections use their dedicated assets. */
#vinyl-preview img.vg-disc-red:first-child {
    filter: sepia(1) saturate(8.5) hue-rotate(315deg) brightness(0.88) contrast(1.14) !important;
}

#vinyl-preview img.vg-disc-white {
    filter: grayscale(1) contrast(0.5) brightness(1.5) opacity(0.18) !important;
}

#vinyl-preview img.vg-disc-clear:first-child {
    filter: grayscale(1) brightness(1.9) contrast(1.15) opacity(0.18) !important;
}

#vinyl-preview img.vg-disc-picture:first-child {
    filter: none !important;
}

/* The legacy 7-inch picture-disc placeholder has a square paper background
   baked into the PNG. Clip precisely to the photographed record edge. */
#vinyl-preview img.vg-disc-picture[src*="/7/7_picture_disc"] {
    clip-path: circle(40.7% at 50% 50%) !important;
    transform: scale(1.225) !important;
    transform-origin: 50% 50% !important;
}

#vinyl-preview.vg-picture-has-art img.vg-disc-picture:first-child {
    filter: grayscale(1) brightness(1.4) opacity(0.25) !important;
}

#vinyl-preview img.vg-disc-black:first-child {
    filter: none !important;
}

/* Picture discs are printed edge-to-edge and have no separate centre label. */
#vinyl-preview.vg-preview-picture #label-overlay {
    display: none !important;
}

#vinyl-preview.vg-preview-picture.vg-picture-has-art #label-overlay {
    display: block !important;
    z-index: 2 !important;
    width: 84% !important;
    height: 84% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    box-shadow:
        inset 0 0 0 2px rgba(20, 24, 32, 0.35),
        inset 0 0 18px rgba(0, 0, 0, 0.22),
        0 5px 14px rgba(26, 32, 44, 0.2) !important;
}

#vinyl-preview.vg-preview-clear {
    background: #fff !important;
    border-radius: 0;
}

@media (max-width: 520px) {
    .vg-cropper-dialog { padding: 18px 14px; }
    .vg-cropper-actions { flex-direction: column-reverse; }
    .vg-cropper-actions button { width: 100%; }
    .vg-label-side-switch { display: flex !important; width: min(100%, 260px); }
    .vg-label-side-switch .vg-label-side-option { flex: 1; min-width: 0; }
    .vg-workflow-tabs { width: 100%; }
    .vg-workflow-tabs #tab-labels,
    .vg-workflow-tabs #tab-tracks { min-height: 44px; padding: 9px 10px !important; }
    #vinyl-preview { margin-top: 0 !important; }
    .vg-shop-ui .vg-label-upload-row {
        grid-template-columns: 48px minmax(0, 1fr) 34px;
        padding: 10px;
    }
    .vg-shop-ui .vg-file-trigger { grid-column: 2; }
    .vg-shop-ui .vg-file-status { display: none; }
}
