/* Merchants page styles optimized for clean design */

/* Top bar section */
.merchants-top-bar {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgb(0 0 0 / 5%);
    border: 1px solid #7e7e7e3d;
}

@media (max-width: 767.98px) {
    .merchants-top-bar {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

/* Merchant count styling */
.merchant-count {
    font-weight: 600;
    color: var(--bs-primary);
}

/* Sort selector styling */
#sortSelect {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    font-size: 0.875rem;
}

#sortSelect:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Active filters styling */
.active-filters {
    margin-bottom: 1.5rem;
}

.active-filters .badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.active-filters .badge:hover {
    transform: translateY(-1px);
}

.active-filters .btn-outline-secondary {
    border-radius: 0.375rem;
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
}

.active-filters .btn-outline-secondary:hover {
    transform: translateY(-1px);
}

/* Merchant card enhancements - Clean Design */
.merchant-card {
    height: 100%;
    border: 1px solid rgb(0 0 0 / 6%) !important;
    border-radius: 1rem;
    overflow: hidden;
    background: #f9f9f9;
}

.merchant-card:hover {
    border-color: rgba(37, 99, 235, 0.3);
}

.merchant-card .card-body {
    padding: 1rem;
    background: white;
}

@media (max-width: 575.98px) {
    .merchant-card .card-body {
        padding: 0.75rem;
    }
}

/* Merchant logo container - Clean Design */
.merchant-logo-container {
    border-radius: 1rem 1rem 0 0;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.merchant-logo-container img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: 0.5rem;
    position: relative;
    z-index: 1;
}

.placeholder-logo {
    width: 100%;
    height: 120px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #6c757d;
    position: relative;
    z-index: 1;
}

/* Merchant title container - Modern Typography */
.merchant-title-container {
    position: relative;
    margin-bottom: 0.75rem;
}

.merchant-title-link {
    font-size: 0.875rem;
    line-height: 1.4;
    font-weight: 600;
    color: #1a202c;
    text-decoration: none;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.merchant-title-link:hover {
    color: #3182ce;
    text-decoration: none;
}

/* Merchant description */
.merchant-description {
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Merchant stats */
.merchant-stats {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.merchant-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
}

/* Merchant actions - Clean Design */
.merchant-actions {
    padding: 0;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.merchant-actions .btn-link {
    background: linear-gradient(135deg, #05294c 0%, #0a4a7a 100%);
    border: 2px solid #05294c;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(5, 41, 76, 0.2);
}

.merchant-actions .btn-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.merchant-actions .btn-products {
    background: transparent;
    border: 2px solid #FF6600;
    color: #05294c;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* View controls */
.view-toggle .btn {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #6c757d;
    transition: all 0.2s ease;
}

.view-toggle .btn.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

.view-toggle .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 575.98px) {
    .merchant-logo-container {
        padding: 0.5rem;
    }

    .merchant-logo-container img {
        height: 100px;
    }

    .placeholder-logo {
        height: 100px;
    }

    .merchant-title-link {
        font-size: 0.8rem;
        font-weight: 700;
    }

    .merchant-description {
        font-size: 0.8rem;
    }

    .merchant-stats {
        font-size: 0.75rem;
    }

    .merchant-actions .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
}

/* List view styles */
.merchants-container.list-view .merchant-item {
    margin-bottom: 1rem;
}

.merchants-container.list-view .merchant-card {
    flex-direction: row;
    padding: 1rem;
}

.merchants-container.list-view .merchant-logo-container {
    width: 120px;
    height: 80px;
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.merchants-container.list-view .merchant-content {
    flex: 1;
    padding: 0;
}

.merchants-container.list-view .merchant-main-content {
    margin-bottom: 1rem;
}

.merchants-container.list-view .merchant-footer {
    margin-top: auto;
}

.merchants-container.list-view .merchant-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

.merchants-container.list-view .merchant-actions .btn {
    flex: 1;
}

/* Loading states */
.spinner-overlay {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
}

/* No merchants message */
.alert.alert-info {
    border-radius: 1rem;
    border: 1px solid rgb(0 0 0 / 6%);
    background: #f9f9f9;
}

.alert.alert-info i {
    color: #6c757d;
}
}

.active-filters .clear-filters {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.active-filters .clear-filters:hover {
    color: #495057;
    background: #e9ecef;
    text-decoration: none;
}

/* View Toggle */
.view-toggle .btn {
    border-radius: 6px !important;
    padding: 0.375rem 0.5rem;
}

.view-toggle .btn.active {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* Sort Select */
#sortSelect {
    border-radius: 6px;
    border: 1px solid #ced4da;
    font-size: 0.875rem;
}

#sortSelect:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Merchant Count */
.merchant-count {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

/* Pagination */
.pagination .page-link {
    border-radius: 6px !important;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: #007bff;
}

.pagination .page-link:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* Empty State */
.merchants-container .alert {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.merchants-container .alert i {
    opacity: 0.6;
}

.merchants-container .alert h4 {
    color: #6c757d;
    font-weight: 600;
}

.merchants-container .alert p {
    color: #868e96;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.merchant-item {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.merchant-item:nth-child(1) { animation-delay: 0.1s; }
.merchant-item:nth-child(2) { animation-delay: 0.2s; }
.merchant-item:nth-child(3) { animation-delay: 0.3s; }
.merchant-item:nth-child(4) { animation-delay: 0.4s; }
.merchant-item:nth-child(5) { animation-delay: 0.5s; }
.merchant-item:nth-child(6) { animation-delay: 0.6s; }
.merchant-item:nth-child(7) { animation-delay: 0.7s; }
.merchant-item:nth-child(8) { animation-delay: 0.8s; }

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
    



    .merchant-logo-container {
        
        border-color: #4a5568;
    }

    .merchant-name a {
        color: #e2e8f0;
    }

    .merchant-name a:hover {
        color: #63b3ed;
    }

    .merchant-description {
        color: #a0aec0;
    }

    .merchant-stats {
        color: #718096;
    }

    .merchant-card .card-footer {
        background: #2d3748;
    }
}