/* ========================================
   P'Noi Thaithai Grocery — Styles
   Bold Editorial / Terracotta + Sand
   ======================================== */

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

:root {
    --color-terracotta: #C4724E;
    --color-terracotta-dark: #A85A3A;
    --color-terracotta-light: #D4916F;
    --color-sand: #F5EDE4;
    --color-sand-dark: #E8DDD2;
    --color-cream: #FDF9F5;
    --color-charcoal: #2C2420;
    --color-warm-gray: #5C4F47;
    --color-light-gray: #9A8B82;
    --color-white: #FFFFFF;
    
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    
    --transition-fast: 0.2s ease;
    --transition-med: 0.4s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-charcoal);
    background-color: var(--color-cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.section-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    color: var(--color-charcoal);
    margin-bottom: var(--space-md);
}

.section-desc {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--color-warm-gray);
    max-width: 540px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--color-terracotta);
    color: var(--color-white);
    border-color: var(--color-terracotta);
}

.btn-primary:hover {
    background-color: var(--color-terracotta-dark);
    border-color: var(--color-terracotta-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(196, 114, 78, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-charcoal);
    border-color: var(--color-charcoal);
}

.btn-secondary:hover {
    background-color: var(--color-charcoal);
    color: var(--color-white);
    transform: translateY(-1px);
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(253, 249, 245, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(196, 114, 78, 0.1);
    transition: all var(--transition-fast);
}

.site-header.scrolled {
    box-shadow: 0 1px 20px rgba(44, 36, 32, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 0.125rem;
    text-decoration: none;
}

.logo-mark {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-terracotta);
    line-height: 1;
}

.logo-wordmark {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-charcoal);
    line-height: 1;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
}

.nav-menu a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-warm-gray);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: var(--color-terracotta);
    transition: width var(--transition-fast);
}

.nav-menu a:hover {
    color: var(--color-terracotta);
}

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

.nav-cta {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    color: var(--color-terracotta) !important;
    border: 1.5px solid var(--color-terracotta) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm) !important;
    transition: all var(--transition-fast) !important;
}

.nav-cta::after {
    display: none !important;
}

.nav-cta:hover {
    background-color: var(--color-terracotta) !important;
    color: var(--color-white) !important;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 1.5px;
    background-color: var(--color-charcoal);
    transition: all var(--transition-fast);
    transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}

/* --- Hero --- */
.hero {
    padding-top: 72px;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--color-cream);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

.hero-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: var(--space-md);
}

.hero-headline {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.05;
    color: var(--color-charcoal);
    margin-bottom: var(--space-lg);
}

.hero-headline em {
    font-style: italic;
    color: var(--color-terracotta);
}

.hero-desc {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--color-warm-gray);
    max-width: 480px;
    margin-bottom: var(--space-lg);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.badge {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    background-color: var(--color-sand);
    color: var(--color-warm-gray);
    border-radius: 100px;
    border: 1px solid var(--color-sand-dark);
}

/* Hero Image */
.hero-image {
    position: relative;
}

.hero-img-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(44, 36, 32, 0.12);
}

.hero-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 7/9;
}

.hero-img-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background-color: var(--color-terracotta);
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0.15;
}

/* --- Section Divider --- */
.section-divider {
    background-color: var(--color-sand);
    padding: var(--space-2xl) 0;
    text-align: center;
}

.divider-text {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-style: italic;
    color: var(--color-warm-gray);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.5;
}

/* --- Products --- */
.products {
    padding: var(--space-3xl) 0;
    background-color: var(--color-cream);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.product-card {
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-med);
    border: 1px solid rgba(196, 114, 78, 0.08);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(44, 36, 32, 0.1);
}

.product-card-img {
    overflow: hidden;
    aspect-ratio: 5/4;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-card-img img {
    transform: scale(1.04);
}

.product-card-body {
    padding: var(--space-md);
}

.product-card-body h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-charcoal);
}

.product-card-body p {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--color-warm-gray);
}

/* --- Bakery Featured --- */
.bakery-featured {
    padding: var(--space-3xl) 0;
    background-color: var(--color-sand);
}

.bakery-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.bakery-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 56px rgba(44, 36, 32, 0.1);
}

.bakery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/5;
}

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

.bakery-content .section-desc {
    margin-bottom: var(--space-lg);
}

.bakery-highlights {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.highlight-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-sand-dark);
}

.highlight-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.highlight-label {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-charcoal);
}

.highlight-desc {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-warm-gray);
}

/* --- About --- */
.about {
    padding: var(--space-3xl) 0;
    background-color: var(--color-cream);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.about-content .section-desc {
    margin-bottom: var(--space-md);
}

.about-content .section-desc:last-of-type {
    margin-bottom: var(--space-xl);
}

.about-stats {
    display: flex;
    gap: var(--space-xl);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-terracotta);
    line-height: 1;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--color-light-gray);
    letter-spacing: 0.02em;
}

.about-images {
    position: relative;
    padding-bottom: var(--space-lg);
}

.about-img-main {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(44, 36, 32, 0.1);
}

.about-img-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/5;
}

.about-img-secondary {
    position: absolute;
    bottom: 0;
    right: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(44, 36, 32, 0.12);
    border: 4px solid var(--color-cream);
}

.about-img-secondary img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

/* --- Visit --- */
.visit {
    padding: var(--space-3xl) 0;
    background-color: var(--color-charcoal);
    color: var(--color-white);
}

.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.visit .section-eyebrow {
    color: var(--color-terracotta-light);
}

.visit .section-title {
    color: var(--color-white);
}

.visit-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.visit-detail {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.visit-icon {
    flex-shrink: 0;
    color: var(--color-terracotta-light);
    margin-top: 2px;
}

.visit-detail-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-light-gray);
    margin-bottom: 0.25rem;
}

.visit-detail-value {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-sand);
}

.visit-link {
    color: var(--color-terracotta-light);
    transition: color var(--transition-fast);
}

.visit-link:hover {
    color: var(--color-terracotta);
}

.visit-map {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    min-height: 400px;
}

.map-placeholder iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--color-charcoal);
    color: var(--color-sand);
    padding: var(--space-2xl) 0 var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand .logo {
    margin-bottom: var(--space-sm);
}

.footer-tagline {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--color-light-gray);
    max-width: 280px;
}

.footer-nav-label,
.footer-contact > span:first-child {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-light-gray);
    margin-bottom: var(--space-sm);
}

.footer-nav ul,
.footer-contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-nav a,
.footer-contact a {
    font-size: 0.9375rem;
    color: var(--color-sand);
    transition: color var(--transition-fast);
}

.footer-nav a:hover,
.footer-contact a:hover {
    color: var(--color-terracotta-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--color-light-gray);
}

.footer-bottom a {
    color: var(--color-terracotta-light);
    transition: color var(--transition-fast);
}

.footer-bottom a:hover {
    color: var(--color-terracotta);
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-grid {
        gap: var(--space-xl);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --space-lg: 1.25rem;
        --space-xl: 2.5rem;
        --space-2xl: 4rem;
        --space-3xl: 5rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        background-color: var(--color-cream);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px var(--space-lg) var(--space-lg);
        gap: var(--space-md);
        transition: right var(--transition-med);
        box-shadow: -8px 0 32px rgba(44, 36, 32, 0.1);
    }
    
    .nav-menu.open {
        right: 0;
    }
    
    .nav-cta {
        margin-top: var(--space-sm);
    }
    
    /* Mobile overlay */
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(44, 36, 32, 0.4);
        z-index: -1;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }
    
    .hero-headline {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-badges {
        justify-content: center;
    }
    
    .hero-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }
    
    .bakery-split {
        grid-template-columns: 1fr;
    }
    
    .bakery-image {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-images {
        order: -1;
        max-width: 480px;
        margin: 0 auto;
    }
    
    .visit-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .about-stats {
        flex-direction: column;
        gap: var(--space-md);
    }
}
