/* Reset & Base */
:root {
    --primary-color: #FFC300; /* Meituan Yellow */
    --text-color: #333;
    --light-text: #666;
    --lighter-text: #999;
    --bg-color: #f4f4f4;
    --white: #fff;
    --border-color: #e5e5e5;
    --hover-color: #FFD000;
    --link-color: #333;
    --container-width: 1190px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.2s;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 28px;
    color: var(--primary-color);
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.city-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
    color: var(--light-text);
}

/* Main Navigation in Header */
.site-nav {
    display: flex;
    gap: 25px;
    margin-left: 30px;
}

.site-nav a {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    padding: 5px 0;
    position: relative;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--primary-color);
}

.search-bar {
    display: flex;
    flex: 1;
    max-width: 500px;
    margin: 0 30px; /* Reduced margin */
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 14px;
}

.search-bar .search-btn {
    background-color: var(--primary-color);
    border: none;
    padding: 0 25px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 18px;
    color: #333;
}

.user-actions {
    display: flex;
    gap: 15px;
}

.user-actions a {
    font-size: 14px;
    color: var(--light-text);
}

.user-actions a:hover {
    color: var(--primary-color);
}

.btn-login {
    color: var(--primary-color) !important;
    font-weight: bold;
}

/* Main Layout (Nav + Banner) */
.main-layout {
    display: flex;
    margin-top: 20px;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden; /* For rounded corners */
    height: 420px; /* Fixed height for banner area */
    padding: 0; /* Override container padding */
}

.category-menu {
    width: 230px;
    flex-shrink: 0; /* Prevent shrinking */
    background-color: #2b333b; /* Dark sidebar like older Meituan or general style */
    color: var(--white);
    padding: 15px 0;
    display: flex;
    flex-direction: column;
}

.category-menu h3 {
    padding: 0 15px 10px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 5px;
}

.category-menu ul {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around; /* Distribute items */
}

.cat-item {
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: var(--white);
    height: 40px;
    font-size: 14px;
}

.cat-item:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--primary-color);
}

.cat-item i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
    color: rgba(255,255,255,0.7);
}

.cat-item:hover i {
    color: var(--primary-color);
}

.cat-item .cat-name {
    flex: 1;
}

.cat-item .arrow {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.banner-area {
    flex: 1;
    min-width: 0; /* Prevent flex item overflow issues */
    display: flex;
    flex-direction: column;
    position: relative;
}

.header-nav {
    padding: 15px 20px;
    background-color: var(--white);
    display: flex;
    gap: 25px;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 1px solid var(--border-color);
}

.header-nav a:hover {
    color: var(--primary-color);
}

.mySwiper {
    width: 100%;
    height: 100%;
    flex: 1;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.slide-1 { background-color: #E0F7FA; }
.slide-2 { background-color: #FFF3E0; }
.slide-3 { background-color: #F3E5F5; }

.banner-content {
    text-align: center;
}

.banner-content h2 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #333;
}

.banner-content p {
    font-size: 18px;
    color: #666;
}

/* Custom Swiper Buttons */
.swiper-button-next,
.swiper-button-prev {
    width: 40px !important;
    height: 40px !important;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    color: #fff !important;
    transition: background-color 0.3s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 18px !important;
    font-weight: bold;
}

/* Super Deals Section */
.super-deals-section {
    margin-top: 30px;
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.no-bg {
    background-color: transparent !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    color: var(--text-color) !important;
}

.text-dark {
    color: var(--text-color) !important;
}

.subtitle {
    margin-left: 15px;
    color: #666;
    font-size: 14px;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.deal-card {
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    /* box-shadow: 0 4px 12px rgba(0,0,0,0.05); */
    transition: transform 0.2s;
    border: 1px solid #f0f0f0;
}

.deal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.deal-img-wrapper {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.deal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deal-tag {
    position: absolute;
    top: 10px;
    left: 0;
    background-color: #ff4d4f;
    color: white;
    padding: 4px 10px;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
    font-weight: bold;
}

.deal-info {
    padding: 15px;
}

.deal-info h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deal-info .desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.current-price {
    color: #F60;
    font-size: 20px;
    font-weight: bold;
}

.old-price {
    color: #999;
    font-size: 12px;
    text-decoration: line-through;
}

/* Floor Sections */
.floor-section {
    margin-top: 30px;
    padding: 0; /* Ensure full width */
}

.floor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    color: white;
}

.color-food { background: linear-gradient(to right, #ff9c00, #ff6a00); }
.color-ent { background: linear-gradient(to right, #2196F3, #00BCD4); }

.floor-title {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.floor-links a {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    margin-left: 15px;
}

.floor-links a:hover {
    color: white;
    text-decoration: underline;
}

.floor-content {
    display: flex;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    height: 520px; /* Fixed height for consistency */
}

.floor-banner {
    width: 240px;
    position: relative;
    flex-shrink: 0;
}

.floor-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floor-banner-text {
    position: absolute;
    bottom: 40px;
    left: 20px;
    right: 20px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.floor-banner-text h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.floor-banner-text p {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.btn-go {
    display: inline-block;
    padding: 6px 15px;
    background-color: rgba(255,255,255,0.2);
    border: 1px solid white;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    transition: background 0.3s;
}

.btn-go:hover {
    background-color: white;
    color: #333;
    text-shadow: none;
}

.floor-grid {
    flex: 1;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
}

.small-card .card-image-wrapper {
    height: 140px; /* Smaller image for grid items */
}

.small-card .card-title {
    font-size: 14px;
}

/* Content Section */
.content-section {
    margin-top: 30px;
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color); /* Match other sections */
}

.section-header {
    background-color: rgb(250, 60, 95);
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    margin: -20px -20px 20px -20px; /* Pull out to edges */
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.section-title {
    font-size: 20px;
}

.view-more {
    color: white;
    font-size: 14px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 cards per row */
    gap: 20px;
}

.card {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-image-wrapper {
    height: 180px;
    overflow: hidden;
    background-color: #eee;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-name {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.card-bottom {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.price-box {
    color: #F60;
}

.currency {
    font-size: 14px;
    font-weight: bold;
}

.price {
    font-size: 22px;
    font-weight: bold;
    line-height: 1;
}

.original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-left: 5px;
}

.sales {
    font-size: 12px;
    color: #999;
}

/* Footer */
.site-footer {
    background-color: #f8f8f8;
    border-top: 1px solid #e5e5e5;
    margin-top: 40px;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
}

.footer-col h4 {
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #666;
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    padding-top: 20px;
    text-align: center;
    color: #999;
    font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    :root {
        --container-width: 960px;
    }
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    :root {
        --container-width: 100%;
    }
    .container {
        padding: 0 20px;
    }
    .category-menu {
        display: none; /* Hide sidebar on smaller screens or make it a dropdown */
    }
    .main-layout {
        height: auto;
    }
    .banner-area {
        height: 300px;
    }
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .header-content {
        flex-wrap: wrap;
    }
    .search-bar {
        order: 3;
        margin: 10px 0 0;
        max-width: 100%;
    }
}
