:root {
    --primary-color: #d70f64;
    --secondary-color: #f8f9fa;
    --dark-color: #333;
    --light-color: #fff;
    --gray-color: #6c757d;
    --success-color: #28a745;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: var(--dark-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* Location Bar */
.location-bar {
    background: var(--primary-color);
    color: white;
    padding: 12px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.location-selector {
    position: relative;
    display: inline-block;
}

.location-selector i {
    color: var(--primary-color);
}

.location-selector select {
    padding: 0.5rem 2rem 0.5rem 2.5rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    color: #333;
    font-weight: 500;
}

.location-selector select option,
.location-selector select optgroup {
    background: white;
    color: #333;
    padding: 8px;
}

/* Dropdown arrow */
.location-selector::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
}

/* Active/Focus state */
.location-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Dropdown container */
.location-selector .select-wrapper {
    position: relative;
}

/* Dropdown styling */
.location-selector select option,
.location-selector select optgroup {
    max-height: 250px;
    /* 2.5 inches approximately */
    overflow-y: auto;
}

.location-selector .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.location-selector select:focus+.dropdown-menu {
    display: block;
}

.filter-controls select {
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 150px;
    color: #333;
}

.filter-controls select:focus {
    outline: none;
}

.filter-controls select option {
    background: white;
    color: #333;
    padding: 10px;
}

.filter-controls select optgroup {
    font-weight: 600;
    color: #333;
    background: #f8f9fa;
}

/* Dropdown styling */
select#city-selector,
select#location-filter {
    color: #333 !important;
    background-color: white;
    border-radius: 4px;
    padding: 8px 30px 8px 35px;
    border: 1px solid #ddd;
    font-weight: 500;
}

select#city-selector option,
select#location-filter option {
    color: #333;
    padding: 8px;
    background: white;
}

select#city-selector optgroup,
select#location-filter optgroup {
    color: #666;
    font-weight: bold;
    padding: 8px;
    background: #f5f5f5;
}

#city-selector {
    background: transparent;
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    padding: 0.2rem 0;
}

.auth-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.auth-links a {
    color: white;
}

.language {
    cursor: pointer;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--light-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img {
    height: 80px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--dark-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

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

.nav-links a i {
    margin-right: 5px;
}

.cart-count {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
    margin-left: 5px;
    display: none;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Address Section */
.address-section {
    background: white;
    padding: 2rem 5%;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin: 2rem 5%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.address-section h3 {
    color: var(--dark-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.search-container {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto 1rem;
}

.location-input {
    position: relative;
    flex: 1;
}

.location-input i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.2rem;
}

#location {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: var(--dark-color);
}

#location:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(215, 15, 100, 0.1);
}

.search-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-button:hover {
    background: #b50a52;
    transform: translateY(-2px);
}

.locate-me-btn {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.locate-me-btn:hover {
    background: var(--primary-color);
    color: white;
}

.locate-me-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.promo-text {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(215, 15, 100, 0.1);
    border-radius: 20px;
    display: inline-block;
}

#map-container {
    margin-top: 2rem;
    display: none;
}

#map {
    height: 300px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #eee;
}

#location-details {
    margin-top: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: left;
}

.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.suggestion {
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    color: var(--dark-color);
}

.suggestion:hover {
    background: #f5f5f5;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 5rem 5%;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Recent Orders */
.recent-orders {
    padding: 4rem 5%;
    background: #f9f9f9;
}

.recent-orders h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.orders-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.order-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 2rem 5%;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--light-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li i {
    margin-right: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-color);
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
}

.btn-primary:hover {
    background-color: #b50a52;
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Tracking Notification */
.track-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {

    .location-selector select,
    .filter-controls select {
        min-width: 120px;
        font-size: 0.9rem;
    }

    .location-bar {
        padding: 8px 15px;
    }

    .navbar {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        margin-top: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 200px;
        margin-bottom: 0.5rem;
    }

    .search-container {
        flex-direction: column;
    }

    .search-button {
        width: 100%;
        padding: 1rem;
    }

    .address-section {
        margin: 1rem;
        padding: 1.5rem;
    }
}

.selected-location {
    background: white;
    padding: 5px 15px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
    color: #333;
}

.selected-location i {
    margin-right: 8px;
    color: #e21b70;
}

/* Dropdown container styles */
.location-selector .select-wrapper {
    position: relative;
}

/* Dropdown menu styles */
.location-selector select optgroup {
    max-height: 192px;
    /* 2 inches = ~192px */
    overflow-y: auto;
    background: white;
    color: #333;
    padding: 8px;
}

/* Style for all location dropdowns */
select#city-selector,
select#location-filter,
.location-selector select {
    color: #333 !important;
    background-color: white;
    border-radius: 4px;
    padding: 8px 30px 8px 35px;
    border: 1px solid #ddd;
    font-weight: 500;
    max-height: 96px;
    /* Exactly 2 inches */
    overflow-y: auto;
}

/* Dropdown list container */
select#city-selector optgroup,
select#location-filter optgroup,
.location-selector select optgroup {
    max-height: 96px;
    /* Exactly 2 inches */
    overflow-y: auto;
    color: #666;
    font-weight: bold;
    padding: 8px;
    background: #f5f5f5;
}

/* Custom scrollbar for better appearance */
select optgroup::-webkit-scrollbar {
    width: 8px;
}

select optgroup::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

select optgroup::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

select optgroup::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Ensure dropdown options are properly styled */
select#city-selector option,
select#location-filter option,
.location-selector select option {
    color: #333;
    padding: 8px;
    background: white;
}

/* Style for the filter controls dropdown */
.filter-controls select {
    max-height: 192px;
    /* 2 inches */
    overflow-y: auto;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    color: #333;
}

/* Dropdown list styles */
select#city-selector,
select#location-filter,
.location-selector select {
    color: #333 !important;
    background-color: white;
    border-radius: 4px;
    padding: 8px 30px 8px 35px;
    border: 1px solid #ddd;
    font-weight: 500;
}

/* Limit dropdown height */
select#city-selector~.select2-container .select2-results,
select#location-filter~.select2-container .select2-results,
.location-selector select~.select2-container .select2-results,
select#city-selector optgroup,
select#location-filter optgroup,
.location-selector select optgroup {
    max-height: 192px !important;
    /* Exactly 2 inches */
    overflow-y: auto;
}

/* Style the dropdown container */
.select2-container--default .select2-results>.select2-results__options,
.location-selector .dropdown-menu {
    max-height: 96px;
    /* Exactly 2 inches */
    overflow-y: auto;
}

/* Custom scrollbar for better appearance */
.select2-results__options::-webkit-scrollbar,
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.select2-results__options::-webkit-scrollbar-track,
.dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.select2-results__options::-webkit-scrollbar-thumb,
.dropdown-menu::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

/* Ensure dropdown options are properly styled */
select#city-selector option,
select#location-filter option,
.location-selector select option {
    padding: 8px;
    color: #333;
}

/* Style optgroups */
select#city-selector optgroup,
select#location-filter optgroup,
.location-selector select optgroup {
    color: #666;
    font-weight: bold;
    padding: 8px;
    background: #f5f5f5;
}

/* Override any browser default heights */
select[size],
select[multiple] {
    height: auto;
    max-height: 192px !important;
}

/* Services Section */
.services-section {
    padding: 4rem 5%;
    background: #fff;
}

.services-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.service-card p {
    color: var(--gray-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .services-container {
        grid-template-columns: 1fr;
    }
}

/* Profile link styles */
.profile-link a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-link i {
    font-size: 1.1rem;
}

.user-email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
}

.user-email:hover {
    color: rgba(255, 255, 255, 0.8);
}