
/* ==========================================
   VENDORS PAGE — Modern Colorful Design
========================================== */

.vendors-page {
    --vendor-primary: #6554c0;
    --vendor-primary-dark: #4937a5;
    --vendor-teal: #0f9f9a;
    --vendor-orange: #f59e0b;
    --vendor-pink: #e94e91;
    --vendor-text: #29263d;
    --vendor-muted: #858198;
    --vendor-border: #ebe8f5;

    width: 100%;
    max-width: 1450px;
    margin: 0 auto;
    padding: 28px 20px 45px;
    box-sizing: border-box;
    direction: rtl;
    color: var(--vendor-text);
}

.vendors-page *,
.vendors-page *::before,
.vendors-page *::after {
    box-sizing: border-box;
}


/* ==========================================
   HEADER
========================================== */

.vendors-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 25px 28px;
    margin-bottom: 30px;
    overflow: hidden;

    border-radius: 22px;
    background: linear-gradient(
        120deg,
        #5141a7 0%,
        #7562d5 52%,
        #a58af1 100%
    );

    color: #fff;
    box-shadow: 0 10px 28px rgba(91, 71, 180, .18);
}

.vendors-header::after {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    left: -65px;
    top: -110px;

    border: 35px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    pointer-events: none;
}

.vendors-header-content {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.vendors-header-icon {
    width: 62px;
    height: 62px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 18px;
    background: rgba(255, 255, 255, .16);

    font-size: 28px;
}

.vendors-header-text h1 {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(20px, 2.3vw, 28px);
    font-weight: 900;
    line-height: 1.6;
}

.vendors-header-text p {
    margin: 0;
    color: rgba(255, 255, 255, .85);
    font-size: 12px;
    line-height: 1.9;
}

.vendor-count {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    flex-shrink: 0;
    padding: 12px 16px;

    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 13px;
    background: rgba(255, 255, 255, .16);

    color: #fff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.vendor-count i {
    font-size: 17px;
}

.vendor-count span:first-of-type {
    color: #fff3a8;
    font-size: 16px;
}


/* ==========================================
   SECTION HEADING
========================================== */

.vendors-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.vendors-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.vendors-title-icon {
    width: 43px;
    height: 43px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;
    background: #eeeaff;
    color: var(--vendor-primary);
    font-size: 18px;
}

.vendors-section-title h2 {
    margin: 0 0 5px;
    color: var(--vendor-text);
    font-size: 18px;
    font-weight: 900;
}

.vendors-section-title p {
    margin: 0;
    color: var(--vendor-muted);
    font-size: 11px;
    line-height: 1.8;
}

.vendors-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 9px 12px;
    border-radius: 10px;

    background: #e4f8f3;
    color: #138575;

    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}


/* ==========================================
   SEARCH AND FILTER
========================================== */

.vendors-page .vendors-filter {
    display: flex;
    flex-direction: column;
    gap: 20px;

    margin-bottom: 24px;
    padding: 22px;

    border: 1px solid #e8e3ff;
    border-radius: 20px;

    background:
        radial-gradient(
            circle at 100% 0,
            rgba(121, 101, 213, .08),
            transparent 35%
        ),
        linear-gradient(135deg, #fff, #faf9ff);

    box-shadow: 0 7px 25px rgba(70, 50, 130, .055);
}

.vendors-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.vendors-filter-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.vendors-filter-title-icon {
    width: 43px;
    height: 43px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;
    background: linear-gradient(135deg, #eeeaff, #e2f8f5);
    color: var(--vendor-primary);
    font-size: 18px;
}

.vendors-filter-title h3 {
    margin: 0 0 5px;
    color: #30284b;
    font-size: 15px;
    font-weight: 900;
}

.vendors-filter-title p {
    margin: 0;
    color: var(--vendor-muted);
    font-size: 11px;
    line-height: 1.8;
}

.vendors-page .vendors-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 10px 12px;
    border: 1px solid #f1d9e6;
    border-radius: 10px;

    background: #fff7fb;
    color: #c04483;

    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;

    transition: background .2s, border-color .2s, transform .2s;
}

.vendors-page .vendors-reset:hover {
    background: #ffedf5;
    border-color: #edb9d2;
    transform: translateY(-1px);
}

.vendors-filter-fields {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    align-items: end;
    gap: 14px;
}

.vendors-search,
.vendors-sort {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.vendors-search label,
.vendors-sort label {
    color: #51496e;
    font-size: 12px;
    font-weight: 800;
}

.vendors-input-wrap,
.vendors-select-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
}

.vendors-input-wrap > i,
.vendors-select-wrap > i {
    position: absolute;
    top: 50%;
    right: 14px;
    z-index: 1;

    color: #7965d5;
    font-size: 16px;

    transform: translateY(-50%);
    pointer-events: none;
}

.vendors-page .vendors-search input,
.vendors-page .vendors-sort select {
    display: block;
    width: 100%;
    height: 47px;
    margin: 0;

    border: 1px solid #e1dcf3;
    border-radius: 12px;
    outline: none;

    background: #fff;
    color: #30284b;

    font-family: inherit;
    font-size: 12px;

    transition: border-color .2s, box-shadow .2s, background .2s;
}

.vendors-page .vendors-search input {
    padding: 0 43px 0 13px;
}

.vendors-page .vendors-search input::placeholder {
    color: #aaa5bb;
    opacity: 1;
}

.vendors-page .vendors-sort select {
    padding: 0 42px 0 32px;
    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;
}

.vendors-page .vendors-search input:focus,
.vendors-page .vendors-sort select:focus {
    border-color: #7965d5;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(121, 101, 213, .11);
}

.vendors-page .vendors-filter-submit {
    min-height: 47px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 20px;
    border: 0;
    border-radius: 12px;

    background: linear-gradient(135deg, #7965d5, #5743b0);
    color: #fff;

    font-family: inherit;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;

    cursor: pointer;
    box-shadow: 0 5px 12px rgba(91, 69, 178, .17);

    transition: transform .2s, box-shadow .2s, filter .2s;
}

.vendors-page .vendors-filter-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 17px rgba(91, 69, 178, .24);
    filter: brightness(1.04);
}

.vendors-page .vendors-filter-submit:active {
    transform: translateY(0);
}

.vendors-filter-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;

    padding-top: 14px;
    border-top: 1px solid #eeebf7;

    color: #756b91;
    font-size: 11px;
}

.vendors-filter-bottom > span {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.vendors-filter-bottom i {
    color: #7965d5;
}

.vendors-filter-bottom strong {
    color: var(--vendor-primary);
    font-size: 14px;
    font-weight: 900;
}

.vendors-page .vendors-active-filter {
    padding: 6px 10px;
    border: 1px solid #d9f0eb;
    border-radius: 8px;

    background: #edfaf7;
    color: #168477;

    overflow-wrap: anywhere;
}


/* ==========================================
   MAIN BOX
========================================== */

.vendors-box {
    width: 100%;
    padding: 22px;

    border: 1px solid var(--vendor-border);
    border-radius: 21px;

    background: #fff;
    box-shadow: 0 5px 22px rgba(47, 36, 102, .045);
}


/* ==========================================
   GRID
========================================== */

.vendors-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}


/* ==========================================
   VENDOR CARD
========================================== */

.vendors-page .vendor-card {
    position: relative;
    display: flex;
    flex-direction: column;

    min-width: 0;
    overflow: hidden;

    border: 1px solid #ece9f6;
    border-radius: 17px;

    background: #fff;
    color: inherit;
    text-decoration: none;

    box-shadow: 0 4px 14px rgba(41, 31, 94, .045);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.vendors-page .vendor-card:hover {
    transform: translateY(-5px);
    border-color: #cfc5fb;
    box-shadow: 0 13px 28px rgba(74, 56, 153, .13);
}

.vendors-page .vendor-card:focus-visible {
    outline: 3px solid rgba(101, 84, 192, .4);
    outline-offset: 3px;
}


/* ==========================================
   IMAGE
========================================== */

.vendor-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
    background: linear-gradient(145deg, #f4f1ff, #edf9f8);
}

.vendor-image img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 8px;

    object-fit: cover;

    transition: transform .4s ease;
}

.vendor-card:hover .vendor-image img {
    transform: scale(1.06);
}


/* ==========================================
   NO IMAGE
========================================== */

.vendor-no-image {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(circle at 30% 25%, #e2dcff, transparent 45%),
        linear-gradient(135deg, #f3efff, #e5f8f5);

    color: #8775d4;
}

.vendor-no-image i {
    font-size: clamp(40px, 5vw, 65px);
    transition: transform .3s ease;
}

.vendor-card:hover .vendor-no-image i {
    transform: scale(1.1) rotate(-4deg);
}


/* ==========================================
   IMAGE BADGES
========================================== */

.vendor-badge {
    position: absolute;
    top: 10px;
    right: 10px;

    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 8px;

    background: rgba(255, 255, 255, .92);
    color: var(--vendor-primary-dark);

    font-size: 10px;
    font-weight: 900;

    backdrop-filter: blur(6px);
}

.vendor-badge i {
    color: var(--vendor-teal);
}

.vendor-image-arrow {
    position: absolute;
    left: 10px;
    bottom: 10px;

    width: 31px;
    height: 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;
    background: rgba(255, 255, 255, .94);
    color: var(--vendor-primary);

    opacity: 0;
    transform: translate(-5px, 5px);

    transition: opacity .25s, transform .25s;
}

.vendor-card:hover .vendor-image-arrow {
    opacity: 1;
    transform: translate(0, 0);
}


/* ==========================================
   CARD INFO
========================================== */

.vendor-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px;
}

.vendor-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;

    margin-bottom: 11px;
}

.vendor-title-row h3 {
    min-width: 0;
    margin: 0;
    overflow: hidden;

    color: #302b49;
    font-size: 14px;
    font-weight: 900;

    white-space: nowrap;
    text-overflow: ellipsis;

    transition: color .2s;
}

.vendor-card:hover .vendor-title-row h3 {
    color: var(--vendor-primary);
}


/* ==========================================
   CARD ARROW
========================================== */

.vendor-arrow {
    width: 29px;
    height: 29px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;
    background: #eeeaff;
    color: var(--vendor-primary);

    transition: background .25s, color .25s, transform .25s;
}

.vendor-arrow i {
    font-size: 12px;
}

.vendor-card:hover .vendor-arrow {
    background: var(--vendor-primary);
    color: #fff;
    transform: translateX(-3px);
}


/* ==========================================
   CARD META
========================================== */

.vendor-meta {
    display: flex;
    align-items: center;
    gap: 7px;

    min-width: 0;
    margin-bottom: 13px;

    color: var(--vendor-muted);
    font-size: 10px;
}

.vendor-meta-icon {
    width: 25px;
    height: 25px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    background: #e5f8f4;
    color: #0e9686;
}

.vendor-meta > span:last-child {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* ==========================================
   CARD FOOTER
========================================== */

.vendor-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    margin-top: auto;
    padding-top: 11px;

    border-top: 1px solid #f0eef7;

    color: var(--vendor-primary);
    font-size: 10px;
    font-weight: 900;
}

.vendor-card-footer i {
    transition: transform .2s;
}

.vendor-card:hover .vendor-card-footer i {
    transform: translateX(-4px);
}


/* ==========================================
   EMPTY STATE
========================================== */

.empty-vendors {
    grid-column: 1 / -1;

    min-height: 280px;
    padding: 35px 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border: 1px dashed #d8d0f2;
    border-radius: 17px;
    background: #fbfaff;

    text-align: center;
}

.empty-vendors-icon {
    width: 72px;
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 16px;
    border-radius: 23px;

    background: #eeeaff;
    color: var(--vendor-primary);
    font-size: 30px;
}

.empty-vendors h3 {
    margin: 0 0 9px;
    color: var(--vendor-text);
    font-size: 17px;
    font-weight: 900;
}

.empty-vendors p {
    max-width: 420px;
    margin: 0;

    color: var(--vendor-muted);
    font-size: 12px;
    line-height: 2;
}

.vendors-page .vendors-empty-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 18px;
    padding: 10px 16px;

    border-radius: 10px;
    background: #6554c0;
    color: #fff;

    font-size: 11px;
    font-weight: 800;
    text-decoration: none;

    transition: background .2s, transform .2s;
}

.vendors-page .vendors-empty-reset:hover {
    background: #4937a5;
    transform: translateY(-2px);
}


/* ==========================================
   TABLET
========================================== */

@media (max-width: 1100px) {
    .vendors-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .vendors-box {
        padding: 18px;
    }

    .vendors-filter-fields {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .vendors-page .vendors-filter-submit {
        grid-column: 1 / -1;
        width: 100%;
    }
}


/* ==========================================
   SMALL TABLET
========================================== */

@media (max-width: 760px) {
    .vendors-page {
        padding: 20px 12px 32px;
    }

    .vendors-header {
        padding: 19px;
        border-radius: 17px;
    }

    .vendors-header-icon {
        width: 49px;
        height: 49px;
        border-radius: 14px;
        font-size: 23px;
    }

    .vendors-header-text h1 {
        font-size: 21px;
    }

    .vendors-header-text p {
        font-size: 11px;
    }

    .vendors-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

    .vendors-box {
        padding: 13px;
        border-radius: 16px;
    }

    .vendor-info {
        padding: 11px;
    }

    .vendor-title-row h3 {
        font-size: 12px;
    }

    .vendor-arrow {
        width: 26px;
        height: 26px;
    }

    .vendor-meta {
        font-size: 9px;
    }

    .vendor-card-footer {
        font-size: 9px;
    }

    .vendors-page .vendors-filter {
        padding: 17px;
    }
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 480px) {
    .vendors-header {
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .vendors-header-content {
        gap: 10px;
    }

    .vendors-header-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 19px;
    }

    .vendors-header-text h1 {
        font-size: 17px;
        margin-bottom: 5px;
    }

    .vendors-header-text p {
        font-size: 10px;
    }

    .vendor-count {
        gap: 5px;
        padding: 8px;
        font-size: 10px;
    }

    .vendor-count i {
        font-size: 13px;
    }

    .vendor-count span:first-of-type {
        font-size: 13px;
    }

    .vendors-section-heading {
        align-items: center;
        gap: 8px;
    }

    .vendors-title-icon {
        width: 35px;
        height: 35px;
        border-radius: 10px;
        font-size: 15px;
    }

    .vendors-section-title h2 {
        font-size: 14px;
    }

    .vendors-section-title p {
        font-size: 9px;
    }

    .vendors-section-badge {
        gap: 4px;
        padding: 7px;
        font-size: 9px;
    }

    .vendors-filter-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .vendors-page .vendors-reset {
        align-self: flex-start;
    }

    .vendors-filter-fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .vendors-page .vendors-filter-submit {
        grid-column: auto;
        width: 100%;
    }

    .vendors-filter-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .vendors-box {
        padding: 9px;
    }

    .vendors-grid {
        gap: 10px;
    }

    .vendor-image {
        aspect-ratio: 1 / 1;
    }

    .vendor-badge {
        top: 6px;
        right: 6px;
        gap: 4px;
        padding: 5px 6px;
        font-size: 9px;
    }

    .vendor-image-arrow {
        width: 25px;
        height: 25px;
        left: 6px;
        bottom: 6px;
        opacity: 1;
        transform: none;
    }

    .vendor-info {
        padding: 9px;
    }

    .vendor-title-row {
        gap: 5px;
        margin-bottom: 9px;
    }

    .vendor-title-row h3 {
        font-size: 11px;
    }

    .vendor-arrow {
        width: 23px;
        height: 23px;
        border-radius: 7px;
    }

    .vendor-meta {
        gap: 5px;
        margin-bottom: 10px;
        font-size: 9px;
    }

    .vendor-meta-icon {
        width: 22px;
        height: 22px;
        border-radius: 7px;
    }

    .vendor-card-footer {
        padding-top: 9px;
        font-size: 9px;
    }
}


/* ==========================================
   VERY SMALL MOBILE
========================================== */

@media (max-width: 350px) {
    .vendors-header {
        flex-direction: column;
    }

    .vendor-count {
        align-self: flex-start;
    }

    .vendors-section-badge {
        display: none;
    }

    .vendors-grid {
        gap: 8px;
    }

    .vendor-info {
        padding: 7px;
    }

    .vendor-title-row h3 {
        font-size: 10px;
    }

    .vendors-filter-title h3 {
        font-size: 13px;
    }

    .vendors-filter-title p {
        font-size: 10px;
    }
}


/* ==========================================
   REDUCED MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {
    .vendors-page *,
    .vendors-page *::before,
    .vendors-page *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
