:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #4338ca;
    --secondary: #f97316;
    --success: #10b981;
    --danger: #ef4444;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-700: #374151;
    --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* Main Container */
.proedit-container {
    max-width: 1200px;
    margin: 40px auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Header */
.proedit-header {
    padding: 24px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.proedit-title {
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.proedit-title svg {
    width: 24px;
    height: 24px;
}

.proedit-actions {
    display: flex;
    gap: 12px;
}

/* Content Area */
.proedit-content {
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

/* Preview Section */
.proedit-preview {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 32px;
}

.preview-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-product {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.preview-image {
    width: 100%;
    height: 200px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
}

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

.preview-details h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.preview-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.preview-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

.preview-meta span {
    background: var(--gray-100);
    padding: 4px 10px;
    border-radius: 20px;
    color: var(--gray-700);
}

.preview-description {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.6;
}

/* Form Section */
.proedit-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title svg {
    width: 18px;
    height: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: span 2;
}

label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.required label::after {
    content: " *";
    color: var(--danger);
}

input, select, textarea {
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Image Upload */
.image-upload {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.image-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    overflow: hidden;
    position: relative;
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-thumbnail:hover .remove-image {
    opacity: 1;
}

.upload-area {
    border: 2px dashed var(--gray-200);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.02);
}

.upload-area p {
    font-size: 14px;
    color: var(--gray-700);
    margin-top: 8px;
}

/* Variants */
.variant-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.variant-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.variant-item input {
    flex: 1;
}

.remove-variant {
    color: var(--danger);
    cursor: pointer;
}

.add-variant {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    margin-top: 8px;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-100);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Responsive */
@media (max-width: 1024px) {
    .proedit-content {
        grid-template-columns: 1fr;
    }
    
    .proedit-preview {
        position: static;
    }
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .proedit-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .proedit-actions {
        width: 100%;
        justify-content: flex-end;
    }
}