/**
 * Product Customization Page Styles
 */

* {
    box-sizing: border-box;
}

body.page-template-customize,
body.page-template-page-customize {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
}

.customize-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    color: #fff;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

/* Dropdown Loading State */
.custom-select.loading {
    background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 50 50"><circle cx="25" cy="25" r="20" fill="none" stroke="%23D32F2F" stroke-width="4"><animate attributeName="stroke-dashoffset" dur="1s" repeatCount="indefinite" from="0" to="502"/><animate attributeName="stroke-dasharray" dur="1s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"/></circle></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
}

/* Step Titles */
.step-title {
    color: #D32F2F;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.step-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #D32F2F 0%, #FF5252 100%);
    border-radius: 2px;
}

/* Step 1: Product Selection */
.customize-step.step-1 {
    margin-bottom: 60px;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease-out;
}

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

.product-selection-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
}

.selection-group {
    display: flex;
    flex-direction: column;
}

.selection-group label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.custom-select {
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    appearance: none;
    background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="%23333" d="M4 6l4 4 4-4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
}

.custom-select:hover:not(:disabled) {
    border-color: #D32F2F;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.15);
    transform: translateY(-2px);
}

.custom-select:focus {
    outline: none;
    border-color: #D32F2F;
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.1);
}

.custom-select:disabled {
    background-color: #F5F5F5;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

/* Step 2: Customize */
.customize-step.step-2 {
    margin-top: 40px;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.preview-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #00695C 0%, #00897B 100%);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 105, 92, 0.3);
}

.preview-btn:hover {
    background: linear-gradient(135deg, #004D40 0%, #00695C 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 105, 92, 0.4);
}

.preview-btn:active {
    transform: translateY(-1px);
}

/* Customize Content Layout */
.customize-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Left Section: How It Works & Options */
.customize-left {
    background-color: #fff;
}

.how-it-works {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.1);
    border-left: 4px solid #4CAF50;
}

.how-it-works h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2E7D32;
}

.how-it-works ol {
    margin: 0;
    padding-left: 20px;
}

.how-it-works li {
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.customization-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.custom-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    background-color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.custom-option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: left 0.5s ease;
}

.custom-option-btn:hover::before {
    left: 100%;
}

.custom-option-btn.add-name {
    border-color: #E91E63;
    color: #E91E63;
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.05) 0%, rgba(233, 30, 99, 0.1) 100%);
}

.custom-option-btn.add-image {
    border-color: #2196F3;
    color: #2196F3;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05) 0%, rgba(33, 150, 243, 0.1) 100%);
}

.custom-option-btn.add-logo {
    border-color: #FFC107;
    color: #FFC107;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05) 0%, rgba(255, 193, 7, 0.1) 100%);
}

.custom-option-btn:hover:not(.active) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.custom-option-btn.add-name:hover:not(.active) {
    background: linear-gradient(135deg, #E91E63 0%, #F06292 100%);
    color: #fff;
    border-color: #E91E63;
}

.custom-option-btn.add-image:hover:not(.active) {
    background: linear-gradient(135deg, #2196F3 0%, #64B5F6 100%);
    color: #fff;
    border-color: #2196F3;
}

.custom-option-btn.add-logo:hover:not(.active) {
    background: linear-gradient(135deg, #FFC107 0%, #FFD54F 100%);
    color: #fff;
    border-color: #FFC107;
}

.custom-option-btn.active {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.custom-option-btn:active:not(.active) {
    transform: translateY(-1px);
}

.plus-icon {
    font-size: 24px;
    font-weight: bold;
}

/* Dynamic Custom Fields */
#custom-fields-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-field {
    padding: 15px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    background-color: #FAFAFA;
    position: relative;
}

.custom-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.custom-field input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    font-size: 14px;
}

.custom-field .remove-field {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #D32F2F;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.custom-field-upload {
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-btn {
    padding: 8px 16px;
    background-color: #2196F3;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.upload-preview {
    max-width: 80px;
    max-height: 80px;
    border-radius: 4px;
    object-fit: cover;
}

/* Center Section: Preview */
.customize-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-label {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #666;
}

.preview-box {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(45deg, #F5F5F5 25%, transparent 25%),
                linear-gradient(-45deg, #F5F5F5 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #F5F5F5 75%),
                linear-gradient(-45deg, transparent 75%, #F5F5F5 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 3px solid #fff;
    position: relative;
    overflow: hidden;
}

.preview-box::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

#preview-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
}

#preview-base-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Draggable Preview Overlays */
.preview-overlay {
    position: absolute;
    cursor: move;
    user-select: none;
    transition: box-shadow 0.2s ease;
}

.preview-overlay.draggable {
    pointer-events: auto;
}

.preview-overlay.dragging {
    z-index: 1000;
    box-shadow: 0 0 20px rgba(211, 47, 47, 0.6);
    opacity: 0.9;
    cursor: grabbing !important;
}

.preview-overlay:hover {
    box-shadow: 0 0 15px rgba(211, 47, 47, 0.4);
    outline: 2px dashed rgba(211, 47, 47, 0.5);
}

/* Name Overlay with Drag Handle */
.name-overlay {
    bottom: 20%;
    left: 50%;
    transform: translate(-50%, 0);
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    min-width: 100px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.drag-handle {
    font-size: 14px;
    color: #999;
    cursor: grab;
    user-select: none;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.name-overlay:hover .drag-handle {
    opacity: 1;
}

.name-overlay.dragging .drag-handle {
    cursor: grabbing;
}

.preview-text-content {
    flex: 1;
    white-space: nowrap;
}

/* Image Overlay */
.image-overlay {
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 40%;
    max-height: 40%;
    object-fit: contain;
    border: 2px dashed transparent;
    border-radius: 4px;
    transition: border-color 0.2s;
    position: absolute;
    display: block;
    z-index: 10;
}

.image-overlay:hover {
    border-color: rgba(33, 150, 243, 0.5);
}

/* Logo Overlay */
.logo-overlay {
    top: 10%;
    right: 10%;
    max-width: 20%;
    max-height: 20%;
    object-fit: contain;
    border: 2px dashed transparent;
    border-radius: 4px;
    transition: border-color 0.2s;
    position: absolute;
    display: block;
    z-index: 10;
}

.logo-overlay:hover {
    border-color: rgba(255, 193, 7, 0.5);
}

/* Resize Handles */
.resize-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #2196F3;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: nwse-resize;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: auto !important;
}

.image-overlay:hover .resize-handle,
.logo-overlay:hover .resize-handle {
    opacity: 1 !important;
}

.image-overlay.resizing .resize-handle,
.logo-overlay.resizing .resize-handle {
    opacity: 1 !important;
}

.resize-handle:hover {
    transform: scale(1.3);
    background: #1976D2;
}

.resize-handle.resizing {
    opacity: 1;
    transform: scale(1.5);
    background: #0D47A1;
}

/* Corner positions */
.resize-handle.top-left {
    top: -8px;
    left: -8px;
    cursor: nwse-resize;
}

.resize-handle.top-right {
    top: -8px;
    right: -8px;
    cursor: nesw-resize;
}

.resize-handle.bottom-left {
    bottom: -8px;
    left: -8px;
    cursor: nesw-resize;
}

.resize-handle.bottom-right {
    bottom: -8px;
    right: -8px;
    cursor: nwse-resize;
}

/* Prevent image selection during resize */
.image-overlay.resizing,
.logo-overlay.resizing {
    user-select: none;
    pointer-events: none;
}

.image-overlay.resizing img,
.logo-overlay.resizing img {
    pointer-events: none;
}

/* Text Styling Panel */
#text-styling-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    border: 2px solid #e0e0e0;
}

.style-control-group {
    margin-bottom: 15px;
}

.style-control-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

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

.style-select:focus {
    outline: none;
    border-color: #D32F2F;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.style-slider {
    width: calc(100% - 60px);
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    margin-right: 10px;
}

.style-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #D32F2F;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.style-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #D32F2F;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#font-size-value {
    display: inline-block;
    min-width: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #D32F2F;
}

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

.color-picker {
    width: 60px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.color-hex-input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    text-transform: uppercase;
}

.color-hex-input:focus {
    outline: none;
    border-color: #D32F2F;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.text-style-buttons {
    display: flex;
    gap: 10px;
}

.style-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.style-btn:hover {
    border-color: #D32F2F;
    background: #fff5f5;
}

.style-btn.active {
    background: #D32F2F;
    color: #fff;
    border-color: #D32F2F;
}

/* Right Section: Product Info */
.customize-right {
    background-color: #fff;
}

.product-info {
    padding: 35px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(211, 47, 47, 0.1);
}

#product-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.3;
}

.product-price {
    font-size: 28px;
    font-weight: 700;
    color: #D32F2F;
    margin-bottom: 25px;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    padding: 5px;
    background-color: #fff;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background-color: #fff;
    color: #333;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background-color: #F5F5F5;
}

#quantity-input {
    width: 60px;
    text-align: center;
    border: none;
    font-size: 18px;
    font-weight: 600;
    background: transparent;
}

#quantity-input:focus {
    outline: none;
}

/* Add to Cart Button */
.add-to-cart-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #D32F2F 0%, #F44336 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.add-to-cart-btn:hover::before {
    width: 300px;
    height: 300px;
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #B71C1C 0%, #D32F2F 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.5);
}

.add-to-cart-btn:active {
    transform: translateY(-1px);
}

.add-to-cart-btn:disabled {
    background: linear-gradient(135deg, #BDBDBD 0%, #9E9E9E 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.add-to-cart-btn.loading {
    pointer-events: none;
}

.add-to-cart-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

.modal-close:hover {
    color: #D32F2F;
}

#modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

#file-upload {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 2px dashed #E0E0E0;
    border-radius: 8px;
}

.modal-preview {
    width: 100%;
    min-height: 200px;
    background-color: #F5F5F5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

#modal-preview-img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.modal-save-btn {
    width: 100%;
    padding: 15px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-save-btn:hover {
    background-color: #388E3C;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .customize-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .customize-center {
        order: -1;
    }
}

/* Cart Count Bounce Animation */
.cart-count.bounce {
    animation: bounceScale 0.5s ease;
}

@keyframes bounceScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Smooth Transitions for All Interactive Elements */
button, select, input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading Overlay Fade In */
.loading-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Custom Field Animations */
.custom-field {
    animation: slideInLeft 0.4s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Preview Overlay Animations */
.preview-overlay {
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hover Effects for Preview */
#preview-container:hover #preview-base-image {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Better Form Input Styles */
input[type="text"], input[type="number"] {
    transition: all 0.3s ease;
}

input[type="text"]:focus, input[type="number"]:focus {
    outline: none;
    border-color: #D32F2F;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

/* Quantity Input Styling */
#quantity-input {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Add pulse animation to preview button */
@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 105, 92, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(0, 105, 92, 0.5); }
}

.preview-btn {
    animation: pulse 2s infinite;
}

@media (max-width: 768px) {
    .product-selection-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .step-title {
        font-size: 24px;
    }

    .preview-box {
        aspect-ratio: 1;
    }

    .customize-step.step-1,
    .customize-step.step-2 {
        padding: 20px;
        border-radius: 12px;
    }

    .how-it-works {
        padding: 15px;
    }

    .custom-option-btn {
        padding: 14px;
        font-size: 14px;
    }
}
