/* =============================================
   RESTAURANTS FEED (ZOMATO/SWIGGY STYLE)
============================================= */

/* Header Override */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem 0.5rem;
    background: transparent;
}

.sticky-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-title {
    text-align: center;
}

.header-title h1 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.3px;
}

.header-title p {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.back-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.back-btn:active {
    transform: scale(0.9);
}

/* Scrollable Horizontal Filters */
.rest-filters {
    display: flex;
    overflow-x: auto;
    padding: 1rem 1.5rem;
    gap: 0.6rem;
    scrollbar-width: none; /* Firefox */
}

.rest-filters::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}

.rest-filter {
    padding: 0.4rem 0.8rem;
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.015);
    transition: all 0.2s ease;
}

.rest-filter.active {
    background: var(--text);
    color: white;
    border-color: var(--text);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.rest-filter:active {
    transform: scale(0.95);
}

/* Restaurants Feed Container */
.restaurants-feed {
    padding: 0.5rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* The Restaurant Card Model */
.rest-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
}

.rest-card:active {
    transform: scale(0.97) translateY(2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

/* Image Swiper exactly inside the Card */
.rest-image-swiper {
    position: relative;
    width: 100%;
    height: 220px;
    background: #e5e7eb;
}

.rest-image-swiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dark Gradient over image for text/icon visibility */
.rest-image-swiper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1; /* Above image, below tags */
}

/* Floating Elements on Image */
.rest-heart {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.15rem;
    z-index: 10;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s;
}

.rest-heart.liked {
    color: #ef4444;
}

.rest-heart:active {
    transform: scale(0.85);
}

.rest-heart i.fas {
    animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.rest-promoted {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rest-discount {
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, #2563eb, #4f46e5);
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.4rem 1.25rem 0.4rem 1rem;
    border-radius: 0 16px 0 0;
    z-index: 10;
    box-shadow: 2px -2px 15px rgba(0,0,0,0.2);
    letter-spacing: -0.2px;
}

/* Swiper Pagination specifically styled to match food apps */
.rest-image-swiper .swiper-pagination {
    bottom: 8px !important;
    z-index: 10;
}

.rest-image-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    width: 6px;
    height: 6px;
    margin: 0 3px !important;
    transition: all 0.3s;
}

.rest-image-swiper .swiper-pagination-bullet-active {
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
    transform: scale(1.3);
}

/* Card Info Section */
.rest-info {
    padding: 1.25rem;
}

.rest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.rest-row:last-child {
    margin-bottom: 0;
}

.rest-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.5px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

.rest-rating {
    background: #22c55e;
    color: white;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.25);
    flex-shrink: 0;
}

.rest-rating i {
    font-size: 0.75rem;
}

.rest-sub span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.rest-cuisine {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 1rem;
    font-weight: 500;
}

.rest-cost {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--text); /* slight emphasis on cost */
}

.rest-meta {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed rgba(0,0,0,0.08);
}

.rest-loc {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.rest-time {
    background: var(--bg);
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.rest-time i {
    color: #10b981;
}

/* Desktop framing fixes for new page */
@media (min-width: 601px) {
    body {
        display: flex;
        justify-content: center;
        background: #D1D5DB;
        padding: 40px 0;
    }
    
    .app-container {
        border-radius: 40px;
        box-shadow: 0 25px 50px -12px rgba(0,0,0,0.3);
        border: 8px solid #1f2937;
        height: 850px;
        overflow-y: auto;
    }
}
