* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-size: 1rem;
    line-height: 1.5;
    background-color: #f8f9fa;
}

/* Product table */
.uk-table th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    color: #666;
}

.product-image {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 0.25rem;
}

/* Image preview */
.image-preview {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #f0f0f0;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: move;
}

.image-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview .delete-image {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(0,0,0,0.7);
    color: white;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    font-size: 0.75rem;
}

.image-preview .delete-image:hover {
    background: rgba(220, 53, 69, 0.9);
}

.image-preview.drag-over {
    border: 2px dashed #007bff;
    background: rgba(0,123,255,0.1);
}

/* Characteristics in table */
.characteristics-cell {
    max-width: 15rem;
}

.char-item {
    display: inline-block;
    background: #e9ecef;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    margin: 0.125rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.char-item:hover {
    background: #007bff;
    color: white;
}

.char-item.editing {
    background: #28a745;
    color: white;
}

.char-input {
    display: inline-block;
    width: auto;
    min-width: 6rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid #007bff;
    border-radius: 0.25rem;
}

/* Parent product highlight */
.parent-product {
    background-color: #fff3cd !important;
    border-left: 0.25rem solid #ffc107;
}

.parent-product td:first-child {
    position: relative;
}

.parent-product td:first-child::before {
    content: "★";
    position: absolute;
    left: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #ffc107;
    font-weight: bold;
}

/* Child product */
.child-product {
    background-color: #f8f9fa;
}

.child-product .product-name {
    padding-left: 2rem;
    position: relative;
}

.child-product .product-name::before {
    content: "↳";
    position: absolute;
    left: 0.5rem;
    color: #999;
}

/* Pagination */
.uk-pagination {
    margin-top: 2rem;
}

.uk-pagination li {
    margin: 0 0.25rem;
}

/* Drag and drop */
.sortable-ghost {
    opacity: 0.5;
    background: #c8ebfb;
}

.sortable-drag {
    cursor: move;
}

/* Responsive */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .uk-table {
        font-size: 0.75rem;
    }
    
    .product-image {
        width: 2rem;
        height: 2rem;
    }
}

/* File list */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.file-item .file-name {
    flex: 1;
}

.file-item .file-type {
    margin: 0 0.5rem;
    padding: 0.125rem 0.5rem;
    background: #e9ecef;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.file-item .delete-file {
    color: #dc3545;
    cursor: pointer;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}