/* ==========================================================================
   1. GLOBALE ELEMENTE (Buttons, Badges, Typo)
   ========================================================================== */
h2 {
    color: #2e7d32;
    margin-top: 35px;
}

ul {
    font-size: 18px;
    line-height: 1.8;
}

.price {
    font-size: 20px;
    font-weight: bold;
    margin: 15px 0;
    color: #444;
}

/* Einheitlicher Button im Baumi4Green-Stil */

.btn {
    display: inline-block;
    background: #2e7d32;
    color: #ffffff !important; /* Erzwingt strahlend weisse Schrift */
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #1b5e20;
    color: #ffffff !important; /* Bleibt auch beim Drüberfahren weiss */
}


/* Badges / Schlagworte */
.badge-container {
    margin: 15px 0 25px 0;
}

.badge {
    display: inline-block;
    background: #eef7ee;
    color: #2e7d32;
    border: 2px solid #2e7d32;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* ==========================================================================
   2. SEITE: PRODUKTÜBERSICHT (Katalog)
   ========================================================================== */
.shop-categories {
    text-align: center;
    margin-bottom: 40px;
}

.shop-categories a {
    display: inline-block;
    margin: 5px;
    padding: 10px 16px;
    background: white;
    color: #2e7d32;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
}

.shop-categories a:hover {
    background: #2e7d32;
    color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
}

.product-card h3 {
    color: #2e7d32;
    margin: 10px 0;
    font-size: 20px;
}

.product-card p {
    flex-grow: 1; /* Schiebt Inhalt gleichmässig */
}

.product-card .btn {
    margin-top: auto; /* Buttons sind immer auf gleicher Höhe */
}

.coming-soon {
    margin-top: 50px;
    background: white;
    padding: 30px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ==========================================================================
   3. SEITE: PRODUKTDETAIL (z.B. Mamiya)
   ========================================================================== */
.card {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Interaktive Galerie */
.product-gallery {
    width: 100%;
    margin-bottom: 25px;
}

.main-image-container {
    width: 100%;
    aspect-ratio: 1 / 1; /* ⭐ Erzwingt eine perfekte quadratische Form (Breite = Höhe) */
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc; /* Schützt das Layout, falls ein Bild weissen Raum hat */
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Füllt das Quadrat sauber aus */
}

.image-row {
    display: flex; 
    gap: 12px;
    width: 100%;
    justify-content: flex-start; /* Richtet die Bilder sauber von links nach rechts aus */
    margin-top: 10px;
}

.image-row img {
    width: 80px;            /* Feste Breite für die Thumbnails */
    aspect-ratio: 1 / 1;    /* ⭐ Erzwingt ein perfektes Quadrat auch für die kleinen Bilder */
    height: auto;           /* Erlaubt dem Seitenverhältnis die Kontrolle */
    object-fit: contain;    /* ⭐ Zeigt das gesamte Bild ohne unschöne Abschnitte */
    background: #f8fafc;    /* Neutraler, heller Hintergrund für freibleibende Ränder */
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.image-row img:hover {
    transform: translateY(-3px); /* Eleganter Hebe-Effekt */
    border-color: #2e7d32;       /* Baumi4Green Rahmenfarbe beim Drüberfahren */
}


.back-link {
    display: block;
    margin-top: 25px;
    color: #666;
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    color: #2e7d32;
    text-decoration: underline;
}

/* ==========================================================================
   4. SEITE: WARENKORB & PANEL (Ausfahrbar)
   ========================================================================== */
.mini-cart {
    position: fixed;
    top: 90px;
    right: 20px;
    background: white;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
}

.mini-cart a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: bold;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: -360px; /* Unsichtbar ausserhalb des Bildschirms */
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease-in-out;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.cart-panel.open {
    right: 0; /* Schiebt das Panel rein */
}

.cart-header {
    padding: 20px;
    background: #f4f9f4;
    border-bottom: 1px solid #eef7ee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    color: #2e7d32;
}

.close-cart {
    cursor: pointer;
    font-size: 20px;
    color: #666;
    font-weight: bold;
}

.close-cart:hover {
    color: #2e7d32;
}

.cart-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    padding: 12px 0;
    border-bottom: 1px solid #eef7ee;
    font-size: 15px;
}

.cart-total {
    margin: 25px 0;
    font-size: 18px;
    text-align: right;
    border-top: 2px dashed #eef7ee;
    padding-top: 15px;
}

.checkout-btn, .edit-cart-btn {
    display: block;
    text-align: center;
    padding: 12px;
    margin-top: 10px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
}

.checkout-btn {
    background: #2e7d32;
    color: white;
}

.checkout-btn:hover {
    background: #1b5e20;
}

.edit-cart-btn {
    background: #eef7ee;
    color: #2e7d32;
}

/* RESPONSIVE DESIGNS */
@media (max-width: 768px) {
    .mini-cart {
        top: 80px;
        right: 10px;
        font-size: 14px;
        max-width: 180px;
    }
    .card {
        margin: 20px 10px;
        padding: 15px;
    }
}
/* ==========================================================================
   5. SEITE: BESTÄTIGUNG (danke.php)
   ========================================================================== */
.success-card {
    background: white;
    padding: 40px 30px;
    max-width: 480px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
    margin: 80px auto; /* Zentriert die Box auf der Seite */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 🎉 Grosses, animiertes Erfolgs-Icon */
.success-icon {
    font-size: 4rem;
    color: #2e7d32;
    margin-bottom: 20px;
    display: inline-block;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-card h1 {
    color: #2e7d32;
    font-size: 1.8rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.success-card p {
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* 🔄 Button-Gruppe nebeneinander */
.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sekundärer Button für die Startseite */
.btn-secondary {
    display: inline-block;
    background: #eef7ee;
    color: #2e7d32 !important;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #e2f0e2;
    transform: translateY(-2px);
}

/* Primärer Button bekommt den bekannten Hover-Effekt */
.success-card .btn:hover {
    transform: translateY(-2px);
}

@keyframes popIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}
/* ==========================================================================
   7. GLOBALER FOOTER (footer.php)
   ========================================================================== */
/* ==========================================================================
   7. GLOBALER FOOTER (footer.php) - Optimiert für fettere Schrift
   ========================================================================== */
/* ==========================================================================
   7. GLOBALER FOOTER (footer.php) - Kontrast-Fix für Startseite
   ========================================================================== */
.site-footer {
    background: #222222 !important;
    color: #dddddd !important; /* Erzwingt ein helles Graublau für normalen Text */
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    font-size: 15px;
    line-height: 1.6;
    font-family: Arial, sans-serif;
    clear: both;
    position: relative;
    z-index: 10;
}

/* 🌟 Erzwingt die helle Textfarbe für Absätze und normalen Text auf der Startseite */
.site-footer p, 
.site-footer div {
    color: #dddddd !important;
}

/* 🌟 Macht das BAUMI4green maximal fett, grösser und strahlend weiss */
.site-footer .footer-brand {
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #ffffff !important; /* Reines, leuchtendes Weiss */
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 6px;
}

/* 🌟 Kontrast-Fix für die Links (Impressum & Datenschutz) im Footer */
.site-footer a {
    color: #4caf50 !important; /* Knalliges, gut lesbares Grün */
    text-decoration: none !important;
    font-weight: bold !important;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #81c784 !important; /* Helles Grün beim Drüberfahren (Hover) */
    text-decoration: underline !important;
}

/* ==========================================================================
   8. SLIDE-OUT WARENKORB - BUTTON OPTIMIERUNG
   ========================================================================== */
.cart-panel .edit-cart-btn {
    display: block !important;
    text-align: center !important;
    background: #64748b !important; /* Angenehmes, professionelles Schiefergrau */
    color: #ffffff !important;       /* Gestochen scharfer, weisser Text */
    padding: 10px 15px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: bold !important;
    font-size: 14px !important;
    margin-top: 10px !important;
    transition: background 0.2s ease, transform 0.1s ease !important;
}

.cart-panel .edit-cart-btn:hover {
    background: #475569 !important; /* Etwas dunkleres Grau beim Drüberfahren (Hover) */
    transform: translateY(-1px) !important;
}
/* ==========================================================================
   9. SLIDE-OUT WARENKORB - MÜLLEIMER-BUTTONS
   ========================================================================== */
.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.cart-item-info {
    flex-grow: 1;
    text-align: left;
    padding-right: 10px;
}

.cart-panel .delete-item-icon-btn {
    background: transparent !important;
    border: none !important;
    color: #ef4444 !important; /* Warnendes Rot */
    font-size: 16px !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: 6px !important;
    transition: background 0.2s ease, color 0.2s ease !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-panel .delete-item-icon-btn:hover {
    background: #fee2e2 !important; /* Leicht rötlicher Hintergrund beim Drüberfahren */
    color: #b91c1c !important;
}
/* ==========================================================================
   9. FIXED: SLIDE-OUT WARENKORB - MÜLLEIMER ERZWINGEN
   ========================================================================== */
.cart-item-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.cart-item-info {
    flex-grow: 1 !important;
    text-align: left !important;
    padding-right: 10px !important;
}

/* 🌟 Dieser Block überschreibt die dicken grünen Button-Stile für das Icon */
.cart-panel button.delete-item-icon-btn {
    background: transparent !important;
    border: none !important;
    color: #dc2626 !important; /* Kräftiges Rot */
    font-size: 18px !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: 6px !important;
    transition: background 0.2s ease, color 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    box-shadow: none !important; /* Entfernt allfällige Button-Schatten */
    margin: 0 !important;
}

.cart-panel button.delete-item-icon-btn:hover {
    background: #fee2e2 !important; /* Sanfter Rot-Effekt beim Drüberfahren */
    color: #991b1b !important;
}

.cart-panel button.delete-item-icon-btn i {
    color: #dc2626 !important; /* Erzwingt die rote Icon-Farbe */
    font-size: 18px !important;
    display: inline-block !important;
}
/* ==========================================================================
   10. CHECKOUT LOADING SPINNER (Verhindert Doppel-Klicks)
   ========================================================================== */
.btn-loading {
    position: relative !important;
    color: transparent !important; /* Versteckt den Text "Bestellung absenden", während es lädt */
    pointer-events: none !important; /* Blockiert sofort weitere Klicks */
    opacity: 0.85 !important;
}

.btn-loading::after {
    content: "" !important;
    position: absolute !important;
    width: 20px !important;
    height: 20px !important;
    top: 50% !important;
    left: 50% !important;
    margin-top: -10px !important;
    margin-left: -10px !important;
    border: 3px solid rgba(255,255,255,0.3) !important;
    border-radius: 50% !important;
    border-top-color: #ffffff !important; /* Die rotierende Spitze */
    animation: spin-loading 0.8s linear infinite !important;
}

@keyframes spin-loading {
    to { transform: rotate(360deg); }
}
/* ==========================================================================
   11. MAMIYA SPEZIFIKATIONS-BOX (HISTORISCHE DETAILS)
   ========================================================================== */
.mamiya-specs-box {
    background: #f8fafc;
    border-left: 4px solid #2e7d32;
    padding: 18px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    text-align: left;
    line-height: 1.6;
}

.mamiya-specs-box h3 {
    margin-top: 0;
    color: #2e7d32;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mamiya-specs-group-title {
    font-size: 14px;
    margin: 12px 0 6px 0;
    font-weight: bold;
    color: #334155;
}

.mamiya-specs-box ul {
    font-size: 14px;
    padding-left: 20px;
    margin-bottom: 10px;
    color: #475569;
}

.mamiya-specs-footer {
    font-size: 13px;
    color: #64748b;
    margin-top: 12px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 8px;
    font-weight: 500;
}
