:root {
    --brand: #ff4e50;
    --accent: #43cea2;
    --dark: #1f2937;
    --muted: #6b7280;
    --bg: #fafafa;
    --card: #ffffff;
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--dark);
    background: var(--bg);
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--card);
    border-bottom: 1px solid #eee;
}

.navbar {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap; /* Mobile wrap */
}


/* Hamburger button */
.hamburger {
    display: none; /* Desktop hidden */
    font-size: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--dark);
}

/* Mobile styles */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none; /* Hidden initially */
        flex-direction: column;
        gap: 10px;
        width: 100%;
        text-align: center;
        background: var(--card);
        position: absolute;
        top: 100%;
        left: 0;
        border-top: 1px solid #eee;
        padding: 10px 0;
        z-index: 9;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 8px 0;
    }
}

.logo {
    margin-right: auto;
    color: var(--brand);
}

.logo img {
    height: 75px;
    width: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 16px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap; /* Mobile wrap */
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
}

.pill {
    background: var(--dark);
    color: #fff;
    border: 0;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
}


/* Hero */
.hero {
    background: linear-gradient(135deg, #43cea2, #185a9d);
    color: #fff;
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 16px;
    text-align: center;
}

.btn {
    background: var(--brand);
    color: #fff;
    border: 0;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

.btn:hover {
    filter: brightness(0.95);
}

.ghost {
    background: transparent;
    border: 1px solid #ddd;
    color: var(--dark);
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
}

.icon-btn {
    background: transparent;
    border: 0;
    font-size: 18px;
    cursor: pointer;
}

/* Sections */
.products,
.about,
.contact {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 16px;
}

.products h2,
.about h2,
.contact h2 {
    margin-bottom: 12px;
}

.product-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.product-card {
    background: var(--card);
    border: 1px solid #eee;
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.product-card img {
    width: 100%;
    border-radius: 10px;
}

.product-card h3 {
    margin: 8px 0 4px;
}

.price {
    color: var(--muted);
    margin: 0 0 8px;
}

.product-card button {
    background: var(--brand);
    color: #fff;
    border: 0;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
}

/* Contact form */
.contact-form {
    display: grid;
    gap: 10px;
    max-width: 520px;
}

.contact-form input,
.contact-form textarea {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    font: inherit;
}

/* Footer */
footer {
    text-align: center;
    padding: 24px 16px;
    color: var(--muted);
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .55);
    padding: 16px;
}

.modal-content {
    background: var(--card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 560px;
    padding: 16px;
    border: 1px solid #eee;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cart-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}

.cart-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.cart-list .title {
    font-weight: 600;
}

.cart-list .remove {
    background: transparent;
    border: 0;
    color: #d11;
    cursor: pointer;
}

.cart-summary {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

#checkout-form input,
#checkout-form select,
#checkout-form textarea {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    font: inherit;
    width: 100%;
}

/* ------------------- Slider ------------------- */
.slider {
    width: 100%;
    max-width: 1000px;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.slides {
    display: flex;
    width: 100%;
    animation: slide 16s infinite;
}

.slide {
    flex: 0 0 100%; /* Each slide takes full width */
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Keyframes: 3s pause, 1s slide */
@keyframes slide {
    0%, 20% { transform: translateX(0%); }
    25%, 45% { transform: translateX(-100%); }
    50%, 70% { transform: translateX(-200%); }
    75%, 95% { transform: translateX(-300%); }
    100% { transform: translateX(0%); }
}

.dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: #ff4e50;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cart-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

/* ------------------- RESPONSIVE ------------------- */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
    }

    .navbar {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        padding: 40px 12px;
    }

    .navbar {
        flex-direction: column;
        gap: 10px;
    }

    .nav-links {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .slider {
        max-width: 100%;
    }

    .slide img {
        width: 100%;
        height: auto;
    }
}

/* ------------------- MOBILE NAVBAR FIX ------------------- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: row;           /* keep elements in a row */
        justify-content: space-between; /* hamburger left, logo center, cart right */
        align-items: center;
        padding: 10px 16px;
    }

    .logo {
        margin: 0 auto; /* center logo */
    }

    .hamburger {
        display: block;  /* show hamburger on mobile */
        order: 1;        /* put hamburger first (left) */
    }

    #cart-btn {
        order: 3;        /* cart button last (right) */
    }

    .nav-links {
        display: none;   /* hide nav links by default */
        flex-direction: column;
        gap: 10px;
        width: 100%;
        text-align: center;
        background: var(--card);
        position: absolute;
        top: 60px;       /* below navbar */
        left: 0;
        border-top: 1px solid #eee;
        padding: 10px 0;
        z-index: 9;
    }

    .nav-links.active {
        display: flex;   /* show links when hamburger clicked */
    }

    .nav-links li {
        margin: 8px 0;
    }

    /* Optional: hide unnecessary text in mobile */
    .navbar h1.logo {
        display: none;   /* remove text logo, keep image */
    }
}

.products a {
  color: inherit;       /* uses normal text color */
  text-decoration: none; /* removes underline */
}

.products a:hover {
  color: var(--brand);   /* optional: highlight on hover */
}
