/* ===================================
   CSS Reset & Base Styles
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1C1C19;
    background-color: #FAFAF8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Typography
   =================================== */

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

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

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

/* ===================================
   Layout Utilities
   =================================== */

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

/* ===================================
   Navigation
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: transparent;
    z-index: 1000;
    transition: background-color 250ms ease-out, box-shadow 250ms ease-out;
}

.navbar.scrolled {
    background-color: #FAFAF8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    color: #78350F;
}

.navbar.scrolled .logo {
    color: #78350F;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    font-size: 16px;
    color: #1C1C19;
    position: relative;
    transition: color 200ms ease-out;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #D97706;
    transition: width 200ms ease-out;
}

.nav-links a:hover {
    color: #D97706;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: #1C1C19;
    transition: all 250ms ease-out;
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('images/hero/bakery-hero.jpg');
    background-size: cover;
    background-position: center;
    margin-top: 64px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 600px;
    padding: 0 24px;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-tagline {
    font-size: 20px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
}

.btn-primary {
    display: inline-block;
    padding: 16px 32px;
    background-color: #D97706;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.02em;
    border-radius: 12px;
    min-width: 140px;
    text-align: center;
    transition: all 200ms ease-out;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.btn-primary:hover {
    background-color: #B45309;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* ===================================
   About Section
   =================================== */

.about {
    padding: 64px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 48px;
    align-items: center;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    color: #1C1C19;
    margin-bottom: 24px;
}

.about-description {
    font-size: 16px;
    line-height: 1.6;
    color: #4A4A45;
    margin-bottom: 16px;
}

.about-image img {
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ===================================
   Products Section
   =================================== */

.products {
    padding: 96px 0;
    background-color: #F5F4F0;
}

.section-title-center {
    font-size: 32px;
    font-weight: 700;
    color: #1C1C19;
    text-align: center;
    margin-bottom: 48px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.product-card {
    background-color: #F5F4F0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 250ms ease-out;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.product-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.product-content {
    padding: 32px;
}

.product-name {
    font-size: 24px;
    font-weight: 600;
    color: #1C1C19;
    margin-bottom: 8px;
}

.product-description {
    font-size: 16px;
    line-height: 1.5;
    color: #4A4A45;
    margin-bottom: 16px;
}

.product-price {
    font-size: 20px;
    font-weight: 500;
    color: #B45309;
}

/* ===================================
   Gallery Section
   =================================== */

.gallery {
    padding: 64px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1;
    cursor: pointer;
    transition: all 250ms ease-out;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* ===================================
   Location/Contact Section
   =================================== */

.location {
    padding: 96px 0;
    background-color: #F5F4F0;
}

.location-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.location-card {
    background-color: #F5F4F0;
    padding: 48px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-icon {
    color: #B45309;
    margin-bottom: 16px;
}

.card-title {
    font-size: 24px;
    font-weight: 600;
    color: #1C1C19;
    margin-bottom: 24px;
}

.hours-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hours-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    color: #4A4A45;
}

.contact-info {
    font-size: 16px;
    line-height: 1.6;
    color: #4A4A45;
}

.contact-info p {
    margin-bottom: 8px;
}

.contact-phone a,
.contact-email a {
    color: #D97706;
    transition: color 200ms ease-out;
}

.contact-phone a:hover,
.contact-email a:hover {
    color: #B45309;
    text-decoration: underline;
}

/* ===================================
   CTA Section
   =================================== */

.cta {
    padding: 64px 0;
    background-color: #FFF5E6;
}

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

.cta-title {
    font-size: 40px;
    font-weight: 700;
    color: #1C1C19;
    margin-bottom: 16px;
}

.cta-text {
    font-size: 20px;
    color: #4A4A45;
    margin-bottom: 32px;
}

.social-links {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.social-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #4A4A45;
    background-color: transparent;
    transition: all 200ms ease-out;
}

.social-icon:hover {
    color: #D97706;
    background-color: #F5F4F0;
    transform: scale(1.05);
}

.social-icon:active {
    transform: scale(0.95);
}

/* ===================================
   Footer
   =================================== */

.footer {
    padding: 32px 0;
    background-color: #1C1C19;
    color: #9B9A94;
    text-align: center;
}

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

/* ===================================
   Responsive Design
   =================================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (<768px) */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 64px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 64px);
        background-color: #FAFAF8;
        flex-direction: column;
        padding: 32px 24px;
        gap: 24px;
        transition: left 300ms ease-in-out;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

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

    .mobile-menu-toggle {
        display: flex;
    }

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

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        height: 400px;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-tagline {
        font-size: 16px;
    }

    .btn-primary {
        padding: 18px 32px;
        font-size: 16px;
    }

    .section-title {
        font-size: 32px;
    }

    .section-title-center {
        font-size: 28px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .location-grid {
        grid-template-columns: 1fr;
    }

    .location-card {
        padding: 32px;
    }

    .cta-title {
        font-size: 32px;
    }

    .cta-text {
        font-size: 16px;
    }
}

/* ===================================
   Accessibility
   =================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid #D97706;
    outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}
