/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=Lato:wght@300;400;700&display=swap');

/* ===== Wein-Farbpalette ===== */
:root {
    --wine-light:   #faf5f3;
    --wine-soft:    #f1dcd9;
    --wine-mid:     #b06a74;
    --wine-main:    #8e2b3f;
    --wine-dark:    #6b1f30;
    --wine-deep:    #4a1522;
    --gold:         #c3952f;
    --gold-soft:    #f6ead0;
    --green-herb:   #5a8a5e;
    --green-light:  #e8f3e9;
    --white:        #ffffff;
    --grey-light:   #fdf8f6;
    --grey-border:  #e6d3cf;
    --text-dark:    #3a2029;
    --text-mid:     #7a5560;
    --shadow:       rgba(74, 21, 34, 0.12);
    --shadow-hover: rgba(74, 21, 34, 0.22);
}

/* ===== Reset & Basis ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Lato', sans-serif;
    background: var(--wine-light);
    background-image:
        radial-gradient(ellipse at 10% 20%, rgba(142,43,63,0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(195,149,47,0.10) 0%, transparent 50%);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--wine-dark); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--wine-deep); }
img { max-width: 100%; height: auto; }

.container { max-width: 1150px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== Header ===== */
.site-header {
    background: linear-gradient(135deg, var(--wine-deep) 0%, var(--wine-dark) 55%, var(--wine-main) 100%);
    color: var(--white);
    box-shadow: 0 3px 15px var(--shadow);
    position: relative;
    overflow: hidden;
}
.site-header::before {
    content: '🍷 🍇 🍷 🍇 🍷 🍇 🍷 🍇 🍷 🍇 🍷 🍇 🍷 🍇 🍷 🍇';
    position: absolute;
    top: 0; left: 0; right: 0;
    font-size: 0.75rem;
    opacity: 0.12;
    letter-spacing: 8px;
    white-space: nowrap;
    overflow: hidden;
    padding: 4px 0;
    line-height: 1;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.2rem 1.5rem;
    max-width: 1150px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.site-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-style: italic;
    color: var(--white);
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.site-logo:hover { text-decoration: none; color: var(--white); }
.site-logo span { font-style: normal; opacity: 0.9; font-size: 1.4rem; margin-right: 0.3rem; }

.main-nav { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.main-nav a {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.2);
    letter-spacing: 0.3px;
}
.main-nav a:hover { background: rgba(255,255,255,0.2); text-decoration: none; border-color: rgba(255,255,255,0.5); }
.main-nav .nav-admin { background: rgba(255,255,255,0.15); }
.main-nav .nav-logout { color: rgba(255,255,255,0.65); font-size: 0.85rem; border-color: transparent; }

/* ===== Main / Footer ===== */
main.container { padding-top: 2.5rem; padding-bottom: 4rem; flex: 1; }

.site-footer {
    background: var(--wine-deep);
    color: rgba(255,255,255,0.75);
    text-align: center;
    padding: 1.2rem;
    font-size: 0.9rem;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.5px;
    margin-top: auto;
}
.site-footer::before {
    content: '🍇 ❦ 🍇';
    display: block;
    font-size: 0.9rem;
    opacity: 0.5;
    margin-bottom: 0.3rem;
    letter-spacing: 8px;
}

/* ===== Seiten-Titel ===== */
.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-style: italic;
    color: var(--wine-deep);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--wine-soft);
}
.page-title::after { content: ' 🍷'; font-style: normal; font-size: 1.3rem; }

/* ===== Login ===== */
.login-wrap { display: flex; justify-content: center; align-items: center; min-height: 75vh; }
.login-box {
    background: var(--white);
    border: 1px solid var(--grey-border);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 35px var(--shadow);
    text-align: center;
}
.login-box::before { content: '🍷 🍇 🍷'; display: block; font-size: 1.3rem; margin-bottom: 0.8rem; letter-spacing: 6px; }
.login-box h1 { font-family: 'Playfair Display', serif; font-size: 2rem; font-style: italic; color: var(--wine-deep); margin-bottom: 0.3rem; }
.login-box .subtitle { color: var(--wine-mid); margin-bottom: 2rem; font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; }

/* ===== Formulare ===== */
.form-group { margin-bottom: 1.3rem; text-align: left; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: var(--text-mid);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1.1rem;
    border: 1.5px solid var(--grey-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Lato', sans-serif;
    background: var(--grey-light);
    color: var(--text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--wine-main);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(142,43,63,0.12);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-group small { font-weight: 300; color: var(--wine-mid); text-transform: none; font-size: 0.8rem; letter-spacing: 0; }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.8rem;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.25s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--wine-dark), var(--wine-main));
    color: var(--white);
    box-shadow: 0 3px 12px rgba(74,21,34,0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--wine-deep), var(--wine-dark));
    box-shadow: 0 5px 18px rgba(74,21,34,0.4);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--white);
}
.btn-secondary { background: var(--wine-soft); color: var(--wine-deep); border: 1px solid var(--grey-border); }
.btn-secondary:hover { background: var(--wine-mid); color: var(--white); text-decoration: none; }
.btn-danger { background: #c0392b; color: var(--white); }
.btn-danger:hover { background: #962d22; text-decoration: none; color: var(--white); }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; border-radius: 15px; }

/* ===== Meldungen ===== */
.alert { padding: 0.9rem 1.2rem; border-radius: 10px; margin-bottom: 1.2rem; font-size: 0.95rem; }
.alert-error   { background: #fde8e8; border-left: 4px solid #c0392b; color: #7b1f1f; }
.alert-success { background: #e8f8e8; border-left: 4px solid #27ae60; color: #1a5e2a; }

/* ===== Such- & Filter ===== */
.search-bar { display: flex; gap: 0.5rem; margin-bottom: 1.2rem; }
.search-bar input {
    flex: 1;
    padding: 0.75rem 1.1rem;
    border: 1.5px solid var(--grey-border);
    border-radius: 25px;
    font-size: 1rem;
    background: var(--white);
    color: var(--text-dark);
    box-shadow: 0 2px 8px var(--shadow);
}
.search-bar input:focus { outline: none; border-color: var(--wine-main); box-shadow: 0 0 0 3px rgba(142,43,63,0.12); }

.type-filter { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.type-pill {
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    background: var(--white);
    border: 1.5px solid var(--grey-border);
    color: var(--wine-dark);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.2s;
}
.type-pill:hover, .type-pill.active {
    background: linear-gradient(135deg, var(--wine-dark), var(--wine-main));
    border-color: var(--wine-main);
    color: var(--white);
    text-decoration: none;
    box-shadow: 0 2px 8px var(--shadow);
}

/* ===== Wein-Karten ===== */
.wine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.6rem; }
.wine-card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--grey-border);
    box-shadow: 0 3px 14px var(--shadow);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}
.wine-card:hover { transform: translateY(-5px); box-shadow: 0 10px 28px var(--shadow-hover); }
.wine-card-link { display: flex; flex-direction: column; flex: 1; color: inherit; }
.wine-card-link:hover { text-decoration: none; color: inherit; }

.wine-card-img {
    height: 170px;
    background: linear-gradient(135deg, var(--wine-soft), var(--gold-soft));
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem;
    overflow: hidden;
    position: relative;
}
.wine-card-img img { width: 100%; height: 100%; object-fit: cover; }
.wine-type-tag {
    position: absolute;
    top: 10px; left: 10px;
    background: rgba(255,255,255,0.92);
    color: var(--wine-dark);
    border-radius: 14px;
    padding: 0.2rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Typ-Farben */
.type-rotwein      { background: linear-gradient(135deg, #7a2230, #a83a4c); }
.type-weisswein    { background: linear-gradient(135deg, #f3eccf, #e3d59a); }
.type-rose         { background: linear-gradient(135deg, #f7d9df, #eeb4c2); }
.type-schaumwein   { background: linear-gradient(135deg, #f6ebc9, #f0dca0); }
.type-dessertwein  { background: linear-gradient(135deg, #e7c179, #cfa14f); }

.wine-card-body { padding: 1.1rem 1.3rem; flex: 1; display: flex; flex-direction: column; gap: 0.3rem; }
.wine-card-title { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--wine-deep); line-height: 1.3; }
.wine-card-title .vintage, .wine-detail-info h1 .vintage { color: var(--gold); font-style: italic; }
.wine-card-sub { font-size: 0.85rem; color: var(--text-mid); font-weight: 700; }
.wine-card-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; font-size: 0.8rem; color: #8a7076; margin-top: 0.1rem; }
.wine-card-rating { margin-top: auto; padding-top: 0.5rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.wine-card-footer {
    padding: 0.8rem 1.3rem;
    border-top: 1px solid var(--wine-soft);
    background: var(--grey-light);
    display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
}
.wine-stock { font-size: 0.82rem; color: var(--text-mid); font-weight: 700; }

/* Sterne */
.stars { color: var(--gold); letter-spacing: 1px; font-size: 1rem; }
.rating-num { font-size: 0.8rem; color: var(--text-mid); font-weight: 700; }
.muted { color: #a08c92; font-weight: 400; }

/* ===== Wein-Detail ===== */
.wine-detail { max-width: 850px; }
.wine-detail-head { display: flex; gap: 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.wine-detail-img {
    width: 220px; height: 300px; flex-shrink: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--wine-soft), var(--gold-soft));
    display: flex; align-items: center; justify-content: center;
    font-size: 5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
}
.wine-detail-img img { width: 100%; height: 100%; object-fit: cover; }
.wine-detail-info { flex: 1; min-width: 260px; }
.wine-detail-info h1 { font-family: 'Playfair Display', serif; font-size: 2.1rem; font-style: italic; color: var(--wine-deep); line-height: 1.2; }
.wine-detail-info .winery { color: var(--text-mid); font-weight: 700; margin-bottom: 0.6rem; }
.wine-rating-big { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.wine-rating-big .stars { font-size: 1.3rem; }
.wine-rating-big strong { font-size: 1.2rem; color: var(--wine-dark); }

.wine-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.2rem; font-size: 0.95rem; }
.wine-facts dt { color: var(--text-mid); font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; align-self: center; }
.wine-facts dd { color: var(--text-dark); }

.wine-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem 1.8rem;
    margin-bottom: 1.2rem;
    border: 1px solid var(--grey-border);
    box-shadow: 0 2px 8px var(--shadow);
}
.wine-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--wine-dark);
    margin-bottom: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--wine-soft);
}
.text-line { line-height: 1.8; font-size: 0.97rem; overflow-wrap: break-word; }
.text-line-empty { height: 0.5rem; line-height: 0.5rem; }

/* ===== Bewertungen ===== */
.rating-form { background: var(--grey-light); border: 1px solid var(--grey-border); border-radius: 12px; padding: 1.3rem 1.5rem; margin-bottom: 1.5rem; }
.rating-form .form-group { margin-bottom: 1rem; }

.rating-list { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.rating-item { border: 1px solid var(--wine-soft); border-radius: 10px; padding: 0.9rem 1.1rem; background: var(--grey-light); }
.rating-item-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.rating-author { font-weight: 700; color: var(--wine-dark); }
.rating-date { font-size: 0.8rem; color: var(--text-mid); }
.rating-del { margin-left: auto; font-size: 0.9rem; }
.rating-comment { margin-top: 0.4rem; font-size: 0.93rem; line-height: 1.6; color: var(--text-dark); }

/* ===== Admin ===== */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.1rem; margin-bottom: 2rem; }
.admin-card {
    background: var(--white);
    border: 1px solid var(--grey-border);
    border-radius: 14px;
    padding: 1.6rem;
    text-align: center;
    color: var(--wine-dark);
    transition: all 0.2s;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px var(--shadow);
}
.admin-card:hover {
    background: linear-gradient(135deg, var(--wine-dark), var(--wine-main));
    color: var(--white);
    text-decoration: none;
    border-color: var(--wine-main);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--shadow-hover);
}
.admin-card .icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }

.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 3px 12px var(--shadow); }
.data-table th { background: linear-gradient(135deg, var(--wine-dark), var(--wine-main)); color: var(--white); padding: 0.9rem 1.1rem; text-align: left; font-size: 0.82rem; letter-spacing: 0.5px; text-transform: uppercase; }
.data-table td { padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--wine-light); font-size: 0.93rem; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--grey-light); }

.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.form-card { background: var(--white); border: 1px solid var(--grey-border); border-radius: 16px; padding: 2rem; box-shadow: 0 3px 14px var(--shadow); margin-bottom: 1.5rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; padding: 1.2rem 0; }
.file-input { padding: 0.5rem !important; cursor: pointer; font-size: 0.9rem !important; }
.image-preview { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; padding: 0.6rem 0.8rem; background: var(--grey-light); border-radius: 8px; border: 1px solid var(--grey-border); }

/* ===== Leere Zustände ===== */
.empty-state { text-align: center; padding: 3.5rem; color: var(--wine-mid); }
.empty-state .icon { font-size: 3.5rem; margin-bottom: 1rem; }
.empty-state p { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .site-logo { font-size: 1.3rem; }
    .page-title { font-size: 1.6rem; }
    .wine-grid { grid-template-columns: 1fr; }
    .form-row-2 { grid-template-columns: 1fr; }
    .wine-detail-img { width: 100%; height: 240px; }
    .main-nav { gap: 0.4rem; }
    .main-nav a { font-size: 0.82rem; padding: 0.3rem 0.7rem; }
}
