/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #f9f9f9;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Touch-friendly container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
}

.section {
    padding: 60px 0;
}

.bg-light {
    background-color: #f5f5f5;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #4a2c2a;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Typography for mobile */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.2rem;
}

/* Buttons - Larger touch targets */
.btn-primary {
    display: inline-block;
    background-color: #4a2c2a;
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    min-height: 48px;
    min-width: 48px;
    touch-action: manipulation;
}

.btn-primary:hover {
    background-color: #3a221f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 44, 42, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-block;
    background-color: #6c757d;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    min-height: 44px;
}

.admin-btn {
    background-color: #ff6b6b;
    color: white;
    padding: 10px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Floating WhatsApp Button - FIXED FOR MOBILE */
.floating-whatsapp {
    position: fixed;
    bottom: 80px; /* Jauh dari bottom agar tidak tertutup browser UI */
    right: 20px;
    z-index: 1000;
}

.whatsapp-float {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid white;
}

.whatsapp-float::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.2);
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.whatsapp-float:hover {
    background-color: #1da851;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
}

.whatsapp-float:active {
    transform: scale(0.95);
}

/* Header & Navigation - Mobile Optimized */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
}

.navbar {
    padding: 12px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.logo {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a2c2a;
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: 'Playfair Display', serif;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 20px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 8px 0;
    font-size: 0.95rem;
}

.nav-menu a:hover {
    color: #4a2c2a;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4a2c2a;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    margin: -8px;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background-color: #333;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section - Mobile Optimized */
.hero {
    height: 100vh;
    min-height: 600px;
    max-height: 800px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('https://images.unsplash.com/photo-1509042239860-f550ce710b93?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    margin-top: 60px;
    padding: 20px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 16px;
    width: 100%;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 16px;
    font-family: 'Playfair Display', serif;
    line-height: 1.3;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 24px;
    opacity: 0.9;
    line-height: 1.5;
}

/* Menu Section - OPTIMIZED FOR MOBILE (2 COLUMNS) */
.category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding: 0 8px;
}

.filter-btn {
    padding: 10px 16px;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    min-height: 40px;
    touch-action: manipulation;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    text-align: center;
    max-width: 120px;
}

.filter-btn.active, .filter-btn:hover {
    background-color: #4a2c2a;
    color: white;
    border-color: #4a2c2a;
}

.filter-btn:active {
    transform: scale(0.98);
}

/* Menu Grid - 2 COLUMNS FOR MOBILE */
.menu-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns for mobile */
    gap: 12px;
    margin-top: 20px;
}

.menu-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.menu-image {
    height: 140px; /* Ditinggikan untuk kompensasi hilangnya deskripsi */
    width: 100%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.menu-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-category {
    display: inline-block;
    background-color: #f0e6d3;
    color: #4a2c2a;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-bottom: 6px;
    align-self: flex-start;
}

.menu-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.menu-price {
    font-size: 1rem;
    font-weight: 600;
    color: #4a2c2a;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.menu-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #ff6b6b;
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 500;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 3px;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    grid-column: 1 / -1;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4a2c2a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    grid-column: 1 / -1;
    color: #888;
}

.empty-state i {
    font-size: 2.5rem;
    color: #ddd;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: #666;
    font-size: 1.1rem;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: center;
}

.about-text h3 {
    color: #4a2c2a;
    margin: 20px 0 12px;
    font-size: 1.3rem;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    height: auto;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.feature {
    text-align: center;
    padding: 16px 8px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.feature i {
    font-size: 1.6rem;
    color: #4a2c2a;
    margin-bottom: 10px;
}

.feature h4 {
    font-size: 0.9rem;
}

/* Location Section */
.location-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.location-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.info-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.info-card i {
    font-size: 1.8rem;
    color: #4a2c2a;
    margin-bottom: 12px;
}

.info-card h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1rem;
}

.info-card p {
    color: #666;
    line-height: 1.5;
    font-size: 0.9rem;
}

.note {
    font-size: 0.75rem;
    color: #888;
    margin-top: 8px;
    font-style: italic;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.map-container iframe {
    display: block;
    width: 100%;
}

/* Footer */
footer {
    background-color: #2c1816;
    color: white;
    padding-top: 40px;
    padding-bottom: 80px; /* Extra padding untuk floating button */
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 30px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: #f0e6d3;
}

.footer-section p {
    margin-bottom: 8px;
    color: #bbb;
    font-size: 0.9rem;
    line-height: 1.4;
}

.footer-section i {
    margin-right: 8px;
    color: #f0e6d3;
    width: 20px;
}

.social-icons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #4a2c2a;
    transform: translateY(-3px);
}

.footer-cta {
    color: #f0e6d3;
    margin: 16px 0 12px;
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-whatsapp-footer {
    display: inline-block;
    background-color: #25D366;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 200px;
}

.btn-whatsapp-footer:hover {
    background-color: #1da851;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bbb;
    font-size: 0.85rem;
    background-color: #2c1816;
}

/* Responsive Design - TABLET */
@media (min-width: 640px) {
    .section {
        padding: 70px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .menu-container {
        grid-template-columns: repeat(3, 1fr); /* 3 columns untuk tablet */
        gap: 16px;
    }
    
    .menu-image {
        height: 150px;
    }
    
    .menu-title {
        font-size: 1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .location-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .location-info {
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .map-container iframe {
        height: 300px;
    }
    
    .floating-whatsapp {
        bottom: 90px;
        right: 25px;
    }
}

/* Responsive Design - DESKTOP */
@media (min-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .nav-container {
        padding: 0 20px;
    }
    
    .nav-menu li {
        margin-left: 24px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .menu-container {
        grid-template-columns: repeat(4, 1fr); /* 4 columns untuk desktop */
        gap: 20px;
    }
    
    .menu-image {
        height: 160px;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
    
    .whatsapp-float {
        width: 65px;
        height: 65px;
        font-size: 2rem;
    }
    
    .floating-whatsapp {
        bottom: 100px;
        right: 30px;
    }
}

@media (min-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .menu-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
    
    .menu-image {
        height: 170px;
    }
}

/* Mobile Navigation - FIXED */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        z-index: 999;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0;
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 16px;
        font-size: 1rem;
        border-bottom: 1px solid #f5f5f5;
    }
    
    .nav-menu a:hover {
        background-color: #f9f9f9;
    }
    
    .hero {
        min-height: 500px;
        margin-top: 60px;
        padding: 16px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn-primary {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .category-filter {
        display: flex;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 8px 12px;
        margin: 0 -8px 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .category-filter::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        flex: 0 0 auto;
        width: auto;
        min-width: 100px;
    }
    
    .features {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .map-container iframe {
        height: 250px;
    }
    
    /* Floating WhatsApp Position untuk Mobile */
    .floating-whatsapp {
        bottom: 70px; /* Di atas browser UI mobile */
        right: 16px;
        z-index: 10000; /* Pastikan di atas semua elemen */
    }
    
    .whatsapp-float {
        width: 56px;
        height: 56px;
        font-size: 1.7rem;
    }
    
    /* Extra safety untuk browser mobile */
    @supports (padding: max(0px)) {
        .floating-whatsapp {
            bottom: max(70px, env(safe-area-inset-bottom) + 70px);
        }
    }
}

/* Very Small Phones */
@media (max-width: 360px) {
    .section-title {
        font-size: 1.6rem;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 90px;
    }
    
    .menu-container {
        grid-template-columns: 1fr; /* 1 column untuk phone sangat kecil */
        gap: 12px;
    }
    
    .menu-title {
        font-size: 0.9rem;
    }
    
    .menu-price {
        font-size: 0.9rem;
    }
    
    .floating-whatsapp {
        bottom: 60px;
        right: 12px;
    }
    
    .whatsapp-float {
        width: 52px;
        height: 52px;
        font-size: 1.6rem;
    }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 400px;
        height: auto;
        padding: 60px 20px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .floating-whatsapp {
        bottom: 20px;
        right: 20px;
    }
}

/* iPhone Notch & Safe Areas */
@supports (padding: max(0px)) {
    .navbar, .footer-bottom {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
    
    .hero {
        padding-top: max(20px, env(safe-area-inset-top));
    }
    
    footer {
        padding-bottom: max(80px, env(safe-area-inset-bottom) + 80px);
    }
    
    .floating-whatsapp {
        right: max(16px, env(safe-area-inset-right) + 16px);
        bottom: max(70px, env(safe-area-inset-bottom) + 70px);
    }
}

/* Prevent text size adjustment */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Better scrolling on iOS */
.scroll-container {
    -webkit-overflow-scrolling: touch;
}

/* Remove blue highlight on tap for iOS */
input,
textarea,
button,
select,
a {
    -webkit-tap-highlight-color: transparent;
}

/* Menu item hover for touch devices */
@media (hover: hover) and (pointer: fine) {
    .menu-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    }
}