/* 2. Merchant Card - PERFECTLY SIZED */
.all-merchant-card {
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    
    /* 🔥 CRITICAL FIX: Force card to fill the Bootstrap .col perfectly */
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
}

/* Dithering texture overlay (Unique to this page) */
.all-merchant-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

.all-merchant-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(10, 37, 64, 0.12);
    border-color: rgba(255, 107, 0, 0.3);
    z-index: 2;
}

.all-merchant-card-inner {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
    width: 100%; /* Ensures inner content also stretches */
}

/* Logo */
.all-merchant-logo-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.2) 0%, rgba(255, 107, 0, 0.05) 100%);
    margin-bottom: 1rem;
    transition: transform 0.4s ease;
    flex-shrink: 0; /* Prevents logo from squishing */
}

.all-merchant-card:hover .all-merchant-logo-box {
    transform: scale(1.1) rotate(-3deg);
    background: linear-gradient(135deg, var(--secondary-color) 0%, #ff8c42 100%);
}

.all-merchant-logo-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: #ffffff;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.all-merchant-logo-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.all-merchant-logo-inner i {
    font-size: 2rem;
    color: var(--secondary-color);
}

/* Info */
.all-merchant-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.all-merchant-card:hover .all-merchant-name {
    color: var(--secondary-color);
}

.all-merchant-category-badge {
    display: inline-block;
    background: rgba(10, 37, 64, 0.06);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
}

.all-merchant-city {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.all-merchant-city i {
    color: var(--secondary-color);
}

.all-merchant-synopsis {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1; /* Pushes the button to the bottom */
}

/* Action Button */
.all-merchant-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem;
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto; /* Ensures button always sticks to the bottom */
}

.all-merchant-view-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.all-merchant-view-btn i {
    transition: transform 0.3s ease;
}

.all-merchant-card:hover .all-merchant-view-btn i {
    transform: translateX(4px);
}

/* ... (Keep Pagination and Animations CSS exactly as they were) ... */

/* 4. Skeleton Loading (Perfectly Matched to Card Structure) */
.all-merchant-skeleton-card {
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.all-merchant-skeleton-bg {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: all-merchant-skeleton-loading 1.5s infinite;
}

@keyframes all-merchant-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}