/* ==========================================================================
   🌿 RACKTILE BOTANICAL GARDEN ENGINE (FRONTEND STYLESHEET)
   ========================================================================== */

/* 🍃 IMPORTIERT EINE EDLE, ORGANISCHE SCHRIFTART FÜR DIE ÜBERSCHRIFTEN */
@import url('https://googleapis.com');

:root {
    --bg-light: #f7f9f6;         /* Sanftes, mattes Natur-Weiß für den Hintergrund */
    --panel-white: #ffffff;      /* Sauberes Weiß für die Pflanzen-Kacheln */
    --leaf-green: #2c5e43;       /* Tiefes, edles Waldgrün für Titel und Hauptlinks */
    --sprout-green: #4f8a68;     /* Frisches Salbei-Grün für Preise & Highlights */
    --earth-brown: #8d7765;      /* Sanftes Tongrau/Erdbraun für sekundäre Texte */
    --text-dark: #2d312e;        /* Dunkles Anthrazit für perfekte Lesbarkeit */
    --muted-gray: #9ca3af;       /* Helles Grau für IDs und feine Linien */
    --soft-shadow: 0 10px 30px rgba(44, 94, 67, 0.04);
}

.frontend-banner { 
    background: linear-gradient(135deg, #c73030 0%, #2a5298 100%); /* Fetter Retro-Farbverlauf von Rot nach Blau */
    color: white;                              /* Weiße Banner-Schrift */
    padding: 60px 20px;                        /* Abstand nach oben/unten und zu den Seiten */
    text-align: center;                        /* Zentriert alle Texte im Banner */
    box-shadow: inset 0 0 100px rgba(0,0,0,0.2);/* Weicher Schatten nach innen für mehr Tiefe */
    text-shadow: 3px 4px 10px #000;            /* Knallharter, schwarzer Textschatten für den coolen Retro-Effekt */
    background-image: url("images/banner.jpg");
    background-size: cover;
    background-position: center;
}

/* 🌐 GLOBAL NATURE RESETS */
body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    /* Moderner, extrem sauberer Fließtext-Font */
    font-family: 'Plus Jakarta Sans', sans-serif; 
    font-size: 15px;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    color: var(--leaf-green);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}
a:hover {
    color: var(--sprout-green);
}

/* 🖼️ HEADER & BANNER (Botanischer Stil) */
header {
    background-color: var(--panel-white);
    border-bottom: 1px solid #e5eef0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    padding: 30px 20px;
    text-align: center;
}

/* 🗂️ DYNAMISCHE DROPDOWN-MENÜLEISTE (Clean & Organisch) */
.racktile-dropdown-nav {
    background-color: var(--panel-white);
    border: 1px solid #e2e9e5;
    border-radius: 12px; /* Schöne, weiche, moderne Ecken */
    margin-bottom: 2px;
    box-shadow: var(--soft-shadow);
    position: relative;
    z-index: 100;
}

.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: block;
    padding: 16px 24px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    border-right: 1px solid #f0f5f2;
}

.all-products-link {
    color: var(--sprout-green) !important;
}

.menu-item:hover .menu-link {
    background-color: #f3f7f4;
    color: var(--leaf-green);
}

/* 🌪️ DROPDOWN MENÜS (Schweben wie ein sanftes Blatt über dem Inhalt) */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--panel-white);
    border: 1px solid #e2e9e5;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 15px 35px rgba(44, 94, 67, 0.08);
    list-style: none;
    margin: 0;
    padding: 10px 0;
    min-width: 320px;
    display: none;
    z-index: 999;
}

.dropdown-item a {
    display: block;
    padding: 10px 22px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.dropdown-item a:hover {
    background-color: #f3f7f4;
    color: var(--leaf-green);
    padding-left: 26px; /* Eleganter, sanfter Slide nach rechts */
}

.menu-item.has-dropdown:hover .dropdown-menu {
    display: block;
}

/* 📝 WILLKOMMENS-BOX / INFO-BOXEN */
.intro-welcome-box {
    background: var(--panel-white) !important;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--soft-shadow);
    margin-bottom: 35px;
    border: 1px solid #e2e9e5 !important;
    border-left: 6px solid var(--leaf-green) !important; /* Fetter, waldgrüner Akzentstreifen */
}

.intro-welcome-box h2 {
    font-family: 'Playfair Display', serif; /* Stilvoller Premium-Font für Überschriften */
    color: var(--leaf-green) !important;
    font-size: 24px;
    font-weight: 700;
    margin-top: 0;
}

/* 📦 DAS SEITEN-GRID (Absolut fehlerfrei, zwingt alles auf dieselbe Höhe) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 30px;
    align-items: stretch; /* Garantiert: Alle Pflanzen-Karten in einer Reihe exakt gleich hoch */
    margin-bottom: 50px;
}

/* 🎴 DIE PFLANZEN-KACHELN (Product Cards) */
.product-card {
    background: var(--panel-white);
    border: 1px solid #eef3f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0,0,0,0.01);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-6px); /* Sanftes Aufsteigen der Karte */
    border-color: #d1dfd7;
    box-shadow: 0 20px 40px rgba(44, 94, 67, 0.06);
}

/* 🖼️ IMAGES (Perfekt für Pflanzentöpfe und saftiges Grün) */
.product-img-box {
    width: 100%;
    height: 220px; /* Etwas höher für wunderschöne Pflanzen-Fotos */
    background-color: #fafbfc;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f5f3;
}

.product-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover; /* Füllt das Bildfeld harmonisch aus */
    transition: transform 0.4s ease;
}

.product-card:hover .product-img-box img {
    transform: scale(1.03); /* Ganz feiner, organischer Zoom */
}

/* 📝 BIO-DETAILS & TEXTSCHUTZ */
.product-info {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Schiebt den Button zuverlässig nach unten */
}

.product-artnr {
    font-size: 11px;
    color: var(--earth-brown);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.product-info h4 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    margin: 0 0 8px 0;
    color: var(--leaf-green);
    font-weight: 700;
    line-height: 1.3;
}

.product-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--sprout-green);
    margin: 0 0 14px 0;
}

.product-desc {
    font-size: 14px;
    color: #5c625e;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

/* 🎛️ BUTTONS (Edler Gärtnerei-Stil) */
.btn-view {
    display: block;
    text-align: center;
    background: transparent;
    color: var(--leaf-green);
    border: 1px solid var(--leaf-green);
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    margin-top: auto; /* Sitzt unkaputtbar immer ganz unten */
    transition: all 0.2s ease;
}

.btn-view:hover {
    background: var(--leaf-green);
    color: var(--panel-white);
    box-shadow: 0 8px 20px rgba(44, 94, 67, 0.15);
}

/* 📩 KONTAKTFORMULAR / DIALOG BOX */
.dialog-box.add-box {
    background: var(--panel-white) !important;
    border: 1px solid #e2e9e5 !important;
    box-shadow: var(--soft-shadow) !important;
    color: var(--text-dark) !important;
    border-radius: 12px !important;
}

.dialog-box h3 {
    font-family: 'Playfair Display', serif;
    color: var(--leaf-green) !important;
    font-size: 22px;
}

.form-group input, .form-group textarea {
    background: #fcfdfe !important;
    border: 1px solid #dcdfdc !important;
    color: var(--text-dark) !important;
    border-radius: 6px !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--sprout-green) !important;
    box-shadow: 0 0 8px rgba(79, 138, 104, 0.15);
}

/* 🤖 SPAM-SCHUTZ PANEL */
.form-group[style*="background"] {
    background: #f4f8f5 !important;
    border: 1px solid #e1ebe5 !important;
}
.form-group label[style*="color"] {
    color: var(--earth-brown) !important;
}

/* 📥 SAMMEL-BUTTONS & RESET */
button[style*="background: #27ae60"], .btn-save {
    background: var(--leaf-green) !important;
    color: var(--panel-white) !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: bold !important;
    border-radius: 6px !important;
    box-shadow: 0 5px 15px rgba(44, 94, 67, 0.15) !important;
}
button[style*="background: #27ae60"]:hover, .btn-save:hover {
    background: #214733 !important;
    box-shadow: 0 8px 25px rgba(44, 94, 67, 0.25) !important;
}

a[href*="clear_merkliste"] {
    color: #c0392b !important;
}

/* ==========================================================================
   💊 SUB-CHIPS NAVIGATION (PC: AUTOMATISCHER UMBRECH / SMARTPHONE: HORIZONTAL)
   ========================================================================== */

.sub-chips-container {
    background-color: var(--panel-bg, #ffffff);
    border: 1px solid rgba(128,128,128,0.15);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    width: 100%;
    box-sizing: border-box;
}

.sub-chips-headline {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    opacity: 0.7;
}

/* 🖥️ DEFAULT (PC / DESKTOP): Buttons brechen automatisch in die nächste Zeile um! */
.sub-chips-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap; /* Zwingt die Pillen auf dem PC zum automatischen Zeilenumbruch */
    padding-bottom: 0;
}

/* DIE KOMPAKTEN PILLEN (CHIPS) */
.sub-chip-button {
    display: inline-flex;
    align-items: center;
    background: rgba(128,128,128,0.05);
    border: 1px solid rgba(128,128,128,0.15);
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sub-chip-button:hover {
    background: rgba(128,128,128,0.1);
    transform: translateY(-1px);
}

.sub-chip-button.chip-active {
    background-color: var(--neon-blue, var(--lakers-gold, #1e3c72)) !important;
    color: var(--bg-dark, #ffffff) !important;
    border-color: transparent !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.sub-chip-icon { width: 20px; height: 20px; object-fit: contain; margin-right: 6px; border-radius: 3px; flex-shrink: 0; }
.sub-chip-arrow { margin-right: 4px; font-weight: bold; opacity: 0.5; }
.sub-chip-text { display: inline-block; vertical-align: middle; }
.sub-chip-count { font-size: 11px; opacity: 0.6; margin-left: 4px; }

/* ==========================================================================
   📱 MOBIL-WEICHE (SMARTPHONE-OPTIMIERUNG BIS 768px BILDSCHIRMBREITE)
   ========================================================================== */
@media (max-width: 768px) {
    .sub-chips-grid {
        flex-wrap: nowrap; /* Kein Umbruch mehr auf dem Handy! */
        overflow-x: auto;  /* Daumen-Wischgeste wird aktiviert */
        padding-bottom: 4px;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .sub-chips-grid::-webkit-scrollbar {
        display: none; /* Versteckt die Scrollbar auf Mobilgeräten */
    }
}