    /* --- styles.css --- */
    .border-red-500 {
    border-color: #ef4444 !important;
}

#slider-prev, #slider-next, #color-slider-prev, #color-slider-next {
    opacity: 0.7;
    transition: opacity 0.3s;
}
#slider-prev:hover, #slider-next:hover, #color-slider-prev:hover, #color-slider-next:hover {
    opacity: 1;
}
@media (max-width: 768px) {
    #slider-prev, #slider-next, #color-slider-prev, #color-slider-next {
        opacity: 1; 
    }
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Roboto:wght@400;700&family=Lobster&display=swap');
body { font-family: 'Inter', sans-serif; background-color: white; }
.product-preview-area { position: relative; width: 100%; max-width: 450px; margin: auto; overflow: hidden; }
#product-image { width: 100%; height: auto; object-fit: cover; display: block; border-radius: 0.75rem; }
.custom-element {
    position: absolute;
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    white-space: nowrap;
    border: 2px dashed transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.logo-position { 
    background-size: contain; 
    background-repeat: no-repeat; 
    background-position: center; 
}
.text-position {
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 28px;
}
.custom-element.is-active {
    border: 2px solid #f97316;
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.5);
}
.custom-element.hidden { display: none; }
.no-transition { transition: none !important; }
.clothing-thumbnail { 
    width: 60px; 
    height: 60px; 
    object-fit: cover; 
    cursor: pointer; 
    border: 3px solid transparent; 
    border-radius: 8px; 
    transition: all 0.3s; 
    background-color: #f0f0f0; 
    flex-shrink: 0;
    min-height: 44px;
    min-width: 44px;
}
.clothing-thumbnail:hover { transform: scale(1.05); }
.clothing-thumbnail.selected { border-color: #f97316; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 1000; justify-content: center; align-items: center; }
.modal-fullscreen {
    align-items: stretch;
}
.modal-content { background-color: white; padding: 2rem; width: 95%; max-width: 1200px; max-height: 95vh; overflow-y: auto; border-radius: 1rem; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.modal-fullscreen .modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    padding: 0;
}
.size-quantity-input { 
    width: 2.5rem; 
    text-align: center; 
    -moz-appearance: textfield;
    min-height: 44px;
    font-size: 14px;
}
.size-quantity-input::-webkit-outer-spin-button, .size-quantity-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btn-primary { 
    background-color: #f97316; 
    color: white; 
    padding: 0.75rem 1.5rem; 
    border-radius: 0.5rem; 
    font-size: 1.125rem; 
    font-weight: 600; 
    transition: background-color 0.3s;
    min-height: 48px;
    min-width: 48px;
}
.btn-primary:hover { background-color: #ea580c; }
.btn-secondary { 
    background-color: #6b7280; 
    color: white; 
    padding: 0.6rem 1.2rem; 
    border-radius: 0.5rem; 
    font-weight: 600; 
    transition: background-color 0.3s;
    min-height: 44px;
    min-width: 44px;
}
.btn-secondary:hover { background-color: #4b5563; }
.loading-spinner-overlay { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(255, 255, 255, 0.9); 
    z-index: 2000; 
    justify-content: center; 
    align-items: center;
    backdrop-filter: blur(2px);
}
.loading-spinner { 
    width: 60px; 
    height: 60px; 
    border: 4px solid #f3f4f6; 
    border-top: 4px solid #f97316;
    border-radius: 50%; 
    animation: spin 0.8s linear infinite;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}
@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}
.cart-item { border: 2px solid transparent; transition: border-color 0.3s; }
.cart-item.active { border: 2px solid #f97316; }
.slider-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 0.1rem;
}
.slider-container::-webkit-scrollbar {
    display: none;
}
.text-color-swatch, .logo-color-btn { 
    border: 2px solid #d1d5db;
    min-height: 44px;
    min-width: 44px;
}
.text-color-swatch.selected, .logo-color-btn.selected { border-color: #f97316; transform: scale(1.1); }
.upload-frame {
    border: 2px dashed #cbd5e1;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
    min-height: 44px;
}
.upload-frame:hover { background-color: #f8fafc; }
.resize-handle, .delete-handle {
    position: absolute;
    width: 28px;
    height: 28px;
    background-color: #f97316;
    border: 2px solid white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 11;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    color: white;
    font-size: 12px;
}
.resize-handle {
    bottom: -8px;
    right: -8px;
    cursor: nwse-resize;
}
.delete-handle {
    top: -8px;
    left: -8px;
    cursor: pointer;
}
.custom-element.is-active .resize-handle,
.custom-element.is-active .delete-handle {
    display: flex;
}
.quantity-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 1rem;
    margin: 0 auto;
    position: relative;
}
.quantity-slider::-webkit-scrollbar {
    display: none;
}
.quantity-item {
    flex: 0 0 90%;
    scroll-snap-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (min-width: 640px) {
    .quantity-item {
        flex: 0 0 45%;
    }
}
.quantity-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    background-color: #f3f4f6;
    border-radius: 0.25rem;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}
.quantity-btn:hover {
    background-color: #e5e7eb;
}
.quantity-btn:active {
    background-color: #d1d5db;
}
.quantity-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
}
.quantity-arrow-left {
    left: 0.5rem;
}
.quantity-arrow-right {
    right: 0.5rem;
}
.product-card {
    flex: 0 0 auto;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.product-card h4 {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}
.slide-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    width: 100%;
    height: 320px;
}
.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 0.75rem;
}
.slide-image:hover {
    transform: scale(1.02);
}
.slide-image-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(
        to top, 
        rgba(255,255,255,1) 0%,
        rgba(255,255,255,0.9) 20%,
        rgba(255,255,255,0.5) 50%,
        rgba(255,255,255,0) 100%
    );
    pointer-events: none;
}
.instruction-title {
    color: #f97316;
    text-transform: uppercase;
    text-align: center;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    margin: 1.5rem auto 0.5rem;
    display: block;
    width: 100%;
    position: relative;
    padding-bottom: 0.5rem;
}
.instruction-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background-color: #e5e7eb;
}

.text-editor-container {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: #f9fafb;
    padding: 0.75rem;
}

.text-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
}

.editor-btn {
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}
.editor-btn:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.editor-btn.is-active {
    background-color: #f97316;
    color: white;
    border-color: #f97316;
}

.font-select {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.4rem;
    background-color: white;
    font-size: 0.875rem;
}

#text-editor-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.editor-text-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem;
}

.color-picker-wrapper {
    position: relative;
    width: 36px;
    height: 36px;
}

.color-picker-btn {
    width: 100%;
    height: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
}

.color-picker-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
@media (max-width: 768px) {
    .product-card {
        width: 200px;
        flex: 0 0 200px;
    }
    .slide-image-container {
        height: 320px;
    }
    #clothing-choices {
        padding: 1rem 1rem 1rem 0;
        scroll-snap-type: x mandatory;
        justify-content: flex-start;
    }
}
@media (min-width: 768px) {
    .product-card {
        width: 280px;
    }
    .slide-image-container {
        height: 650px;
    }
    #clothing-choices {
        justify-content: center;
    }
}
@media (min-width: 1024px) {
    .desktop-layout .lg\:grid-cols-3 {
        grid-template-columns: 1fr 2fr 1fr;
    }
    .desktop-right-column {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
#color-selector {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 16px;
    padding: 0 16px;
    width: 100%;
}
.color-swatch-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 112px;
    height: 112px;
    scroll-snap-align: center;
    flex: 0 0 auto;
}

.clothing-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
}

.clothing-thumbnail.selected {
    border: 2px solid #000;
}