/* Navigation admin pages */
.admin-nav-links {
    display: flex;
    gap: 12px;
    padding: 0 20px;
    margin-bottom: 20px;
}

.nav-link {
    padding: 10px 16px;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius));
    color: var(--foreground);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--accent);
}

.nav-link.active {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

/* Grid catégories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius));
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.category-card:hover {
    background: var(--accent);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 8px;
}

.category-count {
    font-size: 12px;
    color: var(--muted-foreground);
}

/* Filtres produits */
.product-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
}

/* Grid produits */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius));
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
}

.product-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--muted);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: oklch(20% .008 260);
    color: var(--foreground);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.product-badge.promo {
    background: oklch(60% .15 20);
    color: white;
}

.product-info {
    padding: 16px;
}

.product-category-tag {
    display: inline-block;
    background: var(--accent);
    color: var(--foreground);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 8px;
}

.product-description {
    font-size: 12px;
    color: var(--muted-foreground);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.price-current {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.price-original {
    font-size: 14px;
    color: var(--muted-foreground);
    text-decoration: line-through;
}

.product-stock {
    font-size: 12px;
    color: var(--muted-foreground);
    margin-bottom: 12px;
}

.product-stock.in-stock {
    color: oklch(70% .15 150);
}

.product-stock.low-stock {
    color: oklch(70% .15 60);
}

.product-stock.out-of-stock {
    color: oklch(70% .15 20);
}

.product-actions {
    display: flex;
    gap: 8px;
}

.product-actions button {
    flex: 1;
    padding: 8px;
    font-size: 12px;
}

/* Stock list */
.stock-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stock-item {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius));
    padding: 16px;
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stock-product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--foreground);
}

.stock-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.stock-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.stock-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: calc(var(--radius));
    overflow: hidden;
    border: 1px solid var(--border);
}

.stock-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stock-image-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    background: oklch(20% .008 260 / 0.8);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.stock-image-item:hover .stock-image-delete {
    opacity: 1;
}

/* Preview images upload */
#stockPreview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.preview-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: calc(var(--radius));
    overflow: hidden;
    border: 1px solid var(--border);
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bouton danger */
.btn-danger {
    background: oklch(60% .15 20);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: calc(var(--radius));
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .category-grid,
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .admin-nav-links {
        flex-wrap: wrap;
    }
}