* { box-sizing: border-box; }

body { 
    font-family: 'Inter', system-ui, sans-serif; 
    background-color: #ffffff;
    color: #18181b;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html.dark body {
    background-color: #09090b;
    color: #f4f4f5;
}

/* Navigation */
.nav-link { 
    padding: 0.4rem 0.7rem; 
    font-size: 0.875rem; 
    font-weight: 500; 
    border-radius: 0.5rem; 
    transition: all 0.2s ease; 
    color: #52525b;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.nav-link:hover { 
    background: #f4f4f5; 
    color: #18181b;
}

html.dark .nav-link { 
    color: #a1a1aa;
}

html.dark .nav-link:hover { 
    background: #27272a; 
    color: #f4f4f5;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: #18181b;
    color: #fff;
    padding: 0.7rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background: #3f3f46;
    transform: translateY(-1px);
    color: #fff;
}

html.dark .btn-primary {
    background: #fafafa;
    color: #18181b;
}

html.dark .btn-primary:hover {
    background: #e4e4e7;
    color: #18181b;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    border: 1px solid #d4d4d8;
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    background: transparent;
    color: #18181b;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #f4f4f5;
    color: #18181b;
}

html.dark .btn-secondary {
    border-color: #52525b;
    color: #d4d4d8;
}

html.dark .btn-secondary:hover {
    background: #27272a;
    color: #d4d4d8;
}

/* Form Inputs */
.form-input {
    width: 100%;
    border: 1px solid #d4d4d8;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    outline: none;
    transition: all 0.2s ease;
    color: #18181b;
    font-size: 0.875rem;
}

.form-input:focus {
    border-color: #18181b;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

html.dark .form-input {
    border-color: #3f3f46;
    background: #18181b;
    color: #f4f4f5;
}

html.dark .form-input:focus {
    border-color: #fafafa;
    box-shadow: 0 0 0 3px rgba(250, 250, 250, 0.08);
}

html.dark .form-input::placeholder {
    color: #71717a;
}

/* Product Card */
.product-card img {
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.04);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Flash Message */
.flash {
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

html.dark ::-webkit-scrollbar-track {
    background: #27272a;
}

html.dark ::-webkit-scrollbar-thumb {
    background: #3f3f46;
}

html.dark ::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

/* Dark mode classes */
html.dark .bg-white { background-color: #18181b !important; }
html.dark .bg-zinc-50 { background-color: #1a1a1e !important; }
html.dark .bg-zinc-100 { background-color: #27272a !important; }
html.dark .border-zinc-200 { border-color: #3f3f46 !important; }
html.dark .border-zinc-300 { border-color: #52525b !important; }
html.dark .text-zinc-500 { color: #a1a1aa !important; }
html.dark .text-zinc-600 { color: #d4d4d8 !important; }
html.dark .text-zinc-700 { color: #e4e4e7 !important; }
html.dark .text-zinc-900 { color: #f4f4f5 !important; }
html.dark .text-zinc-950 { color: #fafafa !important; }

/* Transitions */
* {
    transition-property: color, background-color, border-color;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* Admin */
.admin-container {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

@media (min-width: 640px) {
    .admin-container {
        padding: 3rem 2rem;
    }
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.admin-form-grid .full-width {
    grid-column: 1 / -1;
}
