@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

header {
    background-color: var(--surface-color);
    padding: 1.5rem 2rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

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

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Page Titles */
.page-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Grid Layout */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Card Styling */
.deal-card {
    background: var(--surface-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.deal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.deal-image-wrapper {
    position: relative;
    padding-top: 75%;
    background: #f1f5f9;
}

.deal-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deal-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.deal-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.deal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.deal-title a {
    color: var(--text-primary);
    text-decoration: none;
}
.deal-title a:hover {
    color: var(--accent-color);
}

.deal-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
    margin-top: auto;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
    width: 100%;
}

.btn:hover {
    background-color: var(--accent-hover);
}

/* Single Deal Page */
.single-deal-container {
    background: var(--surface-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.single-deal-image img {
    width: 100%;
    border-radius: var(--radius);
    object-fit: contain;
    background: #f1f5f9;
}

.single-deal-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.single-deal-category {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.single-deal-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.single-deal-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.single-deal-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

@media (max-width: 768px) {
    .single-deal-container {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .single-deal-title {
        font-size: 2rem;
    }
}
