.feelform-3d-container {
    position: relative;
    display: inline-block;
    overflow: visible !important;
    max-width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
    touch-action: pan-y;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.feelform-3d-flat-container {
    display: block;
    width: 100%;
    height: 100%;
}

/* Maintain original image visibility until WebGL 3D canvas is confirmed ready */
.feelform-3d-container > img {
    opacity: 1;
    pointer-events: auto;
    user-select: auto;
    transition: opacity 0.4s ease-out;
}

.feelform-3d-container.is-ready > img {
    opacity: 0;
    pointer-events: none;
    user-select: none;
}

/* The generated overlay canvas */
.feelform-3d-canvas {
    position: absolute;
    z-index: 10;
    cursor: default;
    touch-action: pan-y;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    outline: 1px solid transparent; /* Enables hardware subpixel anti-aliasing on CSS 3D transformed parents */
    transform-style: preserve-3d;
    image-rendering: auto;
}

/* Add a smooth entry animation for the canvas */
@keyframes feelform-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.feelform-3d-canvas.ready {
    animation: feelform-fade-in 0.8s ease-out forwards;
}

/* Smooth Spinner for Loading State */
.feelform-3d-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid rgba(169, 255, 93, 0.2);
    border-top-color: #a9ff5d;
    border-radius: 50%;
    animation: feelform-spin 0.8s linear infinite;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.4s ease;
}

@keyframes feelform-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Artmatter Luxury Print Finish Selector (FeelForm vs Flat)
   ========================================================================== */

.print-finish-selector,
.artmatter-finish-selector,
.finish-selector,
[data-feelform-selector] {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 18px 0 22px 0;
    width: 100%;
    box-sizing: border-box;
}

/* Base Option Card Wrapper - Fully Clickable */
.print-finish-selector label,
.artmatter-finish-selector label,
.finish-selector label,
.artmatter-finish-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-sizing: border-box;
    width: 100%;
}

/* Hover State */
.print-finish-selector label:hover,
.artmatter-finish-selector label:hover,
.finish-selector label:hover,
.artmatter-finish-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

/* Selected / Checked State */
.print-finish-selector label:has(input:checked),
.artmatter-finish-selector label:has(input:checked),
.finish-selector label:has(input:checked),
.artmatter-finish-option:has(input:checked),
.print-finish-selector label.is-selected,
.artmatter-finish-selector label.is-selected {
    background: rgba(169, 255, 93, 0.06) !important;
    border-color: rgba(169, 255, 93, 0.75) !important;
    box-shadow: 0 0 20px rgba(169, 255, 93, 0.12), inset 0 0 0 1px rgba(169, 255, 93, 0.3) !important;
}

/* Hide Native Radio Input */
.print-finish-selector input[type="radio"],
.artmatter-finish-selector input[type="radio"],
.finish-selector input[type="radio"],
.artmatter-finish-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

/* Custom Radio Indicator Dot */
.print-finish-selector label::before,
.artmatter-finish-selector label::before,
.finish-selector label::before,
.artmatter-finish-radio {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    background: #121214;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin-top: 2px;
    flex-shrink: 0;
}

.print-finish-selector label:hover::before,
.artmatter-finish-selector label:hover::before {
    border-color: rgba(255, 255, 255, 0.6);
}

.print-finish-selector label:has(input:checked)::before,
.artmatter-finish-selector label:has(input:checked)::before,
.finish-selector label:has(input:checked)::before,
.print-finish-selector label.is-selected::before,
.artmatter-finish-option.is-selected .artmatter-finish-radio {
    border-color: #a9ff5d !important;
    background: radial-gradient(circle, #a9ff5d 42%, #121214 48%) !important;
    box-shadow: 0 0 10px rgba(169, 255, 93, 0.5) !important;
}

/* Rich Card Layout */
.artmatter-finish-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    pointer-events: none; /* Let parent label handle full card click */
}

.artmatter-finish-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.artmatter-finish-title-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.artmatter-finish-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.1px;
    line-height: 1.3;
}

.artmatter-finish-badge {
    font-size: 8.5px;
    font-weight: 500;
    font-family: inherit;
    text-transform: uppercase;
    padding: 1px 7px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: rgba(169, 255, 93, 0.12);
    color: #a9ff5d;
    border: 1px solid rgba(169, 255, 93, 0.28);
    letter-spacing: 0.4px;
    line-height: 1;
}

.artmatter-finish-badge.muted {
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    color: #a1a1aa;
    border-color: rgba(255, 255, 255, 0.12);
}

.artmatter-finish-price {
    font-size: 13.5px;
    font-weight: 700;
    color: #f4f4f5;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.print-finish-selector label:has(input:checked) .artmatter-finish-price,
.artmatter-finish-selector label:has(input:checked) .artmatter-finish-price {
    color: #a9ff5d;
}

.artmatter-finish-desc {
    font-size: 11.5px;
    color: #a1a1aa;
    font-weight: 400;
    line-height: 1.35;
}

/* Interactive Tooltip Component */
.artmatter-finish-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #a1a1aa;
    font-size: 10px;
    font-weight: 700;
    cursor: help;
    pointer-events: auto;
    position: relative;
    transition: all 0.2s ease;
    margin-left: 2px;
}

.artmatter-finish-info-btn:hover {
    background: rgba(169, 255, 93, 0.2);
    border-color: #a9ff5d;
    color: #a9ff5d;
}

.artmatter-finish-tooltip-bubble {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.35;
    color: #d4d4d8;
    font-weight: 400;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 50;
    text-align: left;
}

.artmatter-finish-info-btn:hover .artmatter-finish-tooltip-bubble,
.artmatter-finish-info-btn.is-active .artmatter-finish-tooltip-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

/* ==========================================================================
   FeelForm™ 3D Mobile Fullscreen Touch Inspection Modal
   ========================================================================== */

.artmatter-feelform-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.artmatter-feelform-modal * {
    box-sizing: border-box;
}

.artmatter-feelform-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.artmatter-feelform-modal-backdrop {
    position: absolute;
    inset: 0;
    background: #000000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Modal Top Bar */
.artmatter-feelform-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: max(20px, env(safe-area-inset-top)) 20px 0 20px;
}

.artmatter-feelform-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 14, 18, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    padding: 7px 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.artmatter-feelform-modal-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a9ff5d;
    box-shadow: 0 0 8px #a9ff5d;
    animation: feelform-dot-pulse 2s infinite;
}

@keyframes feelform-dot-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.artmatter-feelform-modal-title {
    font-size: 12.5px;
    font-weight: 500;
    color: #f4f4f5;
    letter-spacing: 0.02em;
}

.artmatter-feelform-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(14, 14, 18, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.20);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    -webkit-tap-highlight-color: transparent;
}

.artmatter-feelform-modal-close:hover,
.artmatter-feelform-modal-close:active {
    background: rgba(24, 24, 30, 0.90);
    transform: scale(1.05);
}

/* Modal Loading State */
.artmatter-feelform-modal-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #a1a1aa;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.artmatter-feelform-modal-loader.is-loaded {
    opacity: 0;
    transform: translate(-50%, -45%) scale(0.95);
    pointer-events: none;
}

.artmatter-feelform-spinner {
    width: 32px;
    height: 32px;
    border: 2.5px solid rgba(255, 255, 255, 0.15);
    border-top-color: #a9ff5d;
    border-radius: 50%;
    animation: artmatter-spin 0.8s linear infinite;
}

@keyframes artmatter-spin {
    to { transform: rotate(360deg); }
}

/* Modal 3D Canvas Viewport (True Vertical Center) */
.artmatter-feelform-modal-viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: grab;
    overflow: visible;
    z-index: 2;
}

.artmatter-feelform-modal-viewport:active {
    cursor: grabbing;
}

.artmatter-feelform-modal-canvas {
    display: block;
    touch-action: none;
    filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.85));
    transition: opacity 0.35s ease, filter 0.3s ease;
    overflow: visible;
    pointer-events: none;
}

/* Floating Bottom Hint Pill (Matching AR Instructions) */
.artmatter-feelform-modal-hint {
    position: absolute;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(12, 12, 16, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 9px 20px;
    border-radius: 50px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.artmatter-feelform-modal-hint.is-hidden {
    opacity: 0;
}

.artmatter-feelform-modal-hint svg {
    color: #a9ff5d;
    flex-shrink: 0;
}

/* Trigger Button Component (.feelform-view / [feelform_view_button]) */
.feelform-view-btn,
.artmatter-feelform-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(18, 18, 22, 0.85);
    border: 1px solid rgba(169, 255, 93, 0.35);
    border-radius: 9999px;
    padding: 8px 16px;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 12px rgba(169, 255, 93, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.feelform-view-btn:hover,
.artmatter-feelform-trigger-btn:hover {
    background: rgba(28, 28, 34, 0.95);
    border-color: #a9ff5d;
    color: #a9ff5d;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 16px rgba(169, 255, 93, 0.2);
}

.feelform-view-btn svg,
.artmatter-feelform-trigger-btn svg {
    color: #a9ff5d;
    flex-shrink: 0;
}

/* On-image touch pill badge on single product */
.artmatter-feelform-badge-trigger {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 15;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(10, 10, 14, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    padding: 5px 11px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.artmatter-feelform-badge-trigger:hover,
.artmatter-feelform-badge-trigger:active {
    border-color: #a9ff5d;
    color: #a9ff5d;
    background: rgba(18, 18, 24, 0.95);
}

.artmatter-feelform-badge-trigger svg {
    color: #a9ff5d;
}

/* ==========================================================================
   Bricks Finish Visibility Utility Classes
   Allows hiding/showing elements when Flat vs FeelForm 3D is selected
   ========================================================================== */

/* 1. Hide on Flat (Show only when FeelForm 3D is selected) */
body.is-finish-flat .hide-on-flat,
body.is-finish-flat .feelform-only,
body.is-finish-flat .artmatter-hide-on-flat,
body.is-finish-flat .artmatter-feelform-only,
body.is-finish-flat [data-hide-on="flat"],
body.is-finish-flat [data-show-on="feelform"],
body[data-artmatter-finish="flat"] .hide-on-flat,
body[data-artmatter-finish="flat"] .feelform-only,
body[data-artmatter-finish="flat"] .artmatter-hide-on-flat,
body[data-artmatter-finish="flat"] .artmatter-feelform-only,
body[data-artmatter-finish="flat"] [data-hide-on="flat"],
body[data-artmatter-finish="flat"] [data-show-on="feelform"],
[data-artmatter-finish="flat"] .hide-on-flat,
[data-artmatter-finish="flat"] .feelform-only,
[data-artmatter-finish="flat"] .artmatter-hide-on-flat,
[data-artmatter-finish="flat"] .artmatter-feelform-only {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* 2. Hide on FeelForm (Show only when Flat is selected) */
body.is-finish-feelform .hide-on-feelform,
body.is-finish-feelform .flat-only,
body.is-finish-feelform .artmatter-hide-on-feelform,
body.is-finish-feelform .artmatter-flat-only,
body.is-finish-feelform [data-hide-on="feelform"],
body.is-finish-feelform [data-show-on="flat"],
body[data-artmatter-finish="feelform"] .hide-on-feelform,
body[data-artmatter-finish="feelform"] .flat-only,
body[data-artmatter-finish="feelform"] .artmatter-hide-on-feelform,
body[data-artmatter-finish="feelform"] .artmatter-flat-only,
body[data-artmatter-finish="feelform"] [data-hide-on="feelform"],
body[data-artmatter-finish="feelform"] [data-show-on="flat"],
[data-artmatter-finish="feelform"] .hide-on-feelform,
[data-artmatter-finish="feelform"] .flat-only,
[data-artmatter-finish="feelform"] .artmatter-hide-on-feelform,
[data-artmatter-finish="feelform"] .artmatter-flat-only {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}


