/* SeninTablon - Custom Styles */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c7bea8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9d8b6c;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateX(-20px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c241e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Canvas Preview Area */
.canvas-container {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #f8f7f4 0%, #f0ede6 100%);
    border-radius: 12px;
    overflow: hidden;
}

.canvas-preview {
    position: relative;
    margin: auto;
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.15),
        0 1px 3px rgba(0,0,0,0.1);
}

.canvas-frame {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 8px solid #2c241e;
    pointer-events: none;
}

.canvas-inner-shadow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
    pointer-events: none;
}

/* Wall mockup background */
.wall-mockup {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e0cec7' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-color: #f8f7f4;
}

/* File upload zone */
.upload-zone {
    border: 2px dashed #d2bab0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fdf8f6 0%, #f2e8e5 100%);
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #9d8b6c;
    background: linear-gradient(135deg, #f2e8e5 0%, #e0cec7 100%);
}

.upload-zone.has-image {
    border-style: solid;
    border-color: #9d8b6c;
}

/* Product type cards */
.type-card {
    position: relative;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: white;
}

.type-card:hover {
    border-color: #a89a84;
    background: #fefcfa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.type-card.selected {
    border-color: #2c241e;
    border-width: 3px;
    background: linear-gradient(135deg, #faf8f5 0%, #f5f2ed 100%);
    box-shadow: 0 4px 16px rgba(44, 36, 30, 0.15);
}

/* Size option */
.size-option {
    padding: 14px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    background: white;
}

.size-option:hover {
    border-color: #a89a84;
    background: #fefcfa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.size-option.selected {
    border-color: #2c241e;
    border-width: 3px;
    background: linear-gradient(135deg, #faf8f5 0%, #f5f2ed 100%);
    box-shadow: 0 4px 16px rgba(44, 36, 30, 0.15);
}

/* Quantity selector */
.qty-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    border-color: #2c241e;
    background: #f8f7f4;
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Price display */
.price-display {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #2c241e;
}

/* Order status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Form inputs */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #2c241e;
    box-shadow: 0 0 0 3px rgba(44, 36, 30, 0.1);
}

.form-input:disabled {
    background: #f9fafb;
    cursor: not-allowed;
}

.form-input.error {
    border-color: #ef4444;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-error {
    margin-top: 4px;
    font-size: 13px;
    color: #ef4444;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: #2c241e;
    color: white;
}

.btn-primary:hover {
    background: #433830;
}

.btn-secondary {
    background: white;
    color: #2c241e;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f8f7f4;
    border-color: #c7bea8;
}

.btn-success {
    background: #059669;
    color: white;
}

.btn-success:hover {
    background: #047857;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.data-table tr:hover {
    background: #f9fafb;
}

/* Responsive image container */
.img-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Checkout steps */
.checkout-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.checkout-step {
    display: flex;
    align-items: center;
    color: #9ca3af;
}

.checkout-step.active {
    color: #2c241e;
}

.checkout-step.completed {
    color: #059669;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-right: 8px;
}

.checkout-step.active .step-number {
    background: #2c241e;
    color: white;
}

.checkout-step.completed .step-number {
    background: #059669;
    color: white;
}

.step-connector {
    width: 60px;
    height: 2px;
    background: #e5e7eb;
    margin: 0 16px;
}

.checkout-step.completed + .step-connector {
    background: #059669;
}

/* Print styles */
@media print {
    header, footer, .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .upload-zone {
        padding: 24px 16px;
    }
    
    .canvas-container {
        border-radius: 8px;
    }
    
    .btn {
        width: 100%;
    }
    
    .sticky-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 16px;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
        z-index: 40;
    }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 8px;
    background: #2c241e;
    color: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

.toast.success {
    background: #059669;
}

.toast.error {
    background: #dc2626;
}

/* Image zoom controls */
.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zoom-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: #f9fafb;
    border-color: #2c241e;
}

.zoom-slider {
    -webkit-appearance: none;
    width: 100px;
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    outline: none;
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2c241e;
    cursor: pointer;
}

/* Fabric.js canvas styling */
.canvas-wrapper {
    background: #f8f7f4;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.canvas-wrapper canvas {
    border-radius: 4px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}
