:root {
    --primary-blue: #007bff;
    --header-bg: #333333;
    --text-dark: #333333;
    --text-gray: #666666;
    --bg-light: #f4f4f4;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Navbar */
.navbar {
    background: var(--header-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center content */
    gap: 30px;
}

.logo-img {
    width: 150px;
    height: auto;
}

.search-bar {
    flex-grow: 1;
    display: flex;
    max-width: 600px;
}

.search-bar input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    outline: none;
}

.search-bar button {
    background: var(--primary-blue);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
}

.nav-categories {
    background: #2c3e50;
    padding: 8px 0;
    text-align: center;
}

.nav-categories a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-size: 13px;
    font-weight: 500;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.filter-tabs {
    display: flex;
    gap: 10px;
}

.tab {
    padding: 6px 14px;
    border-radius: 20px;
    background: #e0e0e0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.tab.active {
    background: var(--primary-blue);
    color: white;
}

/* Grid Layout */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Card Style */
.result-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    height: 100%;
}

.result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.result-img-container {
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.result-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-placeholder {
    font-size: 40px;
    color: #ccc;
}

.result-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.result-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #000;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-snippet {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 12px;
    flex-grow: 1;
    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 12px;
    color: #888;
}

.result-url {
    color: #28a745;
    font-weight: 500;
}

.result-price {
    color: #d32f2f;
    font-weight: 700;
    font-size: 14px;
}

.discount {
    color: #e65100;
    font-weight: 600;
    margin-left: 5px;
}

/* Footer */
footer {
    margin-top: 50px;
    padding: 30px;
    color: #ffffff;
    background: #333333;
    border-top: 1px solid #444;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.footer-center {
    text-align: center;
}

.footer-links {
    position: absolute;
    right: 20px;
    text-align: right;
}

.footer-links a {
    color: #bbbbbb;
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 20px;
    }

    .footer-links {
        position: static;
        text-align: center;
    }

    .footer-links a {
        margin: 0 10px;
    }
}