:root {
    --primary: #E31B21;
    --primary-dark: #b31217;
    --secondary: #FFD700;
    /* Gold for Tet */
    --accent: #FF5733;
    --text-main: #2D2D2D;
    --text-light: #525252;
    --bg-body: #FFFDF8;
    /* Warm off-white */
    --card-bg: #FFFFFF;
    --shadow: 0 10px 30px rgba(227, 27, 33, 0.08);
    --radius: 16px;
    --font-main: 'Encode Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header Section */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px 20px 80px;
    /* Extra padding bottom for overlap */
    position: relative;
    overflow: hidden;
    text-align: center;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 10%, transparent 60%);
    animation: rotate 60s linear infinite;
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 24px;
}

.stats {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Decorative SVG Background elements */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(to right, var(--secondary), transparent);
    opacity: 0.1;
    z-index: 1;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    margin-top: -40px;
    /* Overlap header */
}

/* Controls */
.controls-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 40px;
    border: 1px solid rgba(227, 27, 33, 0.05);
}

.search-box,
.filter-box {
    flex: 1;
    min-width: 280px;
    position: relative;
}

input,
select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #EEE;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #FAFAFA;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(227, 27, 33, 0.1);
}

/* Grid Layout - Converted to Flex for Centering */
.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-bottom: 60px;
}

/* Card Styling */
.shop-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    position: relative;
    /* Flex sizing to match previous grid behavior but allow centering */
    flex: 1 1 340px;
    max-width: 400px;
    width: 100%;
}

.shop-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(227, 27, 33, 0.12);
    border-color: rgba(227, 27, 33, 0.2);
}

.card-header {
    padding: 20px;
    background: linear-gradient(to right, #fff5f5, #fff);
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.district-badge {
    background: rgba(227, 27, 33, 0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 20px;
    flex-grow: 1;
}

.shop-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.shop-address {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    display: flex;
    align-items: start;
    gap: 8px;
}

.shop-address svg {
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--primary);
}

.map-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 8px;
}

.map-btn:hover {
    background: var(--primary);
    color: white;
}

/* Animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shop-card {
    animation: slideUp 0.6s ease forwards;
    opacity: 0;
    /* hidden initially */
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    position: relative;
    background: #fff;
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .controls-card {
        flex-direction: column;
        padding: 20px;
    }

    header {
        padding-bottom: 60px;
    }
}