﻿/**
 * Verbatim copy of TheUnframer.com's wp-content/themes/TheUnframer/
 * assets/css/upload-configurator.css, at Pete's explicit request
 * ("copy configurator and we'll strip OUT parts") — not yet trimmed.
 * Original header below.
 *
 * Upload Configurator Styles
 * Matches TheUnframer theme design
 */

/* Hide floating site buttons on the upload page — they get in the way of the tool */
.page-template-template-upload #price-quote-trigger,
.page-template-template-upload .site-back-to-top {
    display: none !important;
}

/* Tighten page-top gap — nav is ~150px on desktop with 90px logo */
.page-template-template-upload .wrapper.light-wrapper {
    padding-top: 165px !important;
}

/* CREATE HERE intro line */
.upload-intro-line {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #991e21;
    text-align: center;
    margin: 0;
    padding: 0.3rem 0 0.4rem;
}
@media (max-width: 991px) {
    .page-template-template-upload .wrapper.light-wrapper {
        padding-top: 0 !important;
    }
    .page-template-template-upload .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .page-template-template-upload .upload-configurator {
        padding-top: 10px !important;
    }
    .page-template-template-upload .printed-item-notice {
        padding-top: 0.25rem !important;
        margin-bottom: 0.5rem !important;
    }
}

@media (min-width: 1025px) {
    .page-template-template-upload .wrapper.light-wrapper {
        padding-top: 160px !important;
    }
}

/* ===================================
   Main Layout
   =================================== */

.upload-configurator {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 1rem 2rem;
}

.configurator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .configurator-grid {
        grid-template-columns: 400px 1fr;
        gap: 3rem;
    }

    /* Confirmed items exist but no active photo — compact centered upload */
    .configurator-grid.confirmed-only {
        display: grid !important;
        grid-template-columns: 1fr !important;
        max-width: 800px !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .configurator-grid.confirmed-only .configurator-sidebar {
        width: 100%;
        min-width: 0;
    }

    .configurator-grid.confirmed-only .configurator-main {
        display: none !important;
    }

    .configurator-grid.confirmed-only .upload-options-container {
        grid-template-columns: 1fr 1fr;
    }

    .configurator-grid.confirmed-only .upload-options-container .dropzone {
        min-height: unset;
        padding: 0.6rem 1rem;
    }

    .configurator-grid.confirmed-only .upload-options-container .gallery-choose-section {
        display: flex;
        flex-direction: column;
    }

    .configurator-grid.confirmed-only .upload-options-container .btn-choose-gallery {
        flex: 1;
        min-height: unset;
    }

    .configurator-grid.confirmed-only .upload-options-container .btn-choose-gallery svg {
        width: 28px;
        height: 28px;
    }

    /* Initial state: full-width upload before photos are added */
    .configurator-grid.no-photos {
        grid-template-columns: 1fr;
        max-width: 800px;
        margin: 0 auto;
    }

    .configurator-grid.no-photos .configurator-sidebar {
        width: 100%;
    }

    .configurator-grid.no-photos .configurator-main {
        display: none;
    }

    .configurator-grid.no-photos #configuration-container,
    .configurator-grid.no-photos #quote-module-card,
    .configurator-grid.no-photos #item-info-container {
        display: none;
    }

    .configurator-grid.no-photos .dropzone {
        padding: 1.25rem 1.25rem;
    }

    .configurator-grid.no-photos .dropzone-icon {
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
    }

    .configurator-grid.no-photos .btn-choose-gallery svg {
        width: 48px;
        height: 48px;
    }

    .configurator-grid.no-photos .dropzone-text {
        font-size: 0.95rem;
    }

    .configurator-grid.no-photos .btn-choose-gallery {
        font-size: 1.1rem;
    }
}

/* ── Text-active: collapse config card while any text/balloon/logo tool is on ── */
.configurator-grid.text-active #configuration-container {
    display: none;
}
/* ── Mount-visible mode: hide tab panels until user clicks a tab to enter edit mode ── */
.configurator-grid:not(.text-active) .text-tab-panel {
    display: none !important;
}

#preview-holder {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}


#done-editing-btn-wrap {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0 0.25rem;
}

#done-editing-btn-wrap .editing-action-row {
    display: flex;
    gap: 0.4rem;
}

#done-editing-btn-wrap .editing-action-row #done-editing-btn,
#done-editing-btn-wrap .editing-action-row #upload-another-btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
}

#upload-another-btn {
    background: #f56820;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    letter-spacing: 0.02em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.5rem 1.25rem;
    font-size: 0.82rem;
    transition: background 0.15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
#upload-another-btn:hover {
    background: #991e21;
}
.configurator-grid:not(.no-photos) #done-editing-btn-wrap {
    display: flex !important;
}

#done-editing-btn {
    background: #991e21;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    letter-spacing: 0.02em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.5rem 1.25rem;
    font-size: 0.82rem;
    transition: background 0.15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
#done-editing-btn:hover {
    background: #cc00b0;
}
#preview-expand-btn {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    pointer-events: auto;
    z-index: 10000;
    background: #f56820;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.28);
    transition: background 0.15s, transform 0.12s;
}
#preview-expand-btn:hover {
    background: #991e21;
    transform: scale(1.1);
}

/* ── Confirmed-items holder — full-width basket above the configurator grid ── */
#confirmed-holder {
    width: 100%;
    padding: 0.5rem 0 0.75rem;
    margin-bottom: 0.5rem;
    touch-action: pan-y;
}
#confirmed-holder:empty {
    display: none;
}
.confirmed-holder-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: #991e21;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0.75rem 0 0.4rem;
    padding: 0 0.25rem;
}
.confirmed-card {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #fdf4fc;
    border: 1.5px solid #d1aad0;
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.25rem;
}
.confirmed-card-thumb {
    display: block;
    max-width: 60px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
    background: #e2e8f0;
    align-self: center;
    display: block;
    cursor: zoom-in;
}

.thumb-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox-close-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ff6b00;
    border: 2.5px solid #ff9a40;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    box-shadow: 0 0 0 4px rgba(255,107,0,0.25), 0 4px 14px rgba(0,0,0,0.5);
}
.lightbox-close-btn:active {
    background: #e05500;
    transform: scale(0.93);
}

.thumb-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    display: block;
}
.confirmed-card-thumb-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 4px;
    flex-shrink: 0;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.confirmed-card-info {
    flex: 1;
    min-width: 0;
}
.confirmed-card-name {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #2d3748;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.confirmed-card-details {
    font-family: 'Poppins', sans-serif;
    font-size: 0.68rem;
    color: #718096;
    margin-top: 0.1rem;
    line-height: 1.4;
}
.confirmed-card-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.confirmed-card-edit {
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 5px;
    padding: 0.25rem 0.65rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    border: 1.5px solid #991e21;
    color: #fff;
    background: #991e21;
}
.confirmed-card-edit:hover {
    background: #6a005a;
    border-color: #6a005a;
    color: #fff;
}
.confirmed-card-remove {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border: 1.5px solid #c0392b;
    color: #c0392b;
    background: none;
    padding: 0;
    flex-shrink: 0;
    line-height: 1;
}
.confirmed-card-remove:hover {
    background: #c0392b;
    color: #fff;
}

/* Price column in confirmed-holder cards */
.confirmed-card-price {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 6px;
}
.confirmed-card-price-value {
    color: #991e21;
}

/* Confirmed subtotal row at bottom of confirmed-holder */
.confirmed-holder-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    font-family: 'Poppins', sans-serif;
}
.confirmed-holder-total-label {
    font-size: 0.75rem;
    color: #718096;
}
.confirmed-holder-total-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #991e21;
}

/* Confirmed items section inside sidebar order summary */
.confirmed-sidebar-section {
    margin-top: 0.3rem;
    padding: 0.85rem 0.4rem 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    position: relative;
}
.confirmed-sidebar-title {
    position: absolute;
    top: -0.55em;
    left: 50%;
    transform: translateX(-50%);
    background: #991e21;
    color: #fff;
    padding: 0 0.52rem;
    line-height: 1.25;
    border-radius: 999px;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 0;
}

/* Confirmed items panel — shown in config area when no active photos */
.confirmed-items-panel {
    padding: 0.5rem 0;
}
.confirmed-item-panel-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
    background: #fafafa;
}
.cip-thumb {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
    display: block;
}
.cip-icon {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    background: #f0f0f0;
    border-radius: 5px;
}
.cip-info {
    flex: 1;
    min-width: 0;
}
.cip-name {
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #2d3748;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cip-detail {
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    color: #718096;
    margin-top: 0.15rem;
}
.cip-price {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #991e21;
    margin-top: 0.2rem;
}
.cip-actions {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex-shrink: 0;
}
.cip-edit {
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 5px;
    border: 1.5px solid #991e21;
    color: #fff;
    background: #991e21;
    cursor: pointer;
}
.cip-edit:hover { background: #6a005a; border-color: #6a005a; color: #fff; }
.cip-remove {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    padding: 0.1rem 0.5rem;
    border-radius: 5px;
    border: 1.5px solid #e2e8f0;
    color: #718096;
    background: none;
    cursor: pointer;
    line-height: 1;
}
.cip-remove:hover { background: #c0392b; color: #fff; border-color: #c0392b; }

/* Confirmed-items panel header (shown in main config area) */
.confirmed-items-panel-header {
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #991e21;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1.5px solid #e2c8e0;
}

/* Edit/Remove buttons on active order-items in the sidebar */
.item-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    margin-left: auto;
}
.item-edit-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 5px;
    padding: 0.2rem 0.55rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    border: 1.5px solid #991e21;
    color: #991e21;
    background: none;
}
.item-edit-btn:hover { background: #991e21; color: #fff; }
.item-remove-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border: 1.5px solid #c0392b;
    color: #c0392b;
    background: none;
    padding: 0;
    flex-shrink: 0;
    line-height: 1;
}
.item-remove-btn:hover { background: #c0392b; color: #fff; }

/* Confirmed checkmark on thumbnail */
.thumbnail.confirmed {
    outline: 2px solid #27ae60;
    outline-offset: 1px;
}
.thumbnail.confirmed::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: #27ae60;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.configurator-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.configurator-main {
    position: sticky;
    top: 180px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* ===================================
   Photo Upload Component
   =================================== */

.photo-upload-wrapper {
    margin-bottom: 0.75rem;
}

.photo-upload-label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3d4348;
    margin-bottom: 0.5rem;
}

.photo-upload-label:empty {
    margin-bottom: 0;
}

.dropzone {
    position: relative;
    border: 2px solid #7a181b;
    border-radius: 8px;
    background: linear-gradient(rgba(142,0,121,0.72), rgba(80,0,68,0.82)), url('../images/paisley-bg.jpg') center/cover no-repeat;
    box-shadow: 0 5px 14px rgba(0,0,0,0.38), inset 0 1px 2px rgba(255,255,255,0.16), inset 0 -2px 4px rgba(0,0,0,0.22);
    padding: 0.7rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dropzone .dropzone-text,
.dropzone .dropzone-link,
.dropzone .dropzone-hint,
.dropzone .dropzone-hint-bold,
.dropzone .dropzone-icon {
    color: #ffffff;
}

.dropzone:hover {
    border-color: #c05010;
    background: linear-gradient(rgba(255,100,0,0.55), rgba(230,75,0,0.63)), url('../images/paisley-bg.jpg') center/280px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.42), inset 0 1px 2px rgba(255,255,255,0.16), inset 0 -2px 4px rgba(0,0,0,0.22);
}

.dropzone:hover .dropzone-text,
.dropzone:hover .dropzone-link,
.dropzone:hover .dropzone-hint,
.dropzone:hover .dropzone-hint-bold,
.dropzone:hover .dropzone-icon {
    color: #ffffff;
}

.dropzone.dragover {
    border-color: #c05010;
    background: linear-gradient(rgba(255,100,0,0.68), rgba(230,75,0,0.76)), url('../images/paisley-bg.jpg') center/280px;
    transform: scale(1.01);
}

.dropzone-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.dropzone-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
}

.dropzone-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    color: #991e21;
}

.dropzone-body {
    flex: 1;
}

.dropzone-text {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    color: #991e21;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
}

.dropzone-link {
    color: #991e21;
    font-weight: 800;
    text-decoration: none;
}

.dropzone-hint {
    font-size: 0.62rem;
    color: #991e21;
    margin: 0;
    margin-top: 0.1rem;
}

.dropzone-hint-bold {
    font-size: 0.8rem;
    font-weight: 800;
    color: #991e21;
    white-space: nowrap;
}

.dropzone-smiley {
    width: 90px;
    height: 90px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.dropzone-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #4a5568;
}

.loading-text {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    animation: pulse 1.5s ease-in-out infinite;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #f56820;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.upload-progress-bar {
    width: 100%;
    max-width: 300px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f56820 0%, #e85818 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.upload-progress-text {
    font-size: 0.875rem;
    color: #4a5568;
    font-weight: 500;
}

.dropzone-error,
.upload-error-message {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 4px;
    color: #c53030;
    font-size: 0.875rem;
    text-align: left;
}

.dropzone-error .error-text,
.upload-error-message .error-text {
    display: block;
    white-space: pre-line;
}

.dropzone-error .btn-back-to-upload,
.upload-error-message .btn-back-to-upload {
    display: inline-block;
    margin-top: 0.6rem;
    padding: 0.4rem 0.9rem;
    background-color: #c53030;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.dropzone-error .btn-back-to-upload:hover,
.upload-error-message .btn-back-to-upload:hover {
    background-color: #9b2c2c;
}

.gallery-protected {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
}

.gallery-thumbs-preview {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.gallery-thumb-preview {
    width: 56px;
    height: 56px;
    padding: 0;
    will-change: opacity;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.6s ease;
}

.gallery-thumb-preview:hover {
    transform: translateY(-1px);
    border-color: #3d4348;
}

.gallery-thumb-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pdf-note {
    margin: 0 0 1rem 0;
    padding: 0.6rem 0.85rem;
    background-color: #fff2ec;
    border-left: 3px solid #f56820;
    color: #3d4348;
    font-size: 0.9rem;
    border-radius: 4px;
}

.pdf-size-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.pdf-size-input-group {
    display: flex;
    flex-direction: column;
}

.config-sublabel {
    font-size: 0.8rem;
    color: #4a5568;
    margin: 0 0 0.25rem 0;
    font-weight: 500;
}

/* ===================================
   Printed Item Notice
   =================================== */

.printed-item-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.printed-item-notice .notice-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    background: linear-gradient(to bottom, #f8d0f0 0%, #d060c0 10%, #991e21 35%, #3a0030 60%, #7a0068 80%, #5a004c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-decoration-color: #991e21;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.25));
    transition: filter 0.2s ease;
}

.printed-item-notice .notice-links {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    color: #718096;
}

.printed-item-notice a {
    color: #991e21;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.printed-item-notice a:not(.notice-text):hover {
    color: #f56820;
}

.printed-item-notice .notice-text:hover {
    background: linear-gradient(to bottom, #ffb080 0%, #ff8040 15%, #f56820 40%, #a03000 65%, #d05010 82%, #c04010 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-decoration-color: #f56820;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.printed-item-notice .btn-order-form {
    display: inline-block;
    padding: 0.45rem 0.95rem;
    margin: 0.25rem 0;
    background-color: #3d4348;
    color: #fff !important;
    border: 1px solid #3d4348;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.85rem;
}

.printed-item-notice .btn-order-form:hover {
    background-color: #f56820;
    color: #3d4348 !important;
    border-color: #f56820;
}

/* ===================================
   Agreements Confirmed (reminder, not an ask)
   Both the rights and community-standards agreements are captured once, by
   the upload-time popup. This block is a read-only reminder of what was
   already agreed to -- styled to match the share/tips opt-in box right
   below it, not as a separate stark legal callout.
   =================================== */

.agreements-confirmed {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #fdf4ff;
    border: 1px solid #e9b8e0;
    border-radius: 8px;
}

.agreement-confirmed-line {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #5c0050;
    line-height: 1.5;
}

.agreement-confirmed-line + .agreement-confirmed-line {
    margin-top: 0.6rem;
}

.agreement-check {
    flex: none;
    color: #991e21;
    font-weight: 700;
}

.agreement-confirmed-line a {
    color: #991e21;
    font-weight: 700;
    text-decoration: underline;
}

/* ===================================
   Share / Tips opt-in checkboxes
   =================================== */

.image-share-optin {
    padding: 1rem;
    background-color: #fdf4ff;
    border: 1px solid #e9b8e0;
    border-radius: 8px;
}

.image-share-label,
.image-tips-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.image-tips-label {
    margin-top: 0.6rem;
}

.image-tips-label.is-disabled {
    opacity: 0.5;
}

.image-share-checkbox,
.image-tips-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #991e21;
}

.image-share-checkbox:disabled,
.image-tips-checkbox:disabled {
    cursor: not-allowed;
}

.image-share-text,
.image-tips-text {
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #5c0050;
    line-height: 1.5;
}

.image-tips-helper {
    margin: 0.5rem 0 0 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: #991e21;
    line-height: 1.4;
}

.image-tips-helper[hidden] {
    display: none;
}

/* Disabled dropzone state */
.dropzone.dropzone-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: #cbd5e0;
    background-color: #f1f5f9;
}

.dropzone.dropzone-disabled:hover {
    border-color: #cbd5e0;
    background-color: #f1f5f9;
}

.dropzone.dropzone-disabled .dropzone-text {
    color: #94a3b8;
}

.dropzone.dropzone-disabled .dropzone-link {
    color: #94a3b8;
    pointer-events: none;
}

.image-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.image-name {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 1rem;
}

.btn-replace {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: 1px solid #f56820;
    border-radius: 4px;
    color: #f56820;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-replace:hover {
    background-color: #f56820;
    color: #fff;
}

.btn-replace-icon {
    width: 16px;
    height: 16px;
}

/* ===================================
   Configuration Panel
   =================================== */

.configuration-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.configuration-panel.hidden {
    display: none;
}

.config-section {
    padding-top: 0.35rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #e2e8f0;
}

.config-section:first-of-type {
    padding-top: 0;
}

.config-section:last-of-type {
    border-bottom: none;
}

.add-text-label-btn {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: linear-gradient(135deg, #991e21 0%, #7a181b 100%);
    color: #fff;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 2px 7px rgba(142, 0, 121, 0.32);
    transition: filter 0.15s, box-shadow 0.15s;
    vertical-align: middle;
}
.add-text-label-btn:hover {
    filter: brightness(1.12);
    box-shadow: 0 3px 12px rgba(142, 0, 121, 0.48);
}

.config-label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #991e21;
    margin-bottom: 0.25rem;
}

.config-select {
    width: 100%;
    height: auto;
    min-height: 50px;
    padding: 0.875rem 3rem 0.875rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #2d3748;
    background-color: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

/* Custom size dropdown — always opens downward via fixed portal */
.custom-size-btn {
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.size-dropdown-portal {
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    max-height: 220px;
    overflow-y: auto;
}

.size-dropdown-option {
    padding: 0.65rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #2d3748;
    cursor: pointer;
    transition: background 0.1s;
}

.size-dropdown-option:hover {
    background: #f7fafc;
}

.size-dropdown-option.selected {
    background: #ebf8ff;
    font-weight: 600;
    color: #2b6cb0;
}

.config-select option {
    padding: 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
}

.config-select:hover {
    border-color: #a0aec0;
}

.config-select:focus {
    outline: none;
    border-color: #f56820;
    box-shadow: 0 0 0 3px rgba(245, 104, 32, 0.1);
}

/* Pickup location tiles */
.pickup-location-tiles {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.pickup-location-tile {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    background: #fff;
}

.pickup-location-tile:hover {
    border-color: #c4a0bf;
    background: #fdf5fc;
}

.pickup-location-tile.is-selected {
    border-color: #991e21;
    background: #f3e5f0;
}

.pickup-tile-name {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3d4348;
}

.pickup-location-tile.is-selected .pickup-tile-name {
    color: #991e21;
}

.pickup-tile-detail {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: #991e21;
    margin-top: 0.1rem;
}

.pickup-tile-address {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    color: #718096;
    margin-top: 0.15rem;
}

.config-description {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #718096;
    line-height: 1.4;
}

/* Custom Size Inputs */
.custom-size-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.size-input-group {
    display: flex;
    flex-direction: column;
}

.size-input-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0.5rem;
}

.size-input {
    padding: 0.65rem 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #2d3748;
    background-color: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.size-input:hover {
    border-color: #a0aec0;
}

.size-input:focus {
    outline: none;
    border-color: #f56820;
    box-shadow: 0 0 0 3px rgba(245, 104, 32, 0.1);
}

/* Mount Style Selector */
.style-options {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.style-option {
    display: block;
    padding: 0.28rem 0.75rem;
    background-color: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.style-option:hover {
    border-color: #cbd5e0;
    background-color: #fff;
}

.style-option.active {
    border-color: #f56820;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(245, 104, 32, 0.1);
}

.style-option-inner {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.style-option-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.style-option-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    color: #991e21;
    font-weight: 700;
}

.style-option-desc {
    font-family: 'Poppins', sans-serif;
    font-size: 0.62rem;
    color: #991e21;
    font-weight: 400;
    line-height: 1.25;
    opacity: 0.7;
}

.style-option.active .style-option-desc {
    opacity: 1;
}

.style-option .rotator-preview-btn {
    width: 26px;
    min-height: 26px;
    padding: 0;
    background-color: transparent;
    border: 1.5px solid #4a5568;
    border-radius: 4px;
    color: #1a202c;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.style-option .rotator-preview-btn:hover {
    background-color: #f56820;
    border-color: #f56820;
    color: #fff;
}

.style-option .rotator-preview-btn svg {
    width: 15px;
    height: 15px;
}

/* ─── Mount Style Drum ──────────────────────────────── */
.style-drum-section {
    padding: 0 !important;
    margin-bottom: 0.35rem;
}

.style-drum-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #991e21;
    border-radius: 6px 6px 0 0;
    padding: 5px 12px;
    gap: 10px;
}

.drum-title-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 0;
}

.drum-label {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #f56820;
    text-align: center;
    white-space: nowrap;
}

.drum-arr-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.drum-arr-btn:hover  { opacity: 1; border: 1.5px solid #000 !important; border-radius: 4px; }
.drum-arr-btn:active { opacity: 1; transform: scale(0.88); }

.style-drum-row {
    display: flex;
    align-items: center;
    position: relative;
}

.style-drum-window {
    flex: 1;
    min-width: 0;
    height: 92px;
    overflow: hidden;
    position: relative;
    border-radius: 0 0 6px 6px;
    border: 1.5px solid #e2e8f0;
    border-top: none;
    background: #f0f2f5;
    cursor: pointer;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.18), inset 0 -10px 20px rgba(0,0,0,0.18);
    perspective: 600px;
}

.style-drum-window:active { cursor: grabbing; }

.style-drum-window::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 72px;
    border-top: 2px solid rgba(245,104,32,0.5);
    border-bottom: 2px solid rgba(245,104,32,0.5);
    background: rgba(245,104,32,0.03);
    z-index: 1;
    pointer-events: none;
    border-radius: 3px;
}

.style-drum {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1.0);
}

.style-drum-face {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    margin-top: -36px;
    height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6px 16px 6px 28px;
    background: #f56820;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    line-height: 1;
    overflow: hidden;
    backface-visibility: hidden;
}

.style-drum-face .face-name {
    font-family: 'Poppins', sans-serif !important;
    font-size: 1.25rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.1 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 !important;
    margin: 0 !important;
}

.style-drum-face .face-desc {
    display: block !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.58rem !important;
    font-weight: 600;
    color: #fff;
    line-height: 1.1 !important;
    margin-top: 7px !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* External 2D rotator button — lives beside the drum, not on a face */
.style-rotator-btn {
    /* Overlaid on top of the (now full-width) drum window instead of taking
       its own column beside it — the drum rolls behind it, porthole-style.
       top/right chosen to match where it sat as the last flex sibling before. */
    position: absolute !important;
    top: 50% !important;
    right: 8px !important;
    transform: translateY(-50%) !important;
    z-index: 2;
    flex-shrink: 0 !important;
    width: 56px !important;
    height: 56px !important;
    min-height: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    border: 1.5px solid #991e21 !important;
    border-radius: 6px !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    opacity: 1;
    transition: opacity 0.55s ease, background 0.15s, border-color 0.15s;
}
.style-rotator-btn:hover {
    background: #f56820 !important;
    border-color: #f56820 !important;
}
.style-rotator-btn svg {
    width: 34px !important;
    height: 34px !important;
    display: block !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
    transform-origin: center 50%;
    animation: eye-blink 3.5s ease-in-out infinite;
}

@keyframes eye-blink {
    0%,  86%, 100% { transform: scaleY(1); }
    91%             { transform: scaleY(0.06); }
}

@keyframes eye-btn-pop {
    0%   { opacity: 0; box-shadow: inset 0 0 0px  0px rgba(245,104,32,0);    border-color: #991e21; }
    45%  { opacity: 1; box-shadow: inset 0 0 7px 3px rgba(245,104,32,0.8); border-color: #f56820; }
    100% { opacity: 1; box-shadow: inset 0 0 0px  0px rgba(245,104,32,0);    border-color: #991e21; }
}
.style-rotator-btn.eye-pop {
    animation: eye-btn-pop 0.85s ease-out forwards;
}

.drum-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    padding: 8px 0 6px;
    background: #fff;
}

.drum-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e2e8f0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.drum-dot.active {
    background: #f56820;
    transform: scale(1.35);
}
/* Finish Selector */
.finish-section {
    /* No animation - prevents visual jump on re-render */
}

.finish-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.finish-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.finish-option:hover {
    border-color: #f56820;
    background-color: #fff;
}

.finish-option.active {
    border-color: #f56820;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(245, 104, 32, 0.1);
}

.finish-checkbox {
    width: 24px;
    height: 24px;
    min-width: 24px;
    cursor: pointer;
    accent-color: #f56820;
    flex-shrink: 0;
}

.finish-color {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.finish-thumbnail-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.finish-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #2d3748;
    font-weight: 500;
    flex: 1;
}

.finish-preview-hint {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    color: #a0aec0;
    font-style: italic;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.finish-option:hover .finish-preview-hint {
    opacity: 1;
}

/* Print Option */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.config-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #f56820;
}

.checkbox-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #2d3748;
    cursor: pointer;
    margin: 0;
}

/* Order Type Radio Options */
.order-type-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.order-type-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #991e21 !important;
    font-weight: 600;
    margin: 0;
}
.order-type-option span {
    color: #991e21 !important;
}

.order-type-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #f56820;
}

.crop-option {
    gap: 0.4rem;
    color: #991e21;
    font-weight: 600;
    border: 1.5px solid #d1aad0;
    border-radius: 6px;
    padding: 0.25rem 0.6rem 0.25rem 0.45rem;
    background: #fdf4fc;
    transition: background 0.12s, border-color 0.12s;
}
.crop-option input[type="checkbox"] {
    display: none;
}
.crop-option .crop-scissors {
    color: #991e21;
    flex-shrink: 0;
    transition: color 0.12s;
}
.crop-option--active,
.crop-option--active span,
.crop-option--active .crop-scissors {
    background: #991e21;
    border-color: #991e21;
    color: #fff !important;
}

#crop-reset-btn.crop-option {
    font-size: 0.82rem;
    letter-spacing: 0;
    text-transform: none;
}

.config-hint {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: #2d3748;
    line-height: 1.4;
    font-weight: 600;
}

.config-hint.pickup-other-hint {
    color: #b45309;
    background-color: #fef3c7;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
    margin-top: 0.75rem;
}

/* Price Display */
.price-section {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f56820 0%, #d04f10 100%);
    border-radius: 8px;
    text-align: center;
}

.price-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    margin-bottom: 0.5rem;
}

.price-value {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.price-value.invalid {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.price-message {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.price-message.error {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

/* "Ordered at X — priced as Y" note in the item price block (custom sizes) */
.price-billed-as {
    margin-top: 0.4rem;
    font-size: 0.72rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.82);
}

/* Manual Quote Notice */
.manual-quote-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.manual-quote-notice .notice-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.manual-quote-notice .notice-icon svg {
    width: 48px;
    height: 48px;
    color: #f59e0b;
}

.manual-quote-notice h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 0.5rem 0;
}

.manual-quote-notice p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: #78350f;
    margin: 0;
    line-height: 1.5;
}

/* Gallery Order Notice (for gallery images - manual order mode) */
.gallery-order-notice {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border: 2px solid #38bdf8;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.gallery-order-notice .notice-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.gallery-order-notice .notice-icon svg {
    width: 48px;
    height: 48px;
    color: #0284c7;
}

.gallery-order-notice h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #075985;
    margin: 0 0 0.5rem 0;
}

.gallery-order-notice p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: #0c4a6e;
    margin: 0;
    line-height: 1.5;
}

/* Manual Order Tag (for gallery items in order summary) */
.manual-order-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0284c7;
    background-color: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: 3px;
}

/* Form Inputs */
.config-input,
.config-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: #2d3748;
    background-color: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.config-input:hover,
.config-textarea:hover {
    border-color: #a0aec0;
}

.config-input:focus,
.config-textarea:focus {
    outline: none;
    border-color: #f56820;
    box-shadow: 0 0 0 3px rgba(245, 104, 32, 0.1);
}

.config-textarea {
    resize: vertical;
    min-height: 100px;
}

.quote-textarea {
    width: 100%;
    height: 2.1rem;
    min-height: 0;
    padding: 0.25rem 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    line-height: 1.4;
    border: 1.5px solid #cbd5e0;
    border-radius: 6px;
    resize: vertical;
    box-sizing: border-box;
}
.quote-textarea:focus {
    outline: none;
    border-color: #991e21;
    box-shadow: 0 0 0 3px rgba(142, 0, 121, 0.1);
}

/* Checkout Button */
.btn-checkout {
    width: 100%;
    padding: 0.85rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: #991e21;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(142, 0, 121, 0.35);
}

.btn-checkout:hover:not(:disabled) {
    background: #750064;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(142, 0, 121, 0.45);
}

.btn-checkout:active:not(:disabled) {
    transform: translateY(0);
}

.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===================================
   Preview
   =================================== */

#preview-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

#item-info-container {
    width: 100%;
}

/* ── Crop Tool ─────────────────────────────────────────────────────────── */
#crop-tool-overlay {
    position: absolute;
    inset: 0;
    z-index: 200;
    overflow: visible;
    cursor: crosshair;
    user-select: none;
}

#crop-box {
    position: absolute;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.52);
    border: 1.5px solid rgba(255,255,255,0.9);
    box-sizing: border-box;
    cursor: move;
}

/* Rule-of-thirds grid — pointer-events off so they never intercept drag */
.crop-grid { position: absolute; inset: 0; pointer-events: none; }
.crop-grid-line { position: absolute; background: rgba(255,255,255,0.25); pointer-events: none; }
.crop-grid-v1 { left: 33.33%; top: 0; bottom: 0; width: 1px; }
.crop-grid-v2 { left: 66.66%; top: 0; bottom: 0; width: 1px; }
.crop-grid-h1 { top: 33.33%; left: 0; right: 0; height: 1px; }
.crop-grid-h2 { top: 66.66%; left: 0; right: 0; height: 1px; }

/* Drag handles — larger hit area */
.crop-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid rgba(0,0,0,0.4);
    border-radius: 3px;
    box-sizing: border-box;
    z-index: 202;
}
.crop-handle-nw { top: -10px;  left: -10px;  cursor: nw-resize; }
.crop-handle-n  { top: -10px;  left: calc(50% - 10px); cursor: n-resize; }
.crop-handle-ne { top: -10px;  right: -10px; cursor: ne-resize; }
.crop-handle-e  { top: calc(50% - 10px); right: -10px; cursor: e-resize; }
.crop-handle-se { bottom: -10px; right: -10px; cursor: se-resize; }
.crop-handle-s  { bottom: -10px; left: calc(50% - 10px); cursor: s-resize; }
.crop-handle-sw { bottom: -10px; left: -10px;  cursor: sw-resize; }
.crop-handle-w  { top: calc(50% - 10px); left: -10px; cursor: w-resize; }

/* Action strip — normal document flow directly under the image, never
   floats on top of the photo, so it can't land off in blank space when the
   photo's aspect ratio doesn't fill #preview-container. */
#crop-actions {
    display: flex;
    gap: 0.5rem;
    width: 50%;
    margin: 0.6rem auto 0;
    box-sizing: border-box;
}
#crop-cancel-btn,
#crop-apply-btn {
    flex: 1;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1.5px solid;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.12s, color 0.12s;
}
#crop-cancel-btn {
    background: #fff;
    color: #444;
    border-color: #bbb;
}
#crop-cancel-btn:hover { background: #f5f5f5; }
#crop-apply-btn {
    background: #991e21;
    color: #fff;
    border-color: #991e21;
}
#crop-apply-btn:hover { background: #6d005d; }
#crop-apply-btn:disabled { opacity: 0.6; cursor: wait; }

/* Placeholder State */
.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.preview-placeholder-icon {
    width: 64px;
    height: 64px;
    color: #9ca3af;
}

.preview-placeholder-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #9ca3af;
    margin: 0;
}

/* Image Preview */
.preview-image-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Tight wrapper around the actual image — overlay is injected here so it's exactly image-sized */
.preview-image-wrapper {
    position: relative;
    display: block;
    line-height: 0;
    flex-shrink: 0;
    max-width: 100%;
}

.harry-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 72px;
    height: auto;
    opacity: 0.85;
    filter: invert(1);
    animation: harry-spin 1.3s linear infinite;
    pointer-events: none;
}
@keyframes harry-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}
/* Harry as a flex-child spinner — used wherever a spinner sits inside a centered flex column */
.harry-spinner {
    display: block;
    width: 64px;
    height: auto;
    opacity: 0.85;
    filter: invert(1);
    animation: harry-spin-inline 1.3s linear infinite;
    pointer-events: none;
}
.harry-spinner--sm {
    width: 28px;
}
@keyframes harry-spin-inline {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
/* RAW/DNG unreliable-preview placeholder — Harry keeps spinning while the
   customer configures mount style/size, since there's nothing real to show */
.preview-raw-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 3rem 1.5rem;
    text-align: center;
    min-height: 280px;
    border-radius: 8px;
    background: linear-gradient(rgba(255,100,0,0.55), rgba(230,75,0,0.63)), url('../images/paisley-bg.jpg') center/280px;
}
.preview-raw-placeholder .harry-raw-spinner {
    width: 80px;
    height: auto;
    opacity: 0.9;
    filter: invert(1);
    animation: harry-spin-inline 2s linear infinite;
    margin-bottom: 0.25rem;
}
.preview-raw-placeholder .raw-placeholder-title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.preview-raw-placeholder .raw-placeholder-sorry {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}
.preview-raw-placeholder .raw-placeholder-caveat {
    margin: 0;
    max-width: 320px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-style: italic;
    color: #fff;
    line-height: 1.4;
}
.preview-raw-placeholder .raw-placeholder-action {
    margin: 0.4rem 0 0;
    max-width: 320px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #fff;
    line-height: 1.4;
}
/* CSS-only Harry override — restyle legacy .spinner divs to use harry-logo instead of a border circle */
.dropzone-loading .spinner,
.checkout-loading .spinner,
.rotator-modal-content .product-360-loading .spinner {
    border: none !important;
    border-radius: 0 !important;
    background: url('../images/harry-logo.png') center / contain no-repeat;
    filter: invert(1);
    animation: harry-spin-inline 1.3s linear infinite !important;
    width: 64px !important;
    height: 64px !important;
}
.gallery-modal-sentinel-spinner .spinner {
    border: none !important;
    border-radius: 0 !important;
    background: url('../images/harry-logo.png') center / contain no-repeat;
    filter: invert(1);
    animation: harry-spin-inline 1.3s linear infinite !important;
    width: 28px !important;
    height: 28px !important;
}

.preview-image {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 340px);
}

/* File Preview (for PDF/TIFF) */
.preview-file-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.file-icon {
    width: 64px;
    height: 64px;
    color: #718096;
    flex-shrink: 0;
}

.file-notice-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.file-notice-name {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: #4a5568;
    margin: 0;
    word-break: break-word;
    max-width: 100%;
}

.file-notice-hint {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

/* Float Style */
.style-float .preview-image,
/* UnFramed Plus 1.25" */
.style-unframed-plus-125 .preview-image,
/* UnFramed Plus 2.0" */
.style-unframed-plus-200 .preview-image,
/* Plaque Style */
.style-plaque .preview-image {
    max-width: 100%;
    margin: 0;
}

/* ===================================
   Responsive Adjustments
   =================================== */

@media (max-width: 991px) {
    /* On mobile, show upload at top, then preview, then configuration */
    .upload-configurator,
    .configurator-grid {
        touch-action: pan-y;
    }
    .configurator-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    /* Explicit touch-action on interactive elements — ancestor inheritance is
       not guaranteed across all mobile browsers for clickable elements. */
    .btn-choose-gallery,
    .dropzone,
    #photo-upload-container,
    .upload-options-container {
        touch-action: pan-y;
    }

    /* Unwrap sidebar so its children participate directly in the grid's flex column,
       allowing preview to be ordered above the "This Item" price box. */
    .configurator-sidebar {
        display: contents;
    }

    #photo-upload-container {
        order: 1;
        width: 100%;
        max-width: 100%;
    }

    #quote-module-card {
        order: 2;
        width: 100%;
    }

    .configurator-main {
        order: 3;
        position: static;
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 1rem;
    }

    #item-info-container {
        order: 4;
        width: 100%;
    }

    #configuration-container {
        order: 5;
        width: 100%;
    }

    #preview-container {
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
        height: auto;
        min-height: unset;
        max-height: unset;
        overflow: visible;
        padding: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }


    .preview-image-container {
        width: auto;
        max-width: 100%;
        height: auto;
        display: flex;
    }

    .preview-image {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 50vh;
        display: block;
    }

    .style-float .preview-image,
    .style-unframed-plus-125 .preview-image,
    .style-unframed-plus-200 .preview-image,
    .style-plaque .preview-image {
        max-width: 100%;
        max-height: 50vh;
        margin: 0;
    }

    .configurator-main.hidden {
        display: none;
    }

    #configuration-container {
        order: 0;
        width: 100%;
        max-width: 100%;
    }

    /* Ensure image preview doesn't expand beyond filename */
    .image-preview {
        max-width: 100%;
        overflow: hidden;
    }

    .image-name {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .price-value {
        font-size: 2rem;
    }

    /* Mobile: hide config and preview when no photos */
    .configurator-grid.no-photos .configurator-main {
        display: none;
    }

    .configurator-grid.no-photos #configuration-container,
    .configurator-grid.no-photos #quote-module-card,
    .configurator-grid.no-photos #item-info-container {
        display: none;
    }
}

@media (max-width: 576px) {
    .upload-configurator {
        padding: 0 0.5rem 1.5rem;
    }

    .dropzone {
        padding: 1.5rem 1rem;
    }

    .dropzone-icon {
        width: 36px;
        height: 36px;
    }

    .dropzone-hint-bold {
        font-size: 0.62rem;
    }

    .price-value {
        font-size: 1.75rem;
    }

    .finish-options {
        gap: 0.5rem;
    }

    .finish-option {
        padding: 0.65rem 0.85rem;
    }

    .finish-color {
        width: 28px;
        height: 28px;
    }

    .finish-label {
        font-size: 0.85rem;
    }
}

/* ===================================
   Stripe Checkout Modal
   =================================== */

#stripe-checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.checkout-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.checkout-modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.checkout-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f7fafc;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-modal-close:hover {
    background-color: #e2e8f0;
    transform: scale(1.1);
}

#checkout-container {
    padding: 2rem;
    min-height: 400px;
}

.checkout-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1rem;
}

.checkout-loading .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #f56820;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.checkout-loading p {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #fff;
    margin: 0;
}

@media (max-width: 768px) {
    .checkout-modal-overlay {
        padding: 1rem;
    }

    .checkout-modal-content {
        max-height: 95vh;
    }

    #checkout-container {
        padding: 1.5rem;
    }

    .checkout-loading {
        min-height: 300px;
    }

    .checkout-loading .spinner {
        width: 40px;
        height: 40px;
    }
}

/* ===================================
   Utility Classes
   =================================== */

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Photo Thumbnails Strip
   =================================== */

.photo-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    background-color: #f7fafc;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Desktop: 5 items per row grid layout */
@media (min-width: 992px) {
    .photo-thumbnails {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 0.75rem;
    }
}

/* Mobile: horizontal scroll */
@media (max-width: 991px) {
    .photo-thumbnails {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* Firefox */
        scrollbar-color: #991e21 rgba(142, 0, 121, 0.12);
        scrollbar-width: auto;
        padding-bottom: 6px; /* breathing room for the scrollbar */
    }
}

.photo-thumbnails::-webkit-scrollbar {
    height: 10px;
}

.photo-thumbnails::-webkit-scrollbar-track {
    background: rgba(142, 0, 121, 0.12);
    border-radius: 5px;
}

.photo-thumbnails::-webkit-scrollbar-thumb {
    background: #991e21;
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.photo-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #7a181b;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.thumbnail {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background-color: #e2e8f0;
}

/* Desktop grid: thumbnails fill the grid cell */
@media (min-width: 992px) {
    .thumbnail {
        width: 100%;
        height: 0;
        padding-bottom: 100%; /* Square aspect ratio */
    }

    .thumbnail img {
        position: absolute;
        top: 0;
        left: 0;
    }

    .thumbnail-file-icon {
        position: absolute;
        top: 0;
        left: 0;
    }

    .thumbnail-remove {
        z-index: 10;
    }
}

.thumbnail:hover {
    border-color: #cbd5e0;
}

.thumbnail.active {
    border-color: #f56820;
    box-shadow: 0 0 0 3px rgba(245, 104, 32, 0.3);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-file-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e2e8f0;
}

.thumbnail-file-icon svg {
    width: 32px;
    height: 32px;
    color: #718096;
}

.thumbnail-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.thumbnail-remove svg {
    width: 12px;
    height: 12px;
}

.thumbnail:hover .thumbnail-remove {
    opacity: 1;
}

.thumbnail-remove:hover {
    background: rgba(220, 38, 38, 0.9);
}

.thumbnail-add {
    width: 70px;
    height: 70px;
    border: 2px dashed #cbd5e0;
    border-radius: 6px;
    background: transparent;
    color: #a0aec0;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

/* Desktop grid: add button fills the grid cell */
@media (min-width: 992px) {
    .thumbnail-add {
        width: 100%;
        height: 0;
        padding-bottom: 100%; /* Square aspect ratio */
        position: relative;
    }

    .thumbnail-add svg {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

.thumbnail-add svg {
    width: 24px;
    height: 24px;
}

.thumbnail-add:hover {
    border-color: #f56820;
    color: #f56820;
    background-color: rgba(245, 104, 32, 0.05);
}

/* ===================================
   Order Summary
   =================================== */

.order-summary {
    margin-top: 0.3rem;
    padding: 0.85rem 0.4rem 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    position: relative;
}

.order-summary-title {
    position: absolute;
    top: -0.55em;
    left: 50%;
    transform: translateX(-50%);
    background: #991e21;
    color: #fff;
    padding: 0 0.52rem;
    line-height: 1.25;
    border-radius: 999px;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 0;
}

.order-items {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.4rem;
    background-color: #f7fafc;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.order-item.active {
    background-color: #fff;
    border-color: #f56820;
    box-shadow: 0 0 0 3px rgba(245, 104, 32, 0.1);
}

.order-item .item-thumbnail {
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #e2e8f0;
    align-self: center;
}

.order-item .item-thumbnail img {
    display: block;
    max-width: 60px;
    max-height: 60px;
    width: auto;
    height: auto;
}

.order-item .item-thumbnail .thumbnail-file-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-item .item-thumbnail .thumbnail-file-icon svg {
    width: 24px;
    height: 24px;
    color: #718096;
}

.order-item .item-details {
    flex: 1;
    min-width: 0;
}

.order-item .item-name {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-item .item-config {
    display: block;
    font-size: 0.75rem;
    color: #718096;
    margin-top: 2px;
}

.order-item .item-config.item-not-configured {
    display: inline-block;
    margin-top: 5px;
    padding: 3px 10px;
    background: #991e21;
    color: #fff;
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.03em;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(142,0,121,0.35);
    min-height: 0 !important;
    line-height: 1.3;
}

.order-item .item-price {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #27ae60;
    flex-shrink: 0;
}

.order-item .item-price .quote-needed {
    font-size: 0.8rem;
    color: #f59e0b;
    font-weight: 500;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: linear-gradient(135deg, #f56820 0%, #d04f10 100%);
    border-radius: 8px;
}

.order-total .total-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.order-total .total-price {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

/* Pricing Disclaimer */
.pricing-disclaimer {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: #000;
    font-weight: 700;
    text-align: center;
    margin: 0.4rem 0 0 0;
    padding: 0.5rem;
    background-color: #f7fafc;
    border-radius: 6px;
    line-height: 1.6;
}

.pricing-disclaimer.checkout-disclaimer {
    margin-bottom: 1.5rem;
    background-color: #f7fafc;
    border: none;
    color: #000;
}

/* ===================================
   Customer Form
   =================================== */

.customer-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.customer-form-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #3d4348;
    margin: 0 0 1rem 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row-three {
    grid-template-columns: 1fr auto auto;
}

.shipping-fields {
    margin-bottom: 0.75rem;
    padding: 1rem;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.shipping-fields-label {
    font-weight: 600;
    margin-bottom: 0.75rem !important;
}

.shipping-fields .config-hint {
    font-weight: 400;
    font-size: 0.85rem;
    color: #718096;
}

.shipping-fields .form-group {
    margin-bottom: 0.5rem;
}

.config-textarea-compact {
    min-height: 2.25rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.9rem;
    line-height: 1.3;
    resize: vertical;
}

.pickup-or-ship-hint {
    margin: 0.5rem 0 1rem;
    padding: 0.6rem 0.85rem;
    background-color: #fff2ec;
    border-left: 3px solid #f56820;
    color: #3d4348;
    font-size: 0.9rem;
    border-radius: 4px;
}

/* Delivery Method Toggle (Pick Up vs Ship to Me) */
.delivery-method-section {
    margin: 1rem 0 1.25rem;
}

.delivery-method-label {
    margin-bottom: 0.6rem !important;
    font-weight: 600;
}

.delivery-method-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.delivery-method-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background-color: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    margin: 0;
}

.delivery-method-option:hover {
    border-color: #f56820;
}

.delivery-method-option.is-selected {
    border-color: #f56820;
    background-color: #fff2ec;
    box-shadow: 0 0 0 3px rgba(245, 104, 32, 0.15);
}

.delivery-method-option input[type="radio"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #f56820;
    flex-shrink: 0;
}

.delivery-method-option-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    line-height: 1.3;
}

.delivery-method-option-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #3d4348;
}

.delivery-method-option-desc {
    font-size: 0.85rem;
    color: #718096;
}

.delivery-method-fields {
    margin-bottom: 0.75rem;
}

.delivery-method-fields-pickup {
    padding: 1rem;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

@media (max-width: 540px) {
    .delivery-method-options {
        grid-template-columns: 1fr;
    }
}

.found-via-group {
    margin-top: 0.75rem;
}

.found-via-options {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.3rem 0.65rem;
    margin-top: 0.25rem;
    overflow-x: auto;
}

.found-via-option {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: #3d4348;
    cursor: pointer;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.found-via-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

#customer-state {
    width: 80px;
}

#customer-zip {
    width: 110px;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row-three {
        grid-template-columns: 1fr 1fr;
    }

    .form-row-three .form-group:first-child {
        grid-column: 1 / -1;
    }

    #customer-state,
    #customer-zip {
        width: 100%;
    }
}

/* ===================================
   Active Photo Configuration
   =================================== */

.active-photo-config {
    margin-bottom: 0;
}

.config-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #3d4348;
    margin: 0 0 0.35rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-price-section {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
}

.item-price-section .price-label {
    font-size: 0.7rem;
    margin-bottom: 0.15rem;
    font-weight: 700;
}

.item-price-section .price-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.item-price-section .price-breakdown-row {
    font-weight: 700;
}

.item-price-section .price-breakdown-total {
    font-weight: 800;
}

/* Price breakdown for mounted items */
.price-breakdown {
    margin-top: 0.25rem;
}

.price-breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 0.15rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.price-breakdown-total {
    display: flex;
    justify-content: space-between;
    padding-top: 0.35rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.15));
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.breakdown-label {
    opacity: 1;
}

.price-breakdown-total .breakdown-label {
    opacity: 1;
}

/* ===================================
   Order Confirmation
   =================================== */

.order-confirmation {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.order-confirmation .confirmation-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.order-confirmation h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #3d4348;
    margin: 0 0 1rem 0;
}

.order-confirmation p {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #718096;
    margin: 0 0 0.75rem 0;
    line-height: 1.6;
}

.order-confirmation .btn-new-order {
    margin-top: 2rem;
    padding: 0.875rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #f56820;
    background: transparent;
    border: 2px solid #f56820;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-confirmation .btn-new-order:hover {
    background-color: #f56820;
    color: #fff;
}


/* ===================================
   Thumbnail Modal / Lightbox
   =================================== */

.thumbnail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.thumbnail-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.thumbnail-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.thumbnail-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.thumbnail-modal-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.thumbnail-modal-label {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    margin-top: 1rem;
}

/* Mobile adjustments for thumbnails */
@media (max-width: 576px) {
    .thumbnail-modal-overlay {
        padding: 1rem;
    }

    .thumbnail-modal-close {
        top: -36px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .style-option {
        padding: 0.28rem 0.75rem;
    }

    .style-option-label {
        font-size: 0.75rem;
    }

    .style-option .rotator-preview-btn {
        width: 32px;
        min-height: 32px;
    }

    .style-option .rotator-preview-btn svg {
        width: 16px;
        height: 16px;
    }

    .finish-thumbnail-img {
        width: 38px;
        height: 38px;
    }

    .finish-checkbox {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }

    .finish-preview-hint {
        display: none;
    }
}

/* ===================================
   360 Rotator Modal
   =================================== */

.rotator-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.rotator-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.rotator-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    width: 600px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.rotator-modal-overlay.active .rotator-modal-content {
    transform: scale(1);
}

.rotator-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.rotator-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.rotator-modal-title {
    padding: 1.25rem 3rem 0 1.5rem;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #3d4348;
}

.rotator-modal-subtitle {
    padding: 0.25rem 1.5rem 1rem 1.5rem;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    color: #6b7280;
    border-bottom: 1px solid #e2e8f0;
}

.rotator-modal-body {
    padding: 0;
}

/* Modal Rotator Specific Overrides */
.rotator-modal-content .theunframer-product-360-rotator {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.rotator-modal-content .product-360-container {
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.rotator-modal-content .product-360-viewer {
    cursor: grab;
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* 3:2 aspect ratio for better fit */
    overflow: hidden;
    touch-action: pan-y;
    pointer-events: auto; /* capture sits on top; this is fallback for desktop */
}

.rotator-modal-content .product-360-viewer:active {
    cursor: grabbing;
}

.rotator-modal-content .product-360-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Pan mode (e.g. Classic): a dedicated background-image element (not the
   frame <img>), panned via background-position (see rotator-modal.js) --
   guaranteed to start/end at the photo's real left/right edges, full
   top-to-bottom frame visibility. This modal is used from the configurator
   page, which never loads 360-rotator.css (that's only enqueued for the
   Products-page block), so this element's styling has to live here. */
.rotator-modal-content .product-360-pan-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: auto 100%;
    background-position: 0% center;
    pointer-events: none;
}

.rotator-modal-content .product-360-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    z-index: 10;
    transition: opacity 0.3s ease;
}

.rotator-modal-content .product-360-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #f56820;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 0.75rem;
}

.rotator-modal-content .product-360-loading p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #fff;
    margin: 0;
}

.rotator-modal-content .product-360-controls {
    padding: 0.3rem 0.75rem;
    background: transparent;
    border-top: none;
}

.rotator-modal-content .product-360-hint {
    display: none;
}

.rotator-modal-content .rotator-overlay-label {
    position: absolute;
    bottom: 27%;
    left: 0;
    right: 0;
    text-align: center;
    pointer-events: none;
    z-index: 10;
}

.rotator-modal-content .rotator-overlay-label span {
    display: block;
    background: rgba(142, 0, 121, 0.55);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.35em 1em;
}

.rotator-modal-content .scrubber-track,
.rotator-modal-content .scrubber-handle {
    pointer-events: auto;
}

.rotator-modal-content .scrubber-track {
    position: relative;
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    cursor: pointer;
}

.rotator-modal-content .scrubber-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #f56820, #d04f10);
    border-radius: 5px;
    pointer-events: none;
    transition: width 0.05s ease;
}

.rotator-modal-content .scrubber-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    background: #fff;
    border: 3px solid #f56820;
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.1s ease;
    z-index: 2;
}

.rotator-modal-content .scrubber-handle:hover,
.rotator-modal-content .scrubber-handle:focus {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
    outline: none;
}

.rotator-modal-content .scrubber-handle.dragging {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.2);
}

.rotator-modal-content .scrubber-handle:focus {
    box-shadow: 0 0 0 3px rgba(245, 104, 32, 0.3);
}

/* 360 Rotator Preview Button */
.rotator-preview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    min-height: 50px;
    padding: 0;
    background-color: #f7fafc;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.rotator-preview-btn:hover {
    background-color: #f56820;
    border-color: #f56820;
    color: #fff;
}

.rotator-preview-btn svg {
    width: 24px;
    height: 24px;
}

/* Mobile adjustments for rotator modal */
@media (max-width: 640px) {
    .rotator-modal-content {
        width: 95vw;
        max-height: 95vh;
    }

    .rotator-modal-title {
        padding: 1rem 2.5rem 0 1rem;
        font-size: 1.1rem;
    }

    .rotator-modal-subtitle {
        padding: 0.25rem 1rem 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .rotator-modal-close {
        width: 52px;
        height: 52px;
        font-size: 1.6rem;
        top: 0.5rem;
        right: 0.5rem;
    }

    .rotator-modal-content .product-360-controls {
        padding: 0.75rem 1rem;
    }

    .rotator-modal-content .scrubber-handle {
        width: 20px;
        height: 20px;
    }

    .rotator-preview-btn {
        width: 44px;
        min-height: 44px;
    }

    .rotator-preview-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* ===================================
   Custom Size Picker
   =================================== */

.size-trigger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.8rem;
    width: 100%;
    background: #f56820;
    border: 1.5px solid #991e21;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    text-align: left;
    min-height: 44px;
    box-sizing: border-box;
}
.size-trigger-btn.size-trigger-empty {
    color: #fff;
    border-color: #991e21;
}
.size-trigger-txt {
    flex: 1;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
}
.size-trigger-chevron {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-left: 0.4rem;
    line-height: 1;
}

#size-dropdown-portal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.szp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}
.szp-sheet {
    position: relative;
    background: #fff;
    border-radius: 12px 12px 0 0;
    max-height: 55vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -3px 16px rgba(0,0,0,0.16);
}
.szp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem 0.45rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: #991e21;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border-bottom: 1px solid #f0e0ef;
    flex-shrink: 0;
}
.szp-header-quality {
    width: 80px;
    text-align: center;
    flex-shrink: 0;
}
.szp-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    padding: 0.1rem 0;
}
.szp-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f7f0f6;
}
.szp-row:active { background: #fdf0fc; }
.szp-row.selected { background: #fdf5fd; }
.szp-row.kb-active { background: #f0d8ef; outline: 2px solid #991e21; outline-offset: -2px; }
.szp-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e0;
    flex-shrink: 0;
    position: relative;
}
.szp-radio.selected {
    border-color: #991e21;
    background: #991e21;
    box-shadow: 0 0 0 3px rgba(142,0,121,0.18);
}
.szp-radio.selected::after {
    content: '';
    position: absolute;
    inset: 50%;
    transform: translate(-50%,-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
}
.szp-label {
    flex: 1;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d3748;
}
.szp-row.selected .szp-label { color: #991e21; }
.szp-q-scale {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 80px;
}
.szp-q-gauge {
    position: relative;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(to left, #eab308 0%, #eab308 26%, #22c55e 43%, #22c55e 100%);
}
.szp-q-dot {
    position: absolute;
    top: -7px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid #991e21;
    pointer-events: none;
}
.szp-q-dot::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 7px solid #991e21;
}
/* RAW/DNG placeholder rows: honest "can't verify" marker instead of a dot */
.szp-q-unknown {
    display: block;
    width: 100%;
    text-align: center;
    color: #a0aec0;
    font-weight: 700;
    font-size: 0.9rem;
}

@media (min-width: 992px) {
    #size-dropdown-portal {
        align-items: center;
        justify-content: center;
    }
    .szp-sheet {
        max-width: min(100%, 380px);
        width: 380px;
        border-radius: 12px;
        max-height: 40vh;
        box-shadow: 0 8px 40px rgba(0,0,0,0.28);
    }
    .szp-sheet[data-mode="custom"] { max-height: none; }
}

/* --- Size sheet: STANDARD / CUSTOM tabs --- */
.szp-tabs {
    display: flex;
    flex-shrink: 0;
    border-bottom: 1px solid #f0e0ef;
}
.szp-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    background: #faf3f9;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.55rem 0.4rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #b48bab;
    cursor: pointer;
}
.szp-tab span { display: block; }
.szp-tab.active {
    background: #fff;
    color: #991e21;
    border-bottom-color: #991e21;
}
.szp-tab-orange { color: #f5893d; }
.szp-tab-orange.active {
    color: #f56820;
    border-bottom-color: #f56820;
}
.szp-sheet[data-mode="custom"] .szp-standard-only { display: none; }
.szp-sheet[data-mode="standard"] .szp-custom-only { display: none; }
.szp-sheet[data-mode="custom"] { max-height: 88vh; }

/* --- Size sheet: CUSTOM panel --- */
.szp-custom {
    padding: 1rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    overflow-y: auto;
}
.szp-custom-lead {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #6b6b6b;
}
.szp-axis-toggle {
    display: flex;
    gap: 0;
    border: 1.5px solid #991e21;
    border-radius: 8px;
    overflow: hidden;
}
.szp-axis-btn {
    flex: 1;
    background: #fff;
    border: none;
    padding: 0.6rem 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #991e21;
    cursor: pointer;
}
.szp-axis-btn + .szp-axis-btn { border-left: 1.5px solid #991e21; }
.szp-axis-btn.active { background: #991e21; color: #fff; }

.szp-custom-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #991e21;
}

/* Stepper — replaces a typed number so nothing ever clips a fraction */
.szp-stepper-row {
    display: flex;
    align-items: stretch;
    gap: 0.6rem;
}
.szp-step-btn {
    flex: none;
    width: 3rem;
    background: #fff;
    border: 1.5px solid #991e21;
    border-radius: 8px;
    color: #991e21;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.szp-step-btn:active { background: #f6e6f2; }
.szp-stepper-mid {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    border: 1.5px solid #991e21;
    border-radius: 8px;
    padding: 0.4rem 0.5rem;
}
.szp-stepper-val {
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #2a1508;
}
.szp-custom-derived {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
    font-family: 'Poppins', sans-serif;
}
.szp-custom-derived span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #991e21;
}
.szp-custom-derived strong {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2a1508;
}
.szp-aspect-kept {
    color: #6b6b6b !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
}
.szp-aspect-kept::before { content: '\2022'; margin-right: 0.4rem; color: #cbb; }
.szp-custom-apply {
    margin-top: 0.15rem;
    background: #991e21;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}
.szp-custom-apply:hover { background: #7a0068; }

/* ===================================
   Image Quality Meter
   =================================== */

.quality-meter-container {
    margin-top: 0.75rem;
}

.quality-meter-label {
    margin-bottom: 0.5rem;
    color: #991e21;
}

.quality-meter {
    position: relative;
}

.quality-meter-bar {
    position: relative;
    height: 16px;
    border-radius: 8px;
    background: linear-gradient(to left, #eab308 0%, #eab308 26%, #22c55e 43%, #22c55e 100%);
    overflow: visible;
}

.quality-meter-indicator {
    position: absolute;
    top: -11px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 11px solid #991e21;
    transition: left 0.3s ease;
    z-index: 1;
}
.quality-meter-indicator::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 11px solid #991e21;
}

.quality-meter-labels {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    margin-top: 0.25rem;
    font-size: 0.7rem;
    color: #991e21;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}
.quality-meter-labels span:nth-child(1) { text-align: left; }
.quality-meter-labels span:nth-child(2) { text-align: center; padding-right: 16px; }
.quality-meter-labels span:nth-child(3) { text-align: right; }

/* ===================================
   Two-Step Checkout
   =================================== */

/* Checkout Mode - Grid Layout */
.configurator-grid.checkout-mode {
    grid-template-columns: 1fr;
    max-width: 700px;
    margin: 0 auto;
}

.configurator-grid.checkout-mode .configurator-sidebar {
    width: 100%;
}

.configurator-sidebar.checkout-expanded {
    width: 100%;
}

.configurator-main.hidden-for-checkout {
    display: none !important;
}

/* Hide upload container and text overlay card in checkout mode */
.configurator-grid.checkout-mode #photo-upload-container,
.configurator-grid.checkout-mode #quote-module-card {
    display: none;
}

/* Checkout Header (Step 2) */
.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0 1rem 1.25rem;
    background: transparent;
    border-left: 4px solid #991e21;
    margin-bottom: 2rem;
}

.checkout-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #991e21;
    margin: 0;
}

.checkout-summary-mini {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mini-summary-items {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #4a5568;
}

.mini-summary-total {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #f56820;
}

/* Checkout Items Summary */
.checkout-items-summary {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.checkout-estimated-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #991e21;
}

.estimated-total-label {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #991e21;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.estimated-total-amount {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #f56820;
}

.checkout-items-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #3d4348;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.checkout-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkout-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 8px;
}

.checkout-item-thumb {
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
    align-self: center;
}

.checkout-item-thumb img {
    display: block;
    max-width: 60px;
    max-height: 60px;
    width: auto;
    height: auto;
}

.checkout-item-file-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-item-file-icon svg {
    width: 24px;
    height: 24px;
    color: #718096;
}

.checkout-item-info {
    flex: 1;
    min-width: 0;
}

.checkout-item-name {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-item-config {
    display: block;
    font-size: 0.8rem;
    color: #718096;
    margin-top: 2px;
}

.checkout-item-price {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #27ae60;
    flex-shrink: 0;
}

.checkout-item-price .quote-tag {
    font-size: 0.85rem;
    color: #f59e0b;
    font-weight: 500;
    background: #fef3c7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Customer Form - Enhanced styling */
.checkout-mode .customer-form,
.checkout-step .customer-form {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 0;
    border-top: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.checkout-mode .customer-form-title,
.checkout-step .customer-form-title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.checkout-mode .form-row,
.checkout-step .form-row {
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.checkout-mode .form-group,
.checkout-step .form-group {
    margin-bottom: 1rem;
}

.checkout-mode .config-label,
.checkout-step .config-label {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.checkout-mode .config-input,
.checkout-mode .config-textarea,
.checkout-step .config-input,
.checkout-step .config-textarea {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.checkout-mode .config-input:focus,
.checkout-mode .config-textarea:focus,
.checkout-step .config-input:focus,
.checkout-step .config-textarea:focus {
    border-color: #f56820;
    box-shadow: 0 0 0 4px rgba(245, 104, 32, 0.15);
}

.checkout-mode .config-textarea,
.checkout-step .config-textarea {
    min-height: 100px;
}

/* Checkout Buttons Container (Step 2) — agreements/checkboxes stacked on
   top, the two action buttons in their own equal-width row underneath. */
.checkout-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.checkout-agreements {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkout-action-buttons {
    display: flex;
    gap: 1rem;
}

/* Back Button */
.btn-back {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #991e21;
    background-color: transparent;
    border: 3px solid #991e21;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-back:hover {
    background-color: #991e21;
    border-color: #991e21;
    color: #fff;
}

.btn-back svg {
    flex-shrink: 0;
}

/* Top Back Button (Step 2) */
.btn-back-top {
    margin: 0;
    align-self: flex-start;
}

.checkout-header-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.checkout-add-gallery {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.checkout-add-gallery-text {
    font-size: 0.9rem;
    color: #4a5568;
}

.btn-checkout-gallery {
    padding: 1rem 2.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 50px;
    background-color: #991e21 !important;
    border-color: #991e21 !important;
    box-shadow: 0 4px 12px rgba(142, 0, 121, 0.3) !important;
    color: #fff !important;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-checkout-gallery:hover {
    background-color: #f56820 !important;
    border-color: #f56820 !important;
    transform: translateY(-1px);
}

@media (max-width: 576px) {
    .checkout-header-top {
        flex-direction: column;
        align-items: stretch;
    }
    .checkout-add-gallery {
        justify-content: space-between;
    }
}

/* Proceed Button (Step 1) */
.btn-proceed {
    margin-top: 1.5rem;
    border-radius: 6px;
    letter-spacing: 0.06em;
    font-size: 0.95rem;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(142, 0, 121, 0.3);
}

.btn-proceed.needs-config {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    cursor: pointer;
}

.btn-proceed.needs-config:hover {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

/* Place Order Button (Step 2) */
.btn-place-order {
    flex: 1;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
}

.btn-place-order:hover:not(:disabled) {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

/* Responsive adjustments for checkout */
@media (max-width: 768px) {
    .configurator-grid.checkout-mode {
        max-width: 100%;
    }

    .checkout-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 0.75rem 0 0.75rem 1rem;
    }

    .checkout-title {
        font-size: 1.25rem;
    }

    .checkout-summary-mini {
        width: 100%;
        justify-content: space-between;
    }

    .mini-summary-total {
        font-size: 1.5rem;
    }

    .checkout-mode .customer-form,
    .checkout-step .customer-form {
        padding: 1.5rem;
    }

    .checkout-mode .form-row,
    .checkout-step .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .checkout-mode .form-row-three,
    .checkout-step .form-row-three {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .checkout-mode .form-row-three .form-group:first-child,
    .checkout-step .form-row-three .form-group:first-child {
        grid-column: 1 / -1;
    }

    .checkout-action-buttons {
        flex-direction: column;
    }

    .btn-back {
        order: 1;
    }

    .btn-place-order {
        order: 0;
    }

    .checkout-items-summary {
        padding: 1.25rem;
    }

    .checkout-item {
        padding: 0.625rem;
        gap: 0.75rem;
    }

    .checkout-item-thumb img,
    .checkout-item-thumb > div {
        max-width: 48px;
        max-height: 48px;
    }

    .checkout-item-name {
        font-size: 0.85rem;
    }

    .checkout-item-config {
        font-size: 0.75rem;
    }

    .checkout-item-price {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .checkout-header {
        padding: 1rem 1.25rem;
    }

    .checkout-mode .customer-form,
    .checkout-step .customer-form {
        padding: 1.25rem;
        border-radius: 8px;
    }

    .checkout-mode .config-input,
    .checkout-mode .config-textarea,
    .checkout-step .config-input,
    .checkout-step .config-textarea {
        padding: 0.875rem 1rem;
    }

    .checkout-items-summary {
        padding: 1rem;
        border-radius: 8px;
    }
}

/* ===================================
   Upload Options Layout (Dropzone + Gallery side by side)
   =================================== */

.upload-options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
}

.upload-options-container .dropzone {
    margin: 0;
}

.upload-options-container .gallery-choose-section {
    margin: 0;
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
}

/* Mobile: stack vertically */
@media (max-width: 767px) {
    .upload-options-container {
        grid-template-columns: 1fr;
    }

    .upload-options-container .dropzone {
        min-height: unset;
    }
}

/* ===================================
   Gallery Choose Button Section
   =================================== */

.gallery-choose-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
}

/* Hide divider when in side-by-side layout */
.upload-options-container .gallery-choose-divider {
    display: none;
}

.gallery-choose-divider {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: #a0aec0;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-choose-divider::before,
.gallery-choose-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.gallery-choose-divider span {
    padding: 0 1rem;
}

.btn-choose-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(rgba(142,0,121,0.62), rgba(107,0,91,0.72)), url('../images/paisley-bg.jpg') center/cover no-repeat;
    border: 2px solid #7a181b;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(0,0,0,0.38), inset 0 1px 2px rgba(255,255,255,0.16), inset 0 -2px 4px rgba(0,0,0,0.22);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    flex: 1;
}

/* When in side-by-side layout, make gallery button fill the space */
.upload-options-container .btn-choose-gallery {
    height: 100%;
    min-height: 200px;
    flex-direction: column;
    gap: 0.75rem;
}

.upload-options-container .btn-choose-gallery svg {
    width: 48px;
    height: 48px;
    color: #ffffff;
}

.upload-options-container .btn-choose-gallery:hover svg {
    color: #ffffff;
}

@media (max-width: 767px) {
    .upload-options-container .btn-choose-gallery {
        min-height: 120px;
    }

    .upload-options-container .btn-choose-gallery svg {
        width: 36px;
        height: 36px;
    }
}

/* Compact mode for "add more photos" state */
.upload-options-container.compact-mode .dropzone {
    padding: 0.5rem 0.75rem;
}

.upload-options-container.compact-mode .dropzone-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}

.upload-options-container.compact-mode .dropzone-text {
    font-size: 0.9rem;
}

.upload-options-container.compact-mode .btn-choose-gallery {
    min-height: 100px;
}

.upload-options-container.compact-mode .btn-choose-gallery svg {
    width: 32px;
    height: 32px;
}

@media (max-width: 767px) {
    .upload-options-container.compact-mode .dropzone,
    .upload-options-container.compact-mode .btn-choose-gallery {
        min-height: unset;
    }
}

/* Standalone cancel button (below upload options) */
.dropzone-cancel-standalone {
    display: block;
    margin: 0.75rem auto 0;
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    color: #718096;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.dropzone-cancel-standalone:hover {
    border-color: #a0aec0;
    color: #4a5568;
    background-color: #f7fafc;
}

.btn-choose-gallery:hover {
    border-color: #c05010;
    background: linear-gradient(rgba(255,100,0,0.55), rgba(230,75,0,0.63)), url('../images/paisley-bg.jpg') center/280px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.42), inset 0 1px 2px rgba(255,255,255,0.16), inset 0 -2px 4px rgba(0,0,0,0.22);
    color: #ffffff;
}

.btn-choose-gallery:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-choose-gallery:disabled:hover {
    border-color: #cbd5e0;
    background-color: #f7fafc;
    color: #3d4348;
}

.btn-choose-gallery svg {
    width: 20px;
    height: 20px;
}

/* ===================================
   Gallery Modal
   =================================== */

.gallery-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gallery-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.gallery-modal-overlay.active .gallery-modal-content {
    transform: scale(1);
}

/* Modal Header */
.gallery-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 4rem 1.25rem 1.5rem;
    background: linear-gradient(135deg, #991e21 0%, #7a181b 100%);
    border-bottom: 1px solid #5a004c;
    flex-shrink: 0;
}

.gallery-modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.gallery-modal-slots {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slots-available {
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.slots-selected {
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #f56820;
    background: rgba(245, 104, 32, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.gallery-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Modal Filters */
.gallery-modal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(142, 0, 121, 0.05);
    border-bottom: 1px solid rgba(142, 0, 121, 0.12);
    flex-shrink: 0;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group.filter-search {
    flex: 2;
    min-width: 200px;
}

.filter-select,
.filter-input {
    width: 100%;
    height: 42px;
    padding: 0 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    line-height: 42px;
    color: #2d3748;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-input {
    line-height: normal;
    padding: 0.65rem 1rem;
}

.filter-select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

.filter-select:hover,
.filter-input:hover {
    border-color: #cbd5e0;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #991e21;
    box-shadow: 0 0 0 3px rgba(142, 0, 121, 0.12);
}

/* Modal Body */
.gallery-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    min-height: 300px;
}

/* Gallery Grid */
.gallery-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.gallery-modal-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 3px solid transparent;
    background: #f7fafc;
}

.gallery-modal-item:hover {
    border-color: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery-modal-item.selected {
    border-color: #991e21;
    box-shadow: 0 0 0 3px rgba(142, 0, 121, 0.25);
}

.gallery-modal-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gallery-modal-item.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.gallery-item-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background: #e2e8f0;
}

.gallery-item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-item-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: #f56820;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.gallery-item-check svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

.gallery-item-info {
    padding: 0.75rem;
    background: #fff;
}

.gallery-item-title {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item-photographer {
    display: block;
    font-size: 0.7rem;
    color: #718096;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading State */
.gallery-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.gallery-modal-loading .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #991e21;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.gallery-modal-loading p {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #718096;
    margin: 0;
}

/* Empty State */
.gallery-modal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.gallery-modal-empty .empty-icon {
    width: 64px;
    height: 64px;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

.gallery-modal-empty p {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #718096;
    margin: 0 0 1rem 0;
}

.btn-clear-filters {
    padding: 0.5rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #991e21;
    background: transparent;
    border: 1px solid #991e21;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-filters:hover {
    background: #991e21;
    color: #fff;
}

/* Load More */
.gallery-modal-sentinel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 64px;
    padding: 1rem 0 0.5rem;
}

.gallery-modal-sentinel-end {
    display: none;
    color: #718096;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    padding: 0.25rem 0;
}

.gallery-modal-sentinel-spinner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.gallery-modal-sentinel-spinner.is-visible {
    opacity: 1;
}

.gallery-modal-sentinel-spinner .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-top-color: #991e21;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.gallery-modal-load-more {
    display: flex;
    justify-content: center;
    padding-top: 1.5rem;
}

.btn-load-more {
    padding: 0.75rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3d4348;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-load-more:hover:not(:disabled) {
    border-color: #991e21;
    background: #fff;
    color: #991e21;
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal Footer */
.gallery-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(142, 0, 121, 0.05);
    border-top: 1px solid rgba(142, 0, 121, 0.12);
    flex-shrink: 0;
}

.btn-cancel {
    padding: 0.75rem 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.btn-add-selected {
    padding: 0.75rem 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #a8008f 0%, #991e21 50%, #7a181b 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-selected:hover:not(:disabled) {
    background: linear-gradient(135deg, #c2009f 0%, #a8008f 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(142, 0, 121, 0.4);
}

.btn-add-selected:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Gallery item preview button */
.gallery-item-preview-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s;
    padding: 0;
}
.gallery-item-preview-btn:hover {
    background: #991e21;
    border-color: #991e21;
}

/* Gallery modal — desktop backdrop (CSS relative path, no JS URL construction) */
.gm-overlay {
    background: linear-gradient(rgba(142,0,121,0.62), rgba(107,0,91,0.72)),
                url('../images/paisley-bg.jpg') center/280px !important;
}
.gm-overlay .gm-viewport {
    background: linear-gradient(rgba(142,0,121,0.62), rgba(107,0,91,0.72)),
                url('../images/paisley-bg.jpg') center/280px;
}

/* Full-image preview overlay */
#gallery-img-preview {
    position: fixed;
    inset: 0;
    background: linear-gradient(rgba(142,0,121,0.62), rgba(107,0,91,0.72)), url('../images/paisley-bg.jpg') center/280px;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
}
#gallery-img-preview img {
    max-width: 90vw;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    cursor: default;
    user-select: none;
    -webkit-user-drag: none;
}
.gallery-preview-close {
    position: absolute;
    top: 16px;
    left: 20px;
    width: auto;
    height: auto;
    border-radius: 50px;
    padding: 12px 28px;
    background: #991e21;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 1.05rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: background 0.2s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
}
.gallery-preview-close:hover {
    background: #f56820;
}
.gallery-preview-caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 12px;
    pointer-events: none;
}
.gallery-preview-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
}
.gallery-preview-photographer {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: rgba(255,255,255,0.65);
    text-align: center;
}
.gallery-preview-copyright {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    text-align: center;
    font-style: italic;
}

.gallery-preview-unframe-btn {
    display: inline-block;
    margin-top: 0;
    pointer-events: auto;
    white-space: nowrap;
    background: linear-gradient(rgba(142,0,121,0.60), rgba(107,0,91,0.70)), url('../images/paisley-bg.jpg') center/280px;
    border: 3px solid rgba(0,0,0,0.55);
    color: #fff;
    padding: 24px 72px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35), inset 0 1px 2px rgba(255,255,255,0.16), inset 0 -2px 4px rgba(0,0,0,0.22);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
@media (hover: hover) {
    .gallery-preview-unframe-btn:hover {
        background: linear-gradient(rgba(255,90,0,0.84), rgba(210,60,0,0.90)), url('../images/paisley-bg.jpg') center/280px;
        border-color: #d04f10;
        box-shadow: 0 6px 18px rgba(0,0,0,0.42), inset 0 1px 2px rgba(255,255,255,0.16), inset 0 -2px 4px rgba(0,0,0,0.22);
        transform: scale(1.04);
    }
}
@media (max-width: 767px) {
    .gallery-preview-unframe-btn {
        font-size: 1.1rem;
        padding: 12px 32px;
        border-width: 2px;
    }
}

/* Responsive Gallery Modal */
@media (max-width: 992px) {
    .gallery-modal-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-modal-content {
        max-height: 95vh;
        border-radius: 12px;
    }

    .gallery-modal-header {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 3rem 1rem 1rem;
    }

    .gallery-modal-title {
        font-size: 1.1rem;
    }

    .gallery-modal-slots {
        width: 100%;
        justify-content: space-between;
    }

    .gallery-modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }

    .gallery-modal-filters {
        padding: 0.75rem 1rem;
    }

    .filter-group {
        min-width: 120px;
    }

    .filter-group.filter-search {
        flex: 100%;
        min-width: 100%;
    }

    .gallery-modal-body {
        padding: 1rem;
    }

    .gallery-modal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .gallery-item-info {
        padding: 0.5rem;
    }

    .gallery-item-title {
        font-size: 0.75rem;
    }

    .gallery-item-photographer {
        font-size: 0.65rem;
    }

    .gallery-modal-footer {
        padding: 0.75rem 1rem;
    }

    .btn-cancel,
    .btn-add-selected {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .gallery-modal-overlay {
        padding: 0.5rem;
    }

    .gallery-modal-content {
        max-height: 98vh;
        border-radius: 8px;
    }

    .gallery-modal-grid {
        gap: 0.5rem;
    }

    .gallery-item-check {
        width: 24px;
        height: 24px;
        top: 4px;
        right: 4px;
    }

    .gallery-item-check svg {
        width: 14px;
        height: 14px;
    }

    .gallery-modal-footer {
        flex-direction: column;
    }

    .btn-cancel {
        order: 1;
    }

    .btn-add-selected {
        order: 0;
        width: 100%;
    }
}
