/* Custom Carousel Styles for Consistent Sizing and Responsive Behavior */

/* Base carousel card styling */
.carousel-card {
    min-height: 350px;
    max-height: 350px;
    transition: transform 0.2s ease-in-out;
}

.carousel-card .card-img-top {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.carousel-card .card-body {
    height: 150px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.carousel-card .card-title {
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.carousel-card .card-text {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Force single row display for all carousels with minimum 3 stalls */
.stall-carousel .carousel-inner {
    overflow: visible;
}

.stall-carousel .carousel-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 15px;
    margin: 0 !important;
    padding-bottom: 20px; /* Add padding to prevent bottom cutoff */
}

/* Override Bootstrap col behavior - always show minimum 3 stalls */
.stall-carousel .carousel-row .col {
    flex: 0 0 auto !important;
    width: calc(20% - 12px) !important;
    min-width: 180px !important;
    max-width: none !important;
    padding: 0 !important;
}

/* For smaller screens, maintain minimum 3 stalls visible */
@media (max-width: 1200px) {
    .stall-carousel .carousel-row .col {
        width: calc(25% - 11.25px) !important;
        min-width: 200px !important;
    }
}

@media (max-width: 992px) {
    .stall-carousel .carousel-row .col {
        width: calc(33.333% - 10px) !important;
        min-width: 220px !important;
    }
}

/* For mobile screens, ensure cards fit properly without cutoff */
@media (max-width: 768px) {
    .stall-carousel .carousel-row {
        gap: 10px;
        padding-bottom: 30px; /* More padding for mobile */
    }
    
    .stall-carousel .carousel-row .col {
        width: calc(33.333% - 7px) !important;
        min-width: 160px !important;
    }
    
    /* Keep original card height but adjust content */
    .carousel-card {
        min-height: 320px !important;
        max-height: 320px !important;
    }
    
    .carousel-card .card-img-top {
        height: 160px;
    }
    
    .carousel-card .card-body {
        height: 160px;
        padding: 0.75rem;
    }
    
    .carousel-card .card-title {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .carousel-card .card-text {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    .carousel-card .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 576px) {
    .stall-carousel .carousel-row {
        gap: 8px;
        padding-bottom: 40px; /* Extra padding for very small screens */
    }
    
    .stall-carousel .carousel-row .col {
        width: calc(33.333% - 5px) !important;
        min-width: 140px !important;
    }
    
    /* Maintain adequate card size for very small screens */
    .carousel-card {
        min-height: 300px !important;
        max-height: 300px !important;
    }
    
    .carousel-card .card-img-top {
        height: 140px;
    }
    
    .carousel-card .card-body {
        height: 160px;
        padding: 0.6rem;
    }
    
    .carousel-card .card-title {
        font-size: 0.85rem;
        line-height: 1.1;
    }
    
    .carousel-card .card-text {
        font-size: 0.75rem;
    }
    
    .carousel-card .btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Ensure carousel container doesn't cut off content */
.stall-carousel {
    overflow: visible !important;
    margin-bottom: 20px;
}

.carousel-item {
    overflow: visible !important;
}

/* Carousel navigation buttons */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    padding: 20px;
    width: 40px;
    height: 40px;
}

/* Card image placeholder */
.card-img-placeholder {
    height: 200px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #dee2e6;
}

/* Sponsor label styling */
.sponsor-label {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}


/* User Profile Styles */
.navbar .dropdown-toggle {
    text-decoration: none;
}

.navbar .dropdown-toggle:after {
    margin-left: 0.5rem;
}

/* Rating Styles */
.rating-stars {
    color: #ffc107;
}

.rating-input {
    display: none;
}

.rating-label {
    cursor: pointer;
    font-size: 2rem;
    color: #ddd;
    transition: color 0.2s;
    margin-right: 0.25rem;
}

.rating-label:hover,
.rating-label.active {
    color: #ffc107;
}

/* Gallery Styles */
.gallery-img {
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-img:hover {
    transform: scale(1.05);
}

/* Menu Item Styles */
.menu-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: box-shadow 0.2s;
}

.menu-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Review Card Styles */
.review-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
}

.profile-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rating-label {
        font-size: 1.5rem;
    }
    
    .gallery-img {
        height: 150px;
    }
    
    .menu-item {
        padding: 10px;
    }
}


/* Add CSS variables at the top of the file */
:root {
    --primary-color: #ff6b35;
    --secondary-color: #f7931e;
    --accent-color: #ff8c42;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Modern Navbar Styling with Better UX */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    padding: 0.75rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navbar on scroll effect */
.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-hover);
}

.navbar-brand {
    color: white !important;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-1px);
}

/* Navigation Links */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    margin: 0 0.25rem;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

/* Dropdown Styling */
.navbar .dropdown-toggle {
    border: none;
    background: none;
}

.navbar .dropdown-toggle:after {
    display: none;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-hover);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    background: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    color: var(--text-dark);
    font-weight: 500;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateX(5px);
}

/* User Profile in Navbar */
.navbar .user-profile {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.navbar .user-profile:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.navbar .user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin-right: 0.5rem;
}

/* Language Selector */
.language-selector {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    transition: var(--transition);
}

.language-selector:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-radius: var(--border-radius);
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: var(--shadow);
    }
    
    .navbar-nav .nav-link {
        color: var(--text-dark) !important;
        margin: 0.25rem 0;
    }
    
    .navbar-nav .nav-link:hover {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white !important;
    }
}

/* Loading Animation for Better UX */
.navbar-loading {
    position: relative;
    overflow: hidden;
}

.navbar-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}