/* CheapSlabs Design System - Generated by UI/UX Pro Max */

/* Global Variables */
:root {
    /* Colors */
    --color-primary: #3B82F6;
    --color-secondary: #60A5FA;
    --color-cta: #F97316;
    --color-background: #F8FAFC;
    --color-text: #1E293B;
    --color-white: #FFFFFF;
    --color-gray-100: #F1F5F9;
    --color-gray-200: #E2E8F0;

    /* Spacing */
    --space-xs: 4px;
    /* 0.25rem */
    --space-sm: 8px;
    /* 0.5rem */
    --space-md: 16px;
    /* 1rem */
    --space-lg: 24px;
    /* 1.5rem */
    --space-xl: 32px;
    /* 2rem */
    --space-2xl: 48px;
    /* 3rem */
    --space-3xl: 64px;
    /* 4rem */

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Typography */
    --font-heading: 'Barlow Condensed', sans-serif;
    --font-body: 'Barlow', sans-serif;

    /* Default (Light) Gradient End Color */
    --color-bg-gradient-end: #E0F2FE;
}

/* Dark Mode Variables */
body.dark-mode {
    --color-background: #0f172a;
    --color-text: #f8fafc;
    --color-white: #1e293b;
    /* Cards become dark */
    --color-gray-100: #334155;
    --color-gray-200: #475569;
    --color-bg-gradient-end: #1e293b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    border-radius: 8px;
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: var(--space-md);
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    color: var(--color-text);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Layout Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-3xl) 0;
}

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

/* Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 200ms ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--color-cta);
    color: var(--color-white);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: 12px;
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: all 200ms ease;
    cursor: pointer;
    border: 1px solid var(--color-gray-100);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--color-primary);
}

/* Inputs */
.search-input {
    width: 100%;
    padding: 16px 24px;
    border: 2px solid var(--color-gray-200);
    border-radius: 50px;
    font-size: 1.1rem;
    font-family: var(--font-body);
    transition: border-color 200ms ease;
}

.search-input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Header */
header {
    background: var(--color-white);
    padding: var(--space-md) 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--color-text);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text);
    cursor: pointer;
    padding: 8px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-background) 0%, var(--color-bg-gradient-end) 100%);
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Background pattern */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(var(--color-primary) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.05;
    pointer-events: none;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.hero p {
    font-size: 1.25rem;
    color: #64748B;
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    width: 24px;
    height: 24px;
}

/* Categories */
.category-card {
    text-align: center;
    padding: var(--space-lg);
    background: var(--color-white);
    border-radius: 12px;
    transition: all 200ms ease;
    border: 1px solid transparent;
}

.category-card:hover {
    border-color: var(--color-secondary);
    background: #EFF6FF;
}

.category-icon {
    width: 48px;
    height: 48px;
    background: var(--color-gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    color: var(--color-primary);
}

.category-card:hover .category-icon {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Listings */
.listing-card {
    position: relative;
    overflow: hidden;
}

.listing-image {
    height: 240px;
    background: var(--color-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    border-radius: 8px;
}

.listing-image img {
    max-height: 100%;
}

.listing-title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
}

.listing-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.listing-price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-cta);
    font-weight: 700;
}

.comparison-price {
    font-size: 0.9rem;
    color: #94A3B8;
    text-decoration: line-through;
}

.savings-badge {
    display: inline-block;
    background: #DCFCE7;
    color: #166534;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.listing-grade {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: var(--color-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-cols-3,
    .grid-cols-2,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 var(--space-md);
    }

    /* Mobile Header */
    .mobile-menu-btn {
        display: block;
    }

    header .container {
        position: relative;
    }

    /* Use .flex to override utility class specificity */
    header nav.flex {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: var(--space-md);
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--color-gray-100);
        gap: var(--space-md);
    }

    header nav.flex.active {
        display: flex;
    }

    header nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: var(--space-sm);
    }

    header nav .btn {
        width: 100%;
    }

    /* Keep theme toggle circular/small on mobile */
    header nav #theme-toggle.btn {
        width: 44px;
        height: 44px;
        padding: 0;
        margin: 0 auto;
        /* Center it */
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
}