/* =========================================
   1. GLOBAL RESET & BASICS
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    background-color: #fff;
    color: #000;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Ensure all images dynamically scale and never break their containers */
img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   2. NAVBAR (RESPONSIVE)
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid #f2f2f2;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -1px;
    z-index: 1001;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allows links to adjust on weird window sizes */
}

.nav-links a {
    margin: 0 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #666;
}

.btn-primary {
    background: #000;
    color: #fff;
    padding: 12px 30px; 
    border-radius: 50px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: inline-block; 
}

.btn-primary:hover {
    background: #333;
    transform: scale(1.05);
}

.mobile-only-btn { display: none; }
.desktop-only-btn { display: block; }

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #000;
    margin: 5px 0;
    transition: 0.3s;
}

/* =========================================
   3. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 850px) { /* Increased breakpoint slightly for half-screen users */
    .hamburger-menu { display: block; }
    .desktop-only-btn { display: none; }
    .mobile-only-btn { display: block; margin-top: 20px; }

    .nav-links {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100vh;
        background: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%);
        transition: transform 0.4s ease;
        z-index: 999;
    }

    .nav-links a { font-size: 1.5rem; margin: 20px 0; }
    .nav-links.active { transform: translateY(0); }

    .hamburger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .hamburger-menu.active span:nth-child(2) { opacity: 0; }
    .hamburger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }
    
    .menu-container { flex-direction: column; }
    .menu-sidebar { display: none; }
    
    /* --- CONTACT PAGE MOBILE REORDERING --- */
    .contact-container { 
        flex-direction: column; 
        gap: 2rem; 
    }
    
    .contact-form-wrapper { order: 1; }
    .contact-image { order: 2; width: 100%; }
    /* -------------------------------------- */
    
    .hero {
        min-height: 60vh;
        padding: 4rem 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* =========================================
   4. HOMEPAGE STYLES
   ========================================= */
.hero {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 85vh; 
    width: 100%;
    padding: 0 2rem;
    background-size: cover;      
    background-position: center;  
    background-repeat: no-repeat; 
    background-attachment: fixed;
    position: relative; 
    color: #fff;      
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.3); 
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; 
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2.5rem; 
    color: #f0f0f0;
    max-width: 600px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.hero-content .btn-primary { background: #fff; color: #000; }
.hero-content .btn-primary:hover { background: #e6e6e6; transform: scale(1.05); }

.weekly-flavors {
    padding: 5rem 2rem; 
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.weekly-flavors h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

/* FLUID FLAVOR GRID: Smoothly drops to 2 columns, then 1 column automatically */
.flavor-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2.5rem;
}

.flavor-card {
    background: #fff; 
    border-radius: 20px; 
    padding: 1.5rem; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    transition: transform 0.3s, background-color 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem; 
}

.flavor-card:hover { transform: translateY(-5px); }

.taro-card:hover { background-color: #E5D9F2; }
.matcha-card:hover { background-color: #D0E6A5; }
.peach-card:hover { background-color: #fedcbe; }

.flavor-card img {
    width: 100%; 
    max-height: 350px; /* Prevents images from getting too tall on half-screens */
    aspect-ratio: 1 / 1; 
    object-fit: cover;
    border-radius: 15px; 
    margin-bottom: 0; 
}

.flavor-card h3 { margin: 0; font-size: 1.2rem; }

.btn-outline {
    background: transparent; 
    border: 2px solid #000;
    padding: 10px 25px; 
    border-radius: 50px; 
    font-weight: bold;
    cursor: pointer; 
    transition: background 0.3s, color 0.3s;
    margin-top: auto; 
}

.btn-outline:hover { background: #000; color: #fff; }

/* =========================================
   5. MENU PAGE STYLES 
   ========================================= */
.menu-body { background-color: #fff; }
.menu-container { display: flex; max-width: 1400px; margin: 0 auto; padding-top: 2rem; }

.menu-sidebar {
    width: 250px; padding: 0 2rem; position: sticky;
    top: 100px; height: calc(100vh - 100px); overflow-y: auto;
}

.sidebar-group { margin-bottom: 2rem; }
.sidebar-group h4 { margin-bottom: 1rem; font-size: 1.1rem; }
.sidebar-group ul { list-style: none; }
.sidebar-group li { margin-bottom: 0.8rem; }
.sidebar-group a { color: #666; font-size: 0.95rem; }
.sidebar-group a:hover { color: #000; font-weight: 600; }

.menu-content { flex: 1; padding: 0 2rem; padding-bottom: 4rem; width: 100%; }
.menu-content h2 { font-size: 1.8rem; margin-bottom: 1rem; }
.menu-content section { margin-bottom: 60px; } 

hr { border: 0; border-top: 1px solid #ddd; margin-bottom: 2rem; }

.category-header {
    font-size: 1.4rem; font-weight: bold;
    margin: 2rem 0 1.5rem 0; scroll-margin-top: 120px;
}

.product-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 2rem; 
    margin-bottom: 2rem;
}

.product-item {
    display: flex; flex-direction: column;
    align-items: center; text-align: center; cursor: pointer;
}

.img-circle {
    width: 100%;
    max-width: 140px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #f2f2f2;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s;
}

.product-item:hover .img-circle { transform: scale(1.05); }

.img-circle img { width: 100%; height: 100%; object-fit: cover; }

.product-item span { font-weight: 500; font-size: 1rem; line-height: 1.2; }

/* =========================================
   6. COFFEE LOADER ANIMATION
   ========================================= */
#loader-wrapper {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; background-color: #ffffff;
    z-index: 9999; display: flex; justify-content: center; align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.coffee-cup { width: 80px; height: 80px; animation: pulse 1.5s infinite ease-in-out; }
@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}
.loader-hidden { opacity: 0; visibility: hidden; }

/* =========================================
   7. OTHER PAGES 
   ========================================= */
.page-header { text-align: center; padding: 3rem 0 1rem; color: #5D4037; }
.page-header h2 { font-family: 'Georgia', serif; font-size: 2.5rem; font-weight: normal; letter-spacing: 1px; }
.sub-header { text-align: center; text-transform: uppercase; color: #8D6E63; letter-spacing: 2px; font-size: 0.9rem; margin-bottom: 2rem; }

/* FLUID CONTACT WRAPPER */
.contact-container { 
    display: flex; 
    flex-wrap: wrap; /* Allows it to stack automatically on half-screen */
    max-width: 1200px; 
    margin: 2rem auto; 
    padding: 0 2rem; 
    align-items: center; 
    justify-content: center;
    gap: 4rem; 
}
.contact-image { 
    flex: 1 1 400px; /* Allows smooth shrinking/growing */
}
.contact-image img { 
    width: 100%; 
    max-height: 600px;
    border-radius: 5px; 
    aspect-ratio: 3 / 4; 
    object-fit: cover; 
}
.contact-form-wrapper { 
    flex: 1 1 400px; 
}
.contact-form-wrapper h3 { font-family: 'Georgia', serif; font-size: 2rem; color: #3E2723; margin-bottom: 0.5rem; }
.contact-form-wrapper p { color: #777; margin-bottom: 2rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: #333; font-size: 0.9rem; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; background: #FAFAFA; }

.btn-brown { background-color: #3E2723; color: #fff; padding: 12px 30px; border: none; border-radius: 2px; cursor: pointer; font-size: 1rem; letter-spacing: 1px; }
.btn-brown:hover { background-color: #5D4037; }

/* FLUID LOCATIONS */
.locations-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 2rem; 
    max-width: 1000px; 
    margin: 0 auto 4rem; 
    padding: 0 2rem; 
}
.location-card { 
    background: #fff; 
    border: 1px solid #f0f0f0; 
    text-align: center; 
    padding-bottom: 2rem; 
    border-radius: 8px; 
    overflow: hidden; 
    transition: box-shadow 0.3s; 
}
.location-card:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.location-card img { 
    width: 90%; 
    max-height: 280px; /* Caps the image height so it doesn't stretch massively */
    object-fit: cover; 
    margin: 1rem auto; 
    display: block; 
    border-radius: 15px; 
}
.location-card h3 { color: #3E2723; margin-bottom: 1rem; font-weight: bold; }
.location-card p { color: #666; font-size: 0.9rem; line-height: 1.6; margin-bottom: 0.5rem; padding: 0 1rem; }
.btn-outline-small { border: 1px solid #333; background: transparent; padding: 8px 20px; margin-top: 1rem; display: inline-block; font-size: 0.8rem; cursor: pointer; }

/* FLUID ABOUT PAGE */
.about-container { max-width: 800px; margin: 0 auto 4rem; padding: 0 2rem; text-align: center; }
.about-logo-mark { width: 150px; margin: 0 auto 2rem; display: block; }
.about-text { font-size: 1.1rem; line-height: 1.8; color: #555; margin-bottom: 3rem; }

.about-feature-image {
    width: 100%;
    max-width: 800px;       
    aspect-ratio: 16 / 9;   
    object-fit: cover;      
    border-radius: 10px;    
    display: block;
    margin: 2rem auto 0;    
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
}

/* FLUID GALLERY */
.gallery-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 15px; 
    padding: 2rem; 
    max-width: 1400px; 
    margin: 0 auto; 
}
.gallery-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; transition: transform 0.3s; }
.gallery-item img:hover { transform: scale(1.02); }

/* =========================================
   8. SOCIAL FOOTER 
   ========================================= */
.social-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 2rem; /* Added padding so text doesn't hit screen edges on small windows */
    margin-top: auto;
    background: #fff;
    width: 100%;
}

.social-icons-group {
    display: flex;
    gap: 20px;
    align-items: center; 
}

.social-icon {
    display: flex;         
    align-items: center;   
    justify-content: center;
    text-decoration: none; 
    width: 24px;          
    height: 24px;
}

.social-icon svg {
    width: 20px;           
    height: 20px;
    fill: #000;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: block;        
}

.social-icon:hover svg {
    opacity: 0.6; 
    transform: scale(1.1); 
}

.copyright-text {
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
    text-align: center;
    line-height: 1.5; /* Makes it easier to read if it wraps onto two lines */
}

/* =========================================
   9. LIGHTBOX / MODAL (Gallery Pop-up)
   ========================================= */

/* Make gallery images look clickable */
.gallery-item img {
    cursor: pointer;
}

/* The dark background overlay */
.modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 10000; /* Sit on top of the navbar and everything else */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.85); /* 85% black */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
}

/* The enlarged image */
.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease; /* Smooth pop-in animation */
    object-fit: contain; /* Ensures the whole image fits on screen */
}

/* The Close Button (X) */
.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10001;
}

.close-modal:hover,
.close-modal:focus {
    color: #888;
}

/* The animation keyframes */
@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}