/* Global Layout for Sticky Footer */
html {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Main content should take available space */
body>.container-fluid,
body>nav+.category-bar+.banner-carousel+.container-fluid,
body>nav+.category-bar+.container-fluid {
    flex: 1 0 auto;
}

/* Footer stays at bottom */
.footer-compact {
    flex-shrink: 0;
    margin-top: auto;
    background-color: #212529;
    color: #fff;
    padding: 20px 0;
}

/* Banner Carousel Styles */
.banner-carousel {
    background: #f8f9fa;
    padding: 20px 0;
    border-bottom: 1px solid #dee2e6;
}

.banner-container {
    position: relative;
    overflow: hidden;
}

.banner-scroll-auto {
    display: flex;
    gap: 16px;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-bottom: 8px;
}

.banner-item {
    flex: 0 0 calc((100% - 48px) / 4);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    text-decoration: none;
}

.banner-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.banner-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

@media(max-width: 1200px) {
    .banner-item {
        flex: 0 0 calc((100% - 32px) / 3);
    }
}

@media(max-width: 768px) {
    .banner-item {
        flex: 0 0 calc((100% - 16px) / 2);
    }
}

@media(max-width: 480px) {
    .banner-item {
        flex: 0 0 100%;
    }
}

/* Category Bar */
.category-bar {
    border-bottom: 1px solid #dee2e6;
}

.category-scroll {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 12px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
}

.category-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.category-item.active {
    background: #fff;
    border-color: #dc3545;
    color: #dc3545;
}

.category-icon {
    font-size: 1.5rem;
}

.category-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.category-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #dc3545;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Store Cards */
.store-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    height: 100%;
}

.store-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.store-image {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #f8f9fa;
    position: relative;
}

.store-closed-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.store-body {
    padding: 12px;
}

.store-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.store-name {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-categories {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.category-badge-sm {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #6c757d;
}

.store-rating {
    font-size: 0.875rem;
}

.store-info {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: #6c757d;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Footer */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s;
}

.social-icon:hover {
    background: #dc3545;
    color: #fff;
    transform: translateY(-2px);
}

.footer-copyright {
    text-align: center;
    padding-top: 15px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .category-item {
        padding: 6px 12px;
    }

    .category-icon {
        font-size: 1.2rem;
    }

    .category-name {
        font-size: 0.75rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}