/* =========================================
   Green Dream Atelier - CSS Guideline
   Style: Minimalist, Offen, Mobile First
   ========================================= */

:root {
    /* Color Palette */
    --color-primary: #8CA38A;
    /* Salbeigrün */
    --color-primary-dark: #6C816A;
    --color-secondary: #D4A373;
    /* Warmer Terrakotta / Sand Ton */
    --color-bg-light: #FAF9F6;
    /* Sanftes Off-White */
    --color-bg-white: #FFFFFF;
    --color-text-main: #333333;
    --color-text-muted: #666666;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Sizes */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    --border-radius: 8px;
    --transition-speed: 0.3s;

    /* Layout */
    --max-width: 1200px;
    --header-height: 80px;
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
    overflow-x: hidden;
}

p {
    margin-bottom: var(--space-sm);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
    color: var(--color-primary-dark);
}

.serif-title {
    font-family: var(--font-heading);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

/* =========================================
   Buttons & CTAs
   ========================================= */
.cta-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
    font-size: 1rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cta-button.primary {
    background-color: var(--color-primary);
    color: white;
}

.cta-button.primary:hover {
    background-color: var(--color-primary-dark);
}

.cta-button.secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.cta-button.secondary:hover {
    background-color: var(--color-primary);
    color: white;
}

.cta-button.large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* =========================================
   Placeholder Image Style
   ========================================= */
.image-placeholder {
    width: 100%;
    background-color: #e0e0e0;
    border: 2px dashed #999;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-family: monospace;
    font-size: 0.9rem;
    min-height: 300px;
    transition: all var(--transition-speed) ease;
}

/* Hover-Interaction auf Platzhalter als Micro-Animation */
.image-placeholder:hover {
    background-color: #d5d5d5;
    transform: scale(1.02);
}

/* =========================================
   Header & Navigation
   ========================================= */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-md);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary-dark);
}

.mega-menu {
    display: none;
    /* Hidden on mobile by default */
}

.menu-items {
    list-style: none;
    display: flex;
    gap: var(--space-lg);
}

.menu-items a {
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
}

/* Hover Underline Animation */
.menu-items a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-speed) ease;
}

.menu-items a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-primary-dark);
    transition: 0.3s;
}

/* =========================================
   Layout Containers & Sections
   ========================================= */
.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

/* Hero Section */
.hero-section {
    padding-top: calc(var(--header-height) + var(--space-xl));
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: var(--space-xl);
}

.hero-content {
    max-width: 800px;
    margin-bottom: var(--space-lg);
    padding: 0 var(--space-md);
}

.hero-badge-logo {
    width: 200px;
    height: auto;
    margin: 0 auto var(--space-md) auto;
    display: block;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.hero-ctas {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 100%;
    max-width: var(--max-width);
    height: 50vh;
    margin: 0 auto;
}

/* Centered Text Box */
.text-center {
    text-align: center;
}

.text-box-centered .content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.lead-text {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 800px;
    margin: 0 auto;
}

/* 50/50 Layouts */
.half-half {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.half-half .text-col {
    padding: var(--space-md) 0;
}

.half-half ul {
    list-style-position: inside;
    margin-bottom: var(--space-sm);
    color: var(--color-text-muted);
}

/* CTA Banner */
.cta-banner {
    background-color: var(--color-primary-dark);
    color: white;
    padding: var(--space-xl) var(--space-md);
    margin: var(--space-xl) 0;
}

.cta-banner-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    max-width: var(--max-width);
    margin: 0 auto;
}

.cta-logo {
    max-width: 250px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.cta-banner h2 {
    color: white;
}

/* 50/50 Grid (Leerbereich) */
.grid-half {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.gutschein-images {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.empty-state {
    background-color: var(--color-bg-white);
    border-radius: var(--border-radius);
    min-height: 300px;
}

/* Prices & Gallery */
.prices-box {
    background-color: var(--color-bg-white);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.price-images {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    align-items: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
}

.gallery-grid .image-placeholder {
    min-height: 250px;
}

/* =========================================
   Footer & Form
   ========================================= */
.main-footer {
    background-color: var(--color-bg-white);
    border-top: 1px solid #eaeaea;
    padding: var(--space-xl) var(--space-md) var(--space-md) var(--space-md);
}

.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.simple-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.simple-form input,
.simple-form textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.simple-form input:focus,
.simple-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.footer-links ul {
    list-style: none;
    margin-bottom: var(--space-md);
}

.footer-links li {
    margin-bottom: var(--space-xs);
}

.fm-branding {
    margin-top: var(--space-lg);
    font-size: 0.85rem;
    color: #999;
}

/* =========================================
   Header Cart Icon
   ========================================= */
.cart-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-main);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin-left: var(--space-sm);
    transition: transform var(--transition-speed);
}

.cart-icon-btn:hover {
    transform: scale(1.1);
}

.cart-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: #E63946;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    height: 18px;
    min-width: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.cart-badge.hidden {
    display: none;
}

/* =========================================
   Hero Concepts (New Redesign)
   ========================================= */
.hero-concept {
    min-height: 90vh;
    padding-top: calc(var(--header-height) + var(--space-xl));
    padding-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: var(--color-bg-light);
    border-bottom: 2px solid #eaeaea;
    /* visually separate the 3 testing concepts */
}

.hero-content {
    max-width: var(--max-width);
    width: 100%;
    padding: 0 var(--space-md);
    z-index: 1;
    display: grid;
    gap: var(--space-lg);
    align-items: center;
}

/* Portrait Video Styling */
.portrait-video {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 9/16;
    background-color: #2b3a2f;
    /* dark green placeholder */
    background-image: linear-gradient(135deg, #2b3a2f 0%, #1a231c 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-family: monospace;
    font-size: 1.2rem;
    margin: 0 auto;
}

/* Trust Badge Styling */
.hero-trust {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 8px 24px 8px 8px;
    border-radius: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: var(--space-md);
    border: 1px solid #eaeaea;
}

.trust-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.trust-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-main);
}

/* Base Headline */
.hero-headline {
    font-size: 2.8rem;
    line-height: 1.1;
    color: var(--color-primary-dark);
    margin-bottom: var(--space-md);
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}

/* --- Concept 1: Left-Aligned Split --- */
.hero-left {
    background-color: var(--color-bg-white);
}

.hero-left .hero-content {
    grid-template-columns: 1fr 1fr;
}

.hero-left .hero-text-col {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-left .hero-visual-col {
    display: flex;
    justify-content: flex-end;
}

.hero-ctas-swapped {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
}

.cta-button.glow-effect {
    box-shadow: 0 0 20px rgba(212, 163, 115, 0.5);
    background-color: var(--color-secondary);
    color: #fff;
    border: none;
    transform: scale(1.05);
    /* Highlight primary action */
    padding: 18px 36px;
    font-size: 1.15rem;
}

.cta-button.glow-effect:hover {
    box-shadow: 0 0 35px rgba(212, 163, 115, 0.9);
    transform: scale(1.08);
}

.cta-button.outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-button.outline:hover {
    background: white;
    color: var(--color-text-main);
}

/* =========================================
   Shop Section & Product Cards
   ========================================= */
.shop-section {
    background-color: var(--color-bg-white);
    padding: var(--space-xl) var(--space-md);
}

.shop-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-md);
}

.product-card {
    background: var(--color-bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: #e0e0e0;
}

.product-info {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: var(--space-xs);
    color: var(--color-text-main);
}

.product-desc {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    flex-grow: 1;
    line-height: 1.5;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid #eaeaea;
    padding-top: var(--space-md);
}

.product-price {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-primary-dark);
}

.add-to-cart-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition-speed);
}

.add-to-cart-btn:hover {
    background: var(--color-primary-dark);
}

/* =========================================
   Cart Sidebar
   ========================================= */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.cart-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: var(--color-bg-white);
    z-index: 1051;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 24px 30px;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-bg-light);
}

.cart-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--color-primary-dark);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2.5rem;
    line-height: 0.5;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--color-text-main);
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f5f5f5;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    object-fit: cover;
    background: #e0e0e0;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--color-text-main);
}

.cart-item-price {
    color: var(--color-primary-dark);
    font-size: 0.95rem;
    font-weight: 500;
}

.remove-item {
    background: none;
    border: none;
    color: #e63946;
    cursor: pointer;
    padding: 8px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.remove-item:hover {
    opacity: 1;
}

.empty-cart-msg {
    text-align: center;
    color: var(--color-text-muted);
    margin-top: 3rem;
    font-size: 1.1rem;
}

.cart-footer {
    padding: 30px;
    border-top: 1px solid #eaeaea;
    background: var(--color-bg-white);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.03);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.35rem;
    margin-bottom: 24px;
    color: var(--color-text-main);
}

.request-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.request-form input {
    padding: 14px;
    border: 2px solid #eaeaea;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.request-form input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.full-width {
    width: 100%;
}

.hidden-msg {
    margin-top: 16px;
    color: #2a9d8f;
    font-weight: 600;
    text-align: center;
    font-size: 1rem;
    background: #e6f7f5;
    padding: 12px;
    border-radius: 8px;
}

.error-msg {
    margin-top: 16px;
    color: #e63946;
    font-weight: 600;
    text-align: center;
    font-size: 1rem;
    background: #fdf0f0;
    padding: 12px;
    border-radius: 8px;
}

/* =========================================
   Animations (Staggered Fade In Observer)
   ========================================= */
.anim-item {
    opacity: 0;
    /* Will be overridden by active classes, generic fallback */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.anim-dir-centered {
    transform: translateY(40px);
}

.anim-dir-left {
    transform: translateX(-40px);
}

.anim-dir-right {
    transform: translateX(40px);
}

.anim-item.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

.content-btn {
    margin-top: 20px;
}

/* =========================================
   Media Queries (Desktop First-View)
   ========================================= */
@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }

    .mega-menu {
        display: block;
    }

    .hero-ctas {
        flex-direction: row;
    }

    .hero-content h1 {
        font-size: 4rem;
    }

    .half-half {
        grid-template-columns: 1fr 1fr;
    }

    .grid-half {
        grid-template-columns: 1fr 1fr;
    }

    .new-hero-section h1 {
        font-size: 4.5rem;
    }

    .hero-ctas-swapped {
        flex-direction: row;
    }

    .cta-banner-inner {
        flex-direction: row;
        text-align: left;
        justify-content: center;
        gap: var(--space-xl);
    }

    .cta-banner-inner .cta-text {
        max-width: 500px;
    }

    .gutschein-images {
        flex-direction: row;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr;
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
    }

    .hero-headline {
        font-size: 3.8rem;
    }

    .shop-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================
   Mobile Refinements (max 767px)
   ========================================= */
@media (max-width: 767px) {

    /* Header: keep the logo on one line and free up space for the controls */
    .header-container {
        padding: 0 var(--space-sm);
        gap: var(--space-sm);
    }

    .logo {
        font-size: 1.15rem;
        white-space: nowrap;
    }

    /* The header "Termin anfragen" CTA is redundant on small screens
       (the hero already shows the primary CTA) -> declutter */
    #header-termin-btn {
        display: none;
    }

    /* Mobile dropdown menu panel (visibility toggled via JS) */
    .mega-menu {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--color-bg-white);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        border-top: 1px solid #eaeaea;
    }

    .mega-menu .menu-items {
        flex-direction: column;
        gap: 0;
    }

    .mega-menu .menu-items li {
        border-bottom: 1px solid #f0f0f0;
    }

    .mega-menu .menu-items li:last-child {
        border-bottom: none;
    }

    .mega-menu .menu-items a {
        display: block;
        padding: 16px var(--space-md);
    }

    .mega-menu .menu-items a::after {
        display: none;
    }

    /* Hero: stack into a single column instead of the forced 2-col layout */
    .hero-left .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .hero-left .hero-text-col {
        align-items: center;
        text-align: center;
    }

    .hero-left .hero-visual-col {
        justify-content: center;
    }
}