/* --- CSS VARIABLES & RESET --- */
:root {
    --primary-color: #FF6B6B;
    /* Coral Red for accents/CTA */
    --secondary-color: #4ECDC4;
    /* Fresh Teal for Hero Button */
    --accent-color: #FFE66D;
    /* Sunny Yellow */
    --dark-text: #292F36;
    --light-bg: #F7FFF7;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius: 16px;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
    overflow-x: hidden;
    height: 100%;
    position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* --- PAGE CONTAINERS & TRANSITIONS --- */
.page {
    transition: opacity 0.5s ease-in-out, visibility 0.5s;
    min-height: 100vh;
    width: 100%;
}

.page.hidden {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}

/* --- NAVIGATION --- */
nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.logo span {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a:not(.cta-btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:not(.cta-btn):hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.cta-btn {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.cta-btn:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* Cart Icon */
.cart-icon-container {
    position: relative;
    cursor: pointer;
    margin-left: 1.5rem;
    color: var(--dark-text);
    transition: var(--transition);
}

.cart-icon-container:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

/* --- HERO SECTION --- */
header {
    height: 100vh;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4)), url('../img/MainBG.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 1rem;
    position: relative;
    margin-top: -80px;
    /* Offset nav height to go behind it if needed, or just be full screen */
}

/* Adjust header to account for sticky nav if we want it full viewport minus nav, 
   but usually hero is full viewport. Let's keep it simple. */
header {
    margin-top: 0;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

header h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

header p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-btn {
    background-color: #4CAF50;
    /* Specific Green from screenshot reference or close to it */
    color: var(--white);
    padding: 1rem 3rem;
    text-decoration: none;
    font-size: 1.1rem;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    display: inline-block;
}

.hero-btn:hover {
    background-color: #43A047;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- PRODUCTS SECTION --- */
#menu {
    padding: 4rem 0;
    background: linear-gradient(to bottom, var(--light-bg), #fff);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 3rem;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.section-title p {
    color: #666;
    font-size: 1.1rem;
}

/* --- MENU TABS & SLIDER --- */
.menu-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.menu-tab-btn {
    background: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #888;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.menu-tab-btn.active,
.menu-tab-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.3);
}

.menu-content-container {
    width: 100%;
    overflow: hidden;
    transition: height 0.45s ease;
    height: auto;
    will-change: height;
}

.menu-content-wrapper {
    display: flex;
    width: 300%;
    /* 3 Tabs */
    align-items: flex-start;
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.menu-content {
    width: 33.333%;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    padding: 0 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow);
}

.card-img {
    height: 220px;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.product-card:hover .card-img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    background: var(--white);
    position: relative;
    z-index: 1;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    color: var(--dark-text);
}

.card-content p {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.price {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
}

.order-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
}

.order-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* --- FEATURES SECTION --- */
.features {
    background-color: var(--white);
    padding: 6rem 5%;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-item {
    padding: 2rem;
    background: var(--light-bg);
    border-radius: var(--radius);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1rem;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* --- FOOTER --- */
footer {
    background-color: var(--dark-text);
    color: var(--white);
    text-align: center;
    padding: 4rem 1rem;
}

.footer-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.socials {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.socials a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.2rem;
    opacity: 0.8;
    transition: var(--transition);
}

.socials a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

/* --- CART SIDEBAR --- */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100%;
    background: var(--white);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
}

.close-cart {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-item-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: bold;
}

.remove-item {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.remove-item:hover {
    color: var(--primary-color);
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    background: var(--light-bg);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.checkout-btn:hover {
    background: #3dbdb4;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* --- CHAT WIDGET --- */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1500;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
    transition: var(--transition);
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.chat-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-body {
    height: 300px;
    padding: 1rem;
    overflow-y: auto;
    background: #f9f9f9;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
}

.chat-input-area input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.chat-input-area button {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
}

/* Variant Select Dropdown */
.variant-select {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--dark-text);
    background-color: #f9f9f9;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.variant-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.1);
}

/* Quantity Control */
.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.qty-input {
    width: 50px;
    text-align: center;
    padding: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-body);
    font-weight: bold;
    color: var(--dark-text);
}

.qty-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    .hamburger {
        display: block;
        cursor: pointer;
        z-index: 1001;
    }

    .bar {
        width: 25px;
        height: 3px;
        background-color: var(--dark-text);
        margin: 5px 0;
        transition: 0.3s;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: 0.3s ease-in-out;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}