/**
 * Public-facing styles for the plugin
 *
 * @link       https://www.dugudlabs.com
 * @since      1.0.0
 *
 * @package    Eyewear_virtual_try_on_wordpress
 * @subpackage Eyewear_virtual_try_on_wordpress/public/css
 */

/* ============================================
   FULL PAGE MODAL STYLES
   ============================================ */

/* Hide body scrollbar when modal is open */
body.specfit_modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* For WordPress admin bar compatibility */
body.specfit_modal-open.admin-bar {
    position: fixed !important;
    top: 0 !important;
}

body.specfit-face-modal-open {
    overflow: hidden !important;
}

.specfit-face-widget {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-family: inherit;
}

.specfit-face-widget-toolbar {
    display: inline-flex;
    align-items: stretch;
    justify-content: flex-end;
    border: 1px solid #cfe0ff;
    background: #eef5ff;
    box-sizing: border-box;
}

.specfit-face-widget-heading {
    color: #000;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.specfit-face-widget-change {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-right: 1px solid #d9e7ff !important;
    border-radius: 0 !important;
    background: #eef5ff !important;
    color: #000 !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    cursor: pointer !important;
}

.specfit-face-widget-switch {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #f8fbff !important;
    color: #000 !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

.specfit-face-widget-switch-track {
    display: flex;
    align-items: center;
    width: 36px;
    height: 20px;
    padding: 2px;
    box-sizing: border-box;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.2s ease;
}

.specfit-face-widget-switch-thumb {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease;
}

.specfit-face-widget-switch.is-active .specfit-face-widget-switch-track {
    background: #2563d8;
}

.specfit-face-widget-switch.is-active .specfit-face-widget-switch-thumb {
    transform: translateX(16px);
}

.specfit-face-widget-credit {
    padding-right: 2px;
    color: #111827;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.1;
}

.specfit-face-widget-reset {
    display: none !important;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.specfit-face-archive-banner {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin: 0 0 18px;
    clear: both;
}

.specfit-face-modal {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    align-items: center !important;
    justify-content: center !important;
    padding:
        max(20px, env(safe-area-inset-top))
        max(20px, env(safe-area-inset-right))
        max(20px, env(safe-area-inset-bottom))
        max(20px, env(safe-area-inset-left));
    box-sizing: border-box !important;
    overflow-y: auto !important;
    isolation: isolate !important;
    pointer-events: none !important;
}

.specfit-face-modal.is-open {
    display: flex !important;
    pointer-events: auto !important;
}

.specfit-face-modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 0 !important;
    background: rgba(10, 16, 28, 0.68) !important;
    backdrop-filter: blur(2px);
}

.specfit-face-modal-card {
    position: relative !important;
    z-index: 2 !important;
    width: min(520px, 100%) !important;
    max-width: 100% !important;
    max-height: calc(100dvh - max(40px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 20px)) !important;
    padding: 76px 42px 28px !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    border: 10px solid #fff !important;
    border-radius: 22px !important;
    background: #101827 !important;
    color: #f8fafc !important;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.42) !important;
    font-family: inherit !important;
    text-align: center !important;
}

.specfit-face-modal-close {
    position: absolute !important;
    top: 12px !important;
    right: 14px !important;
    z-index: 3 !important;
    display: grid !important;
    place-items: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    padding: 0 0 2px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.56) !important;
    color: #e2e8f0 !important;
    font-size: 24px !important;
    line-height: 1 !important;
    cursor: pointer !important;
}

.specfit-face-modal-intro {
    min-height: 250px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.specfit-face-modal-icon {
    display: grid !important;
    place-items: center !important;
    width: 84px !important;
    height: 84px !important;
    margin: 0 auto 18px !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 999px !important;
    background: rgba(30, 41, 59, 0.72) !important;
    color: #93c5fd !important;
    font-size: 24px !important;
}

.specfit-face-modal-card h2 {
    margin: 0 32px 12px !important;
    color: #f8fafc !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
}

.specfit-face-modal-card p {
    max-width: 360px !important;
    margin: 0 auto !important;
    color: #cbd5e1 !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
}

.specfit-face-modal-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 24px 0 0 !important;
    padding: 8px !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 16px !important;
    background: rgba(2, 6, 23, 0.22) !important;
    box-sizing: border-box !important;
}

.specfit-face-modal-actions .button,
.specfit-face-upload-label {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}

.specfit-face-modal-actions .button-primary {
    background: #0891b2 !important;
    color: #fff !important;
}

.specfit-face-upload-label {
    background: #f8fafc !important;
    color: #172033 !important;
}

@media (max-width: 560px) {
    .specfit-face-modal-actions {
        grid-template-columns: 1fr;
    }

    .specfit-face-modal {
        align-items: flex-start !important;
        min-height: 100dvh !important;
    }

    .specfit-face-modal-card {
        width: 100% !important;
        padding: 68px 18px 22px !important;
    }

    .specfit-face-modal-intro {
        min-height: min(250px, 42dvh) !important;
    }

    .specfit-face-modal.is-camera-active .specfit-face-camera video {
        max-height: min(420px, 56dvh);
    }

    .specfit-face-preview img {
        max-height: min(338px, 48dvh);
    }
}

.specfit-face-upload-label:hover,
.specfit-face-upload-label:focus,
.specfit-face-modal-actions .button:hover,
.specfit-face-modal-actions .button:focus {
    cursor: pointer;
}

.specfit-face-upload-label input {
    display: none !important;
}

.specfit-face-camera,
.specfit-face-preview {
    margin-top: 18px;
}

.specfit-face-modal.has-preview .specfit-face-modal-intro {
    display: none;
}

.specfit-face-modal.has-preview .specfit-face-modal-card {
    width: min(560px, 100%) !important;
    padding-top: 64px !important;
    display: flex !important;
    flex-direction: column !important;
}

.specfit-face-modal.has-preview .specfit-face-modal-actions {
    order: 3;
    margin-top: 18px;
    margin-bottom: 0;
}

.specfit-face-modal.has-preview .specfit-face-check-frames {
    order: 4 !important;
    width: 100% !important;
    min-height: 48px !important;
    margin-top: 12px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #0891b2 !important;
    color: #fff !important;
}

.specfit-face-modal.is-camera-active .specfit-face-modal-intro,
.specfit-face-modal.is-camera-active .specfit-face-modal-actions {
    display: none;
}

.specfit-face-modal.is-camera-active .specfit-face-modal-card {
    width: min(560px, 100%) !important;
    padding-top: 64px !important;
}

.specfit-face-modal.is-camera-active .specfit-face-camera {
    margin-top: 0;
}

.specfit-face-camera video,
.specfit-face-preview img {
    display: block !important;
    position: static !important;
    z-index: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: 340px !important;
    margin: 0 !important;
    object-fit: cover !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: #0f172a !important;
    box-shadow: none !important;
}

.specfit-face-preview img {
    object-fit: contain;
    max-height: 338px;
}

.specfit-face-modal.has-preview .specfit-face-preview {
    order: 2;
    margin-top: 0;
}

.specfit-face-camera video {
    transform: scaleX(-1);
}

.specfit-face-modal.is-camera-active .specfit-face-camera video {
    max-height: 420px;
}

.specfit-face-modal.is-camera-active .specfit-face-camera .button {
    display: block !important;
    width: 100% !important;
    min-height: 48px !important;
    margin-top: 12px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #0891b2 !important;
    color: #fff !important;
}

.specfit-face-modal.is-camera-active .specfit-face-message {
    text-align: center;
}

.specfit-face-camera .button {
    margin-top: 12px;
}

.specfit-face-message {
    min-height: 22px !important;
    margin: 14px 0 0 !important;
    color: #cbd5e1 !important;
}

.specfit-face-message.is-error {
    color: #fecaca !important;
}

body.specfit-face-modal-open .products .product,
body.specfit-face-modal-open ul.products li.product,
body.specfit-face-modal-open .woocommerce .product,
body.specfit-face-modal-open .et_pb_module,
body.specfit-face-modal-open .et_pb_shop,
body.specfit-face-modal-open .et_shop_image,
body.specfit-face-modal-open .et_overlay,
body.specfit-face-modal-open .woocommerce-loop-product__link,
body.specfit-face-modal-open .woocommerce-loop-product__link img,
body.specfit-face-modal-open img.attachment-woocommerce_thumbnail,
body.specfit-face-modal-open img.wp-post-image {
    z-index: 0 !important;
}

.specfit-face-product-preview {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.specfit-face-product-preview-wrap {
    position: relative;
}

.specfit-face-glasses-overlay {
    position: absolute;
    z-index: 2;
    object-fit: contain;
    pointer-events: none;
    transform-origin: center center;
}

.specfit-face-preview-actions {
    position: static;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 8px 10px;
    border-top: 1px solid #e5e7eb;
    border-radius: 0;
    background: #fff;
    box-sizing: border-box;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: auto;
}

.specfit-face-preview-actions-title {
    color: #111827;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.specfit-face-preview-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.specfit-face-preview-action,
.specfit-face-preview-action:hover,
.specfit-face-preview-action:focus {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
    color: #172033 !important;
    box-shadow: none !important;
    font-size: 0 !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    cursor: pointer !important;
}

.specfit-face-preview-action:hover,
.specfit-face-preview-action:focus {
    background: #fff !important;
    color: #0891b2 !important;
    transform: translateY(-1px);
}

.specfit-face-preview-action svg {
    display: block;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.specfit-face-preview-action[data-specfit-preview-action="facebook"] svg {
    fill: currentColor;
    stroke: none;
}

.specfit-face-preview-active img.hover-image,
.specfit-face-preview-active img.secondary-image,
.specfit-face-preview-active .secondary-image,
.specfit-face-preview-active .product-hover-image,
.specfit-face-preview-active .woocommerce-product-gallery__image--secondary,
.specfit-face-preview-active .product-image-wrapper img:not(.specfit-face-product-preview):not(.specfit-face-glasses-overlay),
.specfit-face-preview-active .product-image img:not(.specfit-face-product-preview):not(.specfit-face-glasses-overlay) {
    opacity: 0 !important;
    visibility: hidden !important;
}

.specfit-face-preview-active:hover .specfit-face-product-preview,
.specfit-face-preview-active:hover .specfit-face-glasses-overlay {
    opacity: 1 !important;
    visibility: visible !important;
}

.specfit-face-preview-active:hover img.hover-image,
.specfit-face-preview-active:hover img.secondary-image,
.specfit-face-preview-active:hover .secondary-image,
.specfit-face-preview-active:hover .product-hover-image,
.specfit-face-preview-active:hover .woocommerce-product-gallery__image--secondary,
.specfit-face-preview-active:hover .product-image-wrapper img:not(.specfit-face-product-preview):not(.specfit-face-glasses-overlay),
.specfit-face-preview-active:hover .product-image img:not(.specfit-face-product-preview):not(.specfit-face-glasses-overlay) {
    opacity: 0 !important;
    visibility: hidden !important;
}

.specfit-v10-inline-host {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999998;
    padding: 16px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.55);
    align-items: center;
    justify-content: center;
}

.specfit-v10-inline-mount {
    display: block;
    width: 100%;
}

.specfit-v10-inline-mount.specfit-v10-awaiting-tryon-image,
.specfit-v10-open-button.specfit-v10-awaiting-tryon-image,
.specfit-v10-open-button[hidden] {
    display: none !important;
}

.specfit-v10-inline-panel {
    position: relative;
    width: 100% !important;
    height: calc(100vh - 32px) !important;
    max-width: 1120px !important;
    max-height: calc(100vh - 32px) !important;
    margin: 0 auto !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32) !important;
}

.specfit-v10-inline-close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    z-index: 50 !important;
    width: 42px !important;
    height: 42px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.82) !important;
    color: #fff !important;
    font-size: 28px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.24) !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-appearance: none !important;
}

.specfit-v10-inline-close:hover {
    background: rgba(15, 23, 42, 0.92) !important;
}

.specfit-v10-inline-layout {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
}

.specfit-v10-related-panel {
    display: none;
    flex: 0 0 260px;
    width: 260px;
    padding: 72px 16px 16px;
    box-sizing: border-box;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.22);
    overflow: hidden;
}

.specfit-v10-related-heading {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.specfit-v10-related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 100%;
    overflow: auto;
    padding-right: 2px;
    scroll-behavior: smooth;
}

.specfit-v10-related-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 10px !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important;
}

.specfit-v10-related-item:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.38) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10) !important;
}

.specfit-v10-related-item.is-active {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12) !important;
}

.specfit-v10-related-thumb-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.specfit-v10-related-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.specfit-v10-related-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
}

.specfit-v10-related-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.specfit-v10-related-price {
    font-size: 13px;
    color: #475569;
}

.specfit-v10-inline-view {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    padding-top: 0;
}

.specfit-v10-inline-frame {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    background: #fff !important;
}

@media (min-width: 768px) {
    .specfit-v10-inline-host {
        padding: 32px;
    }

    .specfit-v10-related-panel {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .specfit-v10-related-list {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 6px;
    }

    .specfit-v10-inline-panel {
        width: 820px !important;
        height: 760px !important;
        max-width: calc(100vw - 64px) !important;
        max-height: calc(100vh - 64px) !important;
        min-width: 0 !important;
        border-radius: 24px !important;
    }

    .specfit-v10-related-panel {
        display: block;
    }
}

@media (max-width: 767px) {
    .specfit-v10-inline-host {
        padding-top: max(20px, env(safe-area-inset-top));
        padding-right: 12px;
        padding-bottom: max(20px, env(safe-area-inset-bottom));
        padding-left: 12px;
    }

    .specfit-v10-inline-panel {
        /*
         * Mobile browsers do not give the modal the full visual viewport once
         * their address/action bars are visible. Keep deliberate room above and
         * below so the iframe header close control and the related-products
         * footer remain reachable instead of sitting under browser chrome.
         */
        height: calc(100vh - 112px) !important;
        height: calc(100dvh - 112px) !important;
        max-height: calc(100vh - 112px) !important;
        max-height: calc(100dvh - 112px) !important;
        border-radius: 18px !important;
    }

    .specfit-v10-inline-layout {
        flex-direction: column;
    }

    .specfit-v10-inline-view {
        flex: 1 1 auto;
        min-height: 0;
        order: 1;
    }

    .specfit-v10-related-panel {
        display: block;
        order: 2;
        flex: 0 0 auto;
        width: 100%;
        padding: 12px 12px 14px;
        border-right: 0;
        border-top: 1px solid rgba(148, 163, 184, 0.22);
        background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    }

    .specfit-v10-related-heading {
        margin-bottom: 10px;
    }

    .specfit-v10-related-list {
        flex-direction: row;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 12px 4px 0;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .specfit-v10-related-item {
        flex: 0 0 154px;
        min-width: 154px;
        padding: 8px !important;
        scroll-snap-align: start;
    }

    .specfit-v10-related-thumb-wrap {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 12px;
    }

    .specfit-v10-related-name {
        font-size: 13px;
    }

    .specfit-v10-related-price {
        font-size: 12px;
    }

    .specfit-v10-inline-frame {
        height: 100% !important;
        min-height: 0 !important;
    }
}

.specfit_modal {
    display: none !important;
    position: fixed !important;
    z-index: 999999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.specfit_modal.specfit_fade.in {
    display: block !important;
}

.specfit_modal-dialog {
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
}

.specfit_modal-content {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    display: flex !important;
    flex-direction: column !important;
}

.specfit_modal-header {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 10000 !important;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95)) !important;
    backdrop-filter: blur(20px) !important;
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08) !important;
    height: 80px !important;
}

/* Header Content Container */
.specfit_header_content {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    padding: 0 32px;
    gap: 20px;
}

/* Left Section - Logo */
.specfit_header_left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.specfit_logo_section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(0, 86, 179, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.specfit_logo_icon {
    color: #007bff;
    flex-shrink: 0;
}

.specfit_header_title {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

/* Center Section - Logo Display */
.specfit_header_center {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.specfit_header_logo_text {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.specfit_header_logo_image {
    max-height: 60px;
    max-width: 300px;
    height: auto;
    width: auto;
    object-fit: contain;
}

/* Right Section - Close Button */
.specfit_header_right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.specfit_close {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(189, 33, 48, 0.05)) !important;
    backdrop-filter: blur(10px) !important;
    border: 2px solid rgba(220, 53, 69, 0.2) !important;
    border-radius: 12px !important;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0 !important;
    z-index: 10001 !important;
}

.specfit_close:hover {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15), rgba(189, 33, 48, 0.1)) !important;
    transform: scale(1.05) !important;
    border-color: rgba(220, 53, 69, 0.4) !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2) !important;
}

.specfit_close svg {
    color: #dc3545 !important;
    stroke: #dc3545 !important;
    transition: transform 0.3s ease !important;
}

.specfit_close:hover svg {
    transform: rotate(90deg) !important;
}

/* ============================================
   VIDEO AND CAMERA CONTAINER STYLES
   ============================================ */

#specfit_img_div {
    width: 100% !important;
    height: 100% !important;
    padding-top: 80px !important;
    background: #fff;
    min-height: 500px;
}

#video_div {
    background: transparent !important;
}

/* Ensure video and media elements are always transparent */
.specfit_canvas_media,
.specfit_input_video,
#specfit_input_video,
video,
canvas,
#specfit_img_div img,
#galssimage_video {
    background: transparent !important;
}

/* ============================================
   THREE COLUMN LAYOUT (25% - 50% - 25%)
   ============================================ */

.specfit_three_column_layout {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 0;
}

.specfit_left_column {
    flex: 0 0 25%;
    width: 25%;
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    padding: 24px 20px;
    overflow-y: auto;
    border-right: 1px solid #e0e0e0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.03);
    position: relative;
}

.specfit_left_column::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, #e0e0e0 10%, #e0e0e0 90%, transparent);
}

/* Custom Scrollbar for Left Column */
.specfit_left_column::-webkit-scrollbar {
    width: 8px;
}

.specfit_left_column::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
}

.specfit_left_column::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #007bff, #0056b3);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.specfit_left_column::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #0056b3, #004085);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.specfit_center_column {
    flex: 0 0 50%;
    width: 50%;
    background: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.specfit_right_column {
    flex: 0 0 25%;
    width: 25%;
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    padding: 24px 20px;
    overflow-y: auto;
    overflow-x: hidden;
    border-left: 1px solid #e0e0e0;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.03);
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #007bff rgba(0, 0, 0, 0.02);
}

.specfit_right_column::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, #e0e0e0 10%, #e0e0e0 90%, transparent);
}

/* Custom Scrollbar for Right Column */
.specfit_right_column::-webkit-scrollbar {
    width: 8px;
}

.specfit_right_column::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
}

.specfit_right_column::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #007bff, #0056b3);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.specfit_right_column::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #0056b3, #004085);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Column headings */
.specfit_left_column h3,
.specfit_center_column h3,
.specfit_right_column h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.specfit_left_column h3::after,
.specfit_right_column h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
}

/* Product Details Styles */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.product-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.product-price {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    display: inline-block;
}

.product-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.product-description p {
    margin: 0;
}

/* Product Variations Section */
.product-variations-section {
    margin-top: 20px;
}

.variation-attribute {
    margin-bottom: 15px;
}

.variation-attribute label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.variation-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.variation-select:hover {
    border-color: #007bff;
}

.variation-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.variation-select.error-highlight {
    border-color: #dc3545;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Product Image Gallery */
.product-image-gallery {
    margin-top: 15px;
    margin-bottom: 15px;
}

.gallery-main-image {
    width: 100%;
    max-width: 250px;
    aspect-ratio: 1;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    cursor: zoom-in;
}

.gallery-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.gallery-main-image:hover img {
    transform: scale(1.5);
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 10px;
    margin-top: 12px;
    padding: 0 5px;
}

.gallery-thumbnail {
    aspect-ratio: 1;
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gallery-thumbnail::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 2px;
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-thumbnail:hover {
    transform: translateY(-2px);
}

.gallery-thumbnail:hover::before {
    opacity: 0.3;
}

.gallery-thumbnail.active {
}

.gallery-thumbnail.active::before {
    opacity: 1;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.gallery-thumbnail:hover img {
    transform: scale(1.1);
}

/* Product Colors Section */
.product-colors-section {
    margin-top: 20px;
}

.product-colors-section h5 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.product-color-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-color-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.product-color-dot:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.product-color-dot.active {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* Quantity Selector */
.product-quantity-section {
    margin-top: 20px;
}

.product-quantity-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    width: fit-content;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border: none;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #e9ecef;
}

.quantity-btn:active {
    background: #dee2e6;
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input:focus {
    outline: none;
    background: #f8f9fa;
}

/* Add to Cart Button */
.add-to-cart-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #28a745 0%, #20883d 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
    box-shadow: 0 4px 14px rgba(40, 167, 69, 0.35);
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.add-to-cart-btn:hover::before {
    transform: translateX(100%);
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1a6b2f 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.add-to-cart-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.add-to-cart-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.add-to-cart-btn.out-of-stock {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
}

.add-to-cart-btn svg {
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* View Product Button */
.view-product-btn {
    width: 100%;
    display: inline-block;
    padding: 14px 24px;
    background: white;
    color: #007bff;
    text-decoration: none;
    border: 2px solid #007bff;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.view-product-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #007bff, #0056b3);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.view-product-btn:hover {
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.25);
}

.view-product-btn:hover::before {
    opacity: 1;
}

.specfit_left_column p,
.specfit_center_column p,
.specfit_right_column p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Related Products Grid */
.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.related-product-item {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.related-product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #007bff, #0056b3);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.related-product-item:hover {
    border-color: #007bff;
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.15);
    transform: translateY(-4px);
}

.related-product-item:hover::before {
    transform: scaleX(1);
}

.related-product-item.active {
    border-color: #007bff;
    background: linear-gradient(to bottom, rgba(0, 123, 255, 0.08), rgba(0, 123, 255, 0.02));
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.related-product-item.active::before {
    transform: scaleX(1);
}

.related-product-item img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.related-product-item:hover img {
    transform: scale(1.05);
}

.related-product-item .product-name {
    font-size: 12px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.related-product-item:hover .product-name {
    color: #007bff;
}

/* Center column specific styles */
.specfit_action_div {
    text-align: center;
    padding: 40px 20px;
}

.specfit_start_camera_btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.specfit_start_camera_btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.specfit_start_camera_btn svg {
    flex-shrink: 0;
}

#video_div {
    width: 100%;
    height: 100%;
    max-width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#video_div video {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: none;
}

#video_div canvas {
    pointer-events: none;
}

/* ============================================
   SKELETON LOADER STYLES
   ============================================ */

/* Skeleton animation */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton-loading {
    background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* Related Products Skeleton */
.related-products-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.skeleton-product-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.skeleton-image {
    width: 100%;
    height: 80px;
    border-radius: 4px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-text {
    width: 80%;
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* Camera Skeleton */
.camera-skeleton {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: absolute;
    top: 0;
    left: 0;
}

.skeleton-camera-box {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.skeleton-camera-pulse {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(90deg, #e0e0e0 0px, #d0d0d0 40px, #e0e0e0 80px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
    margin-bottom: 20px;
}

.skeleton-camera-box p {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

/* Product Details Skeleton */
.product-details-skeleton {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skeleton-title {
    width: 80%;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-price {
    width: 60%;
    height: 24px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-line {
    width: 100%;
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-line.short {
    width: 70%;
}

.skeleton-button {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    margin-top: 10px;
    background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* ============================================
   LOADER STYLES
   ============================================ */

#specfit_video_loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 26, 0.95);
    z-index: 10001;
    padding: 40px 20px;
}

.specfit_loader {
    text-align: center;
}

#imageLoader {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    border: 6px solid rgba(255, 255, 255, 0.1);
    border-top: 6px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.specfit_quotes {
    color: #fff;
    font-size: 16px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   COLOR DOTS SECTION
   ============================================ */

.specfit_color_dot_div {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: none; /* Hidden by default, shown after face detection */
    gap: 12px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    z-index: 9999;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.specfit_color_dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.specfit_color_dot:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.specfit_color_dot.active {
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

/* ============================================
   RELATED PRODUCTS SECTION
   ============================================ */

.specfit_related_products_container {
    position: absolute;
    top: 80px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.specfit_product_expander {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    width: 80px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.specfit_product_expander:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.specfit_product_expander svg {
    transition: transform 0.3s ease;
}

.specfit_related_products_container.expanded .specfit_product_expander svg {
    transform: rotate(180deg);
}

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

.specfit_related_products_list {
    display: none !important;
    flex-direction: column;
    gap: 8px;
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 12px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    animation: slideDown 0.3s ease;
}

.specfit_related_products_container.expanded .specfit_related_products_list {
    display: flex !important;
}

.specfit_replated_product {
    min-width: 60px;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.specfit_replated_product:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.specfit_replated_product.active {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.specfit_replated_product img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ============================================
   PRODUCT SUMMARY SECTION
   ============================================ */

.product_summary_specfit {
    position: absolute;
    top: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    max-width: 300px;
    color: white;
    z-index: 9999;
}

.product_summary_specfit h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.product_summary_specfit .price {
    font-size: 20px;
    font-weight: bold;
    color: #4ade80;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Hide drawer close buttons on desktop */
.specfit_drawer_close {
    display: none;
}

/* Hide mobile bottom panel on desktop */
.specfit_mobile_bottom_panel {
    display: none !important;
}

@media screen and (max-width: 768px) {
    /* Show drawer close buttons on mobile */
    .specfit_drawer_close {
        display: flex;
    }
    .specfit_modal-header {
        height: 70px !important;
    }

    .specfit_header_content {
        grid-template-columns: auto 1fr auto;
        padding: 0 16px;
        gap: 12px;
    }

    .specfit_logo_section {
        padding: 6px 12px;
        gap: 8px;
    }

    .specfit_logo_icon {
        width: 24px;
        height: 24px;
    }

    .specfit_header_title {
        font-size: 13px;
    }

    .specfit_product_name_header {
        font-size: 16px;
    }

    .specfit_product_price_header {
        font-size: 15px;
    }

    .specfit_close {
        width: 42px !important;
        height: 42px !important;
    }

    .specfit_close svg {
        width: 20px;
        height: 20px;
    }

    #specfit_img_div {
        padding-top: 70px !important;
    }

    /* Mobile Layout: Full-screen camera with drawers */
    .specfit_three_column_layout {
        display: block;
        position: relative;
        height: calc(100vh - 70px);
    }

    /* Hide left and right columns by default on mobile */
    .specfit_left_column,
    .specfit_right_column {
        display: none;
        position: fixed;
        top: 0;
        bottom: 0;
        width: 85%;
        max-width: 350px;
        background: #fff;
        z-index: 10000;
        overflow-y: auto;
        transition: transform 0.3s ease;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    }

    /* Left drawer (Related Products) */
    .specfit_left_column {
        left: 0;
        transform: translateX(-100%);
    }

    .specfit_left_column.active {
        transform: translateX(0);
    }

    /* Right drawer (Product Details) */
    .specfit_right_column {
        right: 0;
        transform: translateX(100%);
    }

    .specfit_right_column.active {
        transform: translateX(0);
    }

    /* Center column takes full width on mobile - responsive based on screen width */
    .specfit_center_column {
        flex: 1;
        width: 100vw;
        height: calc(100vw * 1.33);
        max-height: 80vh;
        position: relative;
        margin: 0 auto;
    }

    #video_div {
        width: 100% !important;
        height: 100% !important;
    }

    .specfit_input_video,
    #output_canvas {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Camera skeleton on mobile */
    #cameraSkeleton {
        width: 100% !important;
        height: 100% !important;
    }

    /* Hamburger menu button */
    .specfit_mobile_hamburger {
        display: flex !important;
        position: fixed;
        top: 90px;
        left: 20px;
        width: 60px;
        height: 60px;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(12px);
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 9998;
        border: 2px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
        transition: all 0.25s ease;
    }

    .specfit_mobile_hamburger:hover {
        background: rgba(0, 0, 0, 0.95);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
        transform: translateY(-2px);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .specfit_mobile_hamburger:active {
        transform: scale(0.93);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .specfit_mobile_hamburger svg {
        width: 28px;
        height: 28px;
    }

    /* View Product Details button at bottom */
    .specfit_mobile_product_details_btn {
        display: flex !important;
        position: fixed;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        padding: 18px 36px;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(40, 40, 40, 0.95));
        backdrop-filter: blur(16px);
        color: #fff;
        border: 2px solid rgba(255, 255, 255, 0.15);
        border-radius: 50px;
        font-size: 16px;
        font-weight: 600;
        letter-spacing: 0.3px;
        cursor: pointer;
        z-index: 9998;
        gap: 12px;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
        transition: all 0.25s ease;
        min-width: 240px;
    }

    .specfit_mobile_product_details_btn:hover {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
        transform: translateX(-50%) translateY(-3px);
        border-color: rgba(255, 255, 255, 0.25);
    }

    .specfit_mobile_product_details_btn:active {
        transform: translateX(-50%) scale(0.97);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    }

    .specfit_mobile_product_details_btn svg {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }

    /* Drawer overlay */
    .specfit_drawer_overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .specfit_drawer_overlay.active {
        display: block;
        opacity: 1;
    }

    /* Drawer close button - positioned at top right corner */
    .specfit_drawer_close {
        position: absolute;
        top: 20px;
        right: 20px;
        width: auto;
        display: flex;
        z-index: 100;
    }

    .specfit_drawer_close button {
        width: 64px;
        height: 64px;
        border: 3px solid #333;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    }

    .specfit_drawer_close button:hover {
        background: #fff;
        border-color: #000;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
        transform: scale(1.08);
    }

    .specfit_drawer_close button:active {
        transform: scale(0.95);
        background: #f5f5f5;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    }

    .specfit_drawer_close svg {
        width: 30px;
        height: 30px;
        stroke-width: 2.5px;
    }

    /* Hide drawer headings on mobile - only show close button */
    .specfit_left_column > h3,
    .specfit_right_column > h3 {
        display: none;
    }

    /* Add top padding to account for close button */
    .specfit_left_column,
    .specfit_right_column {
        padding-top: 80px !important;
    }

    .specfit_left_column .related-products-skeleton,
    .specfit_left_column .related-products-grid,
    .specfit_right_column .product-details-skeleton,
    .specfit_right_column #productDetailsContent {
        padding: 0 20px 20px;
    }

    /* Mobile-specific related products improvements */
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
        padding: 0 20px 20px !important;
    }

    .related-product-item {
        padding: 16px !important;
        min-height: 140px;
    }

    .related-product-item img {
        height: 90px !important;
        margin-bottom: 12px !important;
    }

    .related-product-item .product-name {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    /* Hide default color dots on mobile - will be in bottom panel */
    .specfit_center_column .specfit_color_dot_div {
        display: none !important;
    }

    /* Show color dots when inside the mobile bottom panel */
    .specfit_bottom_color_scroll .specfit_color_dot_div {
        display: flex !important;
        position: static !important;
        transform: none !important;
        bottom: auto !important;
        left: auto !important;
    }

    /* Mobile Bottom Panel - below camera section */
    .specfit_mobile_bottom_panel {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
        z-index: 9999;
        transition: all 0.3s ease;
    }

    /* Expander header with icon */
    .specfit_bottom_panel_header {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px;
        background: #f8f8f8;
        border-bottom: 1px solid #e0e0e0;
        cursor: pointer;
        user-select: none;
    }

    .specfit_bottom_panel_expander {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
    }

    .specfit_bottom_panel_expander svg {
        width: 24px;
        height: 24px;
        stroke: #333;
    }

    .specfit_mobile_bottom_panel.expanded .specfit_bottom_panel_expander {
        transform: rotate(180deg);
    }

    /* Color dots section with scroll */
    .specfit_bottom_color_section {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 15px 10px;
        position: relative;
        overflow: hidden;
    }

    .specfit_bottom_color_scroll {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-behavior: smooth;
        padding: 0 50px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .specfit_bottom_color_scroll::-webkit-scrollbar {
        display: none;
    }

    .specfit_bottom_scroll_btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        background: rgba(0, 0, 0, 0.7);
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 10;
        transition: all 0.2s ease;
    }

    .specfit_bottom_scroll_btn:hover {
        background: rgba(0, 0, 0, 0.85);
        transform: translateY(-50%) scale(1.05);
    }

    .specfit_bottom_scroll_btn.left {
        left: 5px;
    }

    .specfit_bottom_scroll_btn.right {
        right: 5px;
    }

    .specfit_bottom_scroll_btn svg {
        width: 20px;
        height: 20px;
        stroke: #fff;
    }

    .specfit_color_dot {
        width: 42px;
        height: 42px;
        flex-shrink: 0;
    }

    /* Related products expandable section */
    .specfit_bottom_related_section {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: #fff;
        pointer-events: none;
    }

    .specfit_mobile_bottom_panel.expanded .specfit_bottom_related_section {
        max-height: 240px;
        overflow-y: hidden;
        overflow-x: hidden;
        pointer-events: auto;
    }

    .specfit_bottom_related_content {
        padding: 15px;
        background: #fff;
        position: relative;
    }

    /* Add fade indicators on sides to show scrollability */
    .specfit_bottom_related_content::before,
    .specfit_bottom_related_content::after {
        content: '';
        position: absolute;
        top: 15px;
        bottom: 25px;
        width: 20px;
        pointer-events: none;
        z-index: 2;
        transition: opacity 0.3s ease;
    }

    .specfit_bottom_related_content::before {
        left: 15px;
        background: linear-gradient(to right, rgba(255,255,255,0.9), transparent);
    }

    .specfit_bottom_related_content::after {
        right: 15px;
        background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
    }

    /* Inherit all left column styles in bottom panel */
    .specfit_bottom_related_content > * {
        display: block !important;
    }

    /* Style headings from left column */
    .specfit_bottom_related_content h3 {
        font-size: 16px !important;
        font-weight: 600 !important;
        margin: 0 0 12px 0 !important;
        color: #333 !important;
        text-align: left !important;
    }

    /* Style related products list - Horizontal Scroll */
    /* Target both custom mobile list and mirrored desktop list */
    .specfit_bottom_related_content .specfit_related_products_list,
    .specfit_bottom_related_content #relatedProductsList {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        padding: 0 0 10px 0 !important;
        margin: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: #007bff #f0f0f0 !important;
        scroll-snap-type: x mandatory !important;
    }

    /* Webkit scrollbar styling for related products */
    .specfit_bottom_related_content .specfit_related_products_list::-webkit-scrollbar,
    .specfit_bottom_related_content #relatedProductsList::-webkit-scrollbar {
        height: 6px !important;
    }

    .specfit_bottom_related_content .specfit_related_products_list::-webkit-scrollbar-track,
    .specfit_bottom_related_content #relatedProductsList::-webkit-scrollbar-track {
        background: #f0f0f0 !important;
        border-radius: 3px !important;
    }

    .specfit_bottom_related_content .specfit_related_products_list::-webkit-scrollbar-thumb,
    .specfit_bottom_related_content #relatedProductsList::-webkit-scrollbar-thumb {
        background: #007bff !important;
        border-radius: 3px !important;
    }

    .specfit_bottom_related_content .specfit_related_products_list::-webkit-scrollbar-thumb:hover,
    .specfit_bottom_related_content #relatedProductsList::-webkit-scrollbar-thumb:hover {
        background: #0056b3 !important;
    }

    .specfit_bottom_related_content .related-product-item {
        display: flex !important;
        flex-direction: column !important;
        background: #fff !important;
        border: 2px solid #e0e0e0 !important;
        border-radius: 8px !important;
        padding: 8px !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        min-width: 100px !important;
        max-width: 100px !important;
        min-height: 80px !important;
        flex-shrink: 0 !important;
        scroll-snap-align: start !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }

    .specfit_bottom_related_content .related-product-item:hover,
    .specfit_bottom_related_content .related-product-item.active {
        border-color: #007bff !important;
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
        transform: translateY(-2px) !important;
    }

    .specfit_bottom_related_content .related-product-item img {
        width: 100% !important;
        height: 60px !important;
        object-fit: contain !important;
        margin: 0 !important;
        border-radius: 4px !important;
    }

    /* Hide product name and price in mobile bottom panel */
    .specfit_bottom_related_content .product-name,
    .specfit_bottom_related_content .product-price {
        display: none !important;
    }

    /* View Product Details Button in Mobile Bottom Panel */
    .specfit_mobile_view_product_btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: calc(100% - 30px) !important;
        margin: 15px auto !important;
        padding: 12px 20px !important;
        background: linear-gradient(135deg, #007bff, #0056b3) !important;
        color: #fff !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3) !important;
    }

    .specfit_mobile_view_product_btn svg {
        width: 18px !important;
        height: 18px !important;
        stroke: #fff !important;
    }

    .specfit_mobile_view_product_btn:hover,
    .specfit_mobile_view_product_btn:active {
        background: linear-gradient(135deg, #0056b3, #003d82) !important;
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4) !important;
        transform: translateY(-1px) !important;
    }

    /* Hide hamburger menu - using bottom panel instead */
    .specfit_mobile_hamburger {
        display: none !important;
    }

    /* Hide old product details button */
    .specfit_mobile_product_details_btn {
        display: none !important;
    }

    /* Hide product details drawer on mobile */
    .specfit_right_column {
        display: none !important;
    }

    /* Show mobile bottom panel */
    .specfit_mobile_bottom_panel {
        display: block !important;
    }
}

@media screen and (max-width: 480px) {
    .specfit_modal-header {
        height: 60px !important;
    }

    .specfit_header_content {
        padding: 0 12px;
        gap: 8px;
    }

    .specfit_logo_section {
        padding: 4px 8px;
        gap: 6px;
    }

    .specfit_logo_icon {
        width: 20px;
        height: 20px;
    }

    .specfit_header_title {
        font-size: 11px;
    }

    .specfit_product_name_header {
        font-size: 14px;
    }

    .specfit_product_price_header {
        font-size: 13px;
    }

    .specfit_close {
        width: 38px !important;
        height: 38px !important;
    }

    .specfit_close svg {
        width: 18px;
        height: 18px;
    }

    #specfit_img_div {
        padding-top: 60px !important;
    }

    .specfit_product_expander {
        width: 60px;
        height: 40px;
    }

    .specfit_replated_product {
        min-width: 50px;
        width: 50px;
        height: 50px;
    }
}
