/* Custom local fonts */
@font-face {
    font-family: 'Nasal';
    src: url('../assets/fonts/Nasal.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tenada';
    src: url('../assets/fonts/Tenada.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Minercraftory';
    src: url('../assets/fonts/Minercraftory.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Blinker', sans-serif;
    min-height: 100vh;
    padding: 0px;
    overflow-x: hidden;
}

/* Layout */
.container {
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.header {
    background:white;
    color: white;
    padding: 30px;
    text-align: left;
}

.header h1 {
    font-size: 1.5rem;
    margin-bottom: 0px;
    color: #ffffff;;
    /* text-shadow: 2px 2px 4px rgba(0,0,0,0.3); */
}



.content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    padding: 20px;
    min-height: 600px;
}

.order-tshirt-panel {

}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 200px;
}

/* Control Groups and Accordion */
.control-group {
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    overflow: hidden;
}

.control-group:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.control-group-header {
    padding: 10px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.control-group-header:hover {
    background: #e9ecef;
}

.control-group-header h3 {
    color: #333;
    font-size: 1.1rem;
    margin: 0;
}

div.accordion-icon {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #b6b6b6;
    transition: transform 0.3s ease;
}

.control-group.collapsed .accordion-icon {
    transform: rotate(-90deg);
}

.control-group-content {
    padding: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.control-group.collapsed .control-group-content {
    max-height: 0;
    padding: 0 20px;
    opacity: 0;
}

.control-group:not(.collapsed) .control-group-content {
    max-height: 1000px;
    opacity: 1;
}

/* File Upload */
.file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload-btn {
    display: block;
    background: linear-gradient(135deg, #FF2300 0%, #e21e00 100%);
    color: white;
    padding: 20px 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    font-size: 18px;
}

.file-upload:hover .file-upload-btn {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.file-upload.dragover .file-upload-btn {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: scale(1.02);
}

.file-selected .file-upload-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

/* Form Controls */
input[type="text"], 
input[type="color"], 
select {
    width: 100%;
    padding: 1px;
    
    
    font-size: 14px;
    transition: border-color 0.3s ease;
    margin-bottom: 10px;
}

input[type="text"]:focus, 
select:focus {
    outline: none;
    border-color: #667eea;
}

input[type="color"] {
    height: 40px;
    cursor: pointer;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

input[type="range"] {
    width: 100%;
    margin: 8px 0;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Design Area */
.design-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
}

/* iOS-style toggle switch for front/back view */
.ios-toggle-switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
}

.ios-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ff2300;
    transition: 0.3s;
    border-radius: 31px;
}

.ios-slider:before {
    position: absolute;
    content: "";
    height: 25px;
    width: 25px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.ios-toggle-switch input:checked + .ios-slider {
    background-color: #ff2300;
}

.ios-toggle-switch input:checked + .ios-slider:before {
    transform: translateX(20px);
}

/* Zoom Controls */
.zoom-btn {
    padding: 8px 15px;
    margin: 0 2px;
    border: 2px solid #28a745;
    background: white;
    color: #28a745;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: #e8f5e8;
}

.zoom-btn:active {
    background: #28a745;
    color: white;
}

.tshirt-background {
    position: relative;
    width: 1000px;
    height: 1000px;
    /* background-image set dynamically by applyShirtColorToPreview() */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top center;
    border-radius: 10px;
    overflow: hidden;

    display: flex;
    align-items: flex-start;
    justify-content: center;
    /* Printful front print area top: 409/3000 * 1000 = 136px */
    padding-top: 136px;
    transition: opacity 0.4s ease;
}

.tshirt-canvas {
    position: relative;
    /* Printful print area: 1140x1520 on 3000x3000 template = 380x507 on 1000x1000 mockup */
    width: 380px;
    height: 507px;
    background: transparent;
    overflow: hidden;
}

.tshirt-background.back-view {
    /* background-image set dynamically by applyShirtColorToPreview() */
    /* Printful back print area top: 265/3000 * 1000 = 88px */
    padding-top: 88px;
}

.tshirt-shape {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Design Elements */
.design-element {
    position: absolute;
    cursor: move;
    user-select: none;
    border: 2px dashed transparent;
    transition: all 0.2s ease;
    z-index: 10;
}

.design-element:hover {
    border-color: #667eea;
    transform: scale(1.02);
}

.design-element.selected {
    border-color: #c9c9c9;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.3);
}

.design-element.selected.anchor {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.4);
}

.design-element.dragging {
    opacity: 0.8;
    transform: scale(1.05);
    z-index: 100;
}

.title-element {
    font-weight: bold;
    text-align: center;
    padding: 0;
    border-radius: 5px;
    background: rgba(255,255,255,0.0);
    min-width: 0;
    min-height: 0;
    white-space: nowrap;
    overflow: hidden;
    transform-origin: center center;
    /* Fixed width = full canvas print area width so text clips overflow */
    width: 380px;
}

.title-element.text-align-left {
    transform-origin: left center;
    text-align: left;
}

.title-element.text-align-center {
    transform-origin: center center;
    text-align: center;
}

.title-element.text-align-right {
    transform-origin: right center;
    text-align: right;
}

.trail-element {
    border-radius: 10px;
    background: rgba(255,255,255,0.00);
    padding: 0;
    z-index: 1;
}

.trail-canvas {
    display: block;
    border-radius: 5px;
}

.metric-element {
    z-index: 15;
    text-align: center;
    white-space: nowrap;
    width: auto;
    position: absolute;
    display: inline-block;
}

/* Resize handles for text elements */
.resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10px;
    cursor: ew-resize !important;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: rgba(102, 126, 234, 0.3);
    pointer-events: auto;
}

.resize-handle-left {
    left: -5px;
    border-left: 3px solid #667eea;
}

.resize-handle-right {
    right: -5px;
    border-right: 3px solid #667eea;
}

.design-element:hover .resize-handle,
.design-element.resizing .resize-handle,
.design-element.selected .resize-handle {
    opacity: 1;
}

.design-element.resizing {
    cursor: ew-resize;
}

/* Buttons */
.preset-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
}

.preset-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.export-btn {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,184,148,0.3);
    width: 100%;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,184,148,0.4);
}

/* Status Messages */
.status {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: 500;
    text-align: center;
    font-size: 14px;
}

.status.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Instructions */
.instructions {
    background: #e3f2fd;
    border: 2px solid #bbdefb;
    border-radius: 10px;
    padding: 15px;
    color: #1565c0;
    font-size: 14px;
    line-height: 1.4;
}

.instructions strong {
    color: #0d47a1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content {
        grid-template-columns: 1fr;
    }
    
    /* .tshirt-background {
        width: 800px;
        height: 1102px;
    }
    
    .tshirt-canvas {
        width: 384px;
        height: 461px;
    } */
}

/* Hide mobile drawer elements on desktop */
@media (min-width: 769px) {
    .drawer-close-btn,
    .controls-drawer-toggle-btn,
    .drawer-toggle-btn,
    .drawer-overlay,
    .accordion-drawer-close,
    .mobile-back-to-gallery {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    

    .content {
        display:inline;
        padding: 20px;
        gap: 20px;
    }

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

    .drawer-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Drawer for saved designs on mobile */
    .saved-designs-section {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        max-height: 60vh !important;
        background: rgba(255, 255, 255, 0.88) !important;
        border-radius: 15px 15px 0 0 !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15) !important;
        z-index: 1000 !important;
        transform: translateY(100%) !important;
        transition: transform 0.3s ease !important;
        overflow-y: auto !important;
        padding: 20px !important;
        padding-top: 20px !important;
    }

    .saved-designs-section.drawer-open {
        transform: translateY(0) !important;
        display: flex !important;
    }

    /* Close button in drawer */
    .drawer-close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        background: #f0f0f0;
        color: #333;
        border: none;
        border-radius: 50%;
        width: 35px;
        height: 35px;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1001;
        transition: background 0.2s ease;
    }

    .drawer-close-btn:hover {
        background: #e0e0e0;
    }

    /* Toggle button for drawer */
    .drawer-toggle-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: rgba(255, 35, 0, 0.88);
        color: white;
        border: none;
        border-radius: 10px;
        padding: 12px 20px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        z-index: 999;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

    /* Controls drawer toggle button - top right across from logo */
    .controls-drawer-toggle-btn {
        position: fixed;
        top: 58px;
        right: 15px;
        background: rgba(255, 35, 0, 0.88);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 7px 14px;
        font-size: 12px;
        font-weight: 500;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        z-index: 999;
        display: none;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

    /* Design controls drawer on mobile */
    .design-controls-bar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        max-height: 70vh !important;
        background: white !important;
        border-radius: 15px 15px 0 0 !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15) !important;
        z-index: 1000 !important;
        transform: translateY(100%) !important;
        transition: transform 0.3s ease !important;
        overflow-y: auto !important;
        padding: 20px !important;
        padding-top: 50px !important;
        margin-bottom: 0 !important;
    }

    .design-controls-bar.drawer-open {
        transform: translateY(0) !important;
        display: flex !important;
    }

    /* Mobile-friendly tabs - reorder to bottom */
    .tab-container {
        display: flex !important;
        flex-direction: column-reverse !important;
        width: 100% !important;
    }

    .tab-nav {
        border-top: 2px solid #e9ecef !important;
        border-bottom: none !important;
        border-radius: 0 0 8px 8px !important;
        position: sticky !important;
        bottom: 0 !important;
        z-index: 10 !important;
    }

    .tab-btn {
        font-size: 10px !important;
        padding: 8px 4px !important;
        min-width: 0 !important;
    }

    .tab-btn:first-child {
        border-radius: 0 0 0 8px !important;
    }

    .tab-btn:last-child {
        border-radius: 0 0 8px 0 !important;
    }

    .tab-content {
        padding: 15px 10px !important;
        height: auto !important;
        min-height: 200px !important;
        border-radius: 8px 8px 0 0 !important;
    }

    .tab-panel > div {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .tab-panel label {
        font-size: 12px !important;
    }

    .tab-panel input,
    .tab-panel select,
    .tab-panel button {
        font-size: 14px !important;
        padding: 8px 12px !important;
    }

    /* Fix white space above and below t-shirt on mobile */
    .design-area {
        align-items: flex-start !important;
        gap: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
    }

    .tshirt-background {
        transform: scale(0.55) !important;
        transform-origin: top left !important;
        margin: 0 !important;
        margin-left: calc(50% - 500px) !important;
        margin-bottom: -450px !important;
        margin-right: -450px !important;
    }

    /* Ensure content wrapper doesn't add extra space */
    .content {
        min-height: 0 !important;
        height: auto !important;
        display: block !important;
        grid-template-columns: none !important;
        padding: 0 !important;
    }

    .content .sidebar {
        display: none !important;
    }

    /* Editor layout - t-shirt fills full width on mobile, no extra space */
    #editorLayout {
        flex-direction: column !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        padding-top: 55px !important;
    }

    #productPreview {
        width: 100% !important;
        justify-content: center !important;
        padding: 10px !important;
    }

    .design-area {
        height: auto !important;
        min-height: 0 !important;
    }

    /* Hide the top Back to Gallery on mobile (use the one below the t-shirt instead) */
    #editorBackToGallery {
        display: none !important;
    }

    .mobile-back-to-gallery {
        display: block !important;
        position: fixed !important;
        top: 58px;
        left: 15px;
        background: rgba(108, 117, 125, 0.9);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 7px 14px;
        font-size: 12px;
        font-weight: 500;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        z-index: 999;
        white-space: nowrap;
    }

    /* Settings accordion: slide-in drawer from right on mobile */
    .settings-accordion {
        position: fixed !important;
        right: 0 !important;
        top: 0 !important;
        width: 85vw !important;
        max-width: 380px !important;
        height: 100vh !important;
        height: 100dvh !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s ease !important;
        z-index: 1001 !important;
        box-shadow: none !important;
        padding-top: 60px !important;
        background: rgba(255, 255, 255, 0.75) !important;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }

    .settings-accordion.drawer-open {
        transform: translateX(0) !important;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15) !important;
    }

    /* Close button inside accordion drawer */
    .accordion-drawer-close {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: #f0f0f0;
        font-size: 20px;
        line-height: 36px;
        text-align: center;
        cursor: pointer;
        color: #666;
        z-index: 10;
    }

}


 :root {
            --primary-color: #FF2300;
            --primary-dark: #3367d6;
            --secondary-color: rgb(17,17,17);
            --accent-color: #10b981;
            --muted-color: #6c757d;
            --gradient-primary: linear-gradient(135deg, #FF2300 0%, #e11e00 100%);
            /* --gradient-primary: linear-gradient(135deg, #6bcb2b 0%, #407b19 100%); */
        }

        body {
            font-family: 'Inter', sans-serif;
            line-height: 1.6;
        }

        /* Custom button styles */
        .btn-gradient {
            background: var(--gradient-primary);
            border: none;
            color: white !important;
            transition: all 0.3s ease;
        }

        .btn-gradient:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
            color: white !important;
        }

        .btn-outline-custom {
            border: 2px solid #e9ecef;
            color: var(--secondary-color);
            background: white;
            transition: all 0.3s ease;
        }

        .btn-outline-custom:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
            background: #f8f9fa;
            border-color: #dee2e6;
            color: var(--secondary-color);
        }

        /* Editor mode - transparent navbar */
        .navbar.editor-mode {
            background: transparent !important;
            box-shadow: none !important;
            position: absolute;
            width: auto;
            z-index: 100;
        }

        /* Editor mode - hide sidebar, expand t-shirt area */
        .content.editor-active {
            grid-template-columns: 1fr !important;
            padding: 0 !important;
            gap: 0 !important;
            display: block !important;
            width: 100% !important;
        }
        .content.editor-active .sidebar {
            display: none !important;
        }

        /* Header styles */
        .navbar-brand {
            font-weight: 700;
            font-size: 1.25rem;
            color: var(--secondary-color) !important;
        }

        .navbar-nav .nav-link {
            font-weight: 500;
            color: #6c757d !important;
            transition: color 0.3s ease;
        }

        .navbar-nav .nav-link:hover {
            color: var(--primary-color) !important;
        }

        /* Hero section */
        .hero-section {
            padding: 5rem 0 8rem 0;
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        }

        .hero-title {
            font-size: 3.5rem;
            font-weight: 700;
            line-height: 1.2;
            color:#252525;
            margin-bottom: 1.5rem;
        }

        .hero-subtitle {
            
            font-size: 1.25rem;
            color: rgb(153, 153, 153);
            line-height: 1.6;
            margin-bottom: 2rem;
        }

        .home-hero-title {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 5rem;
            font-weight: 400;
            line-height: 1.2;
            color:#fff;
            margin-bottom: 1.5rem;
        }

        .home-hero-subtitle {
            font-family: 'Blinker', sans-serif;
            font-size: 1.5rem;
            color: rgb(237, 237, 237);
            line-height: 1.6;
            margin-bottom: 2rem;
        }

        .text-primary-custom {
            color: var(--primary-color) !important;
        }

        /* Stats section */
        .stats-item {
            text-align: center;
            padding: 1rem;
        }

        .stats-number {
            font-size: 1.75rem;
            font-weight: 700;
            color: var(--secondary-color);
            margin-bottom: 0.25rem;
        }

        .stats-label {
            font-size: 0.875rem;
            color: var(--muted-color);
        }

        /* Hero image */
        .hero-image {
            position: relative;
            overflow: hidden;
            border-radius: 1rem;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
            transition: transform 0.3s ease;
        }

        .hero-image:hover {
            transform: translateY(-8px);
        }

        .hero-image img {
            width: 100%;
            height: auto;
            border-radius: 1rem;
        }

        .hero-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
            border-radius: 0 0 1rem 1rem;
            height: 50%;
        }

        .hero-caption {
            position: absolute;
            bottom: 1.5rem;
            left: 1.5rem;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            padding: 0.75rem 1rem;
            border-radius: 0.5rem;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        /* Features section */
        .features-section {
            padding: 5rem 0;
            background: white;
        }

        .feature-icon {
            width: 4rem;
            height: 4rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1.5rem;
            font-size: 1.5rem;
        }

        .feature-icon-upload {
            background: rgba(66, 133, 244, 0.1);
            color: var(--primary-color);
        }

        .feature-icon-palette {
            background: rgba(16, 185, 129, 0.1);
            color: var(--accent-color);
        }

        .feature-icon-award {
            background: rgba(139, 92, 246, 0.1);
            color: #8b5cf6;
        }

        .feature-icon-truck {
            background: rgba(251, 146, 60, 0.1);
            color: #fb923c;
        }

        .feature-card {
            text-align: center;
            padding: 2rem 1rem;
            transition: transform 0.3s ease;
        }

        .feature-card:hover {
            transform: translateY(-5px);
        }

        .feature-title {
            font-size: 1.125rem;
            font-weight: 600;
            color: var(--secondary-color);
            margin-bottom: 1rem;
        }

        .feature-description {
            color: var(--muted-color);
            line-height: 1.6;
        }

        /* ============================================
           Homepage Sections
           ============================================ */

        /* Manifesto Section */
        .manifesto-section {
            background: #f8f8f8 url('../assets/images/homepage/mapbg.png') center/cover no-repeat;
            padding: 6rem 0;
        }

        .manifesto-text {
            max-width: 1000px;
        }

        .manifesto-line {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 3.5rem;
            line-height: 1.4;
            margin-bottom: 0.25rem;
            color: #111;
        }

        .manifesto-line.faded-1 {
            opacity: 0.5;
        }

        .manifesto-line.faded-2 {
            opacity: 0.35;
        }

        .manifesto-line.manifesto-spaced {
            margin-bottom: 2rem;
        }

        .manifesto-line.manifesto-spaced-top {
            margin-top: 2rem;
        }

        /* Lifestyle Section */
        .lifestyle-section {
            width: 100%;
            line-height: 0;
        }

        .lifestyle-image {
            width: 100%;
            height: auto;
            display: block;
        }

        @media (max-width: 768px) {
            .lifestyle-section {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
            .lifestyle-image {
                width: auto;
                height: 80vh;
            }
        }

        /* CTA Section */
        .cta-section {
            padding: 5rem 0;
            background: url('../assets/images/homepage/ultrareal-bg.png') center/cover no-repeat;
        }

        .cta-title {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 3.5rem;
            font-weight: 400;
            margin-bottom: 2rem;
            color: #111;
        }

        .cta-section .btn-gradient {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 36px;
            padding: 0.75rem 3rem;
        }

        /* Homepage Features Section */
        .homepage-features-section {
            padding: 0;
            background: #fff;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 0;
        }

        .feature-tile {
            display: flex;
            flex-direction: column;
            border: 1px solid #F7F7F7;
        }

        .feature-tile img {
            width: 100%;
            height: auto;
            display: block;
        }

        .feature-tile-text {
            background-color: #707070;
            padding: 1.5rem;
            flex: 1;
        }

        .feature-tile h3 {
            font-family: 'Blinker', sans-serif;
            font-size: 1.25rem;
            margin-bottom: 0.5rem;
            color: #F7F7F7;
        }

        .feature-tile p {
            font-family: 'Blinker', sans-serif;
            font-size: 0.85rem;
            color: #F7F7F7;
            line-height: 1.5;
            margin: 0;
        }

        @media (max-width: 991px) {
            .manifesto-line {
                font-size: 2.5rem;
            }
            .cta-title {
                font-size: 48px;
            }
            .features-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 576px) {
            .manifesto-line {
                font-size: 1.75rem;
            }
            .cta-title {
                font-size: 32px;
            }
            .features-grid {
                grid-template-columns: 1fr;
            }
        }

        /* ========================================
           TRACE LANDING PAGE STYLES
        ======================================== */

        /* Breadcrumb Navbar */
        .trace-breadcrumb {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 0.5rem 0;
        }

        .trace-brand {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.5rem;
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 700;
            letter-spacing: 2px;
            margin-right: 16px;
        }

        .trace-brand:hover {
            color: var(--primary-color);
            text-decoration: none;
        }

        .trace-step {
            font-family: 'Blinker', sans-serif;
            font-size: 0.85rem;
            color: #999;
            letter-spacing: 1.5px;
        }

        .trace-step.active {
            color: var(--primary-color);
        }

        .trace-step-separator {
            color: #ccc;
            font-size: 0.75rem;
        }

        /* Trace Landing Section */
        .trace-landing-section {
            overflow: hidden;
        }

        /* Trace Hero Section */
        .trace-hero {
            background: url('../assets/images/trace/header-bg.png') center/cover no-repeat;
            min-height: 60vh;
            display: flex;
            align-items: center;
            padding: 80px 160px;
        }

        .trace-hero-content {
            max-width: 600px;
        }

        .trace-hero-heading {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 4.5rem;
            font-weight: 400;
            color: #111;
            line-height: 1.05;
            margin-bottom: 16px;
        }

        .trace-hero-subtext {
            font-family: 'Blinker', sans-serif;
            font-size: 1.2rem;
            color: #666;
            line-height: 1.6;
            margin-bottom: 24px;
        }

        .trace-hero-btn {
            display: inline-block;
            background-color: #111;
            color: #fff;
            border: none;
            padding: 16px 40px;
            border-radius: 8px;
            font-family: 'Bebas Neue', sans-serif;
            font-size: 36px;
            font-weight: 400;
            
            cursor: pointer;
            transition: all 0.3s ease;
            margin-bottom: 12px;
        }

        .trace-hero-btn:hover {
            background-color: #333;
            transform: translateY(-2px);
        }

        .trace-hero-helper {
            font-size: 0.8rem;
            color: #999;
            margin-bottom: 20px;
        }

        .trace-explore-link {
            font-family: 'Blinker', sans-serif;
            font-size: 1.2rem;
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
        }

        .trace-explore-link:hover {
            text-decoration: underline;
            color: var(--primary-color);
        }

        /* Sample Routes Drawer */
        .trace-sample-routes {
            display: none;
            gap: 20px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        .trace-sample-card {
            width: 250px;
            cursor: pointer;
            transition: transform 0.2s ease;
        }

        .trace-sample-card:hover {
            transform: translateY(-3px);
        }

        .trace-sample-card img {
            width: 100%;
            height: auto;
            border-radius: 0px;
            display: block;
        }

        .trace-sample-card-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 8px;
        }

        .trace-sample-card-title {
            font-family: 'Blinker', sans-serif;
            font-size: 0.9rem;
            color: #333;
            letter-spacing: 1px;
        }

        .trace-sample-card-link {
            font-size: 0.7rem;
            color: #666;
        }

        /* Trace Features Section */
        .trace-features-section {
            width: 100%;
        }

        /* Responsive: Trace Landing */
        @media (max-width: 768px) {
            .trace-hero {
                padding: 40px 24px;
                min-height: auto;
            }

            .trace-hero-heading {
                font-size: 2.5rem;
            }

            .trace-sample-card {
                width: 140px;
            }
        }

        @media (max-width: 576px) {
            .trace-hero {
                padding: 30px 16px;
            }

            .trace-hero-heading {
                font-size: 2rem;
            }

            .trace-sample-routes {
                gap: 12px;
            }

            .trace-sample-card {
                width: 120px;
            }
        }

        /* ========================================
           ORDER CONFIRMATION PAGE STYLES
        ======================================== */

        .order-confirmed-page {
            min-height: 100vh;
            padding: 60px 20px;
            text-align: center;
            background: url('../assets/images/order-confirm/order-bg.png') center top / cover no-repeat;
        }

        .oc-heading {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 3rem;
            font-weight: 400;
            
            margin-bottom: 8px;
            color: #111;
        }

        .oc-order-id {
            font-family: 'Blinker', sans-serif;
            font-size: 1.1rem;
            color: #333;
            margin-bottom: 4px;
        }

        .oc-email-text {
            font-family: 'Blinker', sans-serif;
            font-size: 0.9rem;
            color: #666;
            margin-bottom: 40px;
        }

        .oc-details-grid {
            display: grid;
            grid-template-columns: 1fr 1.2fr;
            gap: 40px;
            max-width: 750px;
            margin: 0 auto 50px auto;
            text-align: left;
        }

        /* Shipping Info */
        .oc-shipping h3 {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.4rem;
            font-weight: 400;
            
            margin-bottom: 12px;
            color: #111;
        }

        .oc-shipping p {
            margin: 3px 0;
            font-size: 1.1rem;
            color: #333;
            font-family: 'Blinker', sans-serif;
        }

        .oc-contact-link {
            color: #333;
            text-decoration: underline;
            font-size: 0.9rem;
            font-family: 'Blinker', sans-serif;
            display: inline-block;
            margin-top: 12px;
        }

        .oc-contact-link:hover {
            color: #111;
        }

        /* Order Card */
        .oc-order-card {
            background: #fff;
            border: 1px solid #e0e0e0;
            padding: 24px;
            border-radius: 8px;
            
        }

        .oc-order-card h3 {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.2rem;
            font-weight: 400;
            margin-bottom: 16px;
            color: #111;
        }

        .oc-order-card hr {
            border: none;
            border-top: 1px solid #e0e0e0;
            margin: 16px 0;
        }

        .oc-order-item {
            display: flex;
            gap: 16px;
            margin-bottom: 16px;
        }

        .oc-item-img-wrap {
            width: 150px;
            height: 150px;
            border-radius: 4px;
            overflow: hidden;
            flex-shrink: 0;
        }

        .oc-item-img {
            width: 100%;
            height: 100%;
        }

        .oc-item-details strong {
            font-size: 0.95rem;
            color: #111;
            font-family: 'Blinker', sans-serif;
        }

        .oc-item-details p {
            margin: 2px 0;
            font-size: 0.85rem;
            color: #555;
            font-family: 'Blinker', sans-serif;
        }

        /* Cost Breakdown */
        .oc-cost-line {
            display: flex;
            justify-content: space-between;
            padding: 3px 0;
            font-size: 0.9rem;
            color: #333;
            font-family: 'Blinker', sans-serif;
        }

        .oc-cost-total {
            font-weight: 700;
            font-size: 1rem;
            color: #111;
            border-top: 1px solid #e0e0e0;
            padding-top: 8px;
            margin-top: 4px;
        }

        /* What Happens Next */
        .oc-next-steps {
            max-width: 700px;
            margin: 0 auto 50px auto;
            text-align: left;
        }

        .oc-next-steps h2 {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.5rem;
            font-weight: 400;
            margin-bottom: 16px;
            color: #111;
        }

        .oc-next-steps ul {
            list-style: disc;
            padding-left: 20px;
        }

        .oc-next-steps li {
            margin-bottom: 8px;
            font-size: 0.9rem;
            color: #333;
            font-family: 'Blinker', sans-serif;
        }

        /* Thank You & CTA */
        .oc-thank-you {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 2.2rem;
            font-weight: 400;
            
            margin-bottom: 24px;
            color: #111;
        }

        .oc-btn-new-design {
            display: inline-block;
            padding: 14px 36px;
            background: var(--primary-color);
            color: #fff;
            text-decoration: none;
            border-radius: 8px;
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.3rem;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .oc-btn-new-design:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(255, 35, 0, 0.3);
            color: #fff;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .oc-details-grid {
                grid-template-columns: 1fr;
                gap: 24px;
            }

            .oc-heading {
                font-size: 2rem;
            }

            .oc-thank-you {
                font-size: 1.6rem;
            }
        }

        /* Footer */
        .footer {
            background: #dcdcdc;
            color: rgb(17,17,17);
            padding: 4rem 0 2rem 0;
            font-family: 'Blinker', sans-serif;
        }

        .footer h5 {
            font-weight: 600;
            margin-bottom: 1rem;
            color: rgb(17,17,17);
        }

        .footer .list-unstyled li {
            margin-bottom: 0.5rem;
        }

        .footer .list-unstyled a {
            color: rgb(17,17,17);
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .footer .list-unstyled a:hover {
            color: #333;
        }

        .footer-brand {
            color: rgb(17,17,17) !important;
            font-weight: 700;
            font-size: 1.25rem;
        }

        .footer-description {
            color: rgb(17,17,17);
            line-height: 1.6;
            margin: 1rem 0 1.5rem 0;
        }

        .social-links a {
            color: rgb(17,17,17);
            font-size: 1.25rem;
            margin-right: 1rem;
            transition: color 0.3s ease;
        }

        .social-links a:hover {
            color: var(--primary-color);
        }

        .footer-bottom {
            border-top: 1px solid #bbb;
            padding-top: 1rem;
        }

        .footer-bottom p {
            margin: 0;
            color: rgb(17,17,17);
        }

        .footer-bottom a {
            color: rgb(17,17,17);
            text-decoration: none;
            margin: 0 0 0 1rem;
        }

        .footer-bottom a:hover {
            color: #333;
        }

        /* Play button */
        .play-icon {
            width: 1.25rem;
            height: 1.25rem;
            background: rgba(66, 133, 244, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 0.5rem;
        }

        .play-triangle {
            width: 0;
            height: 0;
            border-left: 6px solid var(--primary-color);
            border-top: 3px solid transparent;
            border-bottom: 3px solid transparent;
            margin-left: 2px;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .hero-title {
                font-size: 2.5rem;
            }

            .home-hero-title {
                font-size: 4rem;
                
        }
            
            .hero-section {
                padding: 3rem 0 5rem 0;
            }
            
            .stats-item {
                margin-bottom: 1.5rem;
            }
        }

        @media (max-width: 576px) {
            .hero-title {
                font-size: 2rem;
            }
            
            .hero-subtitle {
                font-size: 1.1rem;
            }
        }

        /* Animation utilities */
        .fade-in-up {
            opacity: 0;
            transform: translateY(30px);
            animation: fadeInUp 0.8s ease forwards;
        }

        @keyframes fadeInUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .delay-1 { animation-delay: 0.1s; }
        .delay-2 { animation-delay: 0.2s; }
        .delay-3 { animation-delay: 0.3s; }
        .delay-4 { animation-delay: 0.4s; }

        /* Tab Interface Styles */
        .tab-btn.active {
            background: rgb(153, 153, 153) !important;
            color: white !important;
        }

        .tab-btn:hover {
            background: rgb(153,153,153) !important;
            color: white !important;
        }

        

        /* Mobile-specific styles for element info overlay */
        @media (max-width: 768px) {
            #elementInfoOverlay {
                left: 50% !important;
                transform: translateX(-50%) !important;
                font-size: 0.75rem !important;
                padding: 6px 8px !important;
                max-width: 200px;
            }
        }

        /* Design Gallery Styles */
        .design-gallery {
            max-width: 1400px;
            margin: 0 auto;
            padding: 40px 20px;
        }

        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 30px;
            margin-top: 30px;
        }

        .gallery-card {
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            transition: all 0.3s ease, opacity 0.4s ease;
            cursor: pointer;
            opacity: 0;
        }

        .gallery-card.visible {
            opacity: 1;
        }

        .gallery-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        }

        .gallery-thumbnail {
            position: relative;
            width: 100%;
            min-height: 537px;
            background: #ffffff;
            display: flex;
            align-items: flex-start;
            justify-content: center;
            overflow: hidden;
        }

        .gallery-thumbnail canvas {
            display: block;
        }

        .gallery-card-footer {
            border-top: 1px solid #e9ecef;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }

        .gallery-card-title {
            font-family: 'Blinker', sans-serif;
            font-size: 18px;
            font-weight: 600;
            color: #333;
            cursor: pointer;
        }

        .gallery-view-toggle {
            display: flex;
            border: 1px solid #ddd;
            border-radius: 6px;
            overflow: hidden;
            flex-shrink: 0;
        }

        .gallery-view-btn {
            padding: 4px 12px;
            font-size: 12px;
            font-weight: 500;
            border: none;
            background: #f5f5f5;
            color: #666;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .gallery-view-btn:first-child {
            border-right: 1px solid #ddd;
        }

        .gallery-view-btn.active {
            background: #333;
            color: #fff;
        }

        .gallery-view-btn:hover:not(.active) {
            background: #e8e8e8;
        }

        /* Mobile Gallery Styles */
        @media (max-width: 768px) {
            .gallery-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .gallery-card-title {
                font-size: 16px;
            }

            .gallery-card-footer {
                padding: 10px 12px;
            }
        }

/* ============================================
   Cart System Styles
   ============================================ */

/* Floating cart button */
.floating-cart-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ff2300;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 35, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.floating-cart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 35, 0, 0.5);
}

/* Cart badge */
#cartBadge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #333;
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid white;
}

/* Spinner keyframe for checkout loading */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile: cart drawer full-width */
@media (max-width: 768px) {
    #cartDrawer {
        width: 100% !important;
        right: -100% !important;
    }
    #cartDrawer[style*="right: 0"] {
        right: 0 !important;
    }
}
