/* Grundgerüst */
body { background: #f8fafc; margin: 0; padding: 0; font-family: sans-serif; }

/* Begrenzung der Inhaltsbreite */
.container { max-width: 900px; margin: 0 auto; padding: 20px; }

/* Suchleiste zentrieren */
.hero-search-container { max-width: 900px; margin: 20px auto; display: flex; gap: 15px; }

/* DAS IST DER WICHTIGE TEIL: Die Karten fixieren */
#deals-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 20px auto;
}

.deal-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: row; /* Bild links, Text rechts */
    align-items: center;
    gap: 20px;
}

/* Bilder bändigen */
.deal-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
}

.deal-content { flex-grow: 1; }


/* Container: Klare Begrenzung, viel Weißraum */
#deals-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 950px;
    margin: 20px auto;
}

/* Karte: Dezenter Rahmen, kein Schatten-Overkill */
.deal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Bild: Kleiner, subtiler Rahmen */
.deal-image {
    width: 100px;
    height: 100px;
    object-fit: contain; /* Damit das ganze Bild ohne Abschneiden zu sehen ist */
    border: 1px solid #f1f5f9;
}

/* Text: Klare Hierarchie */
.deal-title { 
    font-size: 1.1rem; 
    font-weight: 600; 
    color: #1e293b; 
    margin-bottom: 8px; 
}
.deal-price { 
    font-size: 1.1rem; 
    font-weight: 700; 
    color: #22c55e; /* Das typische "Deal-Grün" */
}

/* Button: Dezent, kein roter Block mehr */
.btn-deal {
    border: 1px solid #cbd5e1;
    background: transparent;
    color: #475569;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
}
.btn-deal:hover { border-color: #22c55e; color: #22c55e; }

/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');


/* Layout-Container */
#deals-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px; /* Schön schmal wie im Vorbild */
    margin: 20px auto;
}

/* Die einzelne Karte */
.deal-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    gap: 16px;
}

/* Das kleine Bild links */
.deal-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    background: #f1f5f9;
}

/* Der Textbereich in der Mitte */
.deal-content {
    flex-grow: 1;
}

.deal-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1e293b;
}

.deal-price {
    font-size: 0.95rem;
    color: #059669;
    font-weight: 700;
}

/* Der dezente "Zum Deal"-Button */
.btn-deal {
    padding: 6px 12px;
    font-size: 0.85rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    text-decoration: none;
}
.btn-deal:hover { background: #f1f5f9; }



:root {
    /* Markenfarben für extrem hohen Wiedererkennungswert */
    --brand-primary: #f43f5e;     /* Modernes Korall-Rot */
    --brand-hover: #e11d48;
    --header-bg: #0f172a;         /* Edles Nachtblau */
    --bg-color: #f8fafc;          /* Helles Grau-Blau als Hintergrund */
    
    /* Text & Flächen */
    --text-main: #334155;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    
    /* Styling */
    --radius-soft: 16px;
    --radius-pill: 999px;
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   HEADER & NAVIGATION
========================================= */
header {
    background: var(--header-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo a {
    text-decoration: none;
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

/* =========================================
   BUTTONS
========================================= */
.btn-primary {
    background: var(--brand-primary);
    color: #ffffff !important;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.3);
}

.btn-primary:hover {
    background: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(244, 63, 94, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-main);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-block {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 12px;
}

/* =========================================
   LAYOUT & STANDARDFORMULARE
========================================= */
main {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    min-height: 70vh;
}

.auth-box {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-soft);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit; /* Wichtig für Textarea Schriftart */
    transition: all 0.2s;
    background-color: #f9fafb;
}

.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15);
    background-color: #fff;
}

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

/* =========================================
   STARTSEITE: HERO & DEAL KARTEN
========================================= */
.hero-search-container {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.8rem;
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    font-size: 1.1rem;
    background: var(--card-bg);
    box-shadow: var(--shadow-soft);
    color: var(--text-main);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.1);
}

.deal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.deal-card {
    background: var(--card-bg);
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.deal-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: #cbd5e1;
}

.deal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--brand-primary), #fb7185);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.deal-card:hover::before {
    opacity: 1;
}

.deal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.deal-badge {
    background: #f1f5f9;
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deal-price {
    font-weight: 800;
    color: var(--brand-primary);
    font-size: 1.5rem;
}

.deal-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-main);
    line-height: 1.4;
}

.deal-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.deal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

/* =========================================
   MULTI-STEP WIZARD (CREATE DEAL)
   Mobile First Design
========================================= */
.wizard-container {
    display: flex;
    flex-direction: column; /* Standard: Untereinander auf dem Handy */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    max-width: 1100px;
    margin: 2rem auto;
    overflow: hidden;
}

@media (min-width: 768px) {
    .wizard-container {
        flex-direction: row; /* Ab Tablet: Nebeneinander */
        min-height: 600px;
    }
}

/* Sidebar */
.wizard-sidebar {
    background: #f8fafc;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
    .wizard-sidebar {
        width: 280px;
        border-bottom: none;
        border-right: 1px solid var(--border);
        padding: 2rem 1.5rem;
    }
}

.wizard-sidebar h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    display: none; /* Auf Handy ausblenden um Platz zu sparen */
}

@media (min-width: 768px) {
    .wizard-sidebar h2 { 
        display: block; 
    }
}

/* Step Navigation (Handy = Wischen, Desktop = Untereinander) */
.wizard-step-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch; /* Flüssiges Scrollen auf iOS */
}

@media (min-width: 768px) {
    .wizard-step-nav {
        flex-direction: column;
        overflow-x: visible;
        padding-bottom: 0;
    }
}

.step-btn {
    background: transparent;
    border: none;
    text-align: left;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    white-space: nowrap; /* Verhindert Zeilenumbrüche in den Buttons */
}

.step-btn:hover {
    background: #f1f5f9;
}

.step-btn.active {
    background: #ffffff;
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
}

.step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid currentColor;
    font-size: 0.8rem;
}

.step-btn.completed {
    color: #059669; /* Grün für erledigt */
}

.step-btn.completed .step-icon {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

/* Rechter Formularbereich */
.wizard-content {
    flex: 1;
    padding: 2rem 1.5rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .wizard-content { 
        padding: 4rem 5rem; 
    }
}

.step-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
    flex: 1;
}

.step-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-section h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

@media (min-width: 768px) {
    .step-section h3 { 
        font-size: 1.8rem; 
    }
}

.step-section .sub-heading {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.wizard-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: auto;
    padding-top: 2rem;
}

/* =========================================
   KATEGORIE PILLS (Schritt 5)
========================================= */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.category-pill {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: #ffffff;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.category-pill:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.category-pill.selected {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
}

/* =========================================
   SCRAPED IMAGES GRID (Schritt 3)
========================================= */
.scraped-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.scraped-img-container {
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    aspect-ratio: 1;
}

.scraped-img-container:hover {
    border-color: #cbd5e1;
}

.scraped-img-container.selected {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(244,63,94,0.2);
}

.scraped-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   BILDERGALERIE (Drag & Drop)
========================================= */
.deal-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    min-height: 120px;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed var(--border);
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: grab;
    box-shadow: var(--shadow-soft);
    background: #fff;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.gallery-item:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Das erste Bild ist immer das Hauptbild */
.gallery-item:first-child {
    border-color: var(--brand-primary);
}

.gallery-item:first-child::before {
    content: '★ Hauptbild';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--brand-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    text-align: center;
    padding: 0.2rem 0;
    z-index: 2;
}

/* Der Löschen-Button (X) */
.remove-img-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.remove-img-btn:hover {
    background: var(--brand-primary);
}