/* Custom Styles for Hemensat - Bootstrap 5 Edition */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --warning-color: #ffc107;
    --success-color: #198754;
    --danger-color: #dc3545;
    --font-family: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: #f8f9fa;
}

/* Custom Navbar Styles */
.navbar-brand {
    font-size: 1.5rem;
}

/* Image Placeholder */
.image-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

/* Card Hover Effect */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* List Group Item Hover */
.list-group-item-action:hover {
    background-color: #e9ecef;
}

.list-group-item-action.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Custom styles for search button */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #212529;
}

/* Footer links */
footer a {
    transition: color 0.2s;
}

footer a:hover {
    color: white !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .d-flex.justify-content-between > div {
        margin-top: 1rem;
    }
}

/* Custom utility classes */
.text-decoration-none:hover {
    text-decoration: underline !important;
}

/* Category icons */
.list-group-item i {
    color: var(--primary-color);
}

/* Pagination active state */
.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Price styling */
.text-primary {
    color: var(--primary-color) !important;
}

/* Gallery thumbnails */
.row .col-3 .image-placeholder {
    cursor: pointer;
    transition: opacity 0.2s;
}

.row .col-3 .image-placeholder:hover {
    opacity: 0.8;
}

/* Tab content */
.tab-content {
    padding: 1rem 0;
}

/* Seller info card */
.card-body i {
    margin-right: 0.5rem;
}

/* Additional custom styles for better UI */
.navbar {
    padding: 0.75rem 0;
}

.sticky-top {
    z-index: 1020;
}

/* Listing items improvements */
.list-group-item {
    transition: background-color 0.2s;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* Mobile improvements */
@media (max-width: 576px) {
    .row .align-items-center {
        text-align: center;
    }
    
    .col-md-3.text-md-end {
        text-align: center !important;
        margin-top: 0.5rem;
    }
}
    display: block;
}

.vitrine-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.image-placeholder {
    width: 100%;
    height: 120px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

.vitrine-info {
    padding: 10px;
}

.vitrine-info .title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vitrine-info .price {
    font-size: 14px;
    font-weight: bold;
    color: var(--accent-color);
}

/* Category Page Styles */
.breadcrumb {
    font-size: 12px;
    color: #666;
}

.breadcrumb a {
    color: #333;
}

.filters {
    padding: 15px;
}

.filters h3 {
    font-size: 16px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 14px;
}

.filter-group ul li a {
    font-size: 13px;
    color: #555;
    padding: 2px 0;
    display: block;
}

.price-inputs {
    display: flex;
    gap: 5px;
}

.price-inputs input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
}

.filter-group select {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.btn-filter {
    width: 100%;
    padding: 8px;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.listings-area {
    flex: 1;
}

.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.listings-header h2 {
    font-size: 20px;
}

.listings-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.listing-item {
    display: flex;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    gap: 15px;
    transition: box-shadow 0.2s;
}

.listing-item:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.listing-img {
    width: 120px;
    height: 90px;
    flex-shrink: 0;
}

.listing-img .image-placeholder {
    height: 100%;
}

.listing-details {
    flex: 1;
}

.listing-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 5px;
    display: block;
}

.listing-location {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.listing-date {
    font-size: 12px;
    color: #999;
}

.listing-price {
    font-weight: bold;
    color: var(--text-color);
    font-size: 18px;
}

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.pagination a {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 3px;
}

.pagination a.active {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* Detail Page Styles */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.detail-header h1 {
    font-size: 24px;
    color: var(--text-color);
}

.detail-actions a {
    font-size: 13px;
    color: #666;
    margin-left: 15px;
}

.detail-layout {
    display: flex;
    gap: 30px;
}

.detail-main {
    flex: 1;
}

.gallery {
    border: 1px solid #ddd;
    padding: 10px;
    background: #fff;
}

.main-image {
    width: 100%;
    height: 400px;
    margin-bottom: 10px;
}

.main-image .image-placeholder {
    height: 100%;
    background-color: #f0f0f0;
}

.thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.thumb {
    width: 80px;
    height: 60px;
    border: 2px solid transparent;
    cursor: pointer;
}

.thumb.active {
    border-color: var(--accent-color);
}

.thumb .image-placeholder {
    height: 100%;
}

.description-area {
    background: #fff;
    border: 1px solid #ddd;
}

.tabs {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    display: flex;
}

.tab {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    border-right: 1px solid #ddd;
}

.tab.active {
    background: #fff;
    color: var(--text-color);
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
}

.tab-content {
    padding: 20px;
    line-height: 1.6;
}

.detail-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.price-box {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.info-box {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li strong {
    color: #666;
}

.seller-box {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
}

.seller-box h3 {
    font-size: 16px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.seller-info {
    font-size: 14px;
}

.seller-name {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}

.listing-location {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.listing-date {
    font-size: 12px;
    color: #999;
}

.listing-price {
    font-weight: bold;
    color: var(--text-color);
    font-size: 18px;
}

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.pagination a {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 3px;
}

.pagination a.active {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* Detail Page Styles */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.detail-header h1 {
    font-size: 24px;
    color: var(--text-color);
}

.detail-actions a {
    font-size: 13px;
    color: #666;
    margin-left: 15px;
}

.detail-layout {
    display: flex;
    gap: 30px;
}

.detail-main {
    flex: 1;
}

.gallery {
    border: 1px solid #ddd;
    padding: 10px;
    background: #fff;
}

.main-image {
    width: 100%;
    height: 400px;
    margin-bottom: 10px;
}

.main-image .image-placeholder {
    height: 100%;
    background-color: #f0f0f0;
}

.thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.thumb {
    width: 80px;
    height: 60px;
    border: 2px solid transparent;
    cursor: pointer;
}

.thumb.active {
    border-color: var(--accent-color);
}

.thumb .image-placeholder {
    height: 100%;
}

.description-area {
    background: #fff;
    border: 1px solid #ddd;
}

.tabs {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    display: flex;
}

.tab {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    border-right: 1px solid #ddd;
}

.tab.active {
    background: #fff;
    color: var(--text-color);
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
}

.tab-content {
    padding: 20px;
    line-height: 1.6;
}

.detail-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.price-box {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.info-box {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li strong {
    color: #666;
}

.seller-box {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
}

.seller-box h3 {
    font-size: 16px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.seller-info {
    font-size: 14px;
}

.seller-name {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}

.seller-phone {
    margin-bottom: 5px;
    color: #666;
}

.btn-message {
    display: block;
    background-color: var(--accent-color);
    color: #fff;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    font-weight: bold;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    /* Header */
    .header-inner {
        flex-direction: column;
        gap: 10px;
    }

    .search-bar {
        width: 100%;
        margin: 10px 0;
    }

    .user-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .user-actions a {
        margin-left: 0;
        font-size: 13px;
    }

    /* Homepage */
    .homepage-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }

    .category-list {
        display: flex;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .category-list li a {
        white-space: nowrap;
        border-bottom: none;
        border-right: 1px solid #f0f0f0;
    }

    .vitrine-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on mobile */
        gap: 10px;
    }

    /* Category Page */
    .listings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .listing-item {
        flex-direction: column;
    }

    .listing-img {
        width: 100%;
        height: 200px;
    }

    .listing-details {
        width: 100%;
    }

    .listing-price {
        font-size: 16px;
        margin-top: 5px;
    }

    /* Detail Page */
    .detail-layout {
        flex-direction: column;
    }

    .detail-sidebar {
        width: 100%;
    }

    .main-image {
        height: 250px;
    }

    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .detail-actions {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }

    .detail-actions a {
        margin-left: 0;
        margin-right: 15px;
    }
}

/* Lightbox Carousel Controls */
#lightboxModal .carousel-control-prev,
#lightboxModal .carousel-control-next {
    width: 5%;
    opacity: 1;
    z-index: 1050;
}

#lightboxModal .carousel-control-prev-icon,
#lightboxModal .carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    padding: 0.75rem;
}

#lightboxModal .carousel-control-prev:hover .carousel-control-prev-icon,
#lightboxModal .carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.9);
}
