﻿/* Mağazalar — elan kartları ilə eyni məntiq */

html:has(.shops-page),
body:has(.shops-page) {
    overflow-x: clip !important;
}

.verified-mark {
    --verified-blue: #34b7f1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--verified-blue);
    line-height: 1;
    vertical-align: middle;
    flex-shrink: 0;
}

.verified-mark svg {
    display: block;
    width: 1em;
    height: 1em;
}

.verified-mark--sm { font-size: 14px; }
.verified-mark--md { font-size: 20px; }
.verified-mark--lg { font-size: 24px; }

.shops-page {
    --shops-ink: #0f172a;
    --shops-muted: #64748b;
    --shops-line: #e5e7eb;
    --shops-accent: #ea580c;
    background: #f5f6f8;
    padding: 16px 0 48px;
    min-height: 50vh;
}

.shops-page__wrap {
    max-width: var(--container-max, 1140px);
}

.shops-page__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    margin-bottom: 12px;
}

.shops-page__title {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.55rem);
    font-weight: 850;
    letter-spacing: -0.03em;
    color: var(--shops-ink);
    line-height: 1.15;
}

.shops-page__count {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--shops-muted);
}

.shops-page__count strong {
    color: var(--shops-ink);
    font-weight: 800;
}

/* Filtr zolağı — səliqəli, kəsilməyən yazılar */
.shops-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) auto auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 10px;
    border: 1px solid var(--shops-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.shops-bar__panel {
    display: contents;
}

.shops-bar__group {
    display: contents;
}

.shops-bar__caption {
    display: none;
}

.shops-filter-toggle {
    display: none;
}

.shops-bar__filters,
.shops-bar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.shops-bar__search,
.shops-bar__field {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    border: 1px solid var(--shops-line);
    border-radius: 11px;
    background: #f8fafc;
}

.shops-bar__search:focus-within,
.shops-bar__field:focus-within {
    border-color: rgba(234, 88, 12, 0.45);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.shops-bar__search {
    min-width: 0;
    padding: 0 14px 0 40px;
}

.shops-bar__search > i,
.shops-bar__field > i {
    position: absolute;
    left: 13px;
    width: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}

.shops-bar__search input,
.shops-bar__field select {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-weight: 650;
    color: var(--shops-ink);
    min-height: 42px;
    cursor: pointer;
}

.shops-bar__search input {
    cursor: text;
}

.shops-bar__field {
    flex: 0 0 auto;
    padding: 0 32px 0 36px;
}

.shops-bar__field--city {
    min-width: 148px;
}

.shops-bar__field--sort {
    min-width: 168px;
}

.shops-bar__field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8.5L1.5 4h9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    padding-right: 4px;
    white-space: nowrap;
    text-overflow: clip;
    overflow: visible;
}

.shops-bar__field .searchable-select {
    position: static;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

.shops-bar__field .searchable-select__trigger {
    width: 100%;
    min-height: 42px;
    padding: 0 10px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
    font-weight: 650;
    color: var(--shops-ink);
}

.shops-bar__field .searchable-select__trigger::after {
    right: 0;
}

.shops-bar__field .searchable-select__trigger .searchable-select__option-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.shops-bar__field:has(.searchable-select__trigger[aria-expanded="true"]) {
    z-index: 40;
}

.shops-bar__field .searchable-select__dropdown {
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    width: max-content;
    min-width: max(100%, 220px);
    max-width: min(320px, calc(100vw - 24px));
    z-index: 50;
}

.shops-bar__field .searchable-select__dropdown .searchable-select__option-label {
    overflow: visible;
    text-overflow: unset;
}

.shops-bar__check {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--shops-line);
    border-radius: 11px;
    background: #fff;
    font-size: 13px;
    font-weight: 750;
    color: #334155;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.shops-bar__check > i {
    color: #94a3b8;
    font-size: 0.9rem;
}

.shops-bar__check:has(input:checked) {
    border-color: rgba(52, 183, 241, 0.55);
    background: #f0f9ff;
    color: #0369a1;
}

.shops-bar__check:has(input:checked) > i {
    color: #0ea5e9;
}

.shops-bar__check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.shops-bar__check-ui {
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
    display: grid;
    place-items: center;
}

.shops-bar__check:has(input:checked) .shops-bar__check-ui {
    background: #34b7f1;
    border-color: #34b7f1;
}

.shops-bar__check:has(input:checked) .shops-bar__check-ui::after {
    content: "";
    width: 8px;
    height: 4px;
    border: 2px solid #fff;
    border-top: 0;
    border-right: 0;
    transform: rotate(-45deg) translate(0, -1px);
}

.shops-bar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 11px;
    background: var(--shops-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    white-space: nowrap;
}

.shops-bar__btn:hover {
    background: #c2410c;
}

.shops-bar__btn i {
    font-size: 0.8rem;
}

.shops-bar__reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--shops-line);
    border-radius: 11px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    color: var(--shops-muted);
    text-decoration: none;
    white-space: nowrap;
}

.shops-bar__reset:hover {
    color: var(--shops-accent);
    border-color: rgba(234, 88, 12, 0.35);
    background: #fff7ed;
}

/* Grid — product-grid kimi */
.shops-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

/* Kart — product-card məntiqi */
.shop-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.shop-card--verified {
    border-color: rgba(52, 183, 241, 0.28);
}

.shop-card__media {
    position: relative;
    height: 168px;
    background: #e5e7eb;
    flex-shrink: 0;
}

.shop-card__media-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.shop-card__tools {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.shop-card__tools .share-btn {
    position: relative;
    display: inline-flex;
}

.shop-card__tools .share-btn__menu {
    left: auto;
    right: 0;
}

.shop-card__tools .shop-card__follow,
.shop-card__tools .share-btn__toggle,
.shop-card__tools .share-btn__toggle--compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.42);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.shop-card__tools .shop-card__follow i,
.shop-card__tools .share-btn__toggle i {
    font-size: 11px;
    line-height: 1;
}

.shop-card__tools .shop-card__follow:hover,
.shop-card__tools .share-btn__toggle:hover,
.shop-card__tools .share-btn.is-open .share-btn__toggle {
    background: rgba(255, 255, 255, 0.95);
    color: #c2410c;
    border-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.shop-card__follow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.42);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.shop-card__follow.is-active {
    background: rgba(234, 88, 12, 0.92);
    border-color: transparent;
    color: #fff;
}

.shop-card__follow.is-active:hover {
    background: #ea580c;
    color: #fff;
}

.shop-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shop-card__img--empty {
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #1e293b, #334155);
    font-size: 1.6rem;
}

.shop-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #0369a1;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.shop-card__count-pill {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 11px;
    font-weight: 750;
    backdrop-filter: blur(4px);
}

.shop-card__info {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.shop-card__meta {
    margin: 0;
    font-size: 11.5px;
    font-weight: 650;
    color: var(--shops-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.3;
}

.shop-card__meta i {
    color: #f59e0b;
    font-size: 0.65rem;
}

.shop-card__name {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 850;
    color: var(--shops-ink);
    line-height: 1.25;
    letter-spacing: -0.03em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-card__name a {
    color: inherit;
    text-decoration: none;
}

.shop-card:hover .shop-card__name a {
    color: var(--shops-accent);
}

.shop-card__thumbs {
    display: flex;
    gap: 5px;
    margin-top: 2px;
}

.shop-card__thumb {
    width: 44px;
    height: 34px;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e8edf3;
}

.shop-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shop-card__cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.shop-card:hover .shop-card__cta {
    background: var(--shops-accent);
    color: #fff;
}

/* Paylaş */
.share-btn {
    position: relative;
}

.share-btn__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.share-btn__toggle--compact {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
}

.share-btn__toggle:hover,
.share-btn.is-open .share-btn__toggle {
    background: #fff;
    color: #ea580c;
}

.share-btn__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;
    min-width: 168px;
    padding: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    display: none;
    gap: 2px;
}

.share-btn.is-open .share-btn__menu,
.share-btn__menu:not([hidden]) {
    display: grid;
}

.share-btn__menu[hidden] {
    display: none !important;
}

.share-btn__item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #0f172a;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
}

.share-btn__item:hover {
    background: #fff7ed;
    color: #c2410c;
}

.share-btn__item i {
    width: 16px;
    text-align: center;
}

.shops-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 16px;
    color: var(--shops-muted);
}

.shops-empty i {
    font-size: 2rem;
    color: #cbd5e1;
    margin-bottom: 10px;
}

.shops-empty a {
    display: inline-flex;
    margin-top: 10px;
    color: var(--shops-accent);
    font-weight: 750;
    text-decoration: none;
}

.shops-page__pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

@media (max-width: 1100px) {
    .shops-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1020px) {
    .shops-bar {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .shops-bar__filters,
    .shops-bar__actions {
        flex-wrap: wrap;
        width: 100%;
    }

    .shops-bar__field--city,
    .shops-bar__field--sort {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }

    .shops-bar__check {
        flex: 1 1 auto;
    }

    .shops-bar__btn {
        flex: 1 1 auto;
    }

    .shops-bar__reset span {
        display: none;
    }

    .shops-bar__reset {
        width: 44px;
        padding: 0;
    }
}

@media (max-width: 640px) {
    .shops-bar__filters {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .shops-bar__field--city,
    .shops-bar__field--sort,
    .shops-bar__check {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .shops-bar__field select {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 820px) {
    .shops-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .shops-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 44px;
        padding: 0 14px;
        border: 1px solid var(--shops-line);
        border-radius: 11px;
        background: #fff;
        color: var(--shops-ink);
        font-size: 14px;
        font-weight: 750;
        cursor: pointer;
    }

    .shops-filter-toggle__label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .shops-filter-toggle__badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 999px;
        background: var(--shops-accent);
        color: #fff;
        font-size: 11px;
        font-weight: 800;
    }

    .shops-filter-toggle__chev {
        color: #94a3b8;
        font-size: 0.75rem;
        transition: transform 0.18s ease;
    }

    .shops-bar.is-filter-open .shops-filter-toggle__chev {
        transform: rotate(180deg);
    }

    .shops-bar__panel {
        display: none;
    }

    .shops-bar.is-filter-open .shops-bar__panel {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding-top: 2px;
    }

    .shops-bar__group {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0;
    }

    .shops-bar__caption {
        display: block;
        padding-left: 2px;
        font-size: 12px;
        font-weight: 750;
        color: var(--shops-muted);
    }

    .shops-bar__filters {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .shops-bar__field--city,
    .shops-bar__field--sort,
    .shops-bar__check,
    .shops-bar__btn {
        width: 100%;
        max-width: 100%;
        flex: 1 1 auto;
    }

    .shops-bar__field .searchable-select__dropdown {
        z-index: 6000;
    }

    .shops-bar__field .searchable-select__list {
        max-height: min(260px, 46vh);
    }
}

@media (max-width: 520px) {
    .shops-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .shop-card__media {
        height: 132px;
    }

    .shop-card__info {
        padding: 10px;
    }

    .shop-card__name {
        font-size: 0.86rem;
    }

    .shop-card__thumbs {
        display: none;
    }
}
