/* Import Google Fonts for text customization */
@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Barrio&family=Boogaloo&family=Pacifico&family=Love+Ya+Like+A+Sister&family=Architects+Daughter&family=Graduate&family=Special+Elite&family=Unica+One&family=Bangers&family=Lobster&family=Chilanka&family=Montserrat:wght@400;500;600;700&display=swap');

#dog-transformer-container {
    padding: 40px 20px 24px 20px;
    background-color: #285FC3;
    border-radius: 0;
    font-family: 'Montserrat', sans-serif;
    max-width: 1400px;
    box-shadow: none;
    margin: 0;
}

/* Consistent typography for dog transformer container */
#dog-transformer-container,
#dog-transformer-container * {
    font-family: 'Montserrat', sans-serif;
}

/* Base text styles - everything else */
#dog-transformer-container p,
#dog-transformer-container span,
#dog-transformer-container div,
#dog-transformer-container select,
#dog-transformer-container input,
#dog-transformer-container option {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    color: #0A0A0A;
}


#dog-transformer-container label,
#dog-transformer-container h3,
#dog-transformer-container h4,
#dog-transformer-container h5,
#dog-transformer-container h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5 rem;
    color: #0A0A0A;
    text-transform: uppercase;
}

/* Titles and headings - uppercase, 1.8rem */
#dog-transformer-container h1,
#dog-transformer-container h2,
#dog-transformer-container .upload-text,
#dog-transformer-container .style-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.8 rem;
    color: #0A0A0A;
    text-transform: uppercase;
}

/* Buttons - uppercase, 1.8rem */
#dog-transformer-container button,
#dog-transformer-container .upload-button,
#dog-transformer-container .action-button,
#dog-transformer-container #transform-button,
#dog-transformer-container #trial-transform-button {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #0A0A0A;
    text-transform: uppercase;
    padding: 7.5px 15px;
}

/* Standalone transformation page full-width styles */
body.standalone-transformation #dog-transformer-container {
    padding: 40px;
    max-width: 100%;
    margin: 0 auto;
    background-color: #285FC3;
}

/* Modern transformation interface layout */
.modern-transform-interface {
    background-color: #FFFAF4;
    background-image: repeating-linear-gradient(135deg, #E92D2C 0px, #E92D2C 30px, transparent 30px, transparent 50px, #205E97 50px, #205E97 80px, transparent 80px, transparent 100px);
    padding: 20px;
    margin: 40px auto;
    max-width: 1600px;
}

.transform-main-layout {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
    align-items: stretch;
}

/* Left column - stacks upload and settings vertically */
.transform-left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-right: 20px;
    border-right: 2px solid #e5e7eb;
}

/* Right column - stacks output and history vertically */
.transform-right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Inner container with cream background */
.transform-inner-container {
    background-color: #FFFAF4;
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

/* Upload Section */
.upload-section {
    text-align: center;
}

.upload-drop-zone {
    border: 2px dashed #9ca3af;
    padding: 20px;
    margin-bottom: 0;
    background: #EEEEEE;
    cursor: pointer;
    position: relative;
}

.upload-text {
    font-size: 1.8rem;
    color: #0A0A0A;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* Consolidated button styles */
.upload-button,
.action-button {
    background: #FFEE00;
    border: none;
    padding: 7.5px 15px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #0A0A0A;
    display: inline-flex;
    align-items: center;
}



.action-button.view-button {
    background: #3b82f6 !important;
    padding: 12px 20px !important;
    font-size: 0.9rem !important;
    min-width: 120px !important;
}

.action-button.view-button:hover {
    background: #2563eb !important;
    color: #FAFAFA !important;
}

/* Transform button styles */
#transform-button:disabled,
#trial-transform-button:disabled,
.transform-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upload-divider {
    margin: 20px 0;
    font-family: 'Montserrat', sans-serif;
    color: #0A0A0A;
    font-weight: 700;
    font-size: 1.6rem;
}

/* Settings Section */
.settings-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.settings-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4f8cff;
}


.settings-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0A0A0A;
    background: #FAFAFA;
    transition: border-color 0.3s ease;
}

.settings-select:focus {
    outline: none;
    border-color: #4f8cff;
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1);
}

/* Output Section */
.output-section {
    padding: 0;
    text-align: end;
    display: flex;
    flex-direction: column;
}

.output-placeholder {
    background: #f3f4f6;
    padding: 60px 20px;
    border: 2px solid #e5e7eb;
    color: #0A0A0A;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.output-image-container {
    overflow: hidden;
    margin-bottom: 20px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    padding: 15px;
}

.output-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
    object-fit: contain;
}

/* Output Section Multiple Images */
.output-images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.output-image-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    background: #FAFAFA;
}



.output-image-item.selected {
    border-color: #10b981;
}

.output-image-item .output-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    max-height: none; /* allow image to fill item so green frame fits 2:3 etc. with no white space */
}



/* Single image fallback */
.output-images-grid:has(.output-image-item:only-child) {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
}

/* Style Grid - Modern Layout */
.modern-style-section {
    background: #FAFAFA;
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 35px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.modern-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    max-width: none;
}

.modern-style-option {
    background: #FAFAFA;
    border: 3px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.modern-style-option:hover {
    border-color: #4f8cff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 140, 255, 0.15);
}

.modern-style-option.selected {
    border-color: #4f8cff;
    background: #f0f7ff;
    box-shadow: 0 4px 15px rgba(79, 140, 255, 0.2);
}

.modern-style-option img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
    background-color: #f3f4f6;
    display: block;
}

.modern-style-option img[src=""], 
.modern-style-option img:not([src]) {
    background-color: #f3f4f6;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f3f4f6"/><text x="50" y="50" text-anchor="middle" dy=".3em" fill="%23999">Style</text></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.modern-style-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.2;
}

/* History Section - Modern Layout */
.modern-history-section {
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    padding: 20px;
}

.modern-history-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700; 
    color: #0A0A0A;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.modern-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.modern-history-item {
    background: #ff7849;
    aspect-ratio: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.modern-history-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 120, 73, 0.3);
}

.modern-history-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modern-history-empty {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
}




.dog-transformer-form {
    margin-bottom: 32px;
}

.image-upload-container {
    margin-bottom: 24px;
}

#dog-image-upload {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #e5e7eb;
    background: #FAFAFA;
    margin-bottom: 10px;
}

#image-preview-container {
    margin-top: 16px;
    text-align: center;
    background-color: #eceff3;
    padding: 18px;
    border-radius: 12px;
    min-height: 150px;
}

.style-selection {
    margin-bottom: 24px;
}


.style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.style-option {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #FAFAFA;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.style-option:hover {
    border-color: #4f8cff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.style-option.selected {
    border-color: #4f8cff;
    background-color: #f0f7ff;
}

.style-option img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 0;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    padding: 4px;
}

.style-label {
    display: block;
    font-size: 0.9rem;
    color: #23272f;
    font-weight: 500;
    margin-top: 4px;
}

/* Style Dropdown in Settings Section */
.style-dropdown {
    background: #FAFAFA;
    border: 2px solid #e2e8f0;
    padding: 10px;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-bottom: 20px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.style-dropdown:focus {
    outline: none;
    border-color: #4f8cff;
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1);
}

.style-dropdown:hover {
    border-color: #cbd5e1;
}

/* Custom dropdown container for enhanced styling */
.style-dropdown-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    overflow: visible;
}

.style-dropdown-selected {
    display: flex;
    align-items: center;
    gap: 13px;
    background: #FAFAFA;
    border: 2px solid #e2e8f0;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 120px;
}

.style-dropdown-selected:hover {
    border-color: #cbd5e1;
}

.style-dropdown-selected.open {
    border-color: #4f8cff;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.style-dropdown-selected img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
}

.style-dropdown-selected img[src=""], 
.style-dropdown-selected img:not([src]),
.style-dropdown-selected img[src*="404"] {
    content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b7280'%3e%3cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3e%3c/svg%3e");
}



.style-dropdown-selected .dropdown-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
    color: #6b7280;
}

.style-dropdown-selected.open .dropdown-arrow {
    transform: rotate(180deg);
}

.style-dropdown-options {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #FAFAFA;
    border: 2px solid #4f8cff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    padding: 20px;
    min-width: 550px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: auto;
}

.style-dropdown-options.open {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* Backdrop for modal-style dropdown */
.style-dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
}

.style-dropdown-backdrop.open {
    display: block;
}

.style-dropdown-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    text-align: center;
}

/* Removed last-child border rule for grid layout */

.style-dropdown-option:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.style-dropdown-option.selected {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #4f8cff;
}

.style-dropdown-option img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    background: #f1f5f9;
    aspect-ratio: 1;
}

.style-dropdown-option img[src=""], 
.style-dropdown-option img:not([src]),
.style-dropdown-option img[src*="404"] {
    content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b7280'%3e%3cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3e%3c/svg%3e");
}

.style-dropdown-option .style-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.2;
    color: #0A0A0A;
    text-transform: uppercase;
}

/* Hide the original select dropdown when using custom one */
.style-dropdown.hidden {
    display: none;
}

@media (max-width: 1200px) {
    body.standalone-transformation #dog-transformer-container {
        padding: 30px 20px;
    }
    

    
    .style-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    body.standalone-transformation #dog-transformer-container {
        padding: 0px;
    }


    .style-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .style-option {
        padding: 12px 8px;
    }
    
    /* Style dropdown mobile responsive */
    .style-dropdown-selected {
        padding: 12px 16px;
        min-height: 120px;
        gap: 12px;
    }
    
    .style-dropdown-selected img {
        width: 100px;
        height: 100px;
    }
    
    .style-dropdown-option img {
        width: 60px;
        height: 60px;
        aspect-ratio: 1;
        object-fit: contain;
    }
    
    .style-dropdown-option {
        padding: 8px;
        gap: 6px;
    }
    
    .style-dropdown-selected .style-name {
        font-size: 1.6rem;
    }
    
    .style-dropdown-option .style-name {
        font-size: 1.4rem;
    }
    
    .style-dropdown-options.open {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .style-dropdown-options {
        min-width: 350px;
        max-width: 95vw;
        padding: 15px;
    }

    .result-images {
        grid-template-columns: 1fr;
    }
  
    
    .tshirt-container {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 1;
        margin: 10px 0;
        transform: none;
    }
}

@media (max-width: 480px) {
    #dog-transformer-container {
        padding: 0px;
    }

    .style-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .style-dropdown-options.open {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .style-dropdown-option img {
        width: 50px;
        height: 50px;
        aspect-ratio: 1;
        object-fit: contain;
    }
    
    .style-dropdown-option .style-name {
        font-size: 1.2rem;
    }
    
    .style-dropdown-options {
        min-width: 280px;
        max-width: 95vw;
        padding: 12px;
    }
    
    .transform-inner-container {
        padding: 15px;
    }
    
    .customization-page {
        padding: 15px;
    }
    
    .controls-column {
        padding: 15px;
    }
    
    .design-canvas {
        padding: 15px 10px;
        min-height: 350px;
    }
    
    .tshirt-container {
        margin: 5px 0;
    }
}

.background-selection {
    margin-bottom: 24px;
}


.ratio-selection {
    margin-bottom: 24px;
}


.ratio-selection select {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #FAFAFA;
    cursor: pointer;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.checkbox-group input[type="checkbox"]:disabled + label {
    color: #6c757d;
    cursor: not-allowed;
}

.checkbox-group label {
    font-size: 1rem;
    color: #23272f;
    cursor: pointer;
}

#art-style {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #FAFAFA;
    margin-bottom: 10px;
}

#download-image, #approve-button {
    background: #FFEE00;
    border: none;
    padding: 7.5px 15px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #0A0A0A;
    display: inline-flex;
    align-items: center;
}

#download-image:hover, #approve-button:hover {
    background-color: #2563eb;
}

#loading-indicator {
    text-align: center;
    margin: 24px 0;
    padding: 18px;
    background-color: #eceff3;
    border-radius: 12px;
    color: #4f8cff;
    font-weight: 500;
    font-size: 1.1rem;
}

#transformation-result {
    margin-top: 32px;
}

.result-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.original-image, .transformed-image {
    flex: 1;
    min-width: 280px;
    padding: 18px;
    background-color: #eceff3;
    border-radius: 12px;
    text-align: center;
}

.original-image img, .transformed-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 0;
}


.transformation-actions {
    margin: 24px 0 0 0;
    display: flex;
    gap: 16px;
    justify-content: center;
}

#approve-button {
    background: #FFEE00;
    border: none;
    padding: 7.5px 15px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #0A0A0A;
    display: inline-flex;
    align-items: center;
}

#approve-button:hover {
    background-color: #16a34a;
}

#retry-button {
    background: #FFEE00;
    border: none;
    padding: 7.5px 15px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #0A0A0A;
    display: inline-flex;
    align-items: center;
}

#retry-button:hover {
    background-color: #e0e7ff;
    color: #2563eb;
}

.approved-transformation {
    text-align: center;
    margin: 32px 0;
    padding: 24px;
    background-color: #eceff3;
    border-radius: 12px;
}

.approved-transformation img {
    max-width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
}

@media (max-width: 768px) {
    .result-images {
        flex-direction: column;
    }
    .transformation-actions {
        flex-direction: column;
    }
    #dog-transformer-container {
        padding: 18px 6px 12px 6px;
        max-width: 100%;
    }
} 

/* Modern Product Configurator Styles */
.product-configurator {
    background-color: #FFFAF4;
    background-image: repeating-linear-gradient(135deg, #E92D2C 0px, #E92D2C 30px, transparent 30px, transparent 50px, #205E97 50px, #205E97 80px, transparent 80px, transparent 100px);
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}


/* Customization Page */
.customization-page {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
    background-color: #FFFAF4;
    padding: 30px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}


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

/* Placement Selection Header */
.placement-selection-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    margin: -40px -40px 32px -40px;
}

.placement-buttons {
    display: flex;
    gap: 12px;
}

.placement-button {
    background: transparent;
    border: 2px solid #FFEE00;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}


.placement-button:hover {
    background: #FFEE00;
}

.placement-button.active {
    background: #FFEE00;
    border: none;
}


/* Step 1: Placement Choice */
.placement-choice {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin: 40px 0;
    flex-wrap: wrap;
}

.choice-button {
    background: #FAFAFA;
    border: 3px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 250px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.choice-button:hover {
    border-color: #4f8cff;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(79, 140, 255, 0.2);
}

.choice-button.selected {
    border-color: #4f8cff;
    background: linear-gradient(135deg, #4f8cff 0%, #2563eb 100%);
    color: #FAFAFA;
}

.choice-label {
    font-size: 1.8rem;
    font-weight: 700;
    display: block;
    letter-spacing: 0.5px;
}

/* Two-Column Customization Layout */
.customization-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

/* Left Column - Controls */
.controls-column {
    background: #FAFAFA;
    padding: 20px;
    border: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
    height: fit-content;
}

.control-group {
    margin-bottom: 24px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    margin-bottom: 4px;
}

/* ========================================
   COLOR SELECTOR STYLES
   ======================================== */

.color-controls {
    margin-bottom: 24px;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

/* ========================================
   PRESET TEMPLATES STYLES
   ======================================== */

.preset-templates {
    margin-bottom: 24px;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

/* Hide preset templates section if no templates are available */
.preset-templates:has(.preset-templates-container:empty) {
    display: none;
}

/* Fallback for browsers that don't support :has() */
.preset-templates-container:empty {
    display: none;
}

.preset-templates-container:empty + .control-group {
    display: none;
}

.preset-templates-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 12px;
}

.preset-template-btn {
    border: 2px solid #e2e8f0;
    padding: 0 !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
}

.preset-template-btn:hover {
    border-color: #FFEE00;
}

.preset-template-btn:active,
.preset-template-btn.selected {
    border-color: #FFEE00;
}

.template-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-fallback-text {
    font-size: 0.6rem;
    text-align: center;
    color: #666;
    word-break: break-word;
    line-height: 1.1;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

/* Responsive styles for preset templates */
@media (max-width: 768px) {
    .preset-templates-container {
        gap: 6px;
    }
    
    .preset-template-btn {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        padding: 0;
    }
}

@media (max-width: 480px) {
    .preset-templates-container {
        gap: 4px;
    }
    
    .preset-template-btn {
        width: 45px;
        height: 45px;
        min-width: 45px;
        min-height: 45px;
        padding: 0;
    }
}

.color-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.color-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #FAFAFA;
    position: relative;
}

.color-option:hover {
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-option.selected {
    border: 2px solid #374151;
    background:#FAFAFA;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-preview {
    width: 24px;
    height: 24px;
    transition: all 0.2s ease;
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000000;
    font-weight: bold;
    font-size: 14px;
    z-index: 1;
}

/* Responsive adjustments for color selector */
@media (max-width: 768px) {
    .color-selector {
        gap: 6px;
    }
    
    .color-option {
        width: 28px;
        height: 28px;
    }
    
    .color-preview {
        width: 20px;
        height: 20px;
    }
    
    .color-option.selected::after {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .color-selector {
        gap: 4px;
    }
    
    .color-option {
        width: 26px;
        height: 26px;
    }
    
    .color-preview {
        width: 18px;
        height: 18px;
    }
    
    .color-option.selected::after {
        font-size: 11px;
    }
}

/* ========================================
   UNIFIED DESIGN SYSTEM
   ======================================== 
   
   This section contains the core design system with:
   - CSS Custom Properties (variables) for consistent theming
   - Universal heading styles (h1-h5)
   - Universal button system with variants and sizes
   - Consistent color palette and typography scale
   
   All other components should use these base styles
   for consistency across the entire application.
   ======================================== */

/* Typography Scale */
:root {
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --color-primary: #4f8cff;
    --color-primary-dark: #2563eb;
    --color-success: #10b981;
    --color-success-dark: #059669;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
}

/* Universal Heading Styles - Removed to inherit from WordPress theme */


/* Universal Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 2.5rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Button Variants */
.btn-primary {
    background: var(--color-primary);
    color: #FAFAFA;
    border-color: var(--color-primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.btn-success {
    background: var(--color-success);
    color: #FAFAFA;
    border-color: var(--color-success);
}

.btn-success:hover:not(:disabled) {
    background: var(--color-success-dark);
    border-color: var(--color-success-dark);
}

.btn-secondary {
    background: var(--color-gray-100);
    color: var(--color-gray-700);
    border-color: var(--color-gray-200);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-gray-200);
    border-color: var(--color-gray-300);
    color: var(--color-gray-800);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--color-primary);
    color: #FAFAFA;
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: var(--font-size-xs);
    min-height: 2rem;
}

.btn-lg {
    padding: 1rem 1.5rem;
    font-size: var(--font-size-base);
    min-height: 3rem;
}

.btn-full {
    width: 100%;
}

/* Control Sections */
.control-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
}

.control-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.control-section h4 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-gray-800);
    margin: 0 0 1.5rem 0;
    letter-spacing: 0.5px;
    padding-bottom: 0.5rem;
}

/* Form Labels - Consistent styling */


.control-section h5,
.text-elements-list h5 {
    font-size: 0.875rem;
    color: var(--color-gray-600);
    margin-bottom: 0.5rem;
}

/* Compact Slider Styles */
.slider-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.border-controls .color-picker-input {
    display: block;
    width: 100%;
    max-width: 120px;
    height: 36px;
    margin-top: 6px;
    padding: 2px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    box-sizing: border-box;
}

/* Consolidated slider thumb styles - applies to all sliders */
.slider::-webkit-slider-thumb,
.scale-slider::-webkit-slider-thumb,
.text-slider::-webkit-slider-thumb,
.stroke-slider::-webkit-slider-thumb,
.clip-border-slider::-webkit-slider-thumb,
.text-properties-dropdown .text-slider::-webkit-slider-thumb,
.text-properties-dropdown .stroke-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: #4f8cff !important;
    cursor: pointer !important;
    border: 1px solid #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.slider::-moz-range-thumb,
.scale-slider::-moz-range-thumb,
.text-slider::-moz-range-thumb,
.stroke-slider::-moz-range-thumb,
.clip-border-slider::-moz-range-thumb {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: #4f8cff !important;
    cursor: pointer !important;
    border: 1px solid #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.scale-slider,
.clip-border-slider {
    flex: 1;
    height: 4px !important;
    border-radius: 2px;
    background: #e5e7eb !important;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}


.slider-value {
    font-weight: 500;
    color: #6b7280;
    min-width: 35px;
    text-align: right;
    font-size: 0.8rem;
}

/* Editable slider value input wrapper */
.slider-value-wrapper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding-right: 4px;
}

.slider-value-wrapper:focus-within {
    border-color: #4f8cff;
}

.slider-value-input {
    width: 40px;
    text-align: right;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    border: none;
    background: transparent;
    padding: 0;
    outline: none;
}

.slider-value-input:focus {
    color: #1e293b;
}

/* Remove spinner buttons */
.slider-value-input::-webkit-outer-spin-button,
.slider-value-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


.slider-value-suffix {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    margin-left: 2px;
}

.slider-value-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ========================================
   VARIANT-SPECIFIC STYLES
   Y-axis locked mode: allow vertical drag only, hide resize/rotate handles
   ======================================== */

/* When X-axis is locked (Y-axis only movement), hide resize/rotate handles and hover outlines */
.y-axis-locked .design-wrapper .resize-handle,
.y-axis-locked .design-wrapper .rotate-handle {
    display: none !important;
}

.y-axis-locked .design-wrapper:hover {
    outline: none !important;
}

.y-axis-locked .draggable-design {
    cursor: ns-resize !important;
}

/* Hide resize/rotate handles and hover outlines on zoom canvas for Y-axis only mode */
.y-axis-locked .zoom-design-wrapper .zoom-resize-handle,
.y-axis-locked .zoom-design-wrapper .zoom-rotate-handle {
    display: none !important;
}

.y-axis-locked .zoom-design-wrapper:hover {
    outline: none !important;
}

.y-axis-locked .zoom-draggable-design {
    cursor: ns-resize !important;
}

/* Text elements in Y-axis only mode - hide resize handles and hover outlines */
.y-axis-locked .text-element {
    cursor: ns-resize !important;
}

.y-axis-locked .text-element:hover {
    outline: none !important;
    border-color: transparent !important;
}

.y-axis-locked .text-element .text-resize-handle,
.y-axis-locked .text-element.selected .text-resize-handle {
    display: none !important;
}

.y-axis-locked .zoom-text-clone {
    cursor: ns-resize !important;
}

/* Legacy Button Updates - Using New System */
.reset-button {
    width: 100%;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}


/* Instructions */

.controls-column ul {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
}

.controls-column li {
    padding: 8px 0;
    color: #6b7280;
    font-size: 0.9rem;
    position: relative;
    padding-left: 20px;
}

.controls-column li:before {
    content: "•";
    color: #4f8cff;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Right Column - Design Canvas */
.design-column {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    overflow: visible;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
    gap:20px;
}

/* Step 2: Design Canvas */
.design-canvas {
    background: #FAFAFA;
    padding: 20px 40px 40px 40px;
    border: 2px solid #e2e8f0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    position: relative;
    overflow: auto; /* Allow scrolling if needed */
    min-height: 600px;
}

/* Design Canvas Tabs */
.design-canvas-tabs {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    z-index: 10;
}

.tshirt-container {
    position: relative;
    display: inline-block;
    width: 700px;
    height: 700px;
    overflow: visible;
    clip: none;
    clip-path: none;
    contain: none;
    flex-shrink: 0; /* Prevent shrinking */
}


.tshirt-base {
    width: 100%;
    height: 100%;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 1;
    object-fit: contain;
    margin: 0 auto;
}

.design-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none !important;
    border: 2px dashed rgba(79, 140, 255, 0.2);
    z-index: 2;
}

/* Design wrapper with handles */
.design-wrapper {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    /* Transform is handled by JavaScript - no static transform here */
    transform-origin: center center !important;
    transition: none !important;
    pointer-events: auto !important;
    z-index: 3 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.design-wrapper:hover {
    outline: 1px dashed #4f8cff;
    outline-offset: 4px;
}

.draggable-design {
    position: relative !important;
    /* Remove fixed width/height - let JavaScript handle responsive sizing */
    /* width: 150px !important; */
    /* height: 150px !important; */
    /* max-width: 150px !important; */
    /* max-height: 150px !important; */
    cursor: move !important;
    pointer-events: auto !important;
    border: none !important;
    border-radius: 0 !important;
    transition: all 0.1s ease !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    object-fit: contain !important;
    background: transparent !important;
    z-index: 5 !important;
}

/* Static design image used on confirmation/final pages.
   Must match the base size used during customization so that
   the saved scale value renders identically. */
.final-design-image {
    /* Remove fixed width/height - let JavaScript handle responsive sizing */
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    background: transparent !important;
    display: block !important;
    pointer-events: none !important;
}

/* Resize Handles */
.resize-handle {
    position: absolute;
    background: #4f8cff;
    border: 2px solid white;
    border-radius: 3px;
    width: 12px;
    height: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.design-wrapper:hover .resize-handle {
    opacity: 1;
}

.resize-handle-n {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: ns-resize;
}

.resize-handle-s {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: ns-resize;
}

.resize-handle-e {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
}

.resize-handle-w {
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
}

/* Rotation Handles */
.rotate-handle {
    position: absolute;
    background: #22c55e;
    border: 2px solid white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.design-wrapper:hover .rotate-handle {
    opacity: 1;
}

.rotate-handle::after {
    content: '↻';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: #FAFAFA;
    font-weight: bold;
}

.rotate-handle-ne {
    top: -8px;
    right: -8px;
    cursor: alias;
}

.rotate-handle-nw {
    top: -8px;
    left: -8px;
    cursor: alias;
}

.rotate-handle-se {
    bottom: -8px;
    right: -8px;
    cursor: alias;
}

.rotate-handle-sw {
    bottom: -8px;
    left: -8px;
    cursor: alias;
}

/* Instructions */
.instructions {
    background: #FAFAFA;
    border-radius: 12px;
    margin: 0px 0;
}

.instructions p {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 12px;
}

.instructions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instructions li {
    padding: 8px 0;
    color: #4a5568;
    font-size: 1rem;
    position: relative;
    padding-left: 24px;
}

.instructions li::before {
    content: '•';
    color: #4f8cff;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Design Controls */
.design-controls {
    background: #FAFAFA;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}



.position-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    max-width: 120px;
}

.position-controls .control-btn:nth-child(1) { grid-column: 2; grid-row: 1; }
.position-controls .control-btn:nth-child(2) { grid-column: 1; grid-row: 2; }
.position-controls .control-btn:nth-child(3) { grid-column: 3; grid-row: 2; }
.position-controls .control-btn:nth-child(4) { grid-column: 2; grid-row: 2; }

.control-btn {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.control-btn:hover {
    background: #4f8cff;
    color: #FAFAFA;
    border-color: #4f8cff;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    outline: none;
    cursor: pointer;
}


/* Text Controls - Using unified control sections */

.text-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    font-size: 0.8rem;
    margin-bottom: 8px;
    box-sizing: border-box;
    background: #f8f9fa;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.text-input:focus {
    outline: none;
    border-color: #4f8cff;
    background: #FAFAFA;
}

.text-button {
    width: 100%;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.text-button:hover {
    background: #FFEE00;
}

.text-elements-list {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e2e2;
}


.text-item {
    background: #f8f9fa;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    margin-bottom: 6px;
    position: relative;
}

.text-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
}

.text-item-content {
    font-size: 12px;
    color: #333;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-content-with-pencil {
    display: flex;
    align-items: center;
    flex: 1;
}

.text-edit-pencil {
    margin-left: 8px;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    user-select: none;
    transform: scaleX(-1); /* Flip horizontally so point faces text */
}

.text-edit-pencil:hover {
    opacity: 1;
}

.text-edit-input {
    width: 100% !important;
    border: 2px solid #4f8cff !important;
    border-radius: 3px !important;
    padding: 2px 4px !important;
    font-size: 12px !important;
    background: #FAFAFA !important;
    outline: none !important;
    font-family: inherit !important;
    color: #333 !important;
}

.text-item-actions {
    display: flex;
    gap: 4px;
}

.text-item-btn {
    background: none;
    border: none;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    color: #666;
}

.text-item-btn:hover {
    background: #e9ecef;
}

.text-item-btn.delete {
    color: #dc3545;
}

.text-item-btn.delete:hover {
    background: #f8d7da;
}

.text-item-btn.edit {
    position: relative;
}

.text-item-btn.edit::after {
    content: "▼";
    margin-left: 4px;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.text-item-btn.edit.active::after {
    transform: rotate(180deg);
}

/* Text Properties Dropdown */
.text-properties-dropdown {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    background: #FAFAFA;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: none;
    position: relative;
    z-index: 10;
}

.text-properties-dropdown.active {
    display: block;
    animation: slideDown 0.2s ease;
}

/* Add a small triangle pointer at the top */
.text-properties-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #d1d5db;
}

.text-properties-dropdown::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #ffffff;
}

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

/* Dropdown-specific control styling */
.text-properties-dropdown .text-control-item {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.text-properties-dropdown .text-control-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.text-properties-dropdown .text-control-item label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    display: block;
}

.text-properties-dropdown .slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-properties-dropdown .text-slider,
.text-properties-dropdown .stroke-slider {
    flex: 1;
    height: 4px !important;
    background: #e5e7eb !important;
    border-radius: 2px;
}


.text-properties-dropdown .slider-value {
    min-width: 40px;
    font-size: 12px;
    color: #6b7280;
    text-align: right;
    font-weight: 500;
}

.text-properties-dropdown .color-control {
    gap: 10px;
}

/* Modern Color Picker Styles */
.modern-color-picker {
    background: #FAFAFA;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 30px 16px 16px 16px;
    width: 280px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 1px solid #e1e1e1;
}

.color-picker-main {
    margin-bottom: 16px;
}

.color-picker-area {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: crosshair;
}

.color-picker-canvas {
    display: block;
    width: 100%;
    height: 150px;
    border-radius: 8px;
}

.color-picker-controls {
    margin-bottom: 16px;
}

.color-picker-hue-slider {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    border: none;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    position: relative;
}

.color-picker-hue-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: #4f8cff !important;
    cursor: pointer !important;
    border: 1px solid #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    position: relative;
    z-index: 2;
}

.color-picker-hue-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid #ffffff;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.color-picker-hue-slider::-webkit-slider-track {
    height: 12px;
    border-radius: 6px;
    background: transparent;
}

.color-picker-hue-slider::-moz-range-track {
    height: 12px;
    border-radius: 6px;
    background: transparent;
    border: none;
}

.color-picker-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-hex-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.color-picker-hex-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    min-width: 30px;
}

.color-picker-hex-input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    outline: none;
    transition: border-color 0.2s ease;
    background: #FAFAFA;
}

.color-picker-hex-input:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

.color-picker-preview {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
    flex-shrink: 0;
}

/* Color Picker Modal */
.color-picker-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.color-picker-modal {
    position: relative;
    animation: colorPickerModalIn 0.2s ease-out;
}

@keyframes colorPickerModalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.color-picker-close {
    position: absolute;
    top: 5px;
    right: 9px;
    color: #8b8b8b;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 1;
    user-select: none;

}

.color-picker-close:hover {
    color: #333333;
}

/* Color Picker Button */
.color-picker-button {
    width: 40px;
    height: 30px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.color-picker-button:hover {
    border-color: #4f46e5;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.color-picker-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.color-picker-button:hover::after {
    opacity: 1;
}

/* Legacy color picker styles - keep for fallback */
.text-properties-dropdown .text-color-picker,
.text-properties-dropdown .stroke-color-picker {
    width: 40px;
    height: 30px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
}

.text-properties-dropdown .color-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.text-properties-dropdown .text-font-select {
    font-size: 15px;
    padding: 6px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: #FAFAFA;
}

.text-properties-dropdown .text-font-select option {
    font-family: inherit !important;
    font-size: 15px;
}

/* Custom Font Dropdown Styles */
.custom-font-dropdown-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-font-dropdown-button {
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    background: #FAFAFA !important;
    cursor: pointer !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    min-width: 200px !important;
    font-size: 15px !important;
    transition: border-color 0.2s ease !important;
}

.custom-font-dropdown-button:hover {
    border-color: #4f8cff !important;
}

.custom-font-dropdown-options {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: #FAFAFA !important;
    border: 1px solid #ccc !important;
    border-top: none !important;
    border-radius: 0 0 4px 4px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    z-index: 1000 !important;
    display: none !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.custom-font-dropdown-options.show {
    display: block !important;
}

.custom-font-option {
    padding: 8px 12px !important;
    cursor: pointer !important;
    font-size: 15px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    transition: background-color 0.2s ease !important;
}

.custom-font-option:hover {
    background-color: #f5f5f5 !important;
}

.custom-font-option.selected {
    background-color: #e3f2fd !important;
}

.font-preview {
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.dropdown-arrow {
    margin-left: 8px !important;
    font-size: 12px !important;
    color: #666 !important;
    transition: transform 0.2s ease !important;
}

.custom-font-dropdown-button.open .dropdown-arrow {
    transform: rotate(180deg) !important;
}

.text-properties-dropdown .stroke-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.text-properties-dropdown .stroke-controls {
    gap: 8px;
}

.text-properties-dropdown .stroke-checkbox {
    transform: scale(1.1);
    margin-right: 0;
}



.text-properties-dropdown .stroke-options {
    margin-top: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.text-properties-dropdown .stroke-row {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-properties-dropdown .stroke-row:last-child {
    margin-bottom: 0;
}

.text-properties-dropdown .stroke-row label {
    min-width: 50px;
    font-size: 11px;
    margin-bottom: 0;
    color: #6b7280;
}

/* Typography dropdowns container */
.typography-dropdowns-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Font size and weight dropdowns */
.font-size-dropdown,
.font-weight-dropdown {
    flex: 1;
    padding: 6px 8px;
    border: 2px solid #e2e2e2;
    border-radius: 4px;
    font-size: 12px;
    background: #FAFAFA;
    cursor: pointer;
    min-width: 0;
}

.font-size-dropdown:focus,
.font-weight-dropdown:focus {
    outline: none;
    border-color: #4f8cff;
}

.font-size-dropdown:hover,
.font-weight-dropdown:hover {
    border-color: #cbd5e1;
}

.font-size-dropdown option,
.font-weight-dropdown option {
    font-size: 12px;
    padding: 4px;
}

/* Advanced Text Controls */
.advanced-text-controls {
    margin-top: 15px;
    padding: 15px 0;
    border-top: 1px solid #e2e2e2;
}


.text-control-item {
    margin-bottom: 15px;
}

.text-control-item:last-child {
    margin-bottom: 0;
}

.text-control-item label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.text-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px !important;
    border-radius: 2px;
    background: #e5e7eb !important;
    outline: none;
    margin: 5px 0;
}


.color-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-color-picker,
.stroke-color-picker {
    width: 40px;
    height: 30px;
    border: 2px solid #e2e2e2;
    border-radius: 4px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.text-color-picker::-webkit-color-swatch,
.stroke-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.color-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.text-font-select {
    width: 100%;
    padding: 6px 8px;
    border: 2px solid #e2e2e2;
    border-radius: 4px;
    font-size: 15px;
    background: #FAFAFA;
    cursor: pointer;
}

.text-font-select option {
    font-family: inherit !important;
    font-size: 15px;
}

.text-font-select:focus {
    outline: none;
    border-color: #4f8cff;
}

.stroke-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stroke-checkbox {
    margin-right: 8px;
}



.stroke-options {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e2e2e2;
}

.stroke-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.stroke-row:last-child {
    margin-bottom: 0;
}

.stroke-row label {
    min-width: 50px;
    margin-bottom: 0;
}

.stroke-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 2px;
    background: #e5e7eb;
    outline: none;
}


/* Text Overlay */
.text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
    overflow: visible;
    clip: none;
    clip-path: none;
}

/* SVG text overlay for final confirmation page - must match text-overlay z-index */
.text-svg-overlay {
    z-index: 15 !important;
}

.text-element {
    position: absolute;
    font-family: inherit; /* Allow font to be set by JavaScript */
    font-size: 16px;
    color: #000;
    cursor: move;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    border: none;
    min-width: 20px;
    overflow: visible;
    clip: none;
    clip-path: none;
    width: max-content;
    min-width: max-content;
    height: auto;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    white-space: nowrap;
}



.text-element.dragging {
    opacity: 0.7;
    z-index: 20;
}


/* Curvature preset buttons */  
.curvature-presets-container {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.curvature-preset-btn {
    transition: all 0.2s ease !important;
}

.curvature-preset-btn.active {
    border-color: #4f8cff !important;
    background-color: #e3f2fd !important;
    color: #4f8cff !important;
    transform: scale(1.05);
}

.curvature-icon {
    font-size: 18px;
    line-height: 1;
}

/* Hide resize handles for curved text */
.text-element.curved .text-resize-handle {
    display: none !important;
}


/* Text with stroke */
.text-element.stroked {
    /* Stroke is applied dynamically via JavaScript using text-shadow for outside stroke effect */
    -webkit-text-stroke-width: 0px;
    -webkit-text-stroke-color: transparent;
}

/* Text element resize handles */
.text-element .text-resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #4f8cff;
    border: 1px solid white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: auto;
}

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

.text-element .text-resize-handle.ne {
    top: -4px;
    right: -4px;
    cursor: ne-resize;
}

.text-element .text-resize-handle.nw {
    top: -4px;
    left: -4px;
    cursor: nw-resize;
}

.text-element .text-resize-handle.se {
    bottom: -4px;
    right: -4px;
    cursor: se-resize;
}

.text-element .text-resize-handle.sw {
    bottom: -4px;
    left: -4px;
    cursor: sw-resize;
}

/* Final Text Overlay for completed designs */
.final-text-overlay,
.mini-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 16;
}

.final-text-overlay div,
.mini-text-overlay div {
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Curved text on confirmation page needs proper display for CircleType */
.final-text.curved {
    display: inline-block;
    white-space: nowrap;
}

/* Customization Controls */
.customization-controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 32px 0;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    border: none;
    cursor: pointer;
    min-width: 160px;
    min-height: 3rem;
}

.nav-button.primary {
    background: var(--color-primary);
    color: #FAFAFA;
}


/* Finalize button styling */
#finalize-design {
    width: 100%;
    background: #FFEE00;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .modern-transform-interface {
        margin: 0 auto;
    }
    
    .transform-main-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .transform-left-column {
        padding-right: 0;
        border-right: none;
        padding-bottom: 30px;
        border-bottom: 2px solid #e5e7eb;
    }
    
    .modern-style-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .modern-transform-interface {
        margin: 0 auto;
        padding: 15px;
    }
    
    
    .upload-drop-zone {
        padding: 10px;
    }
    
    .modern-style-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .modern-style-option img {
        height: 80px;
    }
}

/* Legacy styles - keeping for backward compatibility */
.transformation-history {
    margin: 32px auto;
    padding: 32px;
    background-color: #FAFAFA;
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
}


.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.history-item {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background: #FAFAFA;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease;
}

.history-item:hover {
    border-color: #4f8cff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.history-image-container {
    /* Legacy styles - keep for backward compatibility */
    margin-bottom: 10px;
}

.history-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 0;
    background-color: #f8f9fa;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.history-details {
    margin-bottom: 12px;
}

.history-style {
    font-size: 0.95rem;
    color: #23272f;
    font-weight: 600;
}

.history-buttons {
    display: flex;
    gap: 8px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.view-full-size,
.select-transformation {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
}

.view-full-size {
    background-color: #f3f4f6;
    color: #374151;
}

.select-transformation {
    background-color: #4f8cff;
    color: #FAFAFA;
}

.view-full-size:hover {
    background-color: #e5e7eb;
}

.select-transformation:hover {
    background-color: #2563eb;
}

@media (max-width: 768px) {
    .history-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .view-full-size,
    .select-transformation {
        width: 100%;
    }
}

/* Modal styles for full-size image view */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    cursor: pointer;
}

.image-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #FAFAFA;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}

@media (max-width: 768px) {
    .view-full-size,
    .select-transformation {
        opacity: 1;
        position: static;
        transform: none;
        width: 100%;
        margin-top: 8px;
    }

    .history-image-container {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
} 

.transformed-image-preview {
    margin: 24px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.transformed-image-preview img {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
}

#save-configuration {
    width: 100%;
    max-width: 300px;
    margin: 24px auto;
    display: block;
    padding: 12px 24px;
    font-size: 1.1rem;
}

/* Comprehensive Order Details Styles */
.transformation-section {
    background: #FAFAFA;
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.transformation-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.transformation-section p {
    color: #4a5568;
    margin-bottom: 16px;
    line-height: 1.6;
}

.order-details-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

@media (max-width: 768px) {
    .transformation-section {
        padding: 16px;
    }
    
    
    .product-configurator {
        padding: 15px;
    }

    .order-details-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .placement-selection-header {
        padding: 20px 24px;
        margin: -40px -40px 24px -40px;
    }
    
    .placement-buttons {
        gap: 8px;
    }
    
    .placement-button {
        padding: 10px 20px;
    }

    
    .transform-inner-container {
        padding: 15px;
        width: 100%;
        max-width: 100%;
    }
    
    .customization-page {
        padding: 15px;
        width: 100%;
        max-width: 100%;
    }
    
    .customization-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
    }
    
    .controls-column {
        height: auto;
        width: 100%;
        max-width: 100%;
    }
    
    .design-column {
        order: -1;
        position: static; /* Remove sticky on mobile for better UX */
        max-height: none;
        width: 100%;
        max-width: 100%;
    }
    
    .design-canvas {
        padding: 20px 15px;
        min-height: 400px;
        max-height: none; /* Remove height restriction on mobile */
        width: 100%;
        box-sizing: border-box;
    }
    
    .tshirt-container {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 1;
        margin: 10px 0;
        box-sizing: border-box;
    }
    
    .tshirt-base {
        width: 100%;
        height: auto;
        max-width: 100%;
    }
    
    .customization-controls {
        flex-direction: column;
        align-items: center;
    }
    
    #finalize-design {
        width: 100%;
        max-width: 300px;
    }
    
    /* Mobile responsive for final product display */
    .final-product-display {
        padding: 16px;
    }
    
    .final-design-two-column {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 100%;
        align-items: stretch;
    }
    
    .product-specs-column {
        text-align: center;
        height: auto;
        justify-content: flex-start;
    }
    
    .product-specs,
    .transformed-dog-preview {
        flex: none;
    }
    
    .spec-item {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Final Product Display Styles */
.final-product-display {
    background: #FAFAFA;
    border-radius: 16px;
    padding: 32px;
    margin: 24px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Two-column layout for final design */
.final-design-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
    max-width: 1000px;
    margin: 0 auto;
}

.product-preview-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}

/* Add border to product image container for symmetrical positioning */
.tshirt-container.final-preview.with-border {
    border: 2px solid #e2e8f0;
    padding: 20px;
    background: #FAFAFA;
}

.product-specs-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: left;
    height: 100%;
    justify-content: space-between;
}

/* Product specifications styling */
.product-specs {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    flex: 1;
}

.product-specs h4 {
    text-align: center;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95rem;
}

.spec-value {
    color: #2d3748;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Transformed dog preview styling */
.transformed-dog-preview {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    flex: 1;
}

.transformed-dog-preview h4 {
    text-align: center;
}

.dog-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.transformed-dog-image {
    max-width: 200px;
    max-height: 200px;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}







.back-to-orders {
    text-align: center;
    margin: 32px 0;
}

.back-to-orders .button {
    background: #f7fafc;
    color: #4f8cff;
    border: 2px solid #4f8cff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.back-to-orders .button:hover {
    background: #4f8cff;
    color: #FAFAFA;
}

@media (max-width: 768px) {

    

    

    

} 

/* Order Details Only Page Styles */
.order-details-container {
    background-color: #FAFAFA;
    border-radius: 16px;
    padding: 32px;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Order Items Section */
.order-items-section {
    margin: 30px 0;
}

.order-items-section h3 {
    text-align: center;
}

.order-item-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.order-item-card:hover {
    border-color: #4f8cff;
    box-shadow: 0 4px 12px rgba(79, 140, 255, 0.1);
}


.item-status {
    margin-bottom: 20px;
}

.item-action {
    text-align: center;
}








/* Order Summary Section */
.order-summary-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-top: 30px;
}

.order-summary-section h3 {
    text-align: center;
}

.summary-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #4f8cff;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 4px;
}

.order-complete-notice {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.order-complete-notice p {
    color: #065f46;
    font-weight: 600;
    margin: 0;
}

.order-pending-notice {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.order-pending-notice p {
    color: #92400e;
    font-weight: 600;
    margin: 0;
}

/* Next Item Prompt */
.next-item-prompt {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    text-align: center;
}


.next-item-prompt p {
    color: #047857;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.next-item-prompt .button {
    background: #10b981;
    color: #FAFAFA;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.next-item-prompt .button:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Mobile responsive for next item prompt */
@media (max-width: 768px) {
    .next-item-prompt {
        padding: 20px;
        margin-top: 20px;
    }
    
    
    .next-item-prompt p {
        font-size: 1rem;
    }
    
    .next-item-prompt .button {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

.order-details-container h2 {
    text-align: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 16px;
}

.transformation-status {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
}

.transformation-status h3 {
    text-align: center;
}

.status-box {
    background: #FAFAFA;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.status-box.status-pending {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.status-box.status-ready {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.status-box.status-complete {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.status-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAFAFA;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.status-content {
    flex: 1;
}


.status-content p {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 0;
    line-height: 1.6;
}

.final-design-mini-preview {
    margin-top: 16px;
    text-align: center;
}


.mini-tshirt-container {
    position: relative;
    display: inline-block;
    max-width: 150px;
    width: 100%;
    margin-bottom: 8px;
}

.mini-tshirt-base {
    width: 100%;
    height: auto;
    display: block;
}

.mini-design-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.mini-design-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
}

.mini-design-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 0;
}

.design-specs {
    font-size: 0.85rem;
    color: #6b7280;
}

.transformation-actions-section {
    background: #FAFAFA;
    border-radius: 16px;
    padding: 32px;
    margin: 24px 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.open-transformation-window {
    background: linear-gradient(135deg, #4f8cff 0%, #2563eb 100%);
    color: #FAFAFA;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 280px;
    box-shadow: 0 4px 15px rgba(79, 140, 255, 0.3);
}

.open-transformation-window:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 140, 255, 0.4);
}

.open-transformation-window.customize-button {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.open-transformation-window.customize-button:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.open-transformation-window.view-design-button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.open-transformation-window.view-design-button:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.open-customization-window {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #FAFAFA;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 280px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.open-customization-window:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.button-description {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 12px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .order-details-container {
        padding: 20px;
        margin: 0 10px;
    }
    
    .status-box {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .status-icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .transformation-actions-section {
        padding: 20px;
    }
    
    .open-transformation-window {
        width: 100%;
        min-width: auto;
        font-size: 1.1rem;
        padding: 14px 24px;
    }
    
    .open-customization-window {
        width: 100%;
        min-width: auto;
        font-size: 1.1rem;
        padding: 14px 24px;
    }
} 

/* History Section Multiple Images */
.history-images-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.history-image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.history-image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.history-image-item .history-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.history-image-item:hover .history-image {
    border-color: #4f8cff;
}

/* Adjust existing history styles */
.history-image-container {
    /* Legacy styles - keep for backward compatibility */
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .history-images-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 6px;
    }
} 

/* ==========================================================
   TRIAL INTERFACE STYLES
   ========================================================== */

/* Trial Container */
/* Trial container - matches dog-transformer-container styling exactly */
.dog-art-trial-container {
    background-color: #285FC3;
    font-family: 'Montserrat', sans-serif;
    box-shadow: none;
    margin: 0 auto;
}

/* Consistent typography for trial container - matches dog-transformer-container */
.dog-art-trial-container,
.dog-art-trial-container * {
    font-family: 'Montserrat', sans-serif;
}

/* Base text styles - everything else */
.dog-art-trial-container p,
.dog-art-trial-container span,
.dog-art-trial-container div,
.dog-art-trial-container select,
.dog-art-trial-container input,
.dog-art-trial-container option {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    color: #0A0A0A;
}

.dog-art-trial-container label,
.dog-art-trial-container h3,
.dog-art-trial-container h4,
.dog-art-trial-container h5,
.dog-art-trial-container h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #0A0A0A;
    text-transform: uppercase;
}

/* Titles and headings - uppercase, 1.8rem */
.dog-art-trial-container h1,
.dog-art-trial-container h2,
.dog-art-trial-container .upload-text,
/* Style name in trial container - inherits from .style-dropdown-selected .style-name */
/* No separate rule needed - uses same styling as main interface */

/* Buttons - uppercase, 1.5rem */
.dog-art-trial-container button,
.dog-art-trial-container .upload-button,
.dog-art-trial-container .action-button,
.dog-art-trial-container #transform-button,
.dog-art-trial-container #trial-transform-button {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #0A0A0A;
    text-transform: uppercase;
    padding: 7.5px 15px;
}

/* Trial expired state */
.trial-expired {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 12px;
    padding: 20px;
    color: #991b1b;
}

.trials-exhausted {
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 8px;
}

.buy-now-link {
    color: #4f8cff;
    font-weight: 600;
    text-decoration: none;
}

.buy-now-link:hover {
    text-decoration: underline;
}

/* Trial Upload Zone - now uses upload-drop-zone class, no separate styles needed */

/* Trial file input - matches main file input styling */
#trial-image-upload {
    display: none;
}



/* Trial Result Actions */
.trial-result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}



/* Trial Mobile Responsive - matches main container responsive styles */
@media (max-width: 768px) {
    .dog-art-trial-container {
        padding: 30px 15px;
    }
    
    /* Trial-specific elements (exhausted overlay, etc.) */
    .trial-exhausted-content {
        padding: 30px 20px;
        margin: 15px;
        max-width: 90vw;
    }
    
    .trial-exhausted-content p {
        font-size: 0.9rem;
    }
    
    .trial-explanation {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    .shop-now-button {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}

/* Trial Output Image Styling - matches main output styling */
#trial-output-container {
    overflow: hidden;
    margin-bottom: 20px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    padding: 15px;
}

#trial-output-container img {
    width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
    object-fit: contain;
}

.trial-output-wrapper {
    /* Matches .output-image-container styling */
    overflow: hidden;
    margin-bottom: 20px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    padding: 15px;
}

.trial-output-wrapper img {
    width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
    object-fit: contain;
}

.trial-result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
}

/* Trial Exhausted Overlay */
.trial-exhausted-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 16px;
}

.trial-exhausted-content {
    background: #FAFAFA;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 2px solid #e5e7eb;
    text-align: center;
    max-width: 500px;
    margin: 20px;
}

.trial-exhausted-content h3 {
    color: #dc2626;
}

.trial-exhausted-content p {
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.trial-explanation {
    background: #f3f4f6;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #6b7280;
    font-size: 0.9rem;
    color: #374151;
    font-style: italic;
}

.trial-exhausted-actions {
    margin-top: 25px;
}

.shop-now-button {
    background: #10b981;
    color: #FAFAFA;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.shop-now-button:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    text-decoration: none;
    color: #FAFAFA;
}

/* Make sure container has relative positioning for overlay */
.dog-art-trial-container {
    position: relative;
}

/* Trial output wrapper - matches output-image-container styling */
.trial-output-wrapper {
    overflow: hidden;
    margin-bottom: 20px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    padding: 15px;
}

/* Transform button in order total column (order-received and view-order pages) */
.woocommerce-order-details .woocommerce-table__product-total {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100%;
    border-bottom: none !important;
}

.order-item-transform-wrapper {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .woocommerce-order-details .woocommerce-table__product-total {
        flex-wrap: wrap !important;
    }
}

/* Mobile responsive styles for color picker */
@media (max-width: 768px) {
    .modern-color-picker {
        width: 260px;
        padding: 12px;
    }
    
    .color-picker-canvas {
        height: 120px;
    }
    
    .color-picker-inputs {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .color-picker-hex-container {
        justify-content: space-between;
    }
    
    .color-picker-preview {
        width: 100%;
        height: 28px;
    }
    
    .color-picker-modal-overlay {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .modern-color-picker {
        width: 240px;
        padding: 10px;
    }
    
    .color-picker-canvas {
        height: 100px;
    }
    
    .color-picker-hue-slider {
        height: 10px;
    }

    .order-item-transform-wrapper {
        flex-shrink: 0;
        padding-top: 10px;
    }

    .color-picker-hue-slider::-moz-range-thumb {
        width: 6px;
        height: 6px;
    }
}

/* Template Specification Modal Styles (Admin Only) */
.template-spec-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.template-spec-modal {
    background: #FAFAFA;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.template-spec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.template-spec-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
}

.template-spec-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.template-spec-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.template-spec-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.spec-section {
    margin-bottom: 32px;
}

.spec-section:last-child {
    margin-bottom: 0;
}

.spec-section h4 {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 8px;
}

.spec-section h5 {
    margin: 0 0 12px 0;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
}

.spec-item {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.spec-item:last-child {
    margin-bottom: 0;
}

.spec-item strong {
    color: #1f2937;
    font-weight: 600;
}

.text-spec-item {
    margin-bottom: 20px;
    padding: 16px;
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.text-spec-item:last-child {
    margin-bottom: 0;
}

.spec-json {
    background: #1f2937;
    color: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.spec-hint {
    color: #9ca3af;
    font-size: 0.75rem;
    font-style: italic;
}

.template-spec-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.template-spec-footer .btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.875rem;
}

.template-spec-footer .btn-primary {
    background: #3b82f6;
    color: #FAFAFA;
}

.template-spec-footer .btn-primary:hover {
    background: #2563eb;
}

.template-spec-footer .btn-secondary {
    background: #6b7280;
    color: #FAFAFA;
}

.template-spec-footer .btn-secondary:hover {
    background: #4b5563;
}

/* Admin-only button styling */
.admin-only {
    background: #dc2626 !important;
    color: #FAFAFA !important;
    border: 1px solid #dc2626 !important;
}

.admin-only:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
}

/* Responsive design for template spec modal */
@media (max-width: 768px) {
    .template-spec-modal-overlay {
        padding: 10px;
    }
    
    .template-spec-modal {
        max-height: 95vh;
    }
    
    .template-spec-header {
        padding: 16px 20px;
    }
    
    .template-spec-header h3 {
        font-size: 1.25rem;
    }
    
    .template-spec-content {
        padding: 20px;
    }
    
    .spec-section {
        margin-bottom: 24px;
    }
    
    .spec-section h4 {
        font-size: 1.1rem;
    }
    
    .text-spec-item {
        padding: 12px;
    }
    
    .spec-json {
        font-size: 0.75rem;
        padding: 12px;
    }
    
    .template-spec-footer {
        padding: 16px 20px;
        flex-direction: column;
    }
    
    .template-spec-footer .btn {
        width: 100%;
    }
}

/* ==========================================================
   DESIGN CANVAS LOADING OVERLAY
   ========================================================== */

.design-canvas-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 8px;
}

.design-canvas-loading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #4f8cff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.design-canvas-loading .loading-text {
    margin-top: 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hide design elements during loading */
.design-canvas.loading .design-wrapper,
.design-canvas.loading #text-overlay {
    opacity: 0;
    visibility: hidden;
}

.design-canvas.loading .design-wrapper,
.design-canvas.loading #text-overlay {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show design elements after loading */
.design-canvas:not(.loading) .design-wrapper,
.design-canvas:not(.loading) #text-overlay {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* ==========================================================
   ZOOM CANVAS STYLES
   ========================================================== */

/* ==========================================================
   ZOOM CANVAS STYLES - Bidirectional Sync Version
   ========================================================== */

.zoom-canvas-container {
    background: #FAFAFA;
    padding: 20px 40px 40px 40px;
    border: 2px solid #e2e8f0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    position: relative;
    overflow: visible;
}

.zoom-canvas-header {
    margin-bottom: 15px;
}

.zoom-canvas-header h4 {
    margin: 0;
}

/* Inner container - mirrors .tshirt-container */
.zoom-tshirt-container {
    position: relative;
    width: 700px;
    height: 700px;
    overflow: hidden;
    background: #f5f5f5; 
}

/* Background image - mirrors .tshirt-base */
.zoom-tshirt-base {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Design overlay - mirrors .design-overlay */
.zoom-design-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* Design wrapper - mirrors .design-wrapper */
.zoom-design-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: move;
    pointer-events: auto;
    z-index: 10;
    user-select: none;
    touch-action: none;
}

.zoom-design-wrapper:hover {
    outline: 2px dashed rgba(79, 140, 255, 0.5);
    outline-offset: 4px;
}

/* Draggable design image - mirrors .draggable-design */
/* Size is set dynamically in JavaScript to match main canvas */
.zoom-draggable-design {
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    object-fit: contain;
}

/* Text overlay - mirrors #text-overlay */
.zoom-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}

/* Cloned text elements in zoom canvas - interactive */
.zoom-text-overlay .text-element,
.zoom-text-overlay .zoom-text-clone {
    position: absolute;
    pointer-events: auto !important;
    user-select: none;
    cursor: move;
    border: 2px dashed transparent;
    padding: 4px 8px;
    border-radius: 4px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}





/* Hide resize handles on zoom text clones */
.zoom-text-overlay .text-resize-handle {
    display: none !important;
}

/* Syncing state indicator on main canvas */
.text-element.syncing {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Resize handles - mirrors .resize-handle */
.zoom-resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #4f8cff;
    border: 2px solid white;
    border-radius: 50%;
    z-index: 20;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.zoom-design-wrapper:hover .zoom-resize-handle {
    opacity: 1;
}

.zoom-resize-handle-n {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: n-resize;
}

.zoom-resize-handle-s {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: s-resize;
}

.zoom-resize-handle-e {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    cursor: e-resize;
}

.zoom-resize-handle-w {
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    cursor: w-resize;
}

/* Rotate handles - mirrors .rotate-handle */
.zoom-rotate-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
    z-index: 20;
    cursor: grab;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.zoom-design-wrapper:hover .zoom-rotate-handle {
    opacity: 1;
}

.zoom-rotate-handle-ne {
    top: -20px;
    right: -20px;
}

.zoom-rotate-handle-nw {
    top: -20px;
    left: -20px;
}

.zoom-rotate-handle-se {
    bottom: -20px;
    right: -20px;
}

.zoom-rotate-handle-sw {
    bottom: -20px;
    left: -20px;
}

/* Chest area indicator on main canvas */
.chest-area-indicator {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    border: 2px dashed rgba(79, 140, 255, 0.5);
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.chest-area-indicator:hover {
    border-color: rgba(79, 140, 255, 0.8);
}

/* Responsive styles */
@media (max-width: 768px) {
    .zoom-canvas-container {
        padding: 10px;
        margin-top: 15px;
    }
    
    .zoom-tshirt-container {
        width: 350px;
        height: 350px;
    }
    
    .zoom-canvas-header h4 {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .zoom-tshirt-container {
        width: 280px;
        height: 280px;
    }
}