@import url('https://fonts.googleapis.com/css2?family=Handlee&display=swap');

/* ── Reset & base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:focus-visible {
    outline: 2px solid var(--color-wheat);
    outline-offset: 2px;
}

:root {
    --color-bg: #FAF6EF;
    --color-surface: #FFFDF9;
    --color-wheat: #C8A96E;
    --color-wheat-light: #E8D5B7;
    --color-wheat-dark: #A8843E;
    --color-brown-dark: #3B2A1A;
    --color-brown-mid: #6B4C2A;
    --color-brown-light: #9C7A52;
    --color-border: #E8D5B7;
    --color-text: #3B2A1A;
    --color-text-muted: #9C7A52;
    --color-error: #C0392B;
    --color-success: #5A8A5A;
    --font-serif: 'Handlee', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(59, 42, 26, 0.08);
    --shadow-md: 0 4px 16px rgba(59, 42, 26, 0.10);
    --shadow-lg: 0 8px 32px rgba(59, 42, 26, 0.14);
    --transition: 150ms ease;
    --max-width: 1200px;
}

html, body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    color: var(--color-brown-dark);
    line-height: 1.25;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 600;
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 600;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--color-brown-mid);
}

a {
    color: var(--color-wheat-dark);
    text-decoration: none;
    transition: color var(--transition);
}

    a:hover {
        color: var(--color-brown-dark);
    }

/* ── Layout ── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-content {
    padding: 2.5rem 0 4rem;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-wheat-dark);
    color: var(--color-surface);
}

    .btn-primary:hover {
        background-color: var(--color-brown-mid);
        color: var(--color-surface);
        box-shadow: var(--shadow-md);
    }

.btn-secondary {
    background-color: transparent;
    color: var(--color-brown-mid);
    border: 2px solid var(--color-border);
}

    .btn-secondary:hover {
        border-color: var(--color-wheat);
        color: var(--color-wheat-dark);
        background-color: var(--color-wheat-light);
    }

.btn-ghost {
    background: none;
    border: none;
    color: var(--color-brown-mid);
    padding: 0.5rem;
}

    .btn-ghost:hover {
        color: var(--color-brown-dark);
    }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ── Cards ── */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

    /*.card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }*/

/* ── Forms ── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-brown-dark);
}

input, select, textarea {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
}

    input:focus, select:focus, textarea:focus {
        outline: none;
        border-color: var(--color-wheat);
        box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.15);
    }

.form-error {
    font-size: 0.8rem;
    color: var(--color-error);
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-wheat {
    background: var(--color-wheat-light);
    color: var(--color-brown-mid);
}

.badge-success {
    background: #E8F5E8;
    color: var(--color-success);
}

.badge-error {
    background: #FDECEA;
    color: var(--color-error);
}

/* ── Divider ── */
.divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 1.5rem 0;
}

/* ── Alert ── */
.alert {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: #FDECEA;
    color: var(--color-error);
    border: 1px solid #F5C6C2;
}

.alert-success {
    background: #E8F5E8;
    color: var(--color-success);
    border: 1px solid #C3E6C3;
}

/* ── Loading ── */
.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-wheat);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 0;
}

/* ── Responsive grid ── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* ── Utility ── */
.text-muted {
    color: var(--color-text-muted);
}

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.admin-form-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-brown-dark);
    margin-bottom: 1rem;
    font-family: var(--font-sans);
}