/* Coffee Shop & Roastery - Main Stylesheet */

/* ===== CSS Variables ===== */
:root {
    /* Primary Colors - Enhanced for better contrast */
    --primary-brown: #2C1810;
    --secondary-brown: #4A2C1A;
    --light-brown: #8B6F47;
    --cream: #FFF8DC;
    --light-cream: #FFFEF7;
    --charcoal: #1A1A1A;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --accent-gold: #D4A574;
    --light-gold: #E6C9A8;
    --white: #FFFFFF;
    --black: #000000;

    /* Text Colors with WCAG compliance */
    --text-on-dark: #FFFFFF;
    --text-on-light: #1A1A1A;
    --text-muted: #666666;
    --text-accent: #D4A574;

    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Inter', sans-serif;

    /* Shadows */
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.16);

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;

    /* Spacing Scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
    --space-xxl: 5rem;

    /* Theme Semantic Variables - Light Default */
    --bg-primary: #FFFEF7;
    --bg-secondary: #FFF8DC;
    --bg-card: #FFFFFF;
    --text-main: #1A1A1A;
    --text-sub: #666666;
    --border-main: rgba(212, 165, 116, 0.2);
    --header-bg: linear-gradient(135deg, #2C1810, #4A2C1A);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --title-color: #2C1810;
    --find-us-color: #FFFFFF;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
    --bg-primary: #12100E;
    --bg-secondary: #1C1814;
    --bg-card: #251D18;
    --text-main: #F5E6D3;
    --text-sub: #BAA391;
    --border-main: rgba(212, 165, 116, 0.3);
    --header-bg: linear-gradient(135deg, #1A100B, #2C1810);
    --card-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
    --title-color: #D4A574;

    /* Fix invisible text in dark mode */
    --primary-brown: #D4A574;
    /* card titles, links — use gold instead of dark brown */
    --secondary-brown: #C49060;
    --text-muted: #BAA391;
    /* body text, card paragraphs */
    --cream: #1C1814;
    /* section backgrounds that use var(--cream) */
    --light-cream: #12100E;

    /* Hardcoded dark brown for elements on gold backgrounds to ensure visibility */
    --text-on-accent: #2C1810;

    /* Keep white truly white for nav/logo text — do NOT override to dark */
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.6);

    /* Ensure specific headings on dark backgrounds are visible */
    --find-us-color: #D4A574;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.7;
    color: var(--text-main);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--title-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: color 0.3s ease;
}

/* Enhanced H1 visibility for all themes */
h1 {
    color: var(--title-color) !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.1);
    font-weight: 800;
}

/* H1 and P on dark backgrounds */
.hero h1,
[class*="-hero"] h1,
.text-on-dark h1,
.hero p,
[class*="-hero"] p,
.text-on-dark p {
    color: var(--text-on-dark) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* H1 on cream/light backgrounds */
.section[style*="background: var(--cream)"] h1,
.section[style*="background:var(--cream)"] h1 {
    color: var(--primary-brown) !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    font-weight: 800;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

h5 {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
}

h6 {
    font-size: clamp(1rem, 1.5vw, 1rem);
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

a {
    text-decoration: none;
    color: var(--primary-brown);
    transition: var(--transition-smooth);
    font-weight: 500;
}

a:hover {
    color: var(--accent-gold);
}

a:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ===== Header & Navigation ===== */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    background: var(--header-bg);
    box-shadow: var(--shadow-medium);
    z-index: 1000;
    transition: background 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    /* Slightly wider for better headroom */
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    gap: 1rem;
    flex-wrap: nowrap;
    /* Force single row */
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-primary);
    flex-shrink: 0;
    white-space: nowrap;
}

.logo-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent !important;
    /* Explicitly ensure no background */
    transition: var(--transition-smooth);
}

.logo-icon img {
    width: 110%;
    /* Slightly larger to fill space better */
    height: 110%;
    object-fit: contain;
    /* This filter thickens the transparent lines, making it appear 'bolder' */
    filter: drop-shadow(0 0 1px var(--accent-gold)) drop-shadow(0 0 1px var(--accent-gold)) brightness(1.2);
}

.logo:hover .logo-icon {
    transform: rotate(5deg) scale(1.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    /* Tighten menu spacing */
    margin: 0;
    flex-wrap: nowrap;
}

/* Hide button list items on desktop */
.nav-menu li:nth-last-child(2),
.nav-menu li:last-child {
    display: none;
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
    /* Consistent gap */
    align-items: center;
    flex-shrink: 0;
    /* Keep buttons together */
}

.nav-link {
    color: var(--white);
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    /* Tighter links */
    border-radius: 20px;
    transition: var(--transition-smooth);
    position: relative;
    font-size: 0.85rem;
    /* Slightly smaller font */
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: var(--accent-gold);
    color: #2C1810;
    /* always dark on gold bg, regardless of theme */
    transform: translateY(-2px);
}

.nav-btn {
    padding: 0.25rem 0.6rem;
    /* Minimal padding */
    font-size: 0.75rem;
    /* Even smaller font */
    margin: 0;
    text-decoration: none;
    display: inline-block;
}

.nav-btn.btn-secondary {
    border: 2px solid var(--white);
    color: var(--white);
}

.nav-btn.btn-secondary:hover {
    background: var(--white);
    color: #2C1810;
    /* always dark on white bg, regardless of theme */
}

.nav-btn.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), var(--light-gold));
    color: #2C1810;
    /* always dark on gold bg, regardless of theme */
}

.nav-btn.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--white);
    transition: var(--transition-fast);
}

/* ===== Theme Toggle Button ===== */
.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--white);
    transition: var(--transition-smooth);
    margin-right: 0.5rem;
    position: relative;
    overflow: hidden;
}

.theme-btn:hover {
    background: var(--accent-gold);
    color: var(--primary-brown);
    transform: rotate(15deg);
}

.theme-icon-light,
.theme-icon-dark {
    font-size: 1.2rem;
    position: absolute;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* In light mode: hide sun, show moon (click = go dark) */
[data-theme="light"] .theme-icon-light {
    transform: translateY(-30px);
    opacity: 0;
}

[data-theme="light"] .theme-icon-dark {
    transform: translateY(0);
    opacity: 1;
}

/* In dark mode: show sun, hide moon (click = go light) */
[data-theme="dark"] .theme-icon-light {
    transform: translateY(0);
    opacity: 1;
}

[data-theme="dark"] .theme-icon-dark {
    transform: translateY(30px);
    opacity: 0;
}

.mobile-theme-toggle {
    display: none;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    font-family: var(--font-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.btn:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), var(--light-gold));
    color: #2C1810;
    /* always dark on gold bg, regardless of theme */
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: #2C1810;
    /* always dark on white bg, regardless of theme */
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-brown);
    border: 2px solid var(--primary-brown);
}

.btn-outline:hover {
    background: var(--primary-brown);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    width: 100%;
}

/* ===== Sections ===== */
.section {
    padding: var(--space-xxl) 0;
    overflow: hidden;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--title-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section-subtitle {
    text-align: center;
    color: var(--text-sub);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===== Hero Section ===== */
.hero,
.about-hero,
.menu-hero,
.gallery-hero,
.blog-hero,
.contact-hero,
.hero-alt {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(44, 24, 16, 0.7), rgba(74, 44, 26, 0.7)),
        var(--hero-bg-url, url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?w=1200&h=800&fit=crop')) center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-on-dark);
    position: relative;
    overflow: hidden;
}

.hero::before,
.about-hero::before,
.menu-hero::before,
.gallery-hero::before,
.blog-hero::before,
.contact-hero::before,
.hero-alt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 var(--space-md);
}

.hero-content h1,
.about-hero h1,
.menu-hero h1,
.gallery-hero h1,
.blog-hero h1,
.contact-hero h1,
.hero-alt h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: var(--space-sm);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: var(--text-on-dark) !important;
    font-family: var(--font-primary);
    font-weight: 900;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-content p,
.about-hero p,
.menu-hero p,
.gallery-hero p,
.blog-hero p,
.contact-hero p,
.hero-alt p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: var(--space-lg);
    color: var(--text-on-dark) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    font-family: var(--font-secondary);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-md);
    align-items: center;
}

/* ===== Grid Layouts ===== */
.grid {
    display: grid;
    gap: var(--space-md);
    width: 100%;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Balanced 2-column grid for specific sections (e.g., 3 cards with the 3rd centered) */
.balanced-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
}

.balanced-grid .card {
    width: 100%;
    margin-bottom: 0 !important;
    /* Override inline margins when in grid */
}

@media (min-width: 1024px) {
    .balanced-grid .card {
        flex: 0 1 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: var(--space-md);
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-main);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.card-image {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: var(--space-md);
    position: relative;
    background: linear-gradient(135deg, var(--light-brown), var(--accent-gold));
}

.card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Coffee-related image placeholders */
.card-image.coffee-beans::before {
    background-image: url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?w=400&h=200&fit=crop&auto=format');
}

.card-image.coffee-cup::before {
    background-image: url('https://images.unsplash.com/photo-1511920183-9f7106036526?w=400&h=200&fit=crop&auto=format');
}

.card-image.croissant::before {
    background-image: url('https://images.unsplash.com/photo-1559310789-03c1176c3d88?w=400&h=200&fit=crop&auto=format');
}

.card-image.gift-box::before {
    background-image: url('https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=400&h=200&fit=crop&auto=format');
}

/* Additional card image types */
.card-image.espresso::before {
    background-image: url('https://images.unsplash.com/photo-1511920183-9f7106036526?w=400&h=200&fit=crop&auto=format');
}

.card-image.latte::before {
    background-image: url('https://images.unsplash.com/photo-1534790566855-4c7b8ec9f7d5?w=400&h=200&fit=crop&auto=format');
}

.card-image.cappuccino::before {
    background-image: url('https://images.unsplash.com/photo-1564890369478-c89ca6d9cda9?w=400&h=200&fit=crop&auto=format');
}

.card-image.americano::before {
    background-image: url('https://images.unsplash.com/photo-1511920183-9f7106036526?w=400&h=200&fit=crop&auto=format');
}

.card-image.mocha::before {
    background-image: url('https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=400&h=200&fit=crop&auto=format');
}

.card-image.cold-brew::before {
    background-image: url('https://images.unsplash.com/photo-1556909114-f6e7ad7d3136?w=400&h=200&fit=crop&auto=format');
}

.card-content {
    text-align: center;
}

.card-title {
    font-size: 1.25rem;
    color: var(--primary-brown);
    margin-bottom: var(--space-sm);
    font-family: var(--font-primary);
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card-price {
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
    font-family: var(--font-primary);
}

.best-sellers-grid .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.best-sellers-grid .card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.best-sellers-grid .btn {
    margin-top: auto;
    align-self: center;
}

.icon-coffee {
    background: linear-gradient(135deg, var(--accent-gold), var(--light-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3rem;
    font-weight: bold;
}

.icon-bean {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-brown), var(--secondary-brown));
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    margin: 0 auto;
}

.icon-bean::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 20px;
    background: var(--accent-gold);
    border-radius: 1px;
}

.icon-cup {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 40px;
    background: var(--white);
    border-radius: 0 0 25px 25px;
    margin: 0 auto;
}

.icon-cup::before {
    content: '';
    position: absolute;
    top: -5px;
    right: -15px;
    width: 20px;
    height: 25px;
    border: 3px solid var(--white);
    border-left: none;
    border-radius: 0 15px 15px 0;
}

.icon-leaf {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 0 100% 0 100%;
    margin: 0 auto;
}

.icon-fire {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 50px;
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    margin: 0 auto;
}

.icon-globe {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 50%;
    margin: 0 auto;
}

.icon-globe::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 15px;
    background: var(--white);
    border-radius: 50%;
    opacity: 0.3;
}

.icon-heart {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 35px;
    background: #e74c3c;
    transform: rotate(-45deg);
    margin: 0 auto;
}

.icon-heart::before,
.icon-heart::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background: #e74c3c;
    border-radius: 50%;
}

.icon-heart::before {
    top: -20px;
    left: 0;
}

.icon-heart::after {
    top: 0;
    left: 20px;
}

.icon-star {
    position: relative;
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 18px solid var(--accent-gold);
    transform: rotate(35deg);
    margin: 15px auto;
}

.icon-star::before {
    content: '';
    position: absolute;
    left: -25px;
    top: -12px;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 18px solid var(--accent-gold);
    transform: rotate(-70deg);
}

.icon-star::after {
    content: '';
    position: absolute;
    left: -25px;
    top: 3px;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 18px solid var(--accent-gold);
    transform: rotate(70deg);
}

/* ===== Text Visibility Improvements ===== */
.text-on-dark {
    color: var(--text-on-dark) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.text-on-light {
    color: var(--text-on-light) !important;
}

.section-title {
    color: var(--primary-brown) !important;
    font-weight: 700;
}

.card-title {
    color: var(--primary-brown) !important;
    font-weight: 600;
}

.menu-item-name {
    color: var(--primary-brown) !important;
    font-weight: 600;
}

.menu-item-description {
    color: var(--dark-gray) !important;
    line-height: 1.6;
}

.menu-item-price {
    color: var(--accent-gold) !important;
    font-weight: 700;
    font-size: 1.2rem;
}

/* ===== Hero Sections with Background Images ===== */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(62, 39, 35, 0.8), rgba(93, 64, 55, 0.8)),
        url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?w=1200&h=800&fit=crop') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-on-dark);
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    color: var(--text-on-dark);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: var(--cream);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ===== Card Images ===== */
.card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--light-brown), var(--secondary-brown));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-dark);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.card-image.coffee-beans {
    background: url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?w=400&h=200&fit=crop') center/cover;
}

.card-image.coffee-cup {
    background: url('https://images.unsplash.com/photo-1511920183-9f7106036526?w=400&h=200&fit=crop') center/cover;
}

.card-image.croissant {
    background: url('https://images.unsplash.com/photo-1559310789-03c1176c3d88?w=400&h=200&fit=crop') center/cover;
}

.card-image.gift-box {
    background: url('https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=400&h=200&fit=crop') center/cover;
}

/* ===== Cards ===== */
.card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition-smooth);
}

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

.card-content {
    padding: 1.5rem;
}

.card-title {
    color: var(--primary-brown);
    margin-bottom: 1rem;
}

.card-price {
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, #2C1810, #4A2C1A);
    /* always dark, regardless of theme */
    color: #F5E6D3;
    padding: var(--space-xxl) 0 var(--space-md) 0;
    margin-top: var(--space-xxl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-content>.footer-section:last-child {
    grid-column: auto;
    justify-self: stretch;
    width: auto;
}

.footer-section h3 {
    color: #E6C9A8;
    /* light gold — always visible on dark footer bg */
    margin-bottom: var(--space-sm);
    font-size: 1.25rem;
    font-family: var(--font-primary);
}

.footer-section p {
    color: #D4C4B0;
    /* always light on dark footer bg */
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #D4C4B0;
    /* always light on dark footer bg */
    font-size: 0.9rem;
    line-height: 1.4;
}

.footer-contact-list .footer-icon {
    color: var(--accent-gold);
    flex-shrink: 0;
    font-size: 1.1rem;
}

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

.footer-links li {
    margin-bottom: var(--space-xs);
}

.footer-links a {
    color: #D4C4B0;
    /* always light on dark footer bg */
    transition: var(--transition-smooth);
}

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

.social-icons {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.social-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gold);
    color: var(--primary-brown);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition-smooth);
    font-size: 18px;
}

.social-icon:hover {
    background: var(--light-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Real social media icons using Unicode symbols */
.social-icon.facebook::before {
    content: "f";
    font-family: Arial, sans-serif;
}

.social-icon.instagram::before {
    content: "";
    font-family: Arial, sans-serif;
}

.social-icon.twitter::before {
    content: "X";
    font-family: Arial, sans-serif;
}

.social-icon.linkedin::before {
    content: "in";
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: #D4C4B0;
    /* always light on dark footer bg */
    font-size: 0.9rem;
}

/* ===== Forms ===== */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-medium);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-brown);
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--light-brown);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(255, 179, 0, 0.1);
}

.form-error {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

.mb-4 {
    margin-bottom: 4rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

.mt-4 {
    margin-top: 4rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-menu {
        gap: 0.4rem;
        /* Further reduced for tablet */
    }

    .nav-link {
        padding: 0.35rem 0.6rem;
        /* Smaller padding for tablet */
        font-size: 0.85rem;
        /* Smaller font for tablet */
    }

    .nav-buttons {
        gap: 0.4rem;
    }

    .nav-btn {
        padding: 0.35rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--primary-brown);
        flex-direction: column;
        justify-content: start;
        align-items: center;
        padding-top: 2rem;
        transition: var(--transition-smooth);
        z-index: 999;
        transform: none;
        gap: 0.5rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-buttons {
        display: none;
        /* Hide desktop nav-buttons on mobile */
    }

    /* Show button list items in mobile menu */
    .nav-menu li:nth-last-child(2),
    .nav-menu li:last-child {
        display: block;
    }

    .nav-menu li:last-child .nav-btn,
    .nav-menu li:nth-last-child(2) .nav-btn {
        font-size: 1.1rem;
        padding: 1rem 2rem;
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
        display: block;
    }

    .nav-menu li:last-child .nav-btn.btn-secondary {
        border: 2px solid var(--white);
        color: var(--white);
    }

    .nav-menu li:last-child .nav-btn.btn-secondary:hover {
        background: var(--white);
        color: var(--primary-brown);
    }

    .nav-link {
        font-size: 1.25rem;
        padding: 1rem 2rem;
        margin: 0.5rem 0;
        color: var(--text-on-dark);
    }

    .nav-link:hover,
    .nav-link.active {
        background: var(--accent-gold);
        color: var(--primary-brown);
    }

    .mobile-theme-toggle {
        display: flex !important;
        align-items: center;
        gap: 1rem;
        padding: 1rem 2rem;
        color: var(--text-on-dark);
        cursor: pointer;
        width: 100%;
        justify-content: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 1rem;
    }

    .mobile-theme-toggle .theme-btn {
        margin-right: 0;
    }

    .nav-btn {
        font-size: 1.1rem;
        padding: 1rem 2rem;
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
    }

    .nav-btn.btn-secondary {
        border: 2px solid var(--white);
        color: var(--white);
    }

    .nav-btn.btn-secondary:hover {
        background: var(--white);
        color: var(--primary-brown);
    }

    .container {
        padding: 0 var(--space-sm);
    }

    .section {
        padding: var(--space-lg) 0;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }

    .btn {
        width: 200px;
        max-width: 100%;
    }

    .card {
        margin-bottom: var(--space-md);
    }

    .grid {
        gap: var(--space-lg);
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 var(--space-sm);
    }

    .hero-content h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .hero-content p {
        font-size: clamp(0.9rem, 4vw, 1rem);
    }

    .form-container {
        padding: var(--space-md);
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-lg);
    }

    .social-icons {
        justify-content: center;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .section-subtitle {
        font-size: 1rem;
        padding: 0 var(--space-sm);
    }
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: var(--space-xs);
}

.mb-2 {
    margin-bottom: var(--space-sm);
}

.mb-3 {
    margin-bottom: var(--space-md);
}

.mb-4 {
    margin-bottom: var(--space-lg);
}

.mb-5 {
    margin-bottom: var(--space-xl);
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: var(--space-xs);
}

.mt-2 {
    margin-top: var(--space-sm);
}

.mt-3 {
    margin-top: var(--space-md);
}

.mt-4 {
    margin-top: var(--space-lg);
}

.mt-5 {
    margin-top: var(--space-xl);
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: var(--space-xs);
}

.p-2 {
    padding: var(--space-sm);
}

.p-3 {
    padding: var(--space-md);
}

.p-4 {
    padding: var(--space-lg);
}

.p-5 {
    padding: var(--space-xl);
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.d-grid {
    display: grid;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

/* ===== Accessibility ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for better keyboard navigation */
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
}

/* ===== Print Styles ===== */
@media print {

    .header,
    .footer,
    .hamburger,
    .btn,
    .hero-buttons {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .section {
        page-break-inside: avoid;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ===== Menu Specific Styles ===== */
.menu-category {
    margin-bottom: 4rem;
}

.menu-category-title {
    text-align: center;
    color: var(--primary-brown);
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
}

.menu-item {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(212, 165, 116, 0.1);
}

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

.menu-item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--light-brown), var(--accent-gold));
}

.menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.menu-item:hover .menu-item-image img {
    transform: scale(1.05);
}

.menu-item-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.75rem;
}

.menu-item-info {
    flex: 1;
}

.menu-item-name {
    font-size: 1.25rem;
    color: var(--primary-brown);
    margin-bottom: 0.5rem;
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.3;
}

.menu-item-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.menu-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(212, 165, 116, 0.1);
}

.menu-item-price {
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 1.2rem;
    font-family: var(--font-primary);
}

.add-to-cart-btn {
    background: linear-gradient(135deg, var(--accent-gold), var(--light-gold));
    color: var(--primary-brown);
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    font-family: var(--font-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-light);
    flex-shrink: 0;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.add-to-cart-btn:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Responsive Menu Grid */
@media (min-width: 1024px) {
    .menu-items {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .menu-items {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .menu-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 575px) {
    .menu-items {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .menu-item {
        max-width: 400px;
        margin: 0 auto;
    }

    .menu-item-content {
        padding: 1.25rem;
    }

    .menu-item-name {
        font-size: 1.1rem;
    }

    .menu-item-description {
        font-size: 0.85rem;
    }

    .add-to-cart-btn {
        font-size: 0.8rem;
        padding: 0.625rem 1rem;
    }
}

/* ===== Menu Item Background Images ===== */
.menu-item-image.espresso {
    background: url('https://images.unsplash.com/photo-1511920183-9f7106036526?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.cappuccino {
    background: url('https://images.unsplash.com/photo-1564890369478-c89ca6d9cda9?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.latte {
    background: url('https://images.unsplash.com/photo-1534790566855-4c7b8ec9f7d5?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.americano {
    background: url('https://images.unsplash.com/photo-1511920183-9f7106036526?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.mocha {
    background: url('https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.cold-brew {
    background: url('https://images.unsplash.com/photo-1556909114-f6e7ad7d3136?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.iced-latte {
    background: url('https://images.unsplash.com/photo-1512927278426-78e0175803136?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.iced-mocha {
    background: url('https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.nitro {
    background: url('https://images.unsplash.com/photo-1556909114-f6e7ad7d3136?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.frappe {
    background: url('https://images.unsplash.com/photo-1584534641230-65e5d3e6425c?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.croissant {
    background: url('https://images.unsplash.com/photo-1559310789-03c1176c3d88?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.muffin {
    background: url('https://images.unsplash.com/photo-1627308595229-78e0175803bb?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.cookie {
    background: url('https://images.unsplash.com/photo-1499636131165-0e931561c659?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.brownie {
    background: url('https://images.unsplash.com/photo-1606313564200-e75d5e425c1f?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.sandwich {
    background: url('https://images.unsplash.com/photo-1528735602780-2552fd46c7af?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.beans {
    background: url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.ground {
    background: url('https://images.unsplash.com/photo-1517449453835-3db026517f4b?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.equipment {
    background: url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.gift {
    background: url('https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=400&h=200&fit=crop') center/cover;
}

.menu-item-image.merchandise {
    background: url('https://images.unsplash.com/photo-1517686469429-8bdb88b9f907?w=400&h=200&fit=crop') center/cover;
}

/* Icon replacements for emojis */
.icon-location::before {
    content: "";
    margin-right: 0.5rem;
    font-size: 1.2em;
}

.icon-phone::before {
    content: "";
    margin-right: 0.5rem;
    font-size: 1.2em;
}

.icon-email::before {
    content: "";
    margin-right: 0.5rem;
    font-size: 1.2em;
}

.icon-clock::before {
    content: "";
    margin-right: 0.5rem;
    font-size: 1.2em;
}

.icon-mobile::before {
    content: "📱";
    margin-right: 0.5rem;
    font-size: 1.2em;
}

.icon-globe::before {
    content: "🌐";
    margin-right: 0.5rem;
    font-size: 1.2em;
}

.social-contact {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.social-contact-btn {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background: var(--accent-gold);
    color: var(--primary-brown);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    white-space: nowrap;
    font-family: var(--font-secondary);
}

.social-contact-btn:hover {
    background: var(--light-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.hours-list {
    list-style: none;
    padding: 0;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(212, 165, 116, 0.2);
    color: var(--text-muted);
}

.hours-list li:last-child {
    border-bottom: none;
}

.hours-list li span:first-child {
    font-weight: 600;
    color: var(--primary-brown);
}

.hours-list li span:last-child {
    font-weight: 500;
    color: var(--accent-gold);
}