:root{
    --pure-black: #000000;
    --rich-black: #0d0d0d;
    --charcoal: #1a1a1a;
    --dark-gray: #2a2a2a;
    --medium-gray: #404040;
    --light-gray: #f8f8f8;
    --pure-white: #ffffff;

    --gold: #d4af37;
    --gold-light: #f0d580;
    --gold-dark: #b8941f;
    --bronze: #cd7f32;

    --cream: #faf9f6;
    --cream-light: #fffef9;
    --cream-dark: #f5f3ed;
    --warm-white: #fdfbf7;

    --wood-dark: #5c3d2e;
    --wood: #8b6748;
    --wood-light: #b8956d;
    --elegant-dark: #2a1810;
    --elegant-brown: #3d2818;
    --elegant-brown-light: #4a342a;

    --terracotta: #c45e52;
    --terracotta-dark: #a74639;
    --terracotta-light: #d47366;

    --bg-primary: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #0d0d0d 100%);
    --bg-secondary: linear-gradient(135deg, #1a1a1a 0%, #2a1810 100%);
    --bg-hero: linear-gradient(135deg, #2a1810 0%, #0d0d0d 100%);

    --card-bg: rgba(250, 249, 246, 0.98);
    --card-bg-dark: rgba(26, 26, 26, 0.95);
    --card-bg-glass: rgba(255, 255, 255, 0.1);
    --glass-effect: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);


    --overlay-light: rgba(0, 0, 0, 0.4);
    --overlay-medium: rgba(0, 0, 0, 0.6);
    --overlay-dark: rgba(0, 0, 0, 0.8);
    --overlay-gradient: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0.4));

    --input-bg: #f5f3ed;
    --input-border: #e5e0d5;
    --input-focus: var(--gold);

    --white: #ffffff;
    --black: #000000;
    --accent: var(--gold);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
    --shadow-gold-lg: 0 8px 32px rgba(212, 175, 55, 0.4);
    --shadow-elegant: 0 12px 40px rgba(0, 0, 0, 0.5);
    --text-shadow-elegant: 2px 2px 8px rgba(0,0,0,0.6);

    --max-width-card: 480px;
    --max-width-content: 980px;
    --gap: 18px;
    --gap-sm: 12px;
    --gap-xs: 8px;
    
    --radius: 10px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50%;

    --input-height: 40px;
    --button-height: 50px;
    --button-height-sm: 48px;

    --text-dark: #1a1a1a;
    --text-medium: #2a2a2a;
    --text-light: #404040;
    --text-muted: #666666;
    --text-placeholder: #999999;
    --text-on-dark: var(--cream);
    --text-gold: var(--gold);

    --transition-fast: 0.12s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    --z-dropdown: 10;
    --z-modal: 1000;
    --z-tooltip: 1100;


    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-elegant: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;


    --text-xs: 0.64rem;     
    --text-sm: 0.8rem;      
    --text-base: 1rem;      
    --text-md: 1.125rem;     
    --text-lg: 1.25rem;      
    --text-xl: 1.563rem;     
    --text-2xl: 1.953rem;    
    --text-3xl: 2.441rem;    
    --text-4xl: 3.052rem;    
    --text-5xl: 3.815rem;   

    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    --leading-tight: 1.2;
    --leading-snug: 1.4;
    --leading-normal: 1.6;
    --leading-relaxed: 1.8;
    --leading-loose: 2;

    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body > div {
    flex: 1;
    display: flex;
    flex-direction: column;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

@media (max-width: 1023px) {
    body, html {
        width: 100%;
        overflow-x: hidden !important;
        position: relative;
    }

    body > *,
    .manage-container,
    .categories-container,
    main,
    section {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-elegant);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h1 {
    font-size: var(--text-4xl);
    letter-spacing: var(--tracking-tight);
}

h2 {
    font-size: var(--text-3xl);
    letter-spacing: var(--tracking-tight);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-md);
}

p {
    margin-bottom: 1rem;
    line-height: var(--leading-relaxed);
}

strong {
    font-weight: var(--font-bold);
}

em {
    font-style: italic;
}

blockquote {
    padding-left: 1.5rem;
    border-left: 4px solid var(--gold);
    font-style: italic;
    margin: 1.5rem 0;
    color: var(--text-medium);
}

.btn, button[class*="btn"], a[class*="button"], .cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    text-align: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    text-decoration: none;
    min-height: var(--button-height-sm);
    letter-spacing: var(--tracking-wide);
}

.btn-primary, .cta-button.primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--rich-black);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover, .cta-button.primary:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    box-shadow: var(--shadow-gold-lg);
    transform: translateY(-2px);
}

.btn-primary:active, .cta-button.primary:active {
    transform: translateY(0);
}

.btn-secondary, .cta-button.secondary {
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
    box-shadow: none;
}

.btn-secondary:hover, .cta-button.secondary:hover {
    background: var(--gold);
    color: var(--rich-black);
    box-shadow: var(--shadow-gold);
}

.btn-dark {
    background: var(--charcoal);
    color: var(--cream);
}

.btn-dark:hover {
    background: var(--dark-gray);
    box-shadow: var(--shadow-lg);
}

.btn-light {
    background: var(--cream);
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.btn-light:hover {
    background: var(--cream-dark);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: var(--text-sm);
    min-height: 40px;
}

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: var(--text-lg);
    min-height: 56px;
}

.btn:disabled, button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.form-group {
    margin-bottom: var(--gap);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: var(--font-medium);
    color: var(--text-medium);
    font-size: var(--text-sm);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--text-base);
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    color: var(--text-dark);
    min-height: var(--input-height);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-placeholder);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

select {
    cursor: pointer;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-dark {
    background: var(--card-bg-dark);
    color: var(--text-on-dark);
}

.card-glass {
    background: var(--glass-effect);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.container {
    width: 100%;
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: 0 1rem;
}

.container-narrow {
    max-width: var(--max-width-card);
}

.container-wide {
    max-width: 1400px;
}

.grid {
    display: grid;
    gap: var(--gap);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-xs { gap: var(--gap-xs); }
.gap-sm { gap: var(--gap-sm); }
.gap { gap: var(--gap); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gold { color: var(--gold); }
.text-dark { color: var(--text-dark); }
.text-light { color: var(--text-on-dark); }
.text-muted { color: var(--text-muted); }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

.font-light { font-weight: var(--font-light); }
.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}

.transition-all {
    transition: all var(--transition-normal);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.hide-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: block;
    }
    .hide-desktop {
        display: none;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }

    .btn, .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: var(--text-sm);
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .btn-lg {
        padding: 0.875rem 1.75rem;
        font-size: var(--text-base);
    }
}

.loading {
    pointer-events: none;
    opacity: 0.6;
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--cream-dark) 0%,
        var(--cream-light) 50%,
        var(--cream-dark) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: 999px;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.badge-gold {
    background: var(--gold);
    color: var(--rich-black);
}

.badge-dark {
    background: var(--charcoal);
    color: var(--cream);
}

.badge-light {
    background: var(--cream-dark);
    color: var(--text-dark);
}

.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 2rem 0;
    border: none;
}

.divider-vertical {
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--gold), transparent);
    margin: 0 1rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}