/* Import global styles */
@import url('../css/global.css');

/* Page-specific overrides and additions */
body {
    font-weight: 600;
    background: white;
    color: #374151;
}

.navbar {
    margin: 0 !important;
    padding: 0 !important;
}

.navbar-container {
    margin: 0 auto !important;
}


@media (max-width: 768px) {
    .items-grid {
        gap: 12px;
        padding: 0 6px;
    }
    
    .pagination-controls {
        gap: 6px;
    }
    
    .pagination-controls button {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    #pageInfo {
        font-size: 11px;
        min-width: 35px;
    }
    
    .item-card {
        width: 65px;
    }
    
    .item-image-container {
        height: 55px;
    }
    
    .item-title {
        font-size: 12px;
    }
    
    .item-price {
        font-size: 13px;
    }
    
    .item-image-container:not(.png-image) .item-image {
        border-radius: 15px;
    }
    
    .chat-modal-content {
        width: 95%;
        height: 80vh;
    }
    
    .upload-modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* Hero Banner */
.hero-banner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    margin-top: 0;
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

.hero-image {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
    border-radius: 23px;
    display: block;
    transition: transform 0.8s ease-in-out;
}

/* Main Sections */
.main-sections {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 20px;
}

.sections-layout {
    display: flex;
    gap: 20px;
    height: 300px;
}

.left-section, .right-section {
    flex: 1;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 23px;
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.section-header h3 {
    font-size: 18px;
    color: #111827;
    margin: 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 0;
    row-gap: 0;
    height: calc(100% - 50px);
    overflow: visible;
    margin-top: 10px;
}

.category-item {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    height: 90px;
    width: 100%;
    transition: background-color 0.2s;
    box-shadow: #e4e4e4 0px 1px 3px;
}

.category-item:hover {
    background: #f1f3f4;
}

.category-item img {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
}

.tabs-container {
    display: flex;
    gap: 10px;
}

.tab {
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    transition: all 0.2s;
}

.tab.active {
    background: #000;
    color: white;
}

.see-more-btn {
    background: none;
    border: none;
    color: #9b9b9b;
    font-size: 16px;
    cursor: pointer;
}

.search-bar {
    margin-bottom: 15px;
}

.search-bar input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.category-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: calc(100% - 50px);
    position: relative;
}

.filters-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 100px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    width: 16px;
    height: 16px;
}

.filter-option label {
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}

.price-range {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (max-width: 768px) {
    .price-range {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
}

.price-input {
    width: 60px;
    padding: 4px 6px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
}

.apply-filters-btn {
    background: #0a0a0a;
    color: rgb(236, 236, 236);
    border: none;
    padding: 10px 10px;
    border-radius: 14px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.apply-filters-btn:hover {
    background: #2b2b2b;
}

/* Bottom Sections */
.bottom-sections {
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 0 20px;
}

.bottom-layout {
    display: flex;
    gap: 20px;
}

.left-bottom, .right-bottom {
    flex: 1;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 17px;
    padding: 20px;
}

.content-title {
    font-size: 18px;
    color: #111827;
    margin-bottom: 20px;
    font-weight: 600;
}

.history-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    display: flex;
    background: #f9fafb;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    background: #f3f4f6;
}

.history-item-content {
    flex: 1;
    padding-right: 15px;
}

.history-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}

.history-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.history-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.top-offers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.offer-item {
    background: #f9fafb;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.offer-item:hover {
    background: #f3f4f6;
}

.offer-item-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.offer-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offer-price {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-top: 5px;
}

.discount-code-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 14px;
    text-align: center;
}

.discount-code-section h4 {
    font-size: 16px;
    color: #111827;
    margin-bottom: 8px;
}

.discount-code {
    font-family: monospace;
    background: #000;
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .discount-code-section {
        margin-top: 15px;
        padding: 12px;
    }
    
    .discount-code-section h4 {
        font-size: 14px;
    }
    
    .discount-code {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .content-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-content-section {
        padding: 0 10px;
    }
    
    .history-item {
        padding: 12px;
    }
    
    .history-item-image {
        display: none;
    }
    
    .top-offers-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Brands Section */
.brands-section {
    max-width: 1200px;
    margin: 30px auto 40px;
    padding: 0 20px;
}

.brands-search {
    margin-bottom: 20px;
    position: relative;
    max-width: 400px;
}

.brands-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #9ca3af;
    pointer-events: none;
}

.brands-search-input {
    width: 100%;
    height: 35px;
    padding: 10px 16px 10px 44px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s;
}

.brands-search-input:focus {
    border-color: #000;
}

.brands-search-input::placeholder {
    color: #9ca3af;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.brand-card {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 17px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.2s;
}

.brand-card:hover {
    border-color: #e5e7eb;
}

.brand-card-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f9fafb;
}

.brand-info {
    flex: 1;
    min-width: 0;
}

.brand-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-description {
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brand-card-footer {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.brand-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-stat svg {
    flex-shrink: 0;
}

.brand-stat .stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.brand-stat .stat-label {
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
}

@media (max-width: 768px) {
    .brands-section {
        padding: 0 10px;
    }
    
    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .brand-card {
        padding: 16px;
    }
    
    .brand-logo-container {
        width: 60px;
        height: 60px;
    }
}



@media (max-width: 768px) {
    .sections-layout {
        flex-direction: column;
        height: auto;
    }
    
    .bottom-layout {
        flex-direction: column;
    }
    
    .main-sections, .bottom-sections {
        padding: 0 10px;
    }
    
    .tabs-container {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab {
        font-size: 12px;
        padding: 6px 12px;
    }
}



/* Search Results Styles - Only apply to non-navbar search sections */
.search-results-container .search-section {
    margin-bottom: 40px;
}

.search-results-container .search-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
    padding-left: 4px;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.user-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-image-container {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

.user-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.review-user-btn {
    background: #000;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.review-user-btn:hover {
    background: #333;
}

@media (max-width: 480px) {
    .users-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }
    
    .user-card {
        padding: 16px;
    }
}

