:root {
    /* --bg: #f9fa1b; */
    --bg: #f9fafb;
    --text: #1f2937;
    --accent: #10b981;
    --sidebar-w: 50vw;
    --font-base: 2.2vmin;
    --stage-h: auto;
    --shelf-h: 22vh;
    --action-bar-h: 18vh;
}

* {
    box-sizing: border-box;
}

html,
body {
    overscroll-behavior: none;
    /* Disables pull-to-refresh and bounce effects */
    overscroll-behavior-y: none;
    /* Specifically targets vertical bounce */
}

body {
    margin: 0;
    font-family: 'Raleway', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: var(--font-base);
    line-height: 1.5;
    /* WICHTIG: Relativ für den absoluten Canvas */
    position: relative;
    width: 100%;
    /* Verhindert Horizontal Scroll */
    overflow-x: hidden;
    min-height: 100vh;
}

#promo-banner {
    background: var(--text);
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    width: 100%;
    z-index: 100;
    position: relative;
}


#mobile-fab {
    display: none;
    /* Hidden by default on Desktop & Landing */
}

/* --- CANVAS (Long Canvas Strategy) --- */
#gl-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    pointer-events: none;
    display: block;
    background: transparent !important;
}


#stage-target {
    position: absolute;
    /* Takes it out of flex flow */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Just to be safe, though Canvas is 50 */
    background: transparent;
    /* Ensure we see 3D */
}

/* 2. FORCE the Shelf Slots to have size */
.shelf-slot {
    /* Flex children sometimes ignore height:100%, so we force min-height */
    height: 100%;
    min-height: 100%;
    aspect-ratio: 3/4;
    width: auto;
    background: transparent;
    position: relative;
    /* Context for rendering */
}

/* --- VIEW SWITCHING (Landing vs App) --- */
/* Step 0: Landing Page (Scrollable) */
#landing-page {
    width: 100%;
    position: relative;
    z-index: 30;
    padding: 0;
    min-height: 100vh;
    background: var(--bg);
}

/* Step 1+: App View (Fixed Configurator) */
#app-view {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
    /* Let clicks pass to canvas */
    display: flex;
    flex-direction: row;
}

/* State Toggle Logic */
body.state-app #landing-page {
    display: none;
}

body.state-app #app-view {
    display: flex;
}

/* Pointer Events Restore */
#info-panel,
#config-panel,
.view-card,
button,
#radial-menu.open,
.product-card,
footer,
header,
.shelf-slot,
#view-container {
    pointer-events: auto;
}

.hidden {
    display: none !important;
}

/* --- Base Styles (Mobile Default) --- */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    /* CHANGED: Removed fixed height:20vh to stop overflow */
    /* Added padding so it has space but pushes content down */
    padding: 8vh 0 5vh 0;
    width: 100%;
}

.hero-logo {
    /* CHANGED: 90% width for Mobile */
    width: 90%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* --- Desktop Override --- */
@media (min-aspect-ratio: 1/1) {
    .hero-logo {
        /* CHANGED: 50% width for Desktop */
        width: 50%;
    }
}

.brand-tag {
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.1em;
    font-size: 0.8em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2vh;
}

/* Product Grid */
#product-selection {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2vw;
    padding: 5vh 5vw 10vh 5vw;
    max-width: 1600px;
    margin: 0 auto;
}

.product-card {
    background: white;
    border-radius: 2vmin;
    padding: 2vmin;
    box-shadow: 0 1vh 3vh rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-1vh);
}

.canvas-target {
    width: 100%;
    aspect-ratio: 1/1;
    /* Keeps it square */
    margin-bottom: 2vh;
    border-radius: 1vmin;
    /* Placeholder color before 3D loads */
    background: transparent;
}

.card-body h2 {
    font-size: 150%;
    margin-bottom: 0.5vh;
}

.price-tag {
    font-weight: 800;
    color: var(--accent);
    font-size: 120%;
    margin-bottom: 1vh;
}

/* Target the strikethrough element inside the price tag */
.price-tag s {
    color: var(--text);
    /* Sets color to black/dark grey */
    text-decoration: line-through;
    /* Crosses it out */
    text-decoration-thickness: 2px;
    /* Optional: makes line thicker */
    margin-right: 8px;
    /* Adds space between numbers */
    font-weight: 400;
    /* Optional: makes old price thinner */
    opacity: 0.7;
    /* Optional: makes it slightly faded */
}

.desc {
    font-size: 90%;
    color: #666;
    margin-bottom: 2vh;
}

.spec-table {
    margin-top: auto;
    /* Pushes to bottom */
    border-top: 1px solid #eee;
    padding-top: 2vh;
}

.spec-table .row {
    display: flex;
    justify-content: space-between;
    padding: 0.5vh 0;
    font-size: 0.85em;
    border-bottom: 1px solid #f9f9f9;
}

.btn-landing-select {
    margin-top: 2vh;
    padding: 1.5vh 0;
    background: #e5e7eb;
    border: none;
    border-radius: 0.5vmin;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.product-card:hover .btn-landing-select {
    background: var(--text);
    color: white;
}

/* --- LEFT PANEL --- */
#info-panel {
    order: 1;
    flex: 0 0 var(--sidebar-w);
    width: var(--sidebar-w);
    background: rgba(255, 255, 255, 0.95);
    border-right: 0.2vmin solid #eee;
    backdrop-filter: blur(2vmin);
    z-index: 20;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    position: sticky;
    top: 0;

    /* --- DIE ÄNDERUNGEN --- */
    overflow-y: auto;
    /* Scrollen aktivieren */
    padding: 0 !important;
    /* FIX: Zwingt Scrollbar an den Rand */
}

#info-content {
    padding: 6vh 4vw;
    overflow: visible;
    /* Kein eigener Scrollbalken */
    height: auto;
    /* Wächst mit dem Text mit */
}

/* --- CONFIG PANEL --- */
#config-panel {
    order: 1;
    flex: 0 0 0;
    width: 0;
    background: rgba(255, 255, 255, 0.95);
    overflow: hidden;
    backdrop-filter: blur(2vmin);
    z-index: 21;
    position: sticky;
    top: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}


/* --- RIGHT VIEWPORT --- */
#view-container {
    order: 2;
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 3vh 3vw;
    min-height: 100dvh;
    /* Garantiert volle Höhe */
}

/* --- ELEMENTS --- */
h1 {
    font-size: 250%;
    line-height: 1.1;
    margin: 0 0 2vh 0;
    letter-spacing: -0.05em;
}

h2 {
    font-size: 180%;
    margin: 0;
}

h3 {
    font-size: 140%;
    margin: 0 0 1vh 0;
}

p {
    font-size: 100%;
    color: #555;
    margin-bottom: 2vh;
}

.btn-main,
.btn-secondary,
#btn-select {
    border: none;
    padding: 2vh 0;
    width: 100%;
    border-radius: 1vmin;
    font-weight: 700;
    font-size: 110%;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: inherit;
    transition: transform 0.2s, background 0.2s;
}

.btn-main {
    background: var(--text);
    color: white;
    margin-top: 2vh;
}

.btn-secondary {
    background: #e5e7eb;
    color: var(--text);
    margin-top: 2vh;
}

.btn-main:hover {
    transform: scale(1.02);
}

#selection-header {
    text-align: center;
    color: #ccc;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 2vh;
    height: 4vh;
}

#shelf-row {
    display: flex;
    gap: 2vw;
    justify-content: center;
    height: var(--shelf-h);
    margin-bottom: 2vh;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

#stage-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 2vh;
    position: relative;
    width: 100%;
    min-height: 40vh;
}

#stage-placeholder {
    position: absolute;
    font-size: 200%;
    color: #ddd;
    font-weight: 800;
    z-index: -1;
}

#action-bar {
    height: 12vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#btn-select {
    width: auto;
    padding: 0 6vw;
    height: 8vh;
    border-radius: 4vh;
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

#btn-select.active {
    background: var(--text);
    color: white;
    cursor: pointer;
    box-shadow: 0 1vh 3vh rgba(0, 0, 0, 0.15);
}

/* CARDS */
.view-card {
    position: relative;
    border-radius: 2vmin;
    cursor: pointer;
    transition: transform 0.4s;
}

#shelf-row .view-card {
    height: 100%;
    aspect-ratio: 3/4;
    width: auto;
}

#shelf-row .view-card:hover {
    transform: translateY(-1vh);
}

#stage-area .view-card {
    width: 100%;
    height: 100%;
    cursor: default;
}

.card-label {
    position: absolute;
    bottom: 2vh;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0.8vh 2vw;
    border-radius: 2vmin;
    box-shadow: 0 1vh 2vh rgba(0, 0, 0, 0.1);
    font-weight: 700;
    font-size: 80%;
    white-space: nowrap;
}

/* Specs & Swatches */
.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5vh;
    margin-top: 3vh;
    background: #f3f4f6;
    padding: 2vh;
    border-radius: 2vmin;
}

.spec-item span {
    display: block;
    font-size: 70%;
    text-transform: uppercase;
    color: #888;
    font-weight: 700;
}

.spec-item strong {
    display: block;
    font-size: 120%;
}

.swatch-grid {
    display: flex;
    gap: 1vw;
    margin-top: 2vh;
    padding: 1.5vmin;
}

.swatch-btn {
    width: 4vmin;
    height: 4vmin;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    cursor: pointer;
    transition: transform 0.2s, border 0.2s;
}

.swatch-btn:hover,
.swatch-btn.selected {
    transform: scale(1.1);
    box-shadow: 0 0.5vh 1.5vh rgba(0, 0, 0, 0.2);
}

.swatch-btn.selected {
    border: 0.3vmin solid var(--text);
}

/* Radial Menu */
#radial-menu {
    position: fixed;
    width: 15vmin;
    height: 15vmin;
    top: 0;
    left: 0;
    z-index: 99999;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#radial-menu.open {
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.color-bubble {
    position: absolute;
    width: 4vmin;
    height: 4vmin;
    border-radius: 50%;
    border: 0.3vmin solid white;
    box-shadow: 0 0.5vh 1vh rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
}

.color-bubble:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

/* STATES */
body.state-config #info-panel {
    flex: 0 0 0;
    width: 0;
    opacity: 0;
    padding: 0;
}

body.state-config #config-panel {
    flex: 0 0 var(--sidebar-w);
    width: var(--sidebar-w);
}



body.state-config #selection-header,
body.state-config #shelf-row,
body.state-config #action-bar {
    height: 0;
    opacity: 0;
    pointer-events: none;
    margin: 0;
    overflow: hidden;
}

body.state-config .card-label {
    opacity: 0;
}

/* --- DESKTOP SIDEBAR LOGIC (Min-Width 769px) --- */
@media (min-aspect-ratio: 1/1) {

    /* Fix: Lock window scroll on Desktop so only the sidebar scrolls */
    body.state-app {
        overflow: hidden;
    }

    #config-panel {
        /* Restoring the Flex Column for the Sidebar */
        padding: 0;
        justify-content: space-between;
        /* Ensure children fade in smoothly */
    }

    body.state-config #config-panel {
        padding: 4vh 4vw;
    }

    /* The new children behave like the old wrapper */
    #conf-header,
    #conf-body,
    #conf-actions {
        opacity: 0;
        transform: translateY(2vh);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    #conf-body {
        flex: 1;
        /* Fills the middle space */
        overflow-y: auto;
        margin: 2vh 0;
    }

    /* Active State Animations */
    body.state-config #conf-header {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.1s;
    }

    body.state-config #conf-body {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.2s;
    }

    body.state-config #conf-actions {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.3s;
    }
}

/* --- PORTRAIT / MOBILE --- */
@media (max-aspect-ratio: 1/1) {
    :root {
        --font-base: 3.5vw;
        --sidebar-w: 100vw;
        --shelf-h: 22vw;
    }

    /* 1. LAYOUT CONTAINER - IOS SYNC FIX */
    #app-view {
        /* CHANGED: Relative allows it to scroll with the main window */
        position: relative;
        display: none;
        /* FIX: Hidden by default so Intro text doesn't bleed onto Landing Page */
        flex-direction: column;
        overflow: visible;
        /* Disable internal scrollbar */
        height: auto;
        /* Grow with content */
        pointer-events: auto;

        /* Keep space for the fixed action bar at bottom */
        padding-bottom: var(--action-bar-h);
    }

    /* NEW: Explicitly show and stack vertically ONLY when state-app is active */
    body.state-app #app-view {
        display: flex;
        flex-direction: column;
    }

    /* 2. LANDING PAGE MOBILE STACK */
    #product-selection {
        display: flex;
        flex-direction: column;
        gap: 5vh;
    }

    .desktop-only {
        display: none;
    }

    .hero-section h1 {
        font-size: 12vw;
    }

    /* --- THE SANDWICH LAYOUT LOGIC --- */

    /* 3. UNWRAP THE PANEL: This makes the children siblings of the Stage */
    #config-panel {
        display: contents;
    }

    /* 4. HEADER: Sits at the Top (Order 1) */
    #conf-header {
        order: 1;
        width: 100%;
        padding: 4vh 5vw 0 5vw;
        z-index: 30;
        flex: 0 0 auto;
        background: transparent;
    }

    /* 5. 3D STAGE: Sits in the Middle (Order 2) */
    #view-container {
        order: 2;
        width: 100%;
        height: 50vh;
        /* Fixed height for 3D view on mobile */
        min-height: auto;
        padding: 0 5vw;
        /* Slight padding so model doesn't touch edges */
        flex: 0 0 auto;
        z-index: 10;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Ensure the 3D target fills this fixed height */
    #stage-area {
        height: 100%;
        min-height: 0;
        margin: 0;
    }

    /* 6. CONTENT BODY: Sits below Stage (Order 3) */
    #conf-body {
        order: 3;
        width: 100%;
        padding: 0 5vw;
        /* Padding REMOVED */
        z-index: 25;
        overflow: visible;
        flex: 0 0 auto;
    }

    /* 7. ACTIONS: Floating at Bottom (Order 4) */
    #conf-actions {
        order: 4;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: var(--action-bar-h);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        padding: 3vh 5vw;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        z-index: 100;
        display: flex;
        flex-direction: column;
        justify-content: center;
        box-shadow: 0 -1vh 4vh rgba(0, 0, 0, 0.1);
    }

    /* 8. HIDING LOGIC */
    /* If NOT in config mode, hide the sandwich parts */
    body:not(.state-config) #conf-header,
    body:not(.state-config) #conf-body,
    body:not(.state-config) #conf-actions {
        display: none;
    }

    /* If IN config mode, hide the old UI elements */
    body.state-config #info-panel {
        display: none;
    }

    /* --- UI ELEMENT SIZING --- */
    h1 {
        font-size: 8vw;
    }

    #shelf-row {
        gap: 3vw;
    }

    .view-card {
        border-radius: 3vw;
    }

    .swatch-btn {
        width: 12vw;
        height: 12vw;
    }

    #radial-menu {
        width: 35vw;
        /* Reduced from 60vw */
        height: 35vw;
        /* Reduced from 60vw */
    }

    .color-bubble {
        width: 9vw;
        /* Reduced from 14vw */
        height: 9vw;
        /* Reduced from 14vw */
        border-width: 0.8vw;
    }

    /* --- MOBILE FAB LOGIC (Step 1 Only) --- */

    /* 1. Show the Floating Button in Step 1 */
    body.state-app:not(.state-config) #mobile-fab {
        display: block;
        position: fixed;
        bottom: 5vh;
        left: 50%;
        transform: translateX(-50%);
        background: var(--text);
        color: white;
        font-weight: 700;
        padding: 2vh 8vw;
        border: none;
        border-radius: 4vh;
        box-shadow: 0 1vh 3vh rgba(0, 0, 0, 0.3);
        z-index: 999;
        font-size: 1.1em;
        white-space: nowrap;
    }

    /* 2. Hide the 3D View Container in Step 1 */
    body.state-app:not(.state-config) #view-container {
        display: none;
    }

    /* 3. Make Info Panel Full Screen in Step 1 */
    /* 3. Make Info Panel Full Screen in Step 1 */
    body.state-app:not(.state-config) #info-panel {
        display: block;
        /* Flex entfernt, damit es normal fließt */
        width: 100%;
        height: auto !important;
        /* WICHTIG: Keine 100vh Begrenzung */
        overflow: visible !important;
        /* WICHTIG: Kein interner Scrollbalken */
        background: transparent;
        pointer-events: auto;
    }

    /* 4. Add padding to text so FAB doesn't cover it */
    body.state-app:not(.state-config) #info-content {
        padding-bottom: 15vh;
    }
}


/* --- NEW MARKETING STYLES --- */

/* 1. Lifestyle Carousel */
.lifestyle-section {
    padding: 0 5vw;
    margin-bottom: 5vh;
}

.instruction-section {
    padding: 0 5vw;
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    /* Space for scrollbar */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
}

.carousel-card {
    flex: 0 0 80vw;
    /* Mobile: Show 80% of card */
    scroll-snap-align: center;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

@media (min-aspect-ratio: 1/1) {
    .carousel-card {
        flex: 0 0 400px;
    }

    /* Desktop: Fixed width */
}

.carousel-img {
    width: 100%;
    height: auto;
    /* WICHTIG: Erlaubt dem Bild, seine native Höhe zu behalten */
    aspect-ratio: auto;
    /* Entfernt erzwungene Verhältnisse */
    object-fit: contain;
    /* Stellt sicher, dass das ganze Bild zu sehen ist */
    background: transparent;
    /* Entfernt den grauen Platzhalter-Hintergrund */
    display: block;
}

.carousel-text {
    padding: 20px;
}

.carousel-text h3 {
    font-size: 1.1em;
    margin-bottom: 0.5em;
}

.carousel-text p {
    font-size: 0.9em;
    margin: 0;
    opacity: 0.7;
}

/* 2. Trust Grid (Facts) */
.trust-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    padding: 5vh 5vw;
    background: white;
    margin-top: 5vh;
    text-align: center;
}

@media (max-aspect-ratio: 1/1) {
    .trust-grid {
        grid-template-columns: 1fr;
    }
}

.trust-item strong {
    display: block;
    font-size: 1.5em;
    color: var(--accent);
}

.trust-item span {
    font-size: 0.9em;
    color: #666;
}

/* 3. Product Detail Images */
.detail-image {
    width: 100%;
    height: auto;
    /* Passt die Höhe automatisch an die Breite an */
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: block;
}

.highlight-box {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 0.9em;
}


/* --- CHECKOUT VIEW (STEP 3) --- */
/* --- CHECKOUT VIEW (STEP 3) --- */
#checkout-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 2000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    /* Global Scalability Factor for this View */
    /* 1rem inside this view will now equal 2% of the smaller screen dimension */
    font-size: 2vmin;
}

/* Logic to show Checkout */
body.state-checkout #checkout-view {
    display: flex;
    flex-direction: column;
}

/* Checkout Styling */
.checkout-container {
    margin: auto;
    padding: 8vmin 5vw;
    /* Breathing room relative to screen size */
    width: 90vw;
    /* Always 90% of screen width */
    max-width: none;
    text-align: center;
}

.checkout-container h1 {
    font-size: 3em;
    /* Relative to container font-size (6vmin) */
    line-height: 1.1;
    margin-bottom: 0.5em;
    letter-spacing: -0.03em;
}

.checkout-container p {
    font-size: 1.2em;
    /* ~2.4vmin */
    margin-bottom: 3em;
    opacity: 0.7;
    max-width: 60ch;
    /* Readable line length */
    margin-left: auto;
    margin-right: auto;
}

.plant-grid {
    display: grid;
    /* SCALABILITY LOGIC:
       Desktop (Landscape): Columns are min 20% of viewport width (approx 4 items per row).
       The gap is relative to the viewport minimum (vmin).
    */
    grid-template-columns: repeat(auto-fit, minmax(20vw, 1fr));
    gap: 3vmin;
    margin-bottom: 5vmin;
    align-items: stretch;
}

.plant-card {
    background: #f9fafb;
    border: 0.2vmin solid #eee;
    /* scalable border thickness */
    border-radius: 2vmin;
    /* scalable corners */
    padding: 3vmin;
    /* scalable padding */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.plant-card:hover {
    border-color: var(--accent);
    transform: translateY(-0.5vmin);
    box-shadow: 0 1vmin 3vmin rgba(0, 0, 0, 0.08);
}

.plant-icon {
    font-size: 5em;
    /* relative to base size (~10vmin) */
    margin-bottom: 0.2em;
    line-height: 1;
}

.plant-card h3 {
    font-size: 1.4em;
    /* ~2.8vmin */
    margin: 0 0 0.5em 0;
    font-weight: 700;
}

.plant-card p {
    font-size: 0.9em;
    /* ~1.8vmin */
    color: #666;
    margin-bottom: 2em;
    /* Push button down */
    line-height: 1.4;
    flex: 1;
    /* Fills space */
}

.btn-claim {
    background: var(--text);
    color: white;
    border: none;
    padding: 1em 0;
    /* Scalable padding */
    font-size: 0.9em;
    /* Scalable text */
    border-radius: 100vmin;
    /* Pill shape */
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    margin-top: auto;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-claim:hover {
    background: var(--accent);
}

#btn-back-checkout {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1em;
    /* ~2vmin */
    padding: 2vmin;
    text-decoration: underline;
    text-underline-offset: 0.5vmin;
    transition: color 0.2s;
}

#btn-back-checkout:hover {
    color: var(--text);
}

/* --- ORIENTATION HANDLING --- */
/* Instead of pixel breakpoints, we use Aspect Ratio.
   If the screen is taller than it is wide (Phones, Portrait Tablets),
   we adjust the layout logic, but keep the relative sizing.
*/

@media (max-aspect-ratio: 1/1) {
    #checkout-view {
        /* Increase base font size slightly on portrait for better readability */
        font-size: 3.5vmin;
    }

    .checkout-container {
        padding: 10vmin 5vw;
    }

    .plant-grid {
        /* Switch to 1 column on portrait devices */
        grid-template-columns: 1fr;
        gap: 4vmin;
    }

    .plant-card {
        /* Horizontal layout for cards on mobile feels more "app-like" */
        flex-direction: row;
        align-items: center;
        padding: 4vmin;
        gap: 4vmin;
    }

    .plant-icon {
        font-size: 3em;
        margin-bottom: 0;
    }

    .plant-card div {
        flex: 1;
    }

    .plant-card p {
        margin-bottom: 0;
        display: none;
        /* Hide description on mobile to save space, or remove this line to show */
    }

    .btn-claim {
        width: auto;
        padding: 0.8em 1.5em;
        margin-top: 0;
    }
}

/* Zwingt iOS, Taps auf die Stage zu registrieren */
#stage-target,
#stage-area {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    /* Entfernt grauen Tap-Hintergrund */
}


/* --- NEW RATIO VISUALIZATION --- */
.card-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Visuelle Leiste */
.ratio-viz {
    margin-bottom: 1.5vmin;
    width: 100%;
}

/* style.css - Ersetze den alten .ratio-viz .bar Block hiermit */

.ratio-viz .bar {
    height: 1.5vmin;
    /* Etwas dicker für bessere Sichtbarkeit */
    width: 100%;
    background: #eee;
    border-radius: 100px;
    margin-bottom: 0.5vmin;
    overflow: hidden;

    /* DER FIX: Grid statt Flex */
    display: grid;
    /* Wir definieren das Grid direkt im HTML über Style, oder Standard 50/50 */
    grid-template-columns: var(--ratio, 50% 50%);
}

.ratio-viz .fill {
    height: 100%;
    width: 100% !important;
    /* Breite füllt nun die Grid-Zelle */
}

/* Colors */
.fill.salad {
    background-color: #a7f3d0;
}

/* Light Green */
.fill.herbs {
    background-color: var(--accent);
}

/* Dark Green */

.dot-salad {
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    background: #a7f3d0;
    border-radius: 50%;
    margin-right: 0.3em;
}

.dot-herbs {
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 0.3em;
}

/* Text under bar */
.ratio-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.75em;
    color: #888;
    font-weight: 600;
}

/* Fix for Mobile Portrait View to keep layout clean */
@media (max-aspect-ratio: 1/1) {
    /* ... inside @media (max-aspect-ratio: 1/1) ... */

    .plant-card {
        /* CHANGED: 'row' to 'column' to stack vertically like desktop */
        flex-direction: column;
        align-items: stretch;
        padding: 5vmin;
        gap: 1vmin;
    }

    .plant-icon {
        font-size: 15vmin;
        /* Adjusted size for vertical mobile */
        margin-bottom: 1vh;
    }

    .card-details {
        /* Reset margins since we are stacking vertically now */
        margin: 0 0 2vh 0;
        width: 100%;
    }

    .plant-card p {
        display: block;
        /* Ensure description is visible */
        margin-top: 1vh;
        margin-bottom: 2vh;
    }

    .btn-claim {
        width: 100%;
        margin-top: auto;
        padding: 2vh 0;
    }
}


/* --- NEW VERTICAL RADIO STYLES --- */
.radio-list {
    display: flex;
    flex-direction: column;
    gap: 1.5vh;
    margin-top: 2vh;
}

.radio-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2vmin;
    border: 1px solid #e5e7eb;
    border-radius: 1vmin;
    cursor: pointer;
    background: white;
    transition: all 0.2s ease;
}

.radio-item:hover {
    border-color: #ccc;
    background: #f9fafb;
}

.radio-item.active {
    border-color: var(--text);
    background: #f3f4f6;
    box-shadow: 0 0.5vh 1.5vh rgba(0, 0, 0, 0.05);
}

/* Hide standard radio button but keep accessible functionality */
.frame-radio-input {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    width: 0;
    height: 0;
}

.radio-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-right: 2vmin;
}

.radio-name {
    font-weight: 600;
    font-size: 1em;
    color: var(--text);
}

.radio-preview {
    width: 6vmin;
    height: 6vmin;
    border-radius: 50%;
    border: 1px solid #ddd;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Mobile Adjustment for larger touch targets */
@media (max-aspect-ratio: 1/1) {
    .radio-preview {
        width: 10vmin;
        height: 10vmin;
    }

    .radio-item {
        padding: 3vmin;
    }
}



/* --- CAROUSEL STYLES --- */

/* --- CAROUSEL STYLES (Cleaned & Combined) --- */

.carousel-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #f0f0f0;

    /* MOBILE DEFAULT: Portrait 2:3 */
    aspect-ratio: 2 / 3;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;

    /* Native Scroll Snap Physics */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    /* Hide Scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    height: 100%;
    position: relative;
    scroll-snap-align: center;
    overflow: hidden;
    border-radius: 12px;

    scroll-snap-stop: always;

    /* MOBILE: Peek effect (90% width) */
    flex: 0 0 90%;
    margin-right: 10px;
}

/* 1. The Blurry Background (Cover) */
.blur-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.9);
    transform: scale(1.1);
    /* Prevent blur edges from bleeding white */
    z-index: 1;
}

/* 2. The Sharp Foreground (Contain) */
.fg-img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensures full image is visible */
    z-index: 2;
    display: block;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

/* Navigation Dots */
.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

/* --- DESKTOP OVERRIDE (Landscape) --- */
@media (min-aspect-ratio: 1/1) {
    .carousel-container {
        /* DESKTOP: Landscape 3:2 */
        aspect-ratio: 3 / 2;
    }

    .carousel-slide {
        /* DESKTOP: Show full single slide (no peek needed) */
        flex: 0 0 100%;
        margin-right: 0;
    }
}


/* --- CAROUSEL ARROWS --- */

.carousel-nav {
    display: none;
    /* Hidden on Mobile */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.carousel-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 15px;
}

.carousel-nav.next {
    right: 15px;
}

/* Show on Desktop */
@media (min-aspect-ratio: 1/1) {
    .carousel-nav {
        display: flex;
    }
}