@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Playfair+Display:wght@700;800&display=swap");
:root {
    --g: #284d39;
    --o: #df6d32;
    --c: #f6f1e5;
    --p: #fffdf8;
    --l: #ded7c8;
    --m: #697269;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--c);
    color: #26362d;
    font: 15px "DM Sans",sans-serif;
}
a {
    color: inherit;
    text-decoration: none;
}
.wrap {
    max-width: 1150px;
    margin: auto;
    padding: 0 22px;
}
header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f6f1e5ee;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--l);
}
.nav {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 28px;
}
.brand {
    font-size: 21px;
    font-weight: 800;
    margin-right: auto;
}
.brand span {
    color: var(--o);
}
nav {
    display: flex;
    gap: 22px;
    font-weight: 700;
    font-size: 14px;
}
button,.btn {
    border: 0;
    border-radius: 8px;
    padding: 12px 18px;
    background: var(--o);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.btn2 {
    background: transparent;
    color: #26362d;
    border: 1px solid #26362d;
}
.hero {
    padding: 75px 0;
}
.heroGrid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 55px;
    align-items: center;
}
.eyebrow {
    color: var(--o);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}
.hero h1,h1,h2 {
    font-family: "Playfair Display",serif;
}
.hero h1 {
    font-size: 65px;
    line-height: 1;
    margin: 12px 0 22px;
}
.hero h1 em {
    color: var(--o);
    font-style: normal;
}
.hero p {
    font-size: 19px;
    color: var(--m);
    line-height: 1.65;
}
.actions {
    display: flex;
    gap: 10px;
    margin-top: 28px;
}
.visual {
    height: 330px;
    border-radius: 22px;
    background: #d9c8a6;
    border: 8px solid #fff;
    box-shadow: 10px 14px 0 #284d3914;
    display: grid;
    place-items: center;
    font-size: 100px;
    transform: rotate(2deg);
}
.section {
    padding: 65px 0;
}
.head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 24px;
}
.head h2 {
    font-size: 40px;
    margin: 5px 0;
}
.tools {
    display: grid;
    grid-template-columns: 1fr 190px;
    gap: 10px;
    margin-bottom: 20px;
}
.input,select,textarea,input {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--l);
    border-radius: 8px;
    background: var(--p);
    font: inherit;
}
.grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 18px;
}
.card {
    background: var(--p);
    border: 1px solid var(--l);
    border-radius: 13px;
    overflow: hidden;
}
.pic {
    height: 175px;
    background: #e6dbc3;
    display: grid;
    place-items: center;
    font-size: 65px;
}
.body {
    padding: 17px;
}
.body h3 {
    margin: 7px 0;
}
.meta {
    color: var(--m);
    font-size: 12px;
}
.price {
    color: var(--o);
    font-size: 21px;
    font-weight: 800;
    float: right;
}
.form {
    max-width: 700px;
    background: var(--p);
    padding: 25px;
    border: 1px solid var(--l);
    border-radius: 13px;
}
.form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 14px;
}
.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    background: #e8efe8;
    color: var(--g);
    font-size: 11px;
}
.login {
    max-width: 480px;
    margin: auto;
}
.notice {
    padding: 13px;
    border-radius: 8px;
    background: #f2dfd4;
    margin-bottom: 15px;
}
.messages {
    display: grid;
    gap: 12px;
}
.msg {
    background: var(--p);
    padding: 17px;
    border: 1px solid var(--l);
    border-radius: 10px;
}
.msg small {
    color: var(--m);
}
footer {
    margin-top: 60px;
    background: #23362d;
    color: #e7eee8;
    padding: 30px 0;
}
footer .wrap {
    display: flex;
    gap: 25px;
    align-items: center;
}
footer span,footer small {
    color: #a9b5ad;
}
@media (max-width:800px) {
    nav {
        display: none;
    }
    .heroGrid {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 48px;
    }
    .grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width:550px) {
    .grid,.two {
        grid-template-columns: 1fr;
    }
    .tools {
        grid-template-columns: 1fr;
    }
    .head {
        display: block;
    }
    footer .wrap {
        display: grid;
    }
    .visual {
        height: 240px;
        font-size: 70px;
    }
}
/* Adminbereich: Titel-bearbeiten-Schaltfläche gut lesbar */
button[data-edit-title] {
    background-color: #176b45 !important;
    color: #ffffff !important;
    border: 1px solid #176b45 !important;
    cursor: pointer;
}
button[data-edit-title] {
    background-color: #125536 !important;
    border-color: #125536 !important;
}
/* Adminbereich: Reiter Angebote und Benutzer sichtbar machen */
.admin-tabs {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    position: relative;
    z-index: 10;
}
.admin-tabs button[data-tab] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #ffffff !important;
    background: #284d39 !important;
    padding: 12px 20px !important;
    border: 1px solid #284d39 !important;
    border-radius: 8px;
    cursor: pointer;
}
.admin-tabs button[data-tab].active {
    background: #df6d32 !important;
    border-color: #df6d32 !important;
}
/* Moderne Hover-Effekte für Angebotskarten */
.card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-radius: 14px;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}
/* Bilder beim Darüberfahren sanft vergrößern */
.card .pic img {
    transition: transform 0.35s ease;
}
.card:hover .pic img {
    transform: scale(1.04);
}
/* Effekt bei Touch-Geräten vermeiden */
@media (hover: none) {
    .card:hover {
        transform: none;
        box-shadow: none;
    }
    .card:hover .pic img {
        transform: none;
    }
}
/* Rücksicht auf reduzierte Animationen */
@media (prefers-reduced-motion: reduce) {
    .card,
    .card .pic img {
        transition: none;
    }
    .card:hover,
    .card:hover .pic img {
        transform: none;
    }
}
#app .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}
/* Die Kartenbewegung ist weiter unten aus Stabilitätsgründen deaktiviert. */
#app .card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.22) !important;
}
/* Vorschaubild sanft vergrößern */
#app .card .pic img {
    transition: transform 0.3s ease !important;
}
#app .card:hover .pic img {
    transform: scale(1.04) !important;
}
/*Smartphone-Optimierung für Dorfflohmarkt.com */
@media (max-width: 600px) {
    /* Weniger Abstand an den Seiten */
    .wrap {
        padding-left: 14px;
        padding-right: 14px;
    }
    .section {
        padding: 28px 0;
    }
    /* Navigation kompakter gestalten */
    .nav {
        height: auto;
        min-height: 62px;
        gap: 10px;
        flex-wrap: wrap;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .brand {
        font-size: 18px;
    }
    nav {
        display: flex;
        order: 3;
        width: 100%;
        justify-content: space-between;
        gap: 8px;
        font-size: 12px;
        padding: 8px 0 2px;
    }
    /* Überschriften verkleinern */
    .head h2 {
        font-size: 30px;
    }
    .head .btn {
        display: inline-block;
        margin-top: 12px;
    }
    /* Suchfeld und Kategorien untereinander */
    .tools {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .input, select, textarea, input {
        font-size: 16px;
    }
    /* Angebotskarten: eine Spalte */
    .grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .card {
        width: 100%;
        min-width: 0;
    }
    /* Bilder auf dem Smartphone etwas höher */
    .card .pic {
        height: 230px;
    }
    /* Inhalt der Angebotskarten */
    .card .body {
        padding: 15px;
    }
    .card .body h3 {
        font-size: 19px;
        line-height: 1.35;
    }
    .card .meta {
        line-height: 1.5;
    }
    /* Preis bleibt gut lesbar */
    .card .price {
        font-size: 23px;
    }
    /* Schaltflächen angenehmer bedienen */
    button, .btn {
        min-height: 44px;
    }
    /* Keine unnötige Kartenbewegung auf Touch-Geräten */
    @media (hover: none) {
        #app .card:hover {
            transform: none !important;
            box-shadow: none !important;
        }
        #app .card:hover .pic img {
            transform: none !important;
        }
    }
    /* Formularfelder auf dem Smartphone */
    .form {
        padding: 16px;
    }
    .two {
        grid-template-columns: 1fr;
        gap: 0;
    }
    /* Fußzeile untereinander */
    footer .wrap {
        display: grid;
        gap: 12px;
    }
}
/* Moderner Begrüßungsbereich */
.hero {
    padding: 85px 0;
    background: linear-gradient(135deg, #f6f1e5 0%, #eee4d1 100%);
}
.heroGrid {
    gap: 45px;
}
.hero h1 {
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -1px;
    margin: 18px 0 24px;
}
.hero h1 em {
    color: #df6d32;
}
.hero p {
    max-width: 560px;
    font-size: 18px;
    line-height: 1.75;
}
.hero .visual {
    border: 8px solid #fffdf8;
    border-radius: 26px;
    background: linear-gradient(145deg, #d9c8a6, #c4d2bd);
    box-shadow: 0 18px 40px rgba(40, 77, 57, 0.13);
    transform: rotate(1deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero .visual:hover {
    transform: rotate(0deg) translateY(-4px);
    box-shadow: 0 24px 45px rgba(40, 77, 57, 0.18);
}
.hero .actions {
    gap: 12px;
    flex-wrap: wrap;
}
.hero .actions .btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 800px) {
    .hero {
        padding: 42px 0;
    }
    .heroGrid {
        gap: 30px;
    }
    .hero h1 {
        font-size: clamp(36px, 8vw, 48px);
    }
    .hero p {
        font-size: 16px;
    }
    .hero .visual {
        transform: none;
    }
}
/* Verbesserte Suche fuer Dorfflohmarkt.com */
.tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(180px, 220px);
    gap: 12px;
    margin-bottom: 16px;
}
.tools input:focus,
.tools select:focus {
    outline: 2px solid #df6d32;
    outline-offset: 2px;
}
.search-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 22px;
}
.search-actions .btn {
    min-height: 44px;
}
.result-count {
    margin: 0;
    color: #697269;
    font-weight: 700;
}
@media (max-width: 800px) {
    .tools {
        grid-template-columns: 1fr;
    }
    .search-actions {
        align-items: stretch;
    }
    .search-actions .btn {
        width: 100%;
    }
}
/* Fehlerbehebung: Angebotskarten und Schaltflächen bleiben stabil */
#app .card,
#app .card:hover {
    transform: none !important;
}
#app .card .actions {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
#app .card .actions .btn,
#app .card .actions button {
    position: relative;
    z-index: 3;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
#app .card .actions .btn:hover,
#app .card .actions button:hover {
    opacity: 1 !important;
    visibility: visible !important;
}
#app .gallery-thumbs {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
}
#app .gallery-thumb,
#app .gallery-thumb:hover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 80px;
    padding: 3px;
    background: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    position: relative;
    z-index: 3;
    cursor: pointer;
}
#app .gallery-thumb img,
#app .gallery-thumb:hover img {
    display: block;
    width: 90px;
    height: 70px;
    object-fit: cover;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}
#app #galleryMain,
#app .card:hover #galleryMain {
    transform: none !important;
}
/* Dorfflohmarkt – Löschbuttons für Angebotsfotos */
#app .delete-offer-photo,
#app .delete-offer-photo:hover {
    display: block !important;
    position: relative !important;
    z-index: 10 !important;
    background: #dc2626 !important;
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    margin: 10px 0 !important;
    padding: 12px !important;
    border: 2px solid #991b1b !important;
    border-radius: 8px !important;
    cursor: pointer !important;
}
#app .delete-offer-photo:hover {
    background: #991b1b !important;
}
/* Admin-Schaltflaechen */
#dashboard button[data-edit-title] {
    background: #176b45 !important;
    color: white !important;
}
#dashboard button[data-reset-password] {
    background: #1769aa !important;
    color: white !important;
    border-color: #1769aa !important;
}
#dashboard button[data-disable][data-value="1"] {
    background: #d97706 !important;
    color: white !important;
    border-color: #d97706 !important;
}
#dashboard button[data-disable][data-value="0"] {
    background: #176b45 !important;
    color: white !important;
    border-color: #176b45 !important;
}
#dashboard button[data-delete] {
    background: #b42318 !important;
    color: white !important;
    border-color: #b42318 !important;
}
.hero .visual.icon-raster {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    grid-template-rows: repeat(3,1fr);
    gap: 12px;
    padding: 22px;
    font-size: 44px;
    align-items: center;
    justify-items: center;
    overflow: hidden;
}
.hero .visual.icon-raster span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    line-height: 1;
    transition: transform .2s ease;
}
.hero .visual.icon-raster span:hover {
    transform: scale(1.2);
}
@media (max-width:550px) {
    .hero .visual.icon-raster {
        height: 240px;
        font-size: 34px;
        gap: 6px;
        padding: 12px;
    }
}

/* Startseite 2026 */

/* Dorfflohmarkt – ausschließlich neue Startseiten-Bausteine */
.home-category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.home-category{display:flex;align-items:center;gap:12px;min-height:86px;text-align:left;background:var(--p);color:#26362d;border:1px solid var(--l);border-radius:14px;padding:16px;font:700 15px 'DM Sans',sans-serif;transition:border-color .2s,box-shadow .2s}
.home-category:hover,.home-category:focus-visible{border-color:var(--o);box-shadow:0 8px 22px #284d391a}
.home-category-icon{font-size:29px;line-height:1}
.home-latest{background:#eee8db}
.home-offer-card .home-offer-link{display:block;height:100%}
.home-offer-card .pic{height:210px;overflow:hidden}
.home-offer-card .pic img{width:100%;height:100%;object-fit:cover;display:block}
.home-offer-card .body{display:flex;flex-direction:column;gap:9px;min-height:190px}
.home-offer-card .body h3{margin:0;font-size:19px}
.home-offer-card .body p{margin:0}
.home-offer-price{font-size:23px;color:var(--g);margin-top:auto}
.home-offer-more{color:var(--o);font-weight:700}
.home-community-panel{padding:38px;border-radius:22px;background:var(--g);color:white}
.home-community-panel h2{font-size:clamp(26px,4vw,40px);margin:12px 0}
.home-community-panel p{max-width:650px;line-height:1.7;color:#e1eae3}
.home-community-panel .btn{display:inline-block;margin-top:8px}
@media(max-width:900px){.home-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.home-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.home-category{padding:12px;min-height:78px;font-size:13px;gap:8px}.home-category-icon{font-size:25px}.home-community-panel{padding:25px}}
@media(prefers-reduced-motion:reduce){.home-category{transition:none}}

.card .pic {overflow:hidden;}
.card .pic {display:flex;align-items:center;justify-content:center;}
.card .pic img {max-width:100%;max-height:100%;min-height:0;min-width:0;}
#galleryMain {object-fit:contain !important;}
.card .pic[style="height:300px"] {height:450px !important;}
.card .body p {white-space:pre-wrap;line-height:1.6;overflow-wrap:anywhere;}
@media(max-width:600px){.card .pic[style="height:300px"]{height:300px !important;}}
.card .body p {line-height:1.4;}

/* ===== Umkreissuche und Angebotsuebersicht ===== */

.geo-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
    margin-bottom: 16px;
}

.geo-tools .input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    box-sizing: border-box;
}

.geo-tools #q {
    order: 1;
}

.geo-tools #place {
    order: 2;
}

.geo-tools #radius {
    order: 3;
}

.geo-tools #cat {
    order: 4;
}

.geo-tools #geoSort {
    order: 5;
}

.geo-tools #geoLocations {
    display: none;
}

#list .card .body .offer-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    line-height: 1.5;
}

@media (max-width: 800px) {
    .geo-tools {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 500px) {
    .geo-tools {
        grid-template-columns: 1fr;
    }

    .geo-tools .input {
        font-size: 16px;
    }
}


/* ===== Regionale Startseitensuche ===== */

.home-geo-search {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0;
}

.home-geo-search #homeSearch {
    grid-column: 1 / -1;
}

.home-geo-search .input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    box-sizing: border-box;
}

.home-geo-search button {
    grid-column: 1 / -1;
    min-height: 48px;
    font-size: 16px;
}

.home-geo-search #homeGeoLocations {
    display: none;
}

.home-geo-search #homeSearchError {
    grid-column: 1 / -1;
    color: #b91c1c;
    margin: 0;
    font-size: 14px;
}

.home-geo-search #homeSearchError:empty {
    display: none;
}

@media (max-width: 500px) {
    .home-geo-search {
        grid-template-columns: 1fr;
    }

    .home-geo-search .input {
        font-size: 16px;
    }
}

