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

:root {
    --primary: #1a1a1a;
    --accent: #e67e22;
    --white: #ffffff;
    --bg-light: #f4f7f9;
    --transition: all 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #fff;
    color: var(--primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.admin-body {
    background-color: var(--bg-light);
    min-height: 100vh;
}

nav {
    background: var(--white);
    padding: 15px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
}

.logo i {
    color: var(--accent);
    font-size: 26px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    font-size: 15px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary);
}

.hero {
    height: 50vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('https://images.unsplash.com/photo-1588850561407-ed78c282e89b?auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 40px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.container {
    padding: 40px 8%;
    max-width: 1200px;
    margin: auto;
}

.section-title {
    font-size: 30px;
    margin-bottom: 35px;
    border-left: 5px solid var(--accent);
    padding-left: 15px;
    font-weight: 700;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid #eee;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: 0.5s;
}

.card:hover img {
    transform: scale(1.08);
}

.card-body {
    padding: 20px;
    text-align: center;
}

.card-body h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary);
    font-weight: 600;
}

.price {
    color: var(--accent);
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 15px;
    display: block;
}

.buy-btn {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-size: 15px;
}

.buy-btn:hover {
    background: #d35400;
    transform: scale(1.02);
}

.admin-btns {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.edit-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.edit-btn:hover {
    background: #2980b9;
}

.delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.delete-btn:hover {
    background: #c0392b;
}

.logout-btn-style {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.logout-btn-style:hover {
    background: #ff2e44;
    transform: scale(1.05);
}

.admin-card {
    background: white;
    max-width: 450px;
    margin: 40px auto;
    padding: 35px 35px 50px 35px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.admin-header {
    margin-bottom: 25px;
}

.admin-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.admin-header p {
    color: #888;
    font-size: 14px;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 10px;
    outline: none;
    transition: 0.3s;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 8px rgba(230, 126, 34, 0.15);
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    color: #999;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
}

.back-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-size: 15px;
}

.google-btn:hover {
    background: #f8f9fa;
    border-color: #ccc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.google-btn img {
    width: 20px;
}

.divider {
    margin: 20px 0;
    text-align: center;
    position: relative;
}

.divider span {
    background: #fff;
    padding: 0 15px;
    color: #bbb;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    border-top: 1px solid #eee;
}

footer {
    background: var(--primary);
    color: white;
    padding: 35px;
    text-align: center;
    margin-top: 50px;
}

.social-icons a {
    color: white;
    margin: 0 10px;
    font-size: 20px;
    transition: 0.3s;
}

.social-icons a:hover {
    color: var(--accent);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 70px;
        right: -100%;
        width: 100%;
        height: auto;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 25px 0;
        gap: 20px;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.08);
        transition: 0.4s ease-in-out;
    }

    .nav-links.active {
        right: 0;
    }

    .hero h1 {
        font-size: 28px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        padding: 0 15px;
    }

    .admin-card {
        width: 90%;
        padding: 25px;
    }

    .section-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 22px;
    }
}