@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #e05c14;
    --primary-dark: #b84a10;
    --primary-glow: rgba(224, 92, 20, 0.4);
    --gold: #c49820;
    --gold-glow: rgba(196, 152, 32, 0.4);
    --bg: #0a0c10;
    --bg-alt: #0f1218;
    --card: rgba(20, 22, 26, 0.8);
    --card-hover: rgba(30, 32, 38, 0.9);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --success: #10b981;
    --error: #ef4444;
    --nav-h: 72px;
    --radius: 12px;
    --radius-lg: 20px;
    --glass: blur(10px);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Ensure inputs are interactive */
input,
textarea,
select {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    color: #fff !important;
    padding: 12px 16px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    transition: var(--transition) !important;
    outline: none !important;
    pointer-events: auto !important;
    cursor: text !important;
    width: 100%;
    margin-bottom: 16px;
    position: relative;
    z-index: 100;
}

input:focus,
textarea:focus,
select:focus {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

h1,
h2,
h3,
h4 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button,
.btn {
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: auto !important;
}

form {
    position: relative;
    z-index: 10;
}

/* Background Effects */
.bg-vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
    z-index: -1;
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: var(--primary-glow);
    filter: blur(150px);
    border-radius: 50%;
    z-index: -2;
    opacity: 0.15;
    pointer-events: none;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-h);
    background: rgba(10, 12, 16, 0.9);
    backdrop-filter: var(--glass);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: var(--card-hover);
}

.nav-link.active {
    color: var(--primary);
}

/* Sections */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 60px;
    text-align: center;
}

.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
    position: relative;
    z-index: 10;
}

.grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Cards */
.card {
    background: var(--card);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    position: relative;
}

.modal-content-card {
    max-height: 90vh;
    overflow-y: auto;
    width: 600px;
    max-width: 95vw;
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 12px 24px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: #fff;
    padding: 12px 24px;
}

/* Admin Styles */
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.admin-nav-link.active {
    color: var(--primary);
    background: rgba(224, 92, 20, 0.1);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

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

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

/* Layout Helper Classes */
.admin-layout,
.dashboard-grid,
.home-news-grid,
.cart-layout,
.checkout-layout {
    display: grid !important;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 16px;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-h: 64px;
    }

    .section {
        padding: 40px 16px;
    }

    .logo span:last-child {
        display: none;
    }

    /* Nav bar on mobile: show icons, hide labels */
    .nav-links {
        display: flex !important;
        gap: 4px;
    }

    .nav-link {
        padding: 8px;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .nav-link span,
    .hide-mobile {
        display: none;
    }

    .nav-link i {
        width: 18px;
        height: 18px;
    }

    .hero {
        padding-top: 80px;
    }

    .hero h1 {
        font-size: 32px !important;
    }

    .hero p {
        font-size: 14px !important;
    }

    .section {
        padding: 40px 16px !important;
    }

    .section[style*="padding-top: 150px"] {
        padding-top: 80px !important;
    }

    .card {
        padding: 20px !important;
    }

    /* Smaller base padding for all cards */

    /* Modal enhancements for mobile */
    .modal-content-card {
        width: 94% !important;
        max-width: none !important;
        max-height: 90vh;
        overflow-y: auto;
        margin: 10px;
        padding: 16px !important;
        /* Smaller padding */
    }

    .modal-content-card h2,
    .modal-content-card h3 {
        font-size: 1.25rem !important;
        margin-bottom: 12px !important;
    }

    .modal-banner {
        height: 120px !important;
        /* Smaller banner on mobile */
        font-size: 48px !important;
        /* Smaller icon on mobile */
    }

    .modal-body {
        padding: 20px !important;
    }

    .modal-content-card p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }

    .modal-grid {
        gap: 8px !important;
        /* Smaller gaps in internal grids */
    }

    .modal-content-card .btn {
        padding: 10px 16px !important;
        font-size: 11px !important;
    }

    /* Stacking Layouts */
    .admin-layout,
    .dashboard-grid,
    .home-news-grid,
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .admin-sidebar {
        position: static !important;
        width: 100% !important;
    }

    /* Table responsiveness */
    .card {
        overflow-x: auto;
    }

    table {
        min-width: 500px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 18px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* Toggle Switch pour Admin */
.m-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.m-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.m-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 34px;
}

.m-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .m-slider {
    background-color: #ef4444;
}

input:checked + .m-slider:before {
    transform: translateX(30px);
}