/* ==========================================================================
   Dillinger Ferienwohnungen & Weingut — neues Frontend
   Mobile-first, kein Framework, CSS Custom Properties für die Farbpalette.
   ========================================================================== */

/* Lokal gehostete Schriften (kein Nachladen von fonts.googleapis.com aus
   DSGVO-Gründen — vermeidet die Übertragung der Besucher-IP an Google). */
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/open-sans-latin.woff2") format("woff2");
}
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/open-sans-latin.woff2") format("woff2");
}
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/open-sans-latin.woff2") format("woff2");
}
@font-face {
    font-family: "Raleway";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/raleway-latin.woff2") format("woff2");
}
@font-face {
    font-family: "Raleway";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("../fonts/raleway-latin.woff2") format("woff2");
}

:root {
    --color-accent: #e56038;
    --color-accent-dark: #c94f2c;
    --color-text: #3b3a36;
    --color-text-light: #6b6a64;
    --color-bg: #ffffff;
    --color-bg-muted: #f4f7f8;
    --color-bg-dark: #3b3a36;
    --color-border: #e2e2e2;
    --color-success-bg: #eef7ee;
    --color-success-text: #2f6b2f;
    --color-error-bg: #fbeaea;
    --color-error-text: #a33;

    --font-heading: "Raleway", sans-serif;
    --font-body: "Open Sans", sans-serif;

    --radius: 8px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);

    --container-width: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1.2;
    margin: 0 0 0.6em 0;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; color: var(--color-accent); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em 0; }

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

ul { margin: 0; padding: 0; list-style: none; }

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 50px 0;
}

.section--muted {
    background: var(--color-bg-muted);
}

.section__intro {
    max-width: 640px;
    margin: 0 auto 30px auto;
    text-align: center;
}

/* Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: var(--radius);
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    transition: background 0.15s;
}

.btn:hover {
    background: var(--color-accent-dark);
    color: #fff;
    text-decoration: none;
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
}

.btn--outline:hover {
    background: var(--color-accent);
    color: #fff;
}

.btn--full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Header / Navigation
   ========================================================================== */

.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--color-text);
}

.site-logo:hover { text-decoration: none; }

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    height: 3px;
    background: var(--color-text);
    border-radius: 2px;
}

.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
}

.main-nav.is-open { display: block; }

.main-nav__list {
    display: flex;
    flex-direction: column;
    padding: 10px 20px;
}

.main-nav__list li a {
    display: block;
    padding: 12px 0;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
}

.main-nav__list li:last-child a { border-bottom: none; }

.main-nav__list a.is-active,
.main-nav__list a:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.lang-switch {
    display: flex;
    gap: 6px;
    padding: 14px 20px 18px 20px;
    font-weight: 600;
}

.lang-switch a { color: var(--color-text-light); }
.lang-switch a.is-active { color: var(--color-accent); }

@media (min-width: 860px) {
    .nav-toggle { display: none; }

    .main-nav {
        display: flex;
        position: static;
        border: none;
        box-shadow: none;
        align-items: center;
        gap: 30px;
        width: auto;
    }

    .main-nav__list {
        flex-direction: row;
        padding: 0;
        gap: 24px;
    }

    .main-nav__list li a {
        border-bottom: none;
        padding: 6px 0;
    }

    .lang-switch { padding: 0; }
}

/* Hero
   ========================================================================== */

.hero {
    position: relative;
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 90px 0;
    text-align: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(59, 58, 54, 0.55);
}

.hero__inner {
    position: relative;
    z-index: 1;
}

.hero h1 { color: #fff; font-size: 2.4rem; }
.hero p { font-size: 1.1rem; }

/* Card grids
   ========================================================================== */

.grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .grid--2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
    position: relative;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.card__image {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
    transition: opacity 0.2s ease;
}

.pet-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    box-shadow: var(--shadow);
}

.pet-badge--allowed {
    border: 3px solid #2f9e44;
}

.pet-badge--not-allowed {
    border: 3px solid #c0392b;
}

.pet-badge--not-allowed::after {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    top: 50%;
    height: 2px;
    background: #c0392b;
    transform: rotate(-45deg);
}

.card__body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card__price {
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 12px;
}

.card__status {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.card__status--open { color: var(--color-success-text); }
.card__status--closed { color: var(--color-text-light); }

.card__body .btn { margin-top: auto; }

/* Fewo detail
   ========================================================================== */

.fewo-gallery {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 30px;
}

.fewo-gallery img {
    border-radius: var(--radius);
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
    cursor: zoom-in;
}

@media (min-width: 640px) {
    .fewo-gallery { grid-template-columns: repeat(3, 1fr); }
}

.info-list {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
    margin: 30px 0;
}

@media (min-width: 640px) {
    .info-list { grid-template-columns: repeat(2, 1fr); }
}

.info-list__item h3 {
    color: var(--color-accent);
    margin-bottom: 6px;
}

/* Forms
   ========================================================================== */

.form {
    max-width: 640px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
    margin-bottom: 16px;
}

@media (min-width: 600px) {
    .form-row--2 { grid-template-columns: 1fr 1fr; }
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #b9bcbe;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--color-bg);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 1px;
    border-color: var(--color-accent);
}

.required-mark {
    color: var(--color-error-text);
    margin-left: 2px;
}

.form-required-note {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: -10px 0 20px 0;
    text-align: center;
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    outline: 2px solid var(--color-error-text);
    background: var(--color-error-bg);
}

.form-error {
    color: var(--color-error-text);
    font-size: 0.85rem;
    margin-top: 4px;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
}

.form-checkbox input { width: auto; margin-top: 4px; }

.radio-row {
    display: flex;
    gap: 24px;
    margin-bottom: 30px;
}

.form-group .radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 0;
    cursor: pointer;
}

.radio-option input { width: auto; }

.form-note {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: -8px;
    margin-bottom: 16px;
}

.alert {
    padding: 16px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert--success {
    background: var(--color-success-bg);
    color: var(--color-success-text);
}

.alert--error {
    background: var(--color-error-bg);
    color: var(--color-error-text);
}

/* Honeypot-Feld: für Menschen unsichtbar, Bots füllen es oft trotzdem aus */
.hp-field {
    position: absolute;
    left: -5000px;
    top: -5000px;
}

/* Wine list & cart
   ========================================================================== */

.wine-year-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.wine-year-nav select {
    padding: 8px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.wine-year {
    margin-bottom: 40px;
}

.wine-year h2 {
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 8px;
}

.wine-card {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
}

.wine-card__number { color: var(--color-text-light); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.02em; }
.wine-card__name { font-weight: 700; }
.wine-card__meta { font-size: 0.8rem; color: var(--color-text-light); }
.wine-card__details { font-size: 0.8rem; margin-top: 2px; }
.wine-card__price { font-weight: 700; color: var(--color-accent); white-space: nowrap; }

.wine-card__add {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--color-accent);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.wine-card__add:hover { background: var(--color-accent-dark); }

@media (max-width: 560px) {
    .wine-card {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "name add"
            "price add";
    }
    .wine-card__name { grid-area: name; }
    .wine-card__price { grid-area: price; }
    .wine-card__add { grid-area: add; }
}

.shipping-box {
    background: var(--color-bg-muted);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 30px;
}

.shipping-box ul { list-style: disc; padding-left: 20px; }
.shipping-box li { margin-bottom: 4px; }

/* Mini-Warenkorb: immer sichtbare Leiste statt verstecktem Popup */
.cart-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-dark);
    color: #fff;
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.cart-bar__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

.cart-bar__count { font-weight: 700; }
.cart-bar__total { font-weight: 700; color: #f2a98a; }

.cart-bar .btn { padding: 10px 20px; }

@media (max-width: 560px) {
    .cart-bar__inner { font-size: 0.9rem; }
}

.cart-drawer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    display: none;
}

.cart-drawer.is-open { display: block; }

.cart-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cart-drawer__close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--color-text);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.cart-item__details { flex: 1; }
.cart-item__number { font-weight: 700; color: var(--color-text-light); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.02em; }
.cart-item__jahrgang { font-weight: 700; font-size: 0.85rem; color: var(--color-text-light); }
.cart-item__lage { font-weight: 700; font-size: 0.95rem; }
.cart-item__bezeichnung { font-weight: 700; font-size: 0.95rem; }
.cart-item__name { font-weight: 700; font-size: 0.95rem; }
.cart-item__price { color: var(--color-accent); font-weight: 600; font-size: 0.9rem; }

.qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.qty-stepper button {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--color-bg-muted);
    cursor: pointer;
    font-size: 1rem;
}

.qty-stepper input {
    width: 44px;
    border: none;
    text-align: center;
    font-size: 0.95rem;
    padding: 0;
    -moz-appearance: textfield;
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item__remove {
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
}

.cart-drawer__footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.cart-drawer__total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 14px;
}

.cart-drawer__total--grand {
    border-top: 1px solid var(--color-border);
    padding-top: 10px;
    margin-top: -4px;
}

.shipping-estimate {
    margin-bottom: 14px;
}

.shipping-estimate__line {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.shipping-estimate__hint {
    font-size: 0.85rem;
    color: var(--color-accent);
    margin: 4px 0 0;
}

.shipping-estimate__boxes {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: 4px 0 0;
}

.order-summary {
    background: var(--color-bg-muted);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 30px;
}

/* Straußwirtschaft / Weingut
   ========================================================================== */

.content-block {
    max-width: 720px;
    margin: 0 auto;
}

.content-block img {
    border-radius: var(--radius);
    margin-top: 20px;
}

.content-block .btn {
    margin-top: 10px;
}

.quote {
    border-left: 4px solid var(--color-accent);
    padding-left: 18px;
    font-style: italic;
    margin: 20px 0;
}

.quote cite {
    display: block;
    margin-top: 6px;
    font-style: normal;
    color: var(--color-text-light);
}

.content-block table {
    border-collapse: collapse;
    margin-bottom: 1em;
}

.content-block table td {
    padding: 4px 12px 4px 0;
    vertical-align: top;
}

.hours-table {
    width: 100%;
    max-width: 480px;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--color-bg-muted);
    border-radius: var(--radius);
    overflow: hidden;
}

.hours-table tr:not(:last-child) td {
    border-bottom: 1px solid var(--color-border);
}

.hours-table td {
    padding: 12px 16px;
    vertical-align: top;
}

.hours-table td:first-child {
    font-weight: 600;
}

.hours-table td:last-child {
    text-align: right;
    color: var(--color-accent);
    font-weight: 600;
    white-space: nowrap;
}

.hours-table__closed {
    color: var(--color-text-light) !important;
    font-style: italic;
}

/* Footer
   ========================================================================== */

.site-footer {
    background: var(--color-bg-dark);
    color: #d8d6d0;
    padding: 40px 0 20px 0;
}

.site-footer h4 { color: #fff; }

.site-footer a { color: #f2a98a; }

.site-footer__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}

@media (min-width: 700px) {
    .site-footer__inner { grid-template-columns: repeat(3, 1fr); }
}

.site-footer__copyright {
    margin-top: 20px;
    font-size: 0.8rem;
    color: #a5a39c;
}

/* "Nach oben"-Button
   ========================================================================== */

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 100px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--color-accent);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.back-to-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover { background: var(--color-accent-dark); }

/* Mehr Abstand vor einer Formularzeile, z.B. Sitzplatz/Hund nach der Personenzahl */
.form-row--spaced { margin-top: 28px; }

/* Gesperrte Eingabefelder (z.B. "Bitte Land angeben", solange nicht "Sonstiges Land" gewählt ist) */
.form-group input:disabled {
    background: #eceeef;
    color: var(--color-text-light);
    cursor: not-allowed;
}
