/* ==========================================
   Teras Coffee - Main Stylesheet
   Color Scheme:
   - Primary: #6F4E37 (Coffee Brown)
   - Secondary: #D4A574 (Warm Latte)
   - Accent: #C89968 (Caramel)
   - Background: #FFF8F0 (Cream)
   - Dark: #2C1810 (Dark Roast)
   ========================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6F4E37;
    --secondary-color: #D4A574;
    --accent-color: #C89968;
    --bg-color: #FFF8F0;
    --dark-color: #2C1810;
    --light-color: #FFFFFF;
    --text-color: #333333;
    --text-light: #666666;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.btn-primary:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Navigation */
.navbar {
    background-color: var(--light-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-brand h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 0;
}

.nav-brand .tagline {
    font-size: 12px;
    color: var(--text-light);
    margin-top: -5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001; /* Ensure it's above other elements */
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.2s ease-out;
    will-change: transform, opacity;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px); /* Move it out of the way */
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px); /* Adjusted for symmetry */
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh; /* Taller for better impact */
    min-height: 600px;
    background: linear-gradient(rgba(44, 24, 16, 0.6), rgba(44, 24, 16, 0.8)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* Parallax effect */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-color);
    overflow: hidden;
    margin-top: -80px; /* Pull behind navbar if transparent */
    padding-top: 80px; /* Compensate for navbar */
}

/* Navbar Transparency override for Hero */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.hero-overlay {
    display: none; /* Removed separate overlay div in favor of background-blend */
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem; /* Larger title */
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    animation: fadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    letter-spacing: 1px;
    opacity: 0.9;
    animation: fadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}

/* Custom Hero Button */
.hero .btn-primary {
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 15px 30px;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
}

.hero .btn-secondary {
    background-color: transparent;
    border: 2px solid #fff;
    padding: 15px 30px;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    border-radius: 30px;
    font-weight: 500;
}

.hero .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(111, 78, 55, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(111, 78, 55, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(111, 78, 55, 0);
    }
}

.hero .btn-primary:hover {
    background-color: var(--dark-color);
    border-color: var(--dark-color);
    transform: translateY(-3px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 42px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    margin: 0 auto 15px;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-light);
}

/* About Section */
.about {
    background-color: var(--light-color);
}

.about-text {
    max-width: 900px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text-color);
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature {
    text-align: center;
    padding: 30px;
    background-color: var(--bg-color);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.feature h4 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.feature p {
    color: var(--text-light);
    font-size: 14px;
}

/* Menu Section */
.menu {
    background-color: var(--bg-color);
}

/* Menu Search Bar */
.menu-search {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

#searchInput {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 25px 0 0 25px;
    font-size: 16px;
    outline: none;
}

#searchBtn {
    padding: 0 20px;
    border: 2px solid var(--primary-color);
    border-left: none;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 18px;
}

.menu-categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 25px;
    background-color: var(--light-color);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.category-btn:hover,
.category-btn.active {
    background-color: var(--primary-color);
    color: var(--light-color);
}

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

.view-all-container {
    text-align: center;
    margin-top: 30px;
}

.menu-item {
    background-color: var(--light-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.menu-item-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.menu-item-content {
    padding: 20px;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.menu-item-name {
    font-size: 22px;
    color: var(--primary-color);
    font-weight: 600;
}

.menu-item-price {
    font-size: 20px;
    color: var(--accent-color);
    font-weight: 600;
}

.menu-item-description {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.menu-item-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--bg-color);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
}

.menu-item-footer {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.menu-item-actions {
    margin-top: 0; /* Reset margin top */
}

/* Carousel Gallery Styles */
.gallery {
    background-color: var(--light-color);
    position: relative;
    padding-bottom: 60px;
}

.carousel-container {
    position: relative;
    height: 600px; /* Adjust based on image aspect ratio preference */
    width: 100%;
    margin: 0 auto;
    max-width: 1000px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.carousel-track-container {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-track {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
    height: 100%;
    width: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%; /* Make sure slide takes full height */
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 20px;
    text-align: center;
    font-size: 1.2rem;
    font-family: 'Playfair Display', serif;
    letter-spacing: 1px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.carousel-container:hover .carousel-caption {
    transform: translateY(0);
}

/* Carousel Buttons */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 24px;
    color: var(--primary-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-button:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.carousel-button--left {
    left: 20px;
}

.carousel-button--right {
    right: 20px;
}

/* Carousel Navigation Indicators */
.carousel-nav {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    position: absolute;
    bottom: 20px;
    width: 100%;
    z-index: 10;
}

.carousel-indicator {
    border: none;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 0 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.current-slide {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Contact Section */
.contact {
    background-color: var(--bg-color);
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-card {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.info-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.info-card-link:hover .info-card {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Instagram Specific Card UI */
.ig-card {
    position: relative;
    overflow: hidden;
    color: var(--text-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ig-gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px; /* Subtle accent line */
    height: 100%;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    transition: width 0.3s ease;
}

.ig-card:hover .ig-gradient-bg {
    width: 100%;
    opacity: 0.05; /* Light tint on hover */
}

.info-content-relative {
    position: relative;
    z-index: 1;
}

.ig-card .info-icon {
    font-size: 45px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.ig-card p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.ig-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #cc2366;
    margin-top: 10px;
    padding: 5px 0;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.ig-card:hover .ig-cta {
    border-bottom-color: #cc2366;
    gap: 12px;
}

.info-card p {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 14px;
}

.contact-map {
    min-height: 450px;
}

.map-card {
    background-color: var(--light-color);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.map-card iframe {
    flex-grow: 1;
    border-radius: 10px !important;
}

.map-directions-btn {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--light-color);
    border-radius: 10px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.map-directions-btn:hover {
    background-color: var(--dark-color);
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 14px;
    opacity: 0.8;
}

.footer-links h4,
.footer-social h4 {
    font-size: 20px;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    display: inline-block;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 14px;
    opacity: 0.7;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

/* Quantity Controls */
.menu-item-actions {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.qty-display {
    margin: 0 15px;
    font-weight: 600;
    width: 20px;
    text-align: center;
}

/* Floating Cart Bar */
.cart-float {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: #fff;
    width: 90%;
    max-width: 600px;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-float.hidden {
    transform: translate(-50%, 150%);
}

.cart-float-info {
    font-weight: 600;
    font-size: 1.1rem;
}

.cart-divider {
    margin: 0 10px;
    opacity: 0.5;
}

#view-cart-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

#view-cart-btn:hover {
    background: var(--accent-color);
}

/* Cart Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal:not(.hidden) {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 25px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal:not(.hidden) .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.cart-items-container {
    overflow-y: auto;
    flex-grow: 1;
    margin-bottom: 20px;
    padding-right: 5px;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.cart-item-details h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--text-light);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.order-note {
    font-size: 0.85rem;
    color: var(--text-light);
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4000;
    width: 90%;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: rgba(44, 24, 16, 0.95);
    color: #fff;
    padding: 12px 20px;
    border-radius: 30px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    pointer-events: all;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    font-size: 1.2rem;
}

/* Visual Checkout Guide */
.checkout-guide {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    background: #fdf5e6; /* Soft cream */
    padding: 15px;
    border-radius: 12px;
    border: 1px dashed var(--accent-color);
}

.guide-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.guide-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.guide-step span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
}

.guide-arrow {
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: bold;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Mobile Optimization & Smooth Animations */



/* Touch Target Optimization */

.btn, .qty-btn, .carousel-button, .category-btn {

    touch-action: manipulation; /* Improves touch response */

}



/* Enhanced Mobile Navigation */

@media (max-width: 768px) {

        .nav-menu {

            display: flex;

            position: fixed; /* Fixed for full screen overlay */

        top: 0;

        right: 0; /* Slide from right */

        left: auto;

        width: 70%; /* Side panel style */

        height: 100vh;

        background-color: var(--light-color);

        flex-direction: column;

        justify-content: center; /* Center items vertically */

        align-items: center;

        padding: 40px;

        box-shadow: -5px 0 15px rgba(0,0,0,0.1);

        transform: translateX(100%); /* Start off-screen right */

        opacity: 1; /* Always opaque when active */

        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
        z-index: 999;

    }



    .nav-menu.active {
        display: flex;
        transform: translateX(0);
    }

    

    /* Overlay for background when menu is open */

    .nav-menu.active::before {

        content: '';

        position: fixed;

        top: 0;

        left: -100vw; /* Cover rest of screen */

        width: 100vw;

        height: 100vh;

        background: rgba(0,0,0,0.5);

        z-index: -1;

    }



    .hamburger {
        display: flex;
        z-index: 1001; /* Above the menu */
    }

}



/* Mobile Typography & Spacing */

@media (max-width: 480px) {

    .hero {

        height: auto;

        min-height: 100dvh; /* Dynamic Viewport Height for mobile browsers */

        padding-top: 100px;

        padding-bottom: 40px;

    }



    .hero-title {

        font-size: 2.5rem; /* Readable large text */

        line-height: 1.1;

    }



    .hero-subtitle {

        font-size: 1rem;

        padding: 0 10px;

    }



    .section-title {

        font-size: 28px;

    }

    

    .category-btn {

        flex: 1 1 40%; /* 2 buttons per row */

        margin-bottom: 5px;

        font-size: 13px;

        padding: 10px 15px;

    }



    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px; /* Further reduced gap */
    }

    .menu-item-content {
        padding: 8px; /* Further reduced padding */
    }

    .menu-item-name {
        font-size: 16px;
    }

    .menu-item-price {
        font-size: 15px;
    }
    
    .menu-item-description {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .menu-item-image {
        height: 100px; /* Further reduced height */
        font-size: 40px; /* Further reduced font size */
    }

    /* Quantity Buttons Touch Area */
    .qty-btn {
        width: 44px; /* Larger touch target */
        height: 44px;
        font-size: 1.2rem;
    }

    .qty-display {
        margin: 0 15px;
        font-size: 1.1rem;
    }



    /* Floating Cart Mobile Optimization */

    .cart-float {

        bottom: 20px;

        width: 95%;

        padding: 12px 20px;

        padding-bottom: max(12px, env(safe-area-inset-bottom)); /* iOS Safe Area */

    }

    

    .cart-float-info {

        font-size: 0.95rem;

    }

    

    #view-cart-btn {

        padding: 8px 15px;

        font-size: 0.9rem;

    }



    /* Quantity Buttons Touch Area */

    .qty-btn {

        width: 40px; /* Larger touch target */

        height: 40px;

    }



    /* How To Order Horizontal Scroll */

    .steps-grid {

        display: flex !important;

        overflow-x: auto;

        padding-bottom: 20px;

        scroll-snap-type: x mandatory;

        gap: 15px !important;

        -webkit-overflow-scrolling: touch;

    }

    

    .step-card {

        min-width: 80%; /* Show mostly one card */

        scroll-snap-align: center;

        background: #fff;

        padding: 20px;

        border-radius: 15px;

        box-shadow: 0 4px 10px rgba(0,0,0,0.05);

    }

}



/* Smooth Entrance Animations */

.fade-in-up {

    opacity: 0;

    transform: translateY(30px);

    transition: opacity 0.8s ease-out, transform 0.8s ease-out;

}



.fade-in-up.visible {

    opacity: 1;

    transform: translateY(0);

}



/* Helper for elements to watch */

.menu-item, .feature, .step-card, .info-card, .gallery-item {

    /* Apply base transition from existing code or here */

    opacity: 0;

    transform: translateY(20px);

    transition: opacity 0.6s ease-out, transform 0.6s ease-out;

}



.menu-item.visible, .feature.visible, .step-card.visible, .info-card.visible, .gallery-item.visible {

    opacity: 1;

    transform: translateY(0);

}
