
/* APC enabled products must use the customizer flow only. Hide WooCommerce's native submit button to prevent double add-to-cart submissions from theme AJAX handlers. */
body.single-product form.cart .single_add_to_cart_button:not(.apc-add-customized),
body.single-product form.cart button[name="add-to-cart"]:not(.apc-add-customized),
body.single-product form.cart input[name="add-to-cart"]:not([type="hidden"]) {
    display: none !important;
}

:root {
    --apc-dark: #182d0e;
    --apc-dark-2: #102006;
    --apc-gold: #c9ad62;
    --apc-gold-2: #e2cf92;
    --apc-cream: #fbfaf5;
    --apc-border: #e5dcc0;
    --apc-text: #1d1d1b;
    --apc-muted: #6f705f;
    --apc-danger: #b42318;
}

.apc-product-entry,
.apc-product-entry *,
.apc-modal,
.apc-modal * {
    box-sizing: border-box;
}

.apc-product-entry {
    margin: 18px 0;
    padding: 14px;
    border: 1px solid var(--apc-border);
    background: linear-gradient(135deg, rgba(24,45,14,.06), rgba(201,173,98,.12));
    border-radius: 14px;
}

.apc-customize-btn,
.apc-add-customized {
    background: var(--apc-dark) !important;
    color: #fff !important;
    border: 1px solid var(--apc-dark) !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    min-height: 48px;
    padding: 0 30px !important;
    box-shadow: 0 8px 20px rgba(24, 45, 14, .18);
}

.apc-customize-btn:hover,
.apc-add-customized:hover:not(:disabled) {
    background: var(--apc-gold) !important;
    color: var(--apc-dark) !important;
    border-color: var(--apc-gold) !important;
}

.apc-add-customized:disabled {
    opacity: .65;
    cursor: wait;
}

.apc-add-customized.apc-missing-required {
    box-shadow: 0 8px 20px rgba(24, 45, 14, .18), inset 0 0 0 2px rgba(201, 173, 98, .45);
}


.apc-entry-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.apc-cart-success {
    flex: 1 1 100%;
    width: 100%;
    margin-top: 10px;
    padding: 16px;
    border: 2px solid rgba(24, 45, 14, .22);
    border-radius: 16px;
    background: #f7fbf2;
    color: var(--apc-dark);
    box-shadow: 0 10px 26px rgba(24, 45, 14, .12);
}

.apc-success-message {
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 900;
}

.apc-success-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.apc-success-buttons .button {
    min-height: 42px !important;
    border-radius: 999px !important;
    padding: 0 18px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.apc-view-cart {
    background: var(--apc-gold) !important;
    border-color: var(--apc-gold) !important;
    color: var(--apc-dark) !important;
}

.apc-buy-now {
    background: var(--apc-dark) !important;
    border-color: var(--apc-dark) !important;
    color: #fff !important;
}

.apc-customize-btn.apc-added {
    background: transparent !important;
    color: var(--apc-dark) !important;
    border-color: var(--apc-dark) !important;
    box-shadow: none;
}

.apc-entry-note {
    margin: 8px 0 0;
    color: var(--apc-muted);
    font-size: 13px;
}

.apc-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.apc-modal.apc-open {
    display: grid;
    align-items: start;
    justify-items: center;
}

/* v2.1.8: lock page scroll behind the modal (added/removed via JS). */
body.apc-modal-open {
    overflow: hidden;
}

.apc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .66);
    backdrop-filter: blur(3px);
}

.apc-modal-card {
    position: relative;
    z-index: 1;
    width: min(1280px, 100%);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    overscroll-behavior: contain;
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgba(201, 173, 98, .45);
    border-radius: 20px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .28);
}

.apc-modal-close {
    position: sticky;
    top: 14px;
    display: block;
    margin-block: 14px -56px;
    margin-inline-start: auto;
    margin-inline-end: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--apc-cream);
    color: var(--apc-dark);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.apc-modal-head {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 20px 24px;
    padding-inline-end: 78px;
    background: var(--apc-dark);
    color: #fff;
    border-radius: 18px 18px 0 0;
}

.apc-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 54px;
    border: 1px solid rgba(201, 173, 98, .45);
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    overflow: hidden;
}

.apc-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.apc-modal-head h3 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    line-height: 1.2;
}

.apc-modal-head p {
    margin: 4px 0 0;
    color: var(--apc-gold-2);
    font-size: 13px;
}

.apc-alert {
    margin: 16px 24px 0;
    padding: 12px 14px;
    border: 1px solid rgba(180, 35, 24, .22);
    background: #fff4f2;
    color: var(--apc-danger);
    border-radius: 12px;
    font-weight: 600;
}

.apc-modal-body {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 22px;
    padding: 24px;
}

.apc-upload-panel,
.apc-preview-panel {
    min-width: 0;
}

.apc-upload-panel h4,
.apc-preview-panel h4 {
    margin: 0 0 6px;
    color: var(--apc-dark);
    font-size: 18px;
}

.apc-muted {
    margin: 0 0 14px;
    color: var(--apc-muted);
    font-size: 13px;
}

.apc-upload-list {
    display: grid;
    gap: 12px;
}

.apc-upload-card {
    border: 1px solid var(--apc-border);
    border-radius: 16px;
    padding: 12px;
    background: var(--apc-cream);
}

.apc-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    color: var(--apc-dark);
}

.apc-card-title strong {
    font-size: 14px;
}

.apc-card-title em {
    margin-inline-start: auto;
    font-size: 11px;
    font-style: normal;
    color: var(--apc-muted);
}

.apc-area-badge,
.apc-print-zone span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--apc-gold);
    color: var(--apc-dark);
    font-size: 12px;
    font-weight: 800;
}

.apc-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 94px;
    border: 1.5px dashed rgba(24, 45, 14, .28);
    border-radius: 14px;
    background: #fff;
    color: var(--apc-dark);
    cursor: pointer;
    text-align: center;
    transition: border-color .2s, background .2s, transform .2s;
}

.apc-dropzone:hover {
    border-color: var(--apc-gold);
    background: #fffdf7;
    transform: translateY(-1px);
}

.apc-dropzone input {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 3 !important;
}

.apc-dropzone small {
    margin-top: 3px;
    color: var(--apc-muted);
    font-size: 11px;
}

.apc-dropzone.apc-drag-over {
    border-color: var(--apc-gold);
    background: #fff8e8;
    transform: translateY(-1px);
}

.apc-upload-icon {
    display: block;
    font-size: 28px;
    line-height: 1;
    color: var(--apc-gold);
    font-weight: 700;
}

.apc-upload-result {
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--apc-border);
    border-radius: 14px;
    padding: 8px;
}

.apc-upload-result img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--apc-cream);
}

.apc-upload-result .button {
    margin-inline-end: 4px !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
}

.apc-upload-error {
    margin-top: 8px;
    color: var(--apc-danger);
    font-size: 12px;
    font-weight: 600;
}

/* v2.1.8: highlight the exact required card(s) the customer still has to fill. */
.apc-upload-card.apc-card-missing {
    border-color: var(--apc-danger);
    box-shadow: 0 0 0 2px rgba(180, 35, 24, .14);
}

.apc-upload-card.apc-card-missing .apc-card-title em {
    color: var(--apc-danger);
}

/* v2.1.8: inline replacement for window.alert on the product page. */
.apc-entry-error {
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(180, 35, 24, .25);
    border-radius: 12px;
    background: #fff4f2;
    color: var(--apc-danger);
    font-size: 13px;
    font-weight: 700;
}

.apc-upload-loading,
.apc-processing {
    margin-top: 8px;
    color: var(--apc-muted);
    font-size: 13px;
}

.apc-preview-stage {
    position: relative;
    width: 100%;
    max-width: 590px;
    margin: 0 auto 16px;
    border: 1px solid var(--apc-border);
    border-radius: 18px;
    overflow: hidden;
    background: #f5f5f1;
}

.apc-base-image {
    display: block;
    width: 100%;
    height: auto;
    min-height: 300px;
    object-fit: contain;
}

.apc-zones-layer {
    /* v2.1.8: JS (syncZoneLayers) resizes this layer to the exact rendered image
       box inside the stage, so area percentages land on the product itself and
       match the canvas output pixel-for-pixel. inset:0 is only the pre-JS fallback. */
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.apc-print-zone {
    position: absolute;
    border: 2px dashed var(--apc-gold);
    background: rgba(201, 173, 98, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.apc-print-zone span {
    position: absolute;
    top: 3px;
    right: 3px;
    box-shadow: 0 3px 10px rgba(0,0,0,.18);
    /* v2.6.8: the customer's artwork must sit above the area number. */
    z-index: 1;
}

.apc-zone-art {
    /* v2.6.8: the artwork occupies a configurable percentage of the print
       zone (--apc-zone-art-fill, set from apcData.zoneArtFillPercent, default
       100%), centered, above the number badge, and clickable to enlarge. */
    position: absolute;
    inset: 0;
    margin: auto;
    width: var(--apc-zone-art-fill, 100%);
    height: var(--apc-zone-art-fill, 100%);
    object-fit: contain;
    object-position: center;
    z-index: 2;
    pointer-events: auto;
    cursor: zoom-in;
}

.apc-add-customized {
    width: 100%;
    min-height: 52px;
}

@media (max-width: 782px) {
    .apc-modal {
        padding: 9px;
    }

    .apc-modal-card {
        width: 100%;
        max-height: calc(100vh - 18px);
        max-height: calc(100dvh - 18px);
        margin: 0 auto;
        border-radius: 16px;
    }

    .apc-modal-close {
        top: 8px;
        margin-block: 8px -50px;
        margin-inline-end: 8px;
    }

    .apc-modal-head {
        padding: 16px;
        padding-inline-end: 70px;
        border-radius: 15px 15px 0 0;
    }

    .apc-logo-wrap {
        width: 60px;
        height: 44px;
    }

    .apc-modal-head h3 {
        font-size: 18px;
    }

    .apc-modal-body {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .apc-alert {
        margin: 12px 16px 0;
    }

    .apc-base-image {
        min-height: 220px;
    }
}

.apc-hidden-external-upload {
    display: none !important;
}

.apc-product-entry[dir="rtl"],
.apc-modal[dir="rtl"] {
    direction: rtl;
}

.apc-product-entry[dir="rtl"],
.apc-modal[dir="rtl"] .apc-modal-head,
.apc-modal[dir="rtl"] .apc-upload-panel,
.apc-modal[dir="rtl"] .apc-preview-panel,
.apc-modal[dir="rtl"] .apc-upload-card {
    text-align: right;
}

.apc-modal[dir="rtl"] .apc-preview-stage,
.apc-modal[dir="rtl"] .apc-zones-layer,
.apc-modal[dir="rtl"] canvas {
    direction: ltr;
}

.apc-floating-cart-success {
    position: fixed;
    left: 50%;
    top: 18px;
    bottom: auto;
    right: auto;
    transform: translateX(-50%);
    z-index: 1000000;
    display: none;
    width: min(560px, calc(100vw - 32px));
    padding-block: 18px;
    padding-inline: 20px 54px;
    border: 2px solid rgba(24, 45, 14, .22);
    border-radius: 20px;
    background: #f7fbf2;
    color: var(--apc-dark);
    box-shadow: 0 18px 55px rgba(0, 0, 0, .24);
}

.apc-floating-cart-success.apc-visible {
    display: block;
    animation: apcSlideUp .18s ease-out;
}

.apc-floating-message {
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 800;
}

.apc-floating-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.apc-floating-actions .button {
    min-height: 42px !important;
    border-radius: 999px !important;
    padding: 0 18px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.apc-floating-close {
    position: absolute;
    top: 10px;
    inset-inline-end: 12px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(24, 45, 14, .08);
    color: var(--apc-dark);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

@keyframes apcSlideUp {
    from { opacity: 0; transform: translate(-50%, -12px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 600px) {
    .apc-floating-cart-success {
        left: 12px;
        right: 12px;
        top: 12px;
        bottom: auto;
        width: auto;
        transform: none;
    }

    @keyframes apcSlideUp {
        from { opacity: 0; transform: translateY(-12px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* v1.0.14: force the post-add controls to be visible immediately, even when the active theme overrides WooCommerce notice styles. */
body.apc-cart-success-visible #apc-cart-success,
body.apc-cart-success-visible .apc-cart-success,
#apc-floating-cart-success.apc-visible {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* v1.0.15: immediate post-click continuation state while the server finishes the cart request. */
.apc-cart-success.apc-is-pending,
.apc-floating-cart-success.apc-is-pending {
    outline: 2px solid rgba(201, 173, 98, .35);
}

.apc-cart-success.apc-is-pending .apc-success-message::after,
.apc-floating-cart-success.apc-is-pending .apc-floating-message::after {
    content: ' …';
}


/* v1.0.16: keep the cart continuation buttons visible after AJAX/theme fragment refreshes. */
body.apc-cart-success-visible #apc-cart-success.apc-locked,
body.apc-cart-success-visible .apc-cart-success.apc-locked,
#apc-floating-cart-success.apc-visible.apc-locked {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

#apc-floating-cart-success.apc-visible.apc-locked {
    position: fixed !important;
    z-index: 2147483000 !important;
}

body.apc-cart-success-visible #apc-cart-success.apc-locked .apc-success-buttons,
#apc-floating-cart-success.apc-visible.apc-locked .apc-floating-actions {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.apc-cart-success-visible #apc-cart-success.apc-locked .button,
#apc-floating-cart-success.apc-visible.apc-locked .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* v1.1.0: customer text customization controls */
.apc-customize-btn.apc-options-required,
.apc-customize-btn:disabled {
    opacity: .58;
    cursor: not-allowed !important;
    box-shadow: none;
}

.apc-text-controls {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(24, 45, 14, .10);
    border-radius: 14px;
    background: #fff;
}

.apc-text-label {
    display: block;
    margin-bottom: 6px;
    color: var(--apc-dark);
    font-size: 13px;
    font-weight: 800;
}

.apc-text-input {
    width: 100%;
    min-height: 58px;
    resize: vertical;
    border: 1px solid var(--apc-border);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.35;
    background: #fffdf8;
}

.apc-text-options {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
    margin-top: 8px;
    align-items: end;
}

.apc-text-options label {
    display: grid;
    gap: 4px;
    color: var(--apc-muted);
    font-size: 11px;
    font-weight: 700;
}

.apc-text-options input[type="color"] {
    width: 100%;
    height: 38px;
    padding: 2px;
    border: 1px solid var(--apc-border);
    border-radius: 10px;
    background: #fff;
}

.apc-text-options select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--apc-border);
    border-radius: 10px;
    padding: 0 8px;
    background: #fff;
    color: var(--apc-text);
    font-size: 12px;
}

.apc-clear-text {
    margin-top: 8px !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
}

/* v2.1.8: color/font/clear controls stay hidden until the customer starts
   typing (or focuses the field) to reduce clutter in each area card. */
.apc-text-controls .apc-text-options,
.apc-text-controls .apc-clear-text {
    display: none;
}

.apc-text-controls.apc-has-text .apc-text-options,
.apc-text-controls:focus-within .apc-text-options {
    display: grid;
}

.apc-text-controls.apc-has-text .apc-clear-text,
.apc-text-controls:focus-within .apc-clear-text {
    display: inline-block;
}

.apc-zone-text {
    position: absolute;
    inset: 6%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    overflow: hidden;
    line-height: 1.08;
    font-size: clamp(10px, 2.2vw, 28px);
    font-weight: 800;
    pointer-events: none;
    /* v2.6.8: badge = 1, artwork = 2, customer text = 3. */
    z-index: 3;
    text-shadow: 0 1px 2px rgba(255,255,255,.55);
    max-width: 88%;
    max-height: 88%;
}

.apc-print-zone.apc-has-text {
    background: rgba(255,255,255,.22);
}

@media (max-width: 600px) {
    .apc-text-options {
        grid-template-columns: 1fr;
    }
}

/* v1.1.1: Temu-style 3 mockups side by side inside the customizer */
.apc-preview-panel {
    position: relative;
}

.apc-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
    margin: 0 auto 16px;
}

.apc-preview-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 8px;
    border: 1px solid rgba(201, 173, 98, .38);
    border-radius: 18px;
    background: #fffdf8;
    box-shadow: 0 10px 28px rgba(24, 45, 14, .07);
}

.apc-preview-label {
    min-height: 22px;
    margin-bottom: 8px;
    color: var(--apc-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .02em;
    text-align: center;
}

.apc-preview-grid .apc-preview-stage {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    margin: 0;
    aspect-ratio: 3 / 4;
    min-height: 260px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f7f7f3 0%, #eeeeea 100%);
}

.apc-preview-grid .apc-base-image {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    object-fit: contain;
}

.apc-preview-grid .apc-print-zone {
    border-width: 1.5px;
}

.apc-preview-grid .apc-print-zone span {
    width: 20px;
    height: 20px;
    top: 3px;
    right: 3px;
    font-size: 11px;
}

@media (max-width: 1120px) {
    .apc-modal-body {
        grid-template-columns: 1fr;
    }

    .apc-preview-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 782px) {
    .apc-preview-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .apc-preview-grid .apc-preview-stage {
        min-height: 220px;
    }
}

@media (max-width: 540px) {
    .apc-preview-grid {
        grid-template-columns: 1fr;
    }

    .apc-preview-grid .apc-preview-stage {
        min-height: 260px;
    }
}

/* v1.1.5: standalone designer page shortcode */
.apc-standalone-designer,
.apc-standalone-designer * {
    box-sizing: border-box;
}

.apc-standalone-designer {
    max-width: 1320px;
    margin: 0 auto;
    color: var(--apc-text);
}

.apc-standalone-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 18px;
    padding: 22px;
    border: 1px solid var(--apc-border);
    border-radius: 18px;
    background: linear-gradient(135deg, #fff, var(--apc-cream));
    box-shadow: 0 14px 38px rgba(24, 45, 14, .08);
}

.apc-standalone-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--apc-gold);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.apc-standalone-hero h2 {
    margin: 0;
    color: var(--apc-dark);
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.15;
}

.apc-standalone-hero p {
    margin: 8px 0 0;
    color: var(--apc-muted);
}

.apc-standalone-product-summary {
    display: grid;
    grid-template-columns: 72px minmax(150px, 1fr);
    gap: 8px 12px;
    align-items: center;
    min-width: 260px;
    padding: 12px;
    border: 1px solid rgba(201, 173, 98, .45);
    border-radius: 16px;
    background: #fff;
}

.apc-standalone-product-summary img {
    grid-row: span 2;
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--apc-cream);
}

.apc-standalone-product-summary strong {
    color: var(--apc-dark);
    line-height: 1.25;
}

.apc-standalone-product-summary span {
    color: var(--apc-muted);
    font-weight: 800;
}

.apc-standalone-entry {
    margin-bottom: 14px;
}

.apc-standalone-product-form {
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid var(--apc-border);
    border-radius: 16px;
    background: #fff;
}

.apc-standalone-product-form form.cart {
    margin: 0;
}

.apc-standalone-product-form .single_add_to_cart_button,
.apc-standalone-product-form button[name="add-to-cart"],
.apc-standalone-product-form input[name="add-to-cart"]:not([type="hidden"]) {
    display: none !important;
}

.apc-standalone-product-form table.variations {
    margin-bottom: 12px;
}

.apc-standalone-product-form .quantity {
    margin: 0 0 10px;
}

.apc-standalone-qty {
    display: inline-grid;
    gap: 6px;
    color: var(--apc-dark);
    font-weight: 800;
}

.apc-standalone-qty input {
    width: 110px;
    min-height: 40px;
    border: 1px solid var(--apc-border);
    border-radius: 10px;
    padding: 0 10px;
}

.apc-standalone-mode.apc-modal {
    position: static;
    inset: auto;
    z-index: auto;
    display: block;
    padding: 0;
    overflow: visible;
}

.apc-standalone-mode .apc-modal-backdrop,
.apc-standalone-mode .apc-modal-close {
    display: none;
}

.apc-standalone-mode .apc-modal-card {
    width: 100%;
    max-height: none;
    overflow: visible;
    margin: 0;
    box-shadow: 0 18px 48px rgba(24, 45, 14, .10);
}

.apc-standalone-mode .apc-modal-head {
    border-radius: 18px 18px 0 0;
}

@media (max-width: 782px) {
    .apc-standalone-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .apc-standalone-product-summary {
        min-width: 0;
    }
}

.apc-picker-summary {
    display: grid;
    place-items: center;
    min-width: 190px;
    padding: 16px;
    border-radius: 16px;
    background: var(--apc-dark);
    color: #fff;
    text-align: center;
}

.apc-picker-summary strong {
    display: block;
    color: var(--apc-gold-2);
    font-size: 34px;
    line-height: 1;
}

.apc-picker-summary span {
    display: block;
    margin-top: 6px;
    font-size: 13px;
}

.apc-product-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.apc-product-picker-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--apc-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(24, 45, 14, .08);
}

.apc-picker-image {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    padding: 16px;
    background: linear-gradient(180deg, #fbfaf5, #f2f0e7);
    text-decoration: none;
}

.apc-picker-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .18s ease;
}

.apc-product-picker-card:hover .apc-picker-image img {
    transform: scale(1.035);
}

.apc-picker-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
}

.apc-picker-type {
    color: var(--apc-gold);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.apc-picker-content h3 {
    margin: 0;
    color: var(--apc-dark);
    font-size: 17px;
    line-height: 1.25;
}

.apc-picker-meta {
    display: grid;
    gap: 4px;
    margin-top: auto;
    color: var(--apc-muted);
    font-size: 13px;
    font-weight: 700;
}

.apc-picker-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px !important;
    border-radius: 999px !important;
    background: var(--apc-dark) !important;
    color: #fff !important;
    border-color: var(--apc-dark) !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.apc-picker-button:hover {
    background: var(--apc-gold) !important;
    color: var(--apc-dark) !important;
    border-color: var(--apc-gold) !important;
}

.apc-notice {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--apc-border);
    background: var(--apc-cream);
    color: var(--apc-dark);
    font-weight: 700;
}

.apc-notice-error {
    border-color: rgba(180, 35, 24, .22);
    background: #fff4f2;
    color: var(--apc-danger);
}

@media (max-width: 1120px) {
    .apc-product-picker-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 782px) {
    .apc-product-picker-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .apc-product-picker-grid {
        grid-template-columns: 1fr;
    }
}

/* v2.6.8: click-to-enlarge lightbox for the customer's uploaded artwork. */
.apc-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483400;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.apc-image-lightbox.apc-open {
    display: flex;
}

.apc-image-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 22, 8, .84);
    cursor: zoom-out;
}

.apc-image-lightbox img {
    position: relative;
    z-index: 1;
    max-width: min(94vw, 1280px);
    max-height: 88vh;
    max-height: 88dvh;
    padding: 8px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
    object-fit: contain;
}

.apc-image-lightbox-close {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--apc-gold, #c9ad62);
    color: var(--apc-dark, #182d0e);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}

.apc-image-lightbox-close:hover {
    filter: brightness(1.06);
}

.apc-upload-result img {
    cursor: zoom-in;
}

body.apc-lightbox-open {
    overflow: hidden;
}

/* v2.6.9: the preview grid adapts to the number of configured views, so a
   product with only 1 or 2 views (exact-views mode) has no empty columns. */
.apc-preview-grid[data-view-count="1"] {
    grid-template-columns: minmax(0, 1fr);
    max-width: 460px;
    margin-inline: auto;
}

.apc-preview-grid[data-view-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1120px) {
    .apc-preview-grid[data-view-count="1"] {
        grid-template-columns: minmax(150px, 1fr);
    }

    .apc-preview-grid[data-view-count="2"] {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}
