/* GenSell Marketplace - Custom Styles
 * 
 * Custom CSS for GenSell Marketplace
 * 
 * @package GenSell
 * @version 1.0.0
 */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header Styles */
.header {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar-brand h3 {
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #0d6efd !important;
    margin: 0;
    font-size: 1.5rem;
}

.nav-link {
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #0d6efd;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navbar always expanded */
.navbar-expand .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
    flex-grow: 1;
    align-items: center;
    justify-content: flex-end !important;
}

.navbar-expand .navbar-nav {
    flex-direction: row !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.navbar-expand .navbar-nav .nav-item {
    margin-left: 0.5rem;
}

.navbar-expand .navbar-nav .nav-item:first-child {
    margin-left: 0;
}


/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    height: 200px;
}

#heroCarousel {
    height: 100%;
}

#heroCarousel .carousel-inner {
    height: 100%;
}

#heroCarousel .carousel-item {
    height: 200px;
}

#heroCarousel .carousel-slide-bg {
    height: 200px;
    width: 100%;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

#heroCarousel .carousel-item img,
#heroCarousel .carousel-item .carousel-slide-bg {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

/* Carousel Indicators - Bootstrap Style */
.carousel-indicators {
    bottom: 10px;
    margin-bottom: 0;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    border: none;
    margin: 0 4px;
    opacity: 1;
}

.carousel-indicators button.active {
    background-color: #fff;
    opacity: 1;
}

.carousel-indicators button:hover {
    opacity: 0.8;
}
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    height: 200px;
}

#heroCarousel {
    height: 100%;
}

#heroCarousel .carousel-inner {
    height: 100%;
}

#heroCarousel .carousel-item {
    height: 200px;
}

#heroCarousel .carousel-slide-bg {
    height: 200px;
    width: 100%;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

#heroCarousel .carousel-item img,
#heroCarousel .carousel-item .carousel-slide-bg {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

#heroCarousel .carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 8px;
    bottom: 50px;
}

/* Search Section */
.search-section {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.search-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: -100px;
    position: relative;
    z-index: 10;
}

/* Main Content */
.main-content {
    background: #f8f9fa;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #0d6efd;
    display: inline-block;
}

/* Listing Cards */
.listing-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.listing-image-container {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.listing-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.listing-card:hover .listing-image {
    transform: scale(1.05);
}

.listing-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.listing-title a {
    color: inherit;
    text-decoration: none;
}

.listing-title a:hover {
    color: #0d6efd;
}

.listing-category {
    margin-bottom: 0.5rem;
}

.listing-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.listing-price {
    color: #dc3545;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.listing-location {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

/* Sponsored Ads */
.sponsored-ad {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.sponsored-ad:hover {
    background: #e9ecef;
    border-color: #0d6efd;
}

.ad-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
}

.ad-description {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

/* Sidebar */
.sidebar .card {
    border: none;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.sidebar .card-header {
    background: #0d6efd;
    color: white;
    font-weight: 600;
    border-radius: 12px 12px 0 0;
    padding: 0.75rem 1rem;
}

.sidebar .card-body {
    padding: 1rem;
}

.sidebar .list-group-item {
    border: none;
    padding: 0.5rem 0;
}

.sidebar .list-group-item a {
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar .list-group-item a:hover {
    color: #0d6efd;
    padding-left: 0.5rem;
}

/* How It Works Section */
.how-it-works {
    background: #f8f9fa;
    padding: 4rem 0;
}

.icon-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
}

.icon-circle:hover {
    background: #0d6efd;
    transform: scale(1.1);
}

.icon-circle i {
    font-size: 3rem;
}

.icon-circle:hover i {
    color: white;
}

/* Why Choose Us Section */
.why-choose-us {
    padding: 4rem 0;
}

/* Footer */
.footer {
    background: #212529;
    color: white;
    padding: 4rem 0 2rem;
}

.footer h4,
.footer h5 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer .text-muted {
    color: #adb5bd !important;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: white;
}

.social-links a {
    font-size: 1.25rem;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #0d6efd;
    transform: translateY(-3px);
}

.newsletter {
    padding-top: 2rem;
    margin-top: 2rem;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background: #0b5ed7;
    border-color: #0b5ed7;
}

.btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
}

.btn-outline-primary:hover {
    background: #0d6efd;
    border-color: #0d6efd;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Badges */
.badge {
    font-weight: 500;
    border-radius: 6px;
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ffc107;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.sponsored-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #0d6efd;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Navbar responsive adjustments */
    .navbar-expand .navbar-nav .nav-item {
        margin-left: 0.25rem;
    }

    .navbar-expand .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .navbar-brand h3 {
        font-size: 1.25rem;
    }

    /* Hero Section - Responsive */
    .hero-section {
        height: 180px;
    }
    
    #heroCarousel .carousel-slide-bg {
        background-size: contain !important;
    }

    #heroCarousel .carousel-item {
        height: 180px;
    }

    #heroCarousel .carousel-caption {
        bottom: 5px;
        padding: 5px;
    }

    #heroCarousel .carousel-caption h5 {
        font-size: 0.9rem;
        margin-bottom: 0;
    }

    #heroCarousel .carousel-caption p {
        font-size: 0.7rem;
        margin-bottom: 0;
        display: none;
    }

    .search-box {
        margin-top: -50px;
        padding: 1rem;
    }

    .listing-image-container {
        height: 150px;
    }

    .icon-circle {
        width: 80px;
        height: 80px;
    }

    .icon-circle i {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand h3 {
        font-size: 1.25rem;
    }

    /* Navbar very small screen adjustments */
    .navbar-expand .navbar-nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .navbar-expand .navbar-nav .nav-item {
        margin: 0.25rem;
    }

    .search-section {
        padding: 2rem 0;
    }

    .how-it-works,
    .why-choose-us {
        padding: 2rem 0;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Handling */
.error-message {
    background: #f8d7da;
    color: #842029;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #f5c2c7;
}

.success-message {
    background: #d1e7dd;
    color: #0f5132;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #badbcc;
}

/* Pagination */
.pagination {
    justify-content: center;
}

.pagination .page-item .page-link {
    color: #6c757d;
    border-color: #dee2e6;
    border-radius: 8px;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background: #0d6efd;
    border-color: #0d6efd;
}

.pagination .page-item .page-link:hover {
    color: #0d6efd;
    border-color: #0d6efd;
    background: #e9ecef;
}

/* Cards */
.card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-header {
    border-radius: 12px 12px 0 0;
}

.card-footer {
    border-radius: 0 0 12px 12px;
    background: #f8f9fa;
}

/* Categories dropdown left alignment */
.dropdown-menu {
    text-align: left !important;
    left: 0 !important;
    right: auto !important;
}

.dropdown-item {
    text-align: left !important;
    justify-content: flex-start !important;
}
