/**
 * rabatt.codes - Main Stylesheet
 * Design-Referenzen: Galaxus, DeinDeal (Viel Whitespace, warme Töne)
 */

:root {
    /* Branding Colors */
    --bg-color: #F9F8F6;       /* Warmes Sand/Beige als Hintergrund */
    --text-color: #2C2A29;     /* Weiches Anthrazit statt hartem Schwarz */
    --primary: #D9534F;        /* Warmer Ziegelrot-Akzent für Rabatte & CTAs */
    --primary-hover: #c9302c;
    --card-bg: #FFFFFF;        /* Reinweiß für die Kacheln */
    
    /* Spacing & Layout */
    --border-radius: 8px;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* =========================================
   Header
   ========================================= */
.site-header {
    background: var(--card-bg);
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.site-header h1 {
    font-size: 1.5rem;
    color: var(--text-color);
}

/* =========================================
   Deals Grid System (Mobile First)
   ========================================= */
.deals-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr; /* Mobile: 1 Spalte */
}

@media (min-width: 768px) {
    .deals-grid { 
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 Spalten */
    }
}

@media (min-width: 1024px) {
    .deals-grid { 
        grid-template-columns: repeat(3, 1fr); /* Desktop: 3 Spalten */
    }
}

/* =========================================
   Deal Card (Die Kachel)
   ========================================= */
.deal-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.deal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.deal-image {
    position: relative;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 20px;
}

.deal-image img { 
    max-height: 100px; 
    max-width: 80%; 
    object-fit: contain; /* Verhindert Verzerrungen des Logos */
}

.badge-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
}

.deal-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.shop-name { 
    font-size: 0.85rem; 
    color: #888; 
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deal-title { 
    font-size: 1.15rem; 
    margin-bottom: 24px; 
    flex-grow: 1;
    line-height: 1.4;
}

/* =========================================
   Buttons
   ========================================= */
.btn-primary {
    display: block;
    text-align: center;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 14px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    width: 100%;
    transition: background-color 0.2s ease;
}

.btn-primary:hover, .btn-primary:focus { 
    background: var(--primary-hover); 
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
}

/* =========================================
   Voucher Modal (Popup)
   ========================================= */
.modal-overlay {
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(44, 42, 41, 0.7); /* Abgedunkelter Hintergrund */
    display: flex; 
    align-items: center; 
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay:not(.hidden) { 
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white; 
    padding: 40px; 
    border-radius: 12px;
    width: 90%; 
    max-width: 450px; 
    text-align: center; 
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay:not(.hidden) .modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute; 
    top: 15px; right: 20px; 
    font-size: 28px;
    background: none; 
    border: none; 
    cursor: pointer;
    color: #888;
}

.modal-close-btn:hover { color: var(--text-color); }

.code-box {
    background: #f8f9fa; 
    padding: 20px; 
    margin: 20px 0;
    font-size: 1.8rem; 
    font-family: 'Courier New', Courier, monospace; 
    font-weight: bold;
    border: 2px dashed #ccc;
    border-radius: 8px;
    letter-spacing: 2px;
}

.feedback-text { 
    color: #2e7d32; /* Angenehmes Erfolgs-Grün */
    font-weight: 600; 
    margin-bottom: 20px; 
}
.feedback-text.hidden { display: none; }


/* =========================================
   Save Deal / Favoriten Button (Herz)
   ========================================= */
.btn-save-deal {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 10;
}

.btn-save-deal:hover {
    transform: scale(1.1);
    background: #fff;
}

.btn-save-deal svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #888;
    stroke-width: 2;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

/* Aktiver Zustand (Gemerkt) */
.btn-save-deal.is-saved svg {
    fill: var(--primary);    /* Rote Füllung */
    stroke: var(--primary);  /* Roter Rand */
}


/* Modern UI Polish für die Deal-Karten */
.deal-card {
    border: 1px solid #f0f0f0; /* Sanfterer Rahmen */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02); /* Leichter Grundschatten */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    will-change: transform;
}

.deal-card:hover {
    transform: translateY(-5px); /* Karte hebt sich sanft an */
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08); /* Schatten wird weicher und größer */
}

/* Der Titel-Link soll beim Hovern die Primärfarbe annehmen */
.deal-title a {
    transition: color 0.2s ease;
}
.deal-card:hover .deal-title a {
    color: var(--primary);
}


/* =========================================
   GOLDEN SHOPPING DAYS - THEME UPGRADE
   ========================================= */

:root {
    /* Die Farbpalette: Premium & Clean */
    --primary: #D4AF37;       /* Das markante Event-Gold */
    --primary-hover: #B5952F; /* Etwas dunkleres Gold für den Klick-Effekt */
    --bg-color: #F8F9FA;      /* Ein extrem helles, modernes Off-White für den Hintergrund */
    --text-color: #1A1A1A;    /* Fast Schwarz für perfekten Lese-Kontrast */
    --card-bg: #FFFFFF;       /* Strahlend weiße Karten */
}

/* 1. Generelles Setup */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* 2. Header (Clean mit goldener Abschlusskante) */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border-bottom: 3px solid var(--primary); /* Zieht die Blicke auf sich */
}

/* 3. Deal-Karten (Premium Card-UI) */
.deal-card {
    background: var(--card-bg);
    border: 1px solid #EFEFEF; /* Fast unsichtbarer Rahmen */
    border-radius: 8px; /* Nicht zu rund, das wirkt erwachsener */
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03); /* Ganz weicher Grundschatten */
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.deal-card:hover {
    transform: translateY(-6px); /* Karte "schwebt" nach oben */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08); /* Starker, weicher Schatten */
    border-color: var(--primary); /* Karte bekommt einen goldenen Rahmen beim Hovern */
}

.deal-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-color);
}

/* 4. Der Rabatt-Badge (Der Eyecatcher) */
.badge-discount {
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 8px 14px;
    border-radius: 0 0 12px 0; /* Eckig oben, dynamisch rund unten */
    box-shadow: 2px 2px 8px rgba(212, 175, 55, 0.3); /* Goldener Leuchteffekt */
}

/* 5. Buttons (Uppercase & Bold) */
.btn-primary {
    background-color: var(--primary);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase; /* WICHTIG für den Event-Look */
    letter-spacing: 1px;
    font-size: 0.85rem;
    padding: 12px 20px;
    border-radius: 6px;
    border: none;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.4);
    color: #fff;
}