/* =========================================
   Schwarzwaldkind - Räumungsverkauf Styles
   ========================================= */

@font-face {
    font-family: 'LeOsler';
    src: url('../fonts/LeOsler-RoughRegular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Color Palette derived from original website */
    --contrast: #222222;
    --contrast-2: #575760;
    --contrast-3: #b2b2be;
    --base: #f0f0f0;
    --base-2: #f7f8f9;
    --base-3: #ffffff;
    --accent: #1e73be;
    --very-light-brown: #faf9f7;
    --darker-green: #5d7975;
    --super-dark-brown: #5e311b;
    --swk-green: #7eb49c;
    --light-brown: #f3eee5;
    --whatsapp-green: #25D366;

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    
    /* Layout */
    --container-max-width: 1200px;
    --header-height: 80px;
    
    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-primary);
    color: var(--contrast);
    background-color: var(--base-3);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--darker-green);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--swk-green);
}

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

/* =========================================
   Typography
   ========================================= */
h1, h2, h3, h4 {
    color: var(--super-dark-brown);
    font-weight: normal; /* LeOsler font relies on the font itself rather than bold weight */
    font-family: 'LeOsler', var(--font-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--contrast-2);
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
    gap: 8px;
}

.btn-primary {
    background-color: #e74c3c;
    color: white;
    animation: btnPulse 2s infinite ease-in-out;
}

.btn-primary:hover {
    background-color: #c0392b;
    color: white;
    transform: translateY(-2px);
    animation-play-state: paused;
}

@keyframes btnPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 0 12px rgba(231, 76, 60, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.btn-secondary {
    background-color: var(--light-brown);
    color: var(--super-dark-brown);
}

.btn-secondary:hover {
    background-color: #e6dfd3;
    color: var(--super-dark-brown);
}

.btn-whatsapp {
    background-color: var(--whatsapp-green);
    color: white;
}

.btn-whatsapp:hover {
    background-color: #1ebe57;
    color: white;
    transform: translateY(-2px);
}

/* =========================================
   Header & Navigation
   ========================================= */
.site-header {
    background-color: var(--base-3);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--contrast);
    font-weight: 600;
    font-size: 1rem;
}

.nav-links a:hover {
    color: var(--darker-green);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--contrast);
    position: relative;
    transition: var(--transition);
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--contrast);
    left: 0;
    transition: var(--transition);
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* =========================================
   Sections
   ========================================= */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    background-color: var(--very-light-brown);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    color: white;
    padding: 4px 15px;
    margin-bottom: 20px;
    transform: rotate(-3deg);
    z-index: 1;
}

.badge::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #a80a0a; /* Dark red from example */
    z-index: -1;
    filter: url(#rough-edges);
    border-radius: 3px 8px 2px 6px;
    transform: skewX(-5deg);
}

.badge-main {
    font-family: 'LeOsler', sans-serif;
    font-size: 1.6rem;
    line-height: 1;
    letter-spacing: 2px;
}

.badge-sub {
    font-family: 'LeOsler', sans-serif;
    font-size: 1.0rem;
    line-height: 1;
    margin-top: -1px;
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 30px;
}

.countdown-card {
    background: var(--base-3);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.time-box {
    background: var(--light-brown);
    border-radius: var(--border-radius);
    padding: 15px;
    min-width: 80px;
}

.time-val {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--super-dark-brown);
    line-height: 1;
}

.time-label {
    display: block;
    font-size: 0.875rem;
    color: var(--contrast-2);
    margin-top: 5px;
}

/* =========================================
   Brands Section
   ========================================= */
.brands-section {
    background-color: var(--base-3);
    padding: 40px 0;
    border-top: 1px solid var(--base);
    border-bottom: 1px solid var(--base);
}

.brands-title {
    text-align: center;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 20px;
}

.brands-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-item img {
    max-height: 40px;
    max-width: 140px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}

.brand-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* =========================================
   Products Section
   ========================================= */
.products-section {
    background-color: var(--base-2);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--base-3);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
}

.stock-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--super-dark-brown);
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background-color: var(--base);
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.125rem;
    margin-bottom: 10px;
    flex-grow: 1;
}

.product-prices {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.price-old {
    text-decoration: line-through;
    color: var(--contrast-3);
    font-size: 0.875rem;
}

.price-new {
    color: var(--darker-green);
    font-size: 1.25rem;
    font-weight: 800;
}

.btn-reserve {
    background-color: #e74c3c;
    color: white;
    margin-top: 15px;
    width: 100%;
    font-size: 0.9rem;
    padding: 10px;
}

.btn-reserve:hover {
    background-color: #c0392b;
    color: white;
    transform: translateY(-2px);
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--contrast-2);
}

/* =========================================
   Insights Section
   ========================================= */
.insights-section {
    padding: 80px 0;
    background-color: #faf9f7;
}

.insight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 60px;
}

.insight-grid:last-child {
    margin-bottom: 0;
}

.insight-image {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.insight-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.insight-grid:hover .insight-image img {
    transform: scale(1.03);
}

.insight-text {
    padding: 20px 0;
}

.insight-text h3 {
    font-family: 'LeOsler', sans-serif;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 20px;
    line-height: 1.2;
}

.insight-text p {
    font-size: 1.1rem;
    color: var(--contrast);
    line-height: 1.6;
}

@media (min-width: 769px) {
    .insight-grid.reverse .insight-text {
        order: -1;
    }
}

@media (max-width: 768px) {
    .insight-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .insight-image {
        height: 300px;
    }
    
    .insight-grid.reverse .insight-text {
        order: 0;
    }
}

/* =========================================
   Location & Contact Sections
   ========================================= */
.location-grid, .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.address-box {
    background: var(--light-brown);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 1.125rem;
}

.location-map iframe {
    border-radius: var(--border-radius);
}

.contact-section {
    background-color: var(--very-light-brown);
}

.contact-list {
    list-style: none;
    margin-bottom: 30px;
}

.contact-list li {
    margin-bottom: 10px;
    font-size: 1.125rem;
}

.opening-hours {
    background: var(--base-3);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.hours-list {
    list-style: none;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--base);
}

.hours-list li:last-child {
    border-bottom: none;
}

.store-status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
}

.store-status.open {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.store-status.open::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.store-status.closed {
    background-color: #ffebee;
    color: #c62828;
}

.store-status.closed::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #f44336;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

/* =========================================
   Pre-Footer
   ========================================= */
.pre-footer {
    width: 100%;
    height: 100px;
    margin-bottom: 20px;
    background-image: url('../images/footer_claim_notxt.svg');
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    background-color: #faf9f7;
    color: var(--contrast);
    padding: 40px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    height: 30px;
}

.footer-links a {
    color: var(--contrast);
    margin-left: 20px;
    text-decoration: underline;
}

.footer-links a:hover {
    color: var(--darker-green);
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 992px) {
    .hero-grid, .location-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--base-3);
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.3s ease-in-out;
    }

    .main-nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
    }

    .nav-links li {
        border-bottom: 1px solid var(--base);
    }

    .nav-links a {
        display: block;
        padding: 15px 20px;
    }

    .countdown-timer {
        gap: 10px;
    }

    .time-box {
        min-width: 60px;
        padding: 10px;
    }

    .time-val {
        font-size: 1.5rem;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links a {
        margin: 0 10px;
    }
}

/* =========================================
   Modal
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--base-3);
    padding: 40px;
    border-radius: var(--border-radius);
    max-width: 700px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-md);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 20px;
}

.modal-content p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--contrast);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: var(--contrast-3);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.close-modal:hover {
    color: var(--darker-green);
}
