/* ============================================
   CSS GRID SYSTEM - DARK MODE APPLE STYLE
   Brand Color: #ff575f (Coral)
   ============================================ */

/* ============================================
   BRAND FONTS
   ============================================ */

@font-face {
    font-family: 'Haffer';
    src: url('/fonts/Haffer-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Haffer';
    src: url('/fonts/Haffer-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RZA';
    src: url('/fonts/RzaRegular-Desktop.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Haffer', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    padding: 20px;
    color: #fafafa;
}

/* ============================================
   GRID CONTAINER
   ============================================ */

.grid-container {
    display: grid;
    grid-template-columns: 350px 1fr 1fr 1fr; /* 4 columns now */
    grid-template-rows: auto 3fr 1fr 1fr; /* header, pricing/sendquote (3fr = 60%), market (1fr = 20%), insights (1fr = 20%) */
    gap: 16px;
    max-width: 2000px; /* Wider max */
    margin: 0 auto;
    height: calc(100vh - 40px);

    /* Layout: pricing (2 cols) + send quote (1 col) in main row */
    grid-template-areas:
        "header     header    header      header"
        "input      pricing   pricing     sendquote"
        "market     similar   similar     livemarket"
        "insights   similar   similar     livemarket";
}

/* Force left column modules to have proper heights */
.input-module {
    min-height: 380px;
}

.input-module .module-content {
    overflow-y: auto;
}

.market-module,
.insights-module {
    min-height: 120px;
}
/* ============================================
   MODULE POSITIONING
   ============================================ */

.header-module {
    grid-area: header;
}

.login-module {
    grid-area: login;
}

.input-module {
    grid-area: input;
}

.results-module {
    grid-area: results;
}

.pricing-module {
    grid-area: pricing;
}

.sendquote-module {
    grid-area: sendquote;
}

.market-module {
    grid-area: market;
}

.insights-module {
    grid-area: insights;
}


.similar-bikes-module {
    grid-area: similar;
}

.livemarket-module {
    grid-area: livemarket;
}

/* ============================================
   GRID ITEM BASE STYLES
   ============================================ */

.grid-item {
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s ease;
}

.grid-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

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

/* ============================================
   RESPONSIVE LAYOUT
   ============================================ */

/* Large laptops / smaller desktops */
@media (max-width: 1600px) {
    .grid-container {
        max-width: 1500px;
        grid-template-columns: 320px 1fr 1fr 1fr;
    }
}

/* Standard laptops */
@media (max-width: 1400px) {
    body {
        padding: 16px;
    }

    .grid-container {
        max-width: 1200px;
        grid-template-columns: 300px 1fr 1fr;
        grid-template-rows: auto minmax(350px, auto) minmax(150px, 1fr) minmax(150px, 1fr);
        height: auto;
        min-height: auto;
        grid-template-areas:
            "header     header      header"
            "input      results     results"
            "market     similar     livemarket"
            "insights   similar     livemarket";
    }

    .module-content {
        padding: 20px;
    }
}

/* Small laptops (1366px and similar) */
@media (max-width: 1366px) {
    .grid-container {
        grid-template-columns: 280px 1fr 1fr;
    }

    .input-module {
        min-height: 350px;
    }
}

@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: 280px 1fr;
        grid-template-rows: auto auto auto 1fr 1fr;
        grid-template-areas:
            "header     header"
            "login      login"
            "input      results"
            "market     similar"
            "insights   livemarket";
    }

    .module-content {
        padding: 18px;
    }
}

/* Tablets */
@media (max-width: 992px) {
    body {
        padding: 14px;
    }

    .grid-container {
        grid-template-columns: 260px 1fr;
        gap: 14px;
    }

    .module-content {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: 12px;
        height: auto;
        min-height: auto;
        grid-template-areas:
            "header"
            "login"
            "input"
            "results"
            "similar"
            "livemarket"
            "market"
            "insights";
    }

    .module-content {
        padding: 16px;
    }

    .grid-item {
        border-radius: 12px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .grid-container {
        gap: 10px;
    }

    .module-content {
        padding: 14px;
    }

    .grid-item {
        border-radius: 10px;
    }
}