/* Listings Page Modernization - Premium Glassmorphism & Interactive UI */

/* --- Page Layout --- */
body {
    padding-top: 0;
}

/* --- Hero Section with Glassmorphic Container --- */
.content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 1400px !important;
    padding: 1.5rem 1rem 3rem !important;
    /* Reduced padding */
}

/* --- Premium Header Section --- */
.content>h1 {
    font-size: 3rem !important;
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 50%, #a5a5a5 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    margin-bottom: 0.5rem !important;
    letter-spacing: -0.04em !important;
    text-align: left;
    /* Changed from center */
    animation: slideDown 0.6s ease-out;
}

.intro {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 1.05rem !important;
    line-height: 1.6 !important;
    margin: 0 0 2.5rem 0 !important;
    /* Left aligned, less bottom margin */
    text-align: left !important;
    max-width: 800px;
    animation: fadeIn 0.8s ease-out;
}

/* --- Back Button with Premium Style --- */
.back-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.7rem 1.4rem !important;
    border-radius: 14px !important;
    font-size: 0.95rem !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 2rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    transform: translateX(-5px) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.back-btn svg {
    transition: transform 0.3s ease;
}

.back-btn:hover svg {
    transform: translateX(-3px);
}

/* --- Listing Cards Grid --- */
.listing-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* --- Individual Listing Cards --- */
.listing-card,
.skeleton-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.6s ease-out backwards;
    will-change: transform;
}

.listing-card::before,
.skeleton-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.listing-card:hover::before,
.skeleton-card:hover::before {
    opacity: 1;
}

.listing-card:hover,
.skeleton-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Staggered animation delays */
.listing-card:nth-child(1),
.skeleton-card:nth-child(1) {
    animation-delay: 0.1s;
}

.listing-card:nth-child(2),
.skeleton-card:nth-child(2) {
    animation-delay: 0.15s;
}

.listing-card:nth-child(3),
.skeleton-card:nth-child(3) {
    animation-delay: 0.2s;
}

.listing-card:nth-child(4),
.skeleton-card:nth-child(4) {
    animation-delay: 0.25s;
}

.listing-card:nth-child(5),
.skeleton-card:nth-child(5) {
    animation-delay: 0.3s;
}

.listing-card:nth-child(6),
.skeleton-card:nth-child(6) {
    animation-delay: 0.35s;
}

/* --- Skeleton Loading Effects --- */
.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(255, 255, 255, 0.12) 50%,
            rgba(255, 255, 255, 0.04) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite ease-in-out;
    border-radius: 12px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card__img {
    height: 220px;
    width: 100%;
}

.skeleton-card__body {
    padding: 1.5rem;
}

.skeleton-card__title {
    height: 24px;
    width: 70%;
    margin-bottom: 1rem;
}

.skeleton-card__meta {
    height: 16px;
    width: 50%;
    margin-bottom: 0.8rem;
}

.skeleton-card__desc {
    height: 14px;
    width: 90%;
    margin-bottom: 0.5rem;
}

.skeleton-card__price {
    height: 20px;
    width: 40%;
    margin: 1rem 0;
}

.skeleton-card__actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.skeleton-card__btn {
    height: 40px;
    flex: 1;
    border-radius: 10px;
}

/* --- Loading & Empty States --- */
.loading,
.empty-state,
.error-state {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 4rem 2rem !important;
    margin: 3rem auto;
    text-align: center;
    max-width: 600px;
}

.loading {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 1.1rem;
}

.loading::before {
    content: '⏳';
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 1.5s infinite;
}

.empty-state {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 1.05rem;
}

.empty-state::before {
    content: '🔍';
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.error-state {
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.error-state::before {
    content: '⚠️';
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .listing-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .content {
        padding: 1.5rem 1rem 3rem !important;
    }

    .content>h1 {
        font-size: 2.2rem !important;
    }

    .intro {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }

    .listing-card-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .back-btn {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 400px) {
    .content>h1 {
        font-size: 1.8rem !important;
    }
}

/* --- Merchant Profile Refinement --- */
.merchant-info {
    margin: 0 0 1.5rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    animation: fadeIn 0.4s ease-out;
}

.merchant-profile-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.merchant-avatar-container {
    width: 40px;
    /* Reduced from 48px */
    height: 40px;
    border-radius: 50%;
    background: #222;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.merchant-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.merchant-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* --- Layout & Structure --- */
.listing-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    margin-top: 0.5rem;
    align-items: start;
}

.listing-main {
    min-width: 0;
}

.listing-sidebar {
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 6rem;
}

.section-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
    /* Reduced from 2.5rem */
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 1.4rem;
    background: #3b82f6;
    border-radius: 4px;
}

/* --- Balanced Square Carousel Gallery --- */
.gallery-hero {
    width: 100%;
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-hero-item {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.gallery-hero-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigation Arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    opacity: 0;
}

.gallery-hero:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 15px;
}

.gallery-nav.next {
    right: 15px;
}

/* Indicators */
.gallery-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.gallery-dot.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}

/* --- Premium Booking Card --- */
.booking-card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 2rem;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(30px) saturate(150%);
    position: relative;
    overflow: hidden;
}

.booking-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* --- Slots grid --- */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.slot-picker-btn {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 1.25rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-align: left !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.slot-picker-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.slot-picker-btn.selected {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border-color: #60a5fa !important;
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4);
}

.slot-time {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.slot-price {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* --- Like Button Modern --- */
.like-button-modern {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    padding: 6px 12px !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.like-button-modern:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.like-button-modern.liked {
    color: #ec4899 !important;
    border-color: rgba(236, 72, 153, 0.3) !important;
    background: rgba(236, 72, 153, 0.1) !important;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1100px) {
    .listing-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .listing-sidebar {
        order: -1;
    }
}

@media (max-width: 900px) {
    .listing-hero-wrapper {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    #galleryHero {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 600px) {
    .content>h1 {
        font-size: 2.22rem !important;
    }

    .listing-hero-wrapper {
        gap: 1rem !important;
    }
}