/* ================================================
   OverageMart Vendor Directory
   ================================================ */

.om-vendor-directory {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Header */
.om-vd-header {
    text-align: center;
    margin-bottom: 32px;
}

.om-vd-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.om-vd-subtitle {
    font-size: 1.05rem;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

/* Search */
.om-vendor-directory .om-vd-search-wrap {
    margin-bottom: 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.om-vendor-directory .om-vd-search-box {
    position: relative !important;
    display: flex;
    align-items: center;
}

.om-vendor-directory .om-vd-search-icon {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #a0aec0;
    pointer-events: none;
    z-index: 2;
    width: 18px !important;
    height: 18px !important;
}

.om-vendor-directory .om-vd-search-input {
    width: 100% !important;
    padding: 12px 16px 12px 48px !important;
    font-size: 1rem;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #2d3748;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.om-vendor-directory .om-vd-search-input:focus {
    border-color: #3182ce !important;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15) !important;
}

.om-vendor-directory .om-vd-search-input::placeholder {
    color: #a0aec0;
    padding-left: 0;
}

/* Card Grid */
.om-vd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Card */
.om-vd-card {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.om-vd-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.om-vd-card:focus {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
}

/* Card Banner */
.om-vd-card-banner {
    height: 80px;
    background-size: cover;
    background-position: center;
    background-color: #edf2f7;
}

.om-vd-card-banner--default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Card Header */
.om-vd-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    margin-top: -30px;
}

/* Avatar */
.om-vd-avatar-wrap {
    flex-shrink: 0;
}

.om-vd-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    object-fit: cover;
    background: #fff;
}

.om-vd-avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #38b2ac 0%, #3182ce 100%);
}

/* Card Info */
.om-vd-card-info {
    min-width: 0;
    padding-top: 20px;
}

.om-vd-card-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 4px 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.om-vd-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: #718096;
    margin: 0;
    line-height: 1.4;
}

.om-vd-card-location svg {
    flex-shrink: 0;
    color: #a0aec0;
}

/* Hidden cards (pre-reveal) */
.om-vd-card--hidden {
    display: none !important;
}

/* Fade-in animation for revealed cards */
.om-vd-card--reveal {
    animation: omVdFadeIn 0.35s ease-out both;
}

@keyframes omVdFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty & No Results */
.om-vd-empty,
.om-vd-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
    font-size: 1.05rem;
    grid-column: 1 / -1;
}

/* Loading indicator */
.om-vd-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 20px;
    color: #718096;
    font-size: 0.9rem;
}

.om-vd-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #3182ce;
    border-radius: 50%;
    animation: omVdSpin 0.7s linear infinite;
}

@keyframes omVdSpin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .om-vendor-directory {
        padding: 24px 16px;
    }

    .om-vd-title {
        font-size: 1.5rem;
    }

    .om-vd-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .om-vd-pagination {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .om-vd-card-header {
        padding: 12px 16px;
    }

    .om-vd-avatar {
        width: 48px;
        height: 48px;
    }

    .om-vd-avatar--initials {
        font-size: 0.95rem;
    }
}
