@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
    --primary: #8d6e63;
    --primary-dark: #5f4339;
    --secondary: #ffab91;
    --accent: #d84315;
    --bg-light: #fafafa;
    --bg-card: #ffffff;
    --text-main: #3e2723;
    --text-muted: #795548;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    margin-left: 30px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -10px;
    right: -15px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 700;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 0 0 50px 50px;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.product-price {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input[type="text"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid #eee;
    font-family: inherit;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.modal-content {
    background-color: var(--bg-card);
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
}

/* Checkout & Cart Page Styles */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .main-section {
        padding: 40px 0 !important;
    }
}

/* Footer */
footer {
    padding: 60px 0;
    background: #3e2723;
    color: #efebe9;
    text-align: center;
    margin-top: 80px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero {
        padding: 50px 20px;
    }

    /* Admin Mobile Adjustments */
    .admin-layout {
        flex-direction: column;
        padding-bottom: 70px;
        /* Space for bottom nav */
    }

    .sidebar {
        display: none;
        /* Hide sidebar on mobile */
    }

    .main-content {
        padding: 20px;
    }

    .badge-pending {
        background: #fff8e1;
        color: #f57f17;
    }

    .badge-completed {
        background: #e8f5e9;
        color: #2e7d32;
    }

    /* Responsive Table Wrapper */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        border-radius: var(--radius);
    }

    .table-responsive table {
        min-width: 600px;
        /* Force scroll on mobile */
        margin-bottom: 0;
    }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #3e2723;
        color: white;
        height: 70px;
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    }

    .bottom-nav a {
        color: #d7ccc8;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1;
        /* Equal width for all items */
        padding: 10px 0;
        font-size: 0.7rem;
        gap: 4px;
        transition: var(--transition);
    }

    .bottom-nav a.active {
        color: white;
        background: rgba(255, 255, 255, 0.05);
    }

    .bottom-nav a svg {
        width: 24px;
        height: 24px;
        fill: currentColor;
    }
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
}