/* ==========================================================================
   CSS Reset & Variables
   ========================================================================== */
:root {
    /* Premium Artisanal Bakery Color Palette */
    --color-primary: #8A5A44;
    /* Warm Chestnut Brown */
    --color-primary-light: #A77A65;
    --color-primary-dark: #664131;
    --color-secondary: #D4A373;
    /* Golden Wheat */
    --color-accent: #E9EDC9;
    /* Soft Olive / Butter */
    --color-background: #FEFAE0;
    /* Creamy White */
    --color-surface: #FFFFFF;
    --color-text: #333333;
    /* Soft Charcoal */
    --color-text-light: #666666;
    --color-border: #E6DFD4;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lora', serif;

    /* Shadows & Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Layout */
    --max-width: 1200px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

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

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    line-height: 1.2;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

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

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

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

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

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

/* ==========================================================================
   Components: Buttons & Dividers
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 500;
    border-radius: 2px;
    cursor: pointer;
    text-align: center;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--color-primary);
    color: #FFF;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: #FFF;
}

.btn-secondary:hover {
    background-color: #C08A56;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-outline:hover {
    background-color: var(--color-primary);
    color: #FFF;
}

.divider {
    height: 3px;
    width: 60px;
    background-color: var(--color-secondary);
    margin: 1.5rem auto;
}

.divider.left {
    margin: 1.5rem 0;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: rgba(254, 250, 224, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--color-border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary-dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-text);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-secondary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-cart {
    font-size: 1.25rem;
    color: var(--color-primary);
    position: relative;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.nav-cart:hover {
    transform: scale(1.1);
    color: var(--color-primary-dark);
}

.cart-count {
    position: absolute;
    top: -2px;
    right: -8px;
    background-color: var(--color-primary-dark);
    color: white;
    font-size: 0.75rem;
    font-family: sans-serif;
    font-weight: bold;
    height: 20px;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(102, 65, 49, 0.6));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #FFF;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 4.5rem;
    color: #FFF;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    font-style: italic;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* ==========================================================================
   Varieties Section
   ========================================================================== */
.varieties-section {
    padding: var(--spacing-xl) 5%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    font-size: 2.5rem;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
    font-style: italic;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: var(--color-surface);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image-wrapper {
    height: 300px;
    overflow: hidden;
    background-color: #F9F6F0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.8s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-info h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.product-info p {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    flex: 1;
}

/* ==========================================================================
   Order Section
   ========================================================================== */
.order-section {
    background-color: var(--color-surface);
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.split-layout {
    display: flex;
    max-width: var(--max-width);
    margin: 0 auto;
    align-items: center;
}

.split-content {
    flex: 1;
    padding: 0 5%;
}

.split-content h2 {
    font-size: 2.5rem;
}

.lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

.order-method {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    transition: var(--transition);
    padding: 1.5rem;
    border-radius: 8px;
    background: var(--color-background);
    border: 1px solid transparent;
}

.order-method:hover {
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-sm);
    transform: translateX(5px);
}

.method-icon {
    font-size: 2rem;
    color: var(--color-secondary);
    background: var(--color-surface);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.method-text h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.split-image {
    flex: 1;
    padding: 0 5%;
    display: flex;
    justify-content: center;
}

.decorative-block {
    background-color: var(--color-primary);
    color: #FFF;
    padding: 4rem;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.decorative-block::before {
    content: '"';
    font-family: var(--font-heading);
    font-size: 8rem;
    position: absolute;
    top: -20px;
    left: 20px;
    color: rgba(255, 255, 255, 0.15);
    line-height: 1;
}

.decorative-block blockquote {
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1.4;
    font-style: italic;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.decorative-block cite {
    font-size: 1.1rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--color-primary-dark);
    color: #FFF;
    padding: var(--spacing-lg) 5% 0;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo {
    height: 40px;
    filter: brightness(0) invert(1);
}

.footer-brand h3 {
    color: #FFF;
    font-size: 1.5rem;
}

.footer-note {
    max-width: 500px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    font-style: italic;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #FFF;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
}

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

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ==========================================================================
   Shop.html / Cart UI
   ========================================================================== */
.shop-header {
    background-color: var(--color-background);
    padding: var(--spacing-lg) 5%;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.shop-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.shop-container {
    max-width: var(--max-width);
    margin: var(--spacing-lg) auto;
    padding: 0 5%;
}

.product-price {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Slide-out Cart UI */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: var(--color-surface);
    z-index: 1002;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-primary);
    color: white;
}

.cart-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.close-cart {
    font-size: 1.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s;
}

.close-cart:hover {
    transform: scale(1.1);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-empty {
    text-align: center;
    color: var(--color-text-light);
    margin-top: 2rem;
    font-style: italic;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    background-color: var(--color-background);
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--color-primary-dark);
}

.cart-item-price {
    font-weight: bold;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qty-btn {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.remove-btn {
    color: #d9534f;
    font-size: 0.875rem;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--color-primary-dark);
}

#checkout-btn {
    width: 100%;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-primary-dark);
    color: white;
    padding: 1rem 2rem;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: var(--font-heading);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }

    .split-layout {
        flex-direction: column;
        gap: 4rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* In a real app, add a hamburger menu */
    }

    .nav-cart {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.25rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .decorative-block {
        padding: 2.5rem;
    }

    .decorative-block blockquote {
        font-size: 1.5rem;
    }
}