:root {
    --primary-orange: rgb(239, 133, 33);
    --secondary-blue: #0d233e;
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #edf2f9;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
}

/* Navbar */
.navbar-bazaland {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 800;
}

.navbar-logo {
    max-height: 50px;
    width: auto;
    transition: transform 0.2s;
}

.navbar-logo:hover {
    transform: scale(1.02);
}

.nav-link {
    font-weight: 400;
    color: var(--text-dark) !important;
    padding: 4px 8px !important;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-orange) !important;
}

.btn-cta {
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn-cta:hover {
    transform: translateY(-2px);
}

.btn-add-listing {
    background-color: #dc3545;
    color: white;
}

.btn-login {
    background-color: #28a745;
    color: white;
}

.btn-register {
    background-color: #007bff;
    color: white;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 600px;
    height: 80vh;
    overflow: hidden;
    color: white;
}

.hero-carousel,
.carousel-inner,
.carousel-item {
    height: 100%;
}

.hero-carousel .carousel-item {
    background-size: cover;
    background-position: center;
}

.hero-video-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 10;
    /* Increased to be above carousel controls */
    text-align: center;
}

.carousel-control-prev,
.carousel-control-next {
    z-index: 11;
    /* Keep controls slightly higher but we will limit their clickable area */
    width: 5%;
    /* Narrower clickable area */
}

.search-box {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-top: 40px;
    position: relative;
    z-index: 12;
    /* Ensure search box is on top */
}

.search-box .form-control,
.search-box .form-select {
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #ddd;
}

.btn-search {
    background-color: var(--primary-orange);
    color: white;
    width: 100%;
    padding: 12px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
}

.btn-admin {
    background-color: var(--primary-orange);
    color: white;
    padding: 8px 20px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    display: inline-block;
    transition: all 0.2s;
}

.btn-admin:hover {
    background-color: #d1701a;
    color: white;
    transform: translateY(-1px);
}

.admin-top-navbar {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 30px;
    background: white;
    height: 70px;
    border-bottom: 1px solid #edf2f7;
}

.admin-page-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-weight: 700;
    color: #2d3748;
}

/* Sections */
.section-title {
    text-align: center;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-padding {
    padding: 80px 0;
}

/* Cards */
.listing-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
}

.listing-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.card-img-wrapper {
    position: relative;
    height: 200px;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #dc3545;
    color: white;
}

.card-overlay-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.85rem;
}

.card-body {
    padding: 20px;
}

.card-title {
    color: var(--primary-orange);
    font-size: 1.15rem;
    margin-bottom: 10px;
}

/* Floating Actions */
.floating-actions {
    position: fixed;
    right: 20px;
    bottom: 50%;
    transform: translateY(50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1050;
}

.float-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}

.float-btn:hover {
    transform: scale(1.1);
    color: white;
}

/* Footer */
footer {
    background-color: var(--secondary-blue);
    color: #e0e0e0;
    padding: 60px 0 20px;
}

footer h5 {
    color: white;
    margin-bottom: 25px;
}

footer a {
    color: #abb9e8;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
    padding-top: 20px;
}


/* Admin Panel Styles */
:root {
    --admin-sidebar-width: 260px;
    --admin-sidebar-bg: #1a1d21;
    --admin-sidebar-hover: #2c3136;
    --admin-header-height: 70px;
}

.admin-body {
    background-color: #f4f7f6;
}

#admin-sidebar {
    width: var(--admin-sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    background: var(--admin-sidebar-bg);
    color: #fff;
    z-index: 1000;
    transition: all 0.3s;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

#admin-sidebar::-webkit-scrollbar {
    width: 5px;
}

#admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

#admin-sidebar .sidebar-header {
    height: var(--admin-header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: var(--primary-orange);
    font-weight: 800;
    font-size: 1.25rem;
}

#admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 15px 25px;
    display: flex;
    align-items: center;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    font-size: 0.95rem;
}

#admin-sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

#admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #fff;
}

#admin-sidebar .nav-item p.opacity-50 {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
}

#admin-sidebar .nav-link i {
    width: 25px;
    margin-right: 10px;
}

#admin-main {
    margin-left: var(--admin-sidebar-width);
    min-height: 100vh;
}

.admin-top-navbar {
    height: var(--admin-header-height);
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 30px;
    border-bottom: 1px solid #edf2f9;
    position: sticky;
    top: 0;
    z-index: 999;
}

.admin-content-p {
    padding: 30px;
}

.object-fit-cover {
    object-fit: cover;
}

/* Saved Listings Sticky Button */
#sticky-saved-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background-color: var(--primary-orange);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(239, 133, 33, 0.4);
    cursor: pointer;
    z-index: 1060;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#sticky-saved-btn:hover {
    transform: scale(1.1);
    background-color: #e44d1d;
}

#sticky-saved-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border: 2px solid white;
}

/* Saved Listings Modal Styles */
.saved-item {
    padding: 15px;
    border-bottom: 1px solid #edf2f9;
    transition: background 0.2s;
}

.saved-item:hover {
    background: #f8f9fa;
}

.saved-item:last-child {
    border-bottom: none;
}

.saved-item-img {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
}

.btn-remove-saved {
    color: #dc3545;
    background: none;
    border: none;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-remove-saved:hover {
    opacity: 1;
}

.modal-saved-list {
    max-height: 400px;
    overflow-y: auto;
}

.language-switch-mobile {
    display: none;
}

/* Responsive Fixes */
@media (max-width: 991.98px) {
    .hero-section {
        height: auto !important;
        min-height: 700px;
        overflow: visible;
        padding-top: 120px;
        padding-bottom: 60px;
        display: flex;
        align-items: center;
        background-color: var(--secondary-blue);
        position: relative;
    }

    .hero-carousel {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    .hero-carousel .carousel-inner,
    .hero-carousel .carousel-item {
        height: 100% !important;
    }

    .hero-content {
        position: relative !important;
        top: 0;
        left: 0;
        transform: none !important;
        padding: 0 15px;
        z-index: 10;
        width: 100%;
    }

    .hero-content h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .hero-content p.lead {
        font-size: 1.1rem;
        margin-bottom: 2rem !important;
    }

    .search-box {
        padding: 20px;
        margin: 20px auto 0;
        text-align: left;
        max-width: 100%;
    }

    .search-box .form-label {
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        padding-top: 100px;
        min-height: 600px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .search-box {
        padding: 15px;
    }

    .language-switch {
        display: none;
    }

    .language-switch-mobile {
        display: block;
    }
}