/* ============================================================
   Маркетплейс amias.com — общая витрина над магазинами.
   Подключается только в layouts/marketplace.blade.php,
   стили магазинов (style.css, asiya.css) не затрагивает.
   ============================================================ */

:root {
    --mp-bg: #F8F3EC;
    --mp-bg-soft: #F2EAE0;
    --mp-surface: #FDFAF6;
    --mp-plum: #3A2036;
    --mp-plum-soft: #5C4159;
    --mp-rose: #C5A39B;
    --mp-rose-deep: #A9766F;
    --mp-gold: #B3905A;
    --mp-gold-soft: #DCCAAB;
    --mp-gold-text: #8A6934;
    --mp-line: #E8DDCF;
    --mp-text: #3A2A35;
    --mp-muted: #76656D;
    --mp-icon-bg: #F3E7E1;
    --mp-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --mp-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --mp-shadow: 0 30px 50px -28px rgba(58, 32, 54, .38);
}

/* ---------- База ---------- */

.mp,
.mp *,
.mp *::before,
.mp *::after {
    box-sizing: border-box;
}

body.mp {
    margin: 0;
    background: var(--mp-bg);
    color: var(--mp-text);
    font-family: var(--mp-sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* сбросы через :where() — нулевая специфичность, чтобы их перекрывал любой класс */
:where(.mp) img {
    display: block;
    max-width: 100%;
}

:where(.mp) a {
    color: inherit;
}

:where(.mp) ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mp a:focus-visible,
.mp button:focus-visible,
.mp input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--mp-plum);
    outline-offset: 3px;
}

.mp-container {
    width: min(1200px, 100% - 48px);
    margin-inline: auto;
}

.mp-icon {
    width: 24px;
    height: 24px;
    flex: none;
}

.mp-emblem {
    display: block;
    width: 54px;
    height: auto;
    color: var(--mp-gold);
    flex: none;
}

.mp-eyebrow {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .34em;
    text-transform: uppercase;
    color: var(--mp-gold-text);
}

.mp-h2 {
    margin: 0;
    font-family: var(--mp-serif);
    font-weight: 400;
    font-size: clamp(28px, 3.2vw, 40px);
    line-height: 1.14;
    letter-spacing: -.01em;
    color: var(--mp-plum);
    text-wrap: balance;
}

.mp-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 3px;
    border-bottom: 1px solid currentColor;
    font-size: 13px;
    font-weight: 500;
    color: var(--mp-plum);
    text-decoration: none;
    white-space: nowrap;
}

.mp-link .mp-icon {
    width: 16px;
    height: 16px;
    transition: transform .25s ease;
}

a.mp-link:hover .mp-icon,
a:hover > .mp-banner__body .mp-link .mp-icon {
    transform: translateX(4px);
}

.mp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 30px;
    border: 0;
    border-radius: 999px;
    background: var(--mp-plum);
    color: #fff;
    font-family: var(--mp-sans);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s ease;
}

.mp-btn:hover {
    background: var(--mp-plum-soft);
}

.mp-btn[disabled] {
    opacity: .6;
    cursor: progress;
}

.mp a.mp-btn--link {
    color: #fff;
    text-decoration: none;
}

.mp-round-btn {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: none;
    border: 0;
    border-radius: 50%;
    background: var(--mp-plum);
    color: #fff;
    cursor: pointer;
    transition: background .2s ease;
}

.mp-round-btn:hover {
    background: var(--mp-plum-soft);
}

/* ---------- Шапка ---------- */

.mp-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(248, 243, 236, .93);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--mp-line);
}

.mp-header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 72px;
}

.mp-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--mp-plum);
    text-decoration: none;
}

.mp-brand__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.mp-brand__name {
    font-family: var(--mp-serif);
    font-weight: 500;
    font-size: 30px;
    line-height: 1;
    letter-spacing: -.015em;
}

.mp-brand__tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 8.5px;
    font-weight: 500;
    letter-spacing: .34em;
    text-transform: uppercase;
    color: var(--mp-gold-text);
    margin-right: -.34em;
}

.mp-brand__tag::before,
.mp-brand__tag::after {
    content: '';
    width: 22px;
    height: 1px;
    background: var(--mp-gold);
    opacity: .7;
}

.mp-nav {
    display: flex;
    gap: 28px;
    margin-left: auto;
}

.mp-nav a {
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--mp-text);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, color .2s ease;
}

.mp-nav a:hover {
    color: var(--mp-plum);
    border-bottom-color: var(--mp-gold);
}

.mp-header__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
}

.mp-icon-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--mp-plum);
    cursor: pointer;
    transition: background .2s ease;
}

.mp-icon-btn:hover {
    background: rgba(58, 32, 54, .07);
}

.mp-icon-btn[aria-disabled="true"] {
    cursor: default;
}

.mp-icon-btn[aria-disabled="true"]:hover {
    background: none;
}

.mp-cart__count {
    position: absolute;
    top: 1px;
    right: -1px;
    display: grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--mp-plum);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

/* показываются только в мобильной шапке */
.mp-burger,
.mp-header__search,
.mp-nav .mp-nav__mobile {
    display: none;
}

.mp-burger span {
    display: grid;
}

.mp-burger .mp-burger__close,
.mp-burger[aria-expanded="true"] .mp-burger__open {
    display: none;
}

.mp-burger[aria-expanded="true"] .mp-burger__close {
    display: grid;
}

.mp-nav__count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--mp-plum);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    vertical-align: 1px;
}

/* ---------- Первый экран ---------- */

.mp-hero {
    position: relative;
    overflow: hidden;
    padding: 68px 0 104px;
    text-align: center;
    background:
        radial-gradient(ellipse 70% 60% at 50% 34%, #FCF9F4 0%, rgba(252, 249, 244, 0) 100%),
        linear-gradient(180deg, #F6EFE7 0%, #F3EAE0 100%);
}

.mp-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mp-emblem--hero {
    width: 98px;
}

.mp-hero__title {
    margin: 4px 0 0;
    font-family: var(--mp-serif);
    font-weight: 500;
    font-size: clamp(54px, 9.6vw, 124px);
    line-height: 1.02;
    letter-spacing: -.025em;
    color: var(--mp-plum);
}

.mp-hero__tag {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.2vw, 30px);
    margin: 16px 0 0;
    font-size: clamp(11px, 1.35vw, 17px);
    letter-spacing: .44em;
    text-transform: uppercase;
    color: var(--mp-plum-soft);
}

.mp-hero__tag::before,
.mp-hero__tag::after {
    content: '';
    width: clamp(36px, 5.5vw, 70px);
    height: 1px;
    background: var(--mp-gold);
}

/* компенсируем letter-spacing после последней буквы, чтобы надпись стояла по центру */
.mp-hero__tag::after {
    margin-left: -.44em;
}

.mp-hero__shops {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 36px;
    margin-top: 60px;
    scroll-margin-top: 100px;
}

.mp-shop-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 260px;
    min-height: 276px;
    padding: 26px 20px 24px;
    border: 1px solid var(--mp-gold-soft);
    border-radius: 34px;
    background: linear-gradient(180deg, #FEFCF9 0%, #F8F2EA 100%);
    box-shadow: var(--mp-shadow), inset 0 1px 0 #fff;
    color: var(--mp-plum);
    text-decoration: none;
    transition: transform .3s ease, box-shadow .3s ease;
}

.mp-shop-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 38px 56px -28px rgba(58, 32, 54, .46), inset 0 1px 0 #fff;
}

.mp-shop-card__logo {
    display: grid;
    place-items: center;
    flex: 1;
    width: 100%;
}

.mp-shop-card__logo img {
    width: 176px;
    height: auto;
}

/* у знака ASIYA внутри файла большие прозрачные поля — увеличиваем и поджимаем их */
.mp-shop-card--asiya .mp-shop-card__logo img {
    width: 128px;
    margin: -20px 0 -8px;
}

.mp-shop-card__name {
    font-family: var(--mp-serif);
    font-size: 27px;
    line-height: 1.15;
}

.mp-shop-card--asiya .mp-shop-card__name {
    font-size: 36px;
    letter-spacing: .24em;
    margin-right: -.24em;
    line-height: 1;
}

.mp-shop-card__subtitle {
    margin: 8px -.4em 0 0;
    font-size: 13px;
    letter-spacing: .4em;
    text-transform: uppercase;
    color: var(--mp-gold-text);
}

.mp-shop-card__arrow {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-top: 16px;
    border-radius: 50%;
    background: var(--mp-rose);
    color: #fff;
    transition: transform .3s ease;
}

.mp-shop-card--asiya .mp-shop-card__arrow {
    background: var(--mp-plum-soft);
}

.mp-shop-card:hover .mp-shop-card__arrow {
    transform: translateX(4px);
}

/* арки по краям */
.mp-arch {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 320px;
    z-index: 1;
    pointer-events: none;
}

.mp-arch--right {
    left: auto;
    right: 0;
    transform: scaleX(-1);
}

.mp-arch__line,
.mp-arch__panel,
.mp-arch__door {
    position: absolute;
    bottom: 0;
    border-radius: 999px 999px 0 0;
}

.mp-arch__line {
    left: -150px;
    width: 282px;
    height: 91%;
    border: 1.5px solid var(--mp-gold);
    border-bottom: 0;
    opacity: .85;
}

.mp-arch__panel {
    left: -60px;
    width: 286px;
    height: 62%;
    background: linear-gradient(180deg, rgba(238, 226, 214, .92) 0%, rgba(244, 235, 225, .82) 100%);
    box-shadow: 14px 0 34px -22px rgba(58, 32, 54, .35);
}

.mp-arch__door {
    left: -76px;
    width: 156px;
    height: 54%;
    background: linear-gradient(180deg, #BDA2A3 0%, #A68A90 100%);
    box-shadow: inset -14px 0 24px -14px rgba(58, 32, 54, .35);
}

.mp-hero__floor {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 74px;
    z-index: 1;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .9) 55%, #FDFAF6 100%);
    box-shadow: 0 -1px 0 rgba(255, 255, 255, .6);
}

/* ---------- Поиск ---------- */

.mp-search {
    padding: 44px 0 14px;
    background: var(--mp-surface);
}

.mp-search__inner {
    display: grid;
    grid-template-columns: minmax(0, 390px) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
}

.mp-searchbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 8px 8px 26px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--mp-bg-soft);
    color: var(--mp-muted);
    transition: border-color .2s ease, background .2s ease;
}

.mp-searchbar:focus-within {
    border-color: var(--mp-gold);
    background: #fff;
}

.mp-searchbar .mp-icon {
    width: 20px;
    height: 20px;
}

.mp-searchbar input {
    flex: 1;
    min-width: 0;
    height: 48px;
    border: 0;
    outline: 0;
    background: none;
    color: var(--mp-text);
    font-family: var(--mp-sans);
    font-size: 15px;
}

.mp-searchbar input::placeholder,
.mp-subscribe__field input::placeholder {
    color: var(--mp-muted);
    opacity: 1;
}

.mp-searchbar input::-webkit-search-cancel-button {
    display: none;
}

/* ---------- Категории ---------- */

.mp-cats-wrap {
    padding: 30px 0 42px;
    background: var(--mp-surface);
}

.mp-cats {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
}

.mp-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    color: var(--mp-text);
}

.mp-cat__icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: var(--mp-icon-bg);
    color: var(--mp-rose-deep);
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

.mp-cat__icon .mp-icon {
    width: 44px;
    height: 44px;
    stroke-width: 1.7;
}

.mp-cat:hover .mp-cat__icon {
    background: var(--mp-rose);
    color: #fff;
    transform: translateY(-3px);
}

.mp-cat__title {
    max-width: 13ch;
}

/* ---------- Баннеры магазинов ---------- */

.mp-banners {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: min(1440px, 100% - 20px);
    margin-inline: auto;
}

.mp-banner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 330px;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #F7F0E8 0%, #EFE4DA 100%);
    color: var(--mp-plum);
    text-decoration: none;
}

.mp-banner__media {
    position: relative;
    overflow: hidden;
}

.mp-banner__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s ease;
}

.mp-banner:hover .mp-banner__media img {
    transform: scale(1.04);
}

.mp-banner__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(243, 234, 225, 0) 62%, #F3EAE1 100%);
}

.mp-banner--asiya .mp-banner__media {
    order: 2;
}

.mp-banner--asiya .mp-banner__media::after {
    background: linear-gradient(270deg, rgba(243, 234, 225, 0) 62%, #F3EAE1 100%);
}

.mp-banner__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 22px;
    text-align: center;
}

.mp-banner__logo {
    width: 132px;
    height: auto;
    margin-bottom: 12px;
}

.mp-banner--asiya .mp-banner__logo {
    width: 104px;
    margin: -16px 0 -8px;
}

.mp-banner__name {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    line-height: 1.15;
}

.mp-banner--asiya .mp-banner__name {
    font-family: var(--mp-serif);
    font-size: 34px;
    font-weight: 400;
    letter-spacing: .24em;
    margin-right: -.24em;
}

.mp-banner__subtitle {
    margin: 8px -.4em 0 0;
    font-size: 12px;
    letter-spacing: .4em;
    text-transform: uppercase;
    color: var(--mp-gold-text);
}

.mp-banner__text {
    max-width: 26ch;
    margin: 16px 0 22px;
    font-size: 11px;
    line-height: 1.75;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--mp-plum-soft);
}

/* ---------- Преимущества ---------- */

.mp-benefits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 34px 0 30px;
}

.mp-benefit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 6px 16px;
    border-left: 1px solid var(--mp-line);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.mp-benefit:first-child {
    border-left: 0;
}

.mp-benefit .mp-icon {
    width: 34px;
    height: 34px;
    color: var(--mp-plum);
    stroke-width: 1.3;
}

.mp-benefit span {
    max-width: 13ch;
}

/* ---------- Популярные категории ---------- */

.mp-popular {
    padding: 26px 0 60px;
}

.mp-popular__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.mp-carousel {
    position: relative;
}

.mp-carousel__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.mp-carousel__track::-webkit-scrollbar {
    display: none;
}

.mp-pop-card {
    position: relative;
    flex: 0 0 calc((100% - 80px) / 6);
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 16px;
    background: var(--mp-bg-soft);
    color: var(--mp-plum);
    text-decoration: none;
    scroll-snap-align: start;
}

.mp-pop-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.mp-pop-card:hover img {
    transform: scale(1.05);
}

.mp-pop-card__label {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 7px 8px 7px 12px;
    border-radius: 12px;
    background: rgba(253, 250, 246, .95);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.25;
}

.mp-pop-card__arrow {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 50%;
    background: var(--mp-rose);
    color: #fff;
}

.mp-pop-card__arrow .mp-icon {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

.mp-carousel__btn {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--mp-line);
    border-radius: 50%;
    background: #fff;
    color: var(--mp-plum);
    cursor: pointer;
    transform: translateY(-50%);
    box-shadow: 0 8px 18px -10px rgba(58, 32, 54, .4);
    transition: opacity .2s ease;
}

.mp-carousel__btn .mp-icon {
    width: 18px;
    height: 18px;
}

.mp-carousel__btn--prev {
    left: -20px;
}

.mp-carousel__btn--next {
    right: -20px;
}

.mp-carousel__btn[disabled] {
    opacity: 0;
    pointer-events: none;
}

/* ---------- Подписка ---------- */

.mp-subscribe {
    position: relative;
    overflow: hidden;
    padding: 50px 0 54px;
    background: var(--mp-bg-soft);
}

.mp-subscribe__veil {
    position: absolute;
    top: -30%;
    right: -90px;
    width: 460px;
    height: 170%;
    border-radius: 64% 36% 0 100% / 55% 100% 0 45%;
    background: linear-gradient(120deg, rgba(197, 163, 155, 0) 8%, rgba(197, 163, 155, .42) 52%, rgba(168, 138, 143, .5) 100%);
    transform: rotate(-9deg);
    pointer-events: none;
}

.mp-subscribe__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
}

.mp-subscribe__text p:last-child {
    max-width: 42ch;
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--mp-muted);
}

.mp-subscribe__form {
    position: relative;
    max-width: 520px;
    width: 100%;
    justify-self: end;
}

.mp-emblem--subscribe {
    position: absolute;
    top: -62px;
    right: 34px;
    width: 62px;
    opacity: .9;
}

.mp-subscribe__field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 7px 7px 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--mp-surface);
    color: var(--mp-rose-deep);
    box-shadow: 0 14px 30px -20px rgba(58, 32, 54, .4);
    transition: border-color .2s ease;
}

.mp-subscribe__field:focus-within {
    border-color: var(--mp-gold);
}

.mp-subscribe__field .mp-icon {
    width: 20px;
    height: 20px;
}

.mp-subscribe__field input {
    flex: 1;
    min-width: 0;
    height: 46px;
    border: 0;
    outline: 0;
    background: none;
    color: var(--mp-text);
    font-family: var(--mp-sans);
    font-size: 15px;
}

.mp-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding-left: 6px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--mp-muted);
    cursor: pointer;
}

.mp-consent input {
    width: 15px;
    height: 15px;
    margin: 1px 0 0;
    flex: none;
    accent-color: var(--mp-plum);
}

.mp-subscribe__status {
    min-height: 1.5em;
    margin: 10px 0 0;
    padding-left: 6px;
    font-size: 13px;
    font-weight: 500;
}

.mp-subscribe__status.is-ok {
    color: #2C6447;
}

.mp-subscribe__status.is-error {
    color: #9B2C2A;
}

/* ---------- Подвал ---------- */

.mp-footer {
    padding: 46px 0 26px;
    background: var(--mp-surface);
    border-top: 1px solid var(--mp-line);
}

.mp-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
    gap: 40px;
}

.mp-footer .mp-brand__name {
    font-size: 26px;
}

.mp-footer .mp-emblem {
    width: 46px;
}

.mp-footer__about {
    max-width: 32ch;
    margin: 16px 0 16px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--mp-muted);
}

.mp-socials {
    display: flex;
    gap: 6px;
    margin-left: -8px;
}

.mp-socials a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--mp-plum);
    transition: background .2s ease;
}

.mp-socials a:hover {
    background: rgba(58, 32, 54, .07);
}

.mp-socials .mp-icon {
    width: 22px;
    height: 22px;
}

.mp-footer__col {
    padding-left: 28px;
    border-left: 1px solid var(--mp-line);
}

.mp-footer h3 {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-plum);
}

.mp-footer__col ul {
    display: grid;
    gap: 9px;
}

.mp-footer__col a,
.mp-footer__col span {
    font-size: 13px;
    color: var(--mp-muted);
    text-decoration: none;
}

.mp-footer__col a:hover {
    color: var(--mp-plum);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mp-footer__contacts li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mp-footer__contacts .mp-icon {
    width: 18px;
    height: 18px;
    color: var(--mp-rose-deep);
}

.mp-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--mp-line);
    font-size: 12px;
    color: var(--mp-muted);
}

.mp-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
}

.mp-footer__legal a {
    text-decoration: none;
}

.mp-footer__legal a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Страница поиска ---------- */

.mp-results {
    min-height: 60vh;
    padding: 44px 0 76px;
    background: var(--mp-surface);
}

.mp-results__search {
    max-width: 720px;
    margin-top: 24px;
}

.mp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 30px;
}

.mp-chip {
    padding: 8px 16px;
    border: 1px solid var(--mp-line);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    text-decoration: none;
    color: var(--mp-text);
    transition: border-color .2s ease;
}

.mp-chip:hover {
    border-color: var(--mp-gold);
}

.mp a.mp-chip.is-active {
    border-color: var(--mp-plum);
    background: var(--mp-plum);
    color: #fff;
}

.mp-results__count {
    margin: 0 0 20px;
    font-size: 13px;
    color: var(--mp-muted);
}

.mp-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px 20px;
}

.mp-product {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: var(--mp-text);
}

.mp-product__media {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    margin-bottom: 6px;
    border-radius: 16px;
    background: var(--mp-bg-soft);
}

.mp-product__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.mp-product:hover .mp-product__media img {
    transform: scale(1.04);
}

.mp-product__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--mp-plum);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.mp-product__shop {
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--mp-gold-text);
}

.mp-product__name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.mp-product__price {
    font-size: 15px;
    font-weight: 600;
    color: var(--mp-plum);
}

.mp-product__old {
    margin-left: 8px;
    font-size: 13px;
    font-weight: 400;
    color: var(--mp-muted);
}

.mp-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 44px;
    font-size: 13px;
    color: var(--mp-muted);
}

.mp-pager__btn {
    padding: 10px 22px;
    border: 1px solid var(--mp-line);
    border-radius: 999px;
    background: #fff;
    font-weight: 500;
    text-decoration: none;
    color: var(--mp-plum);
}

.mp-pager__btn.is-disabled {
    opacity: .45;
}

.mp-pager a.mp-pager__btn:hover {
    border-color: var(--mp-gold);
}

.mp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 56px 16px 24px;
    text-align: center;
}

.mp-empty .mp-emblem {
    width: 72px;
    margin-bottom: 8px;
}

.mp-empty h2 {
    margin: 0;
    font-family: var(--mp-serif);
    font-weight: 400;
    font-size: 28px;
    color: var(--mp-plum);
}

.mp-empty p {
    max-width: 44ch;
    margin: 0 0 14px;
    color: var(--mp-muted);
}

/* ---------- Профиль ---------- */

.mp-profile__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    margin-top: 28px;
}

.mp-profile__card {
    padding: 28px;
    border: 1px solid var(--mp-line);
    border-radius: 22px;
    background: #fff;
}

.mp-profile__hello,
.mp-profile__title {
    margin: 0;
    font-family: var(--mp-serif);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--mp-plum);
}

.mp-profile__text {
    max-width: 46ch;
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--mp-muted);
}

.mp-profile__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0 18px;
}

.mp-profile__stats div {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--mp-bg-soft);
}

.mp-profile__stats dt {
    font-size: 12px;
    color: var(--mp-muted);
}

.mp-profile__stats dd {
    margin: 4px 0 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--mp-plum);
}

.mp-profile__form {
    margin-top: 24px;
}

.mp-profile__label {
    display: block;
    margin: 0 0 8px 6px;
    font-size: 13px;
    font-weight: 500;
}

.mp-profile .mp-subscribe__field {
    background: var(--mp-bg-soft);
    box-shadow: none;
}

.mp-profile__links {
    display: grid;
    gap: 8px;
}

.mp-profile__links a {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 0 18px;
    border: 1px solid var(--mp-line);
    border-radius: 16px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--mp-text);
    transition: border-color .2s ease;
}

.mp-profile__links a:hover {
    border-color: var(--mp-gold);
}

.mp-profile__links .mp-icon {
    width: 22px;
    height: 22px;
    color: var(--mp-rose-deep);
}

.mp-profile__count {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 11px;
    background: var(--mp-plum);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

/* на маркетплейсе нет Bootstrap с его [hidden]{display:none} */
.mp-profile__count[hidden] {
    display: none;
}

.mp-profile__note {
    max-width: 60ch;
    margin: 24px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--mp-muted);
}

@media (max-width: 900px) {
    .mp-profile__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .mp-profile__card {
        padding: 20px 16px;
    }

    .mp-profile__stats {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
    .mp-arch {
        width: 240px;
        opacity: .9;
    }

    .mp-arch__line {
        left: -190px;
    }

    .mp-arch__panel {
        left: -130px;
    }

    .mp-arch__door {
        left: -110px;
    }

    .mp-pop-card {
        flex-basis: calc((100% - 48px) / 4);
    }

    .mp-banner {
        min-height: 300px;
    }

    .mp-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    /* мобильная шапка: поиск — логотип — меню */
    .mp-header__inner {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 8px;
    }

    .mp-header__search {
        display: grid;
    }

    .mp-header .mp-brand {
        justify-self: center;
    }

    .mp-header__actions .mp-icon-btn:not(.mp-burger) {
        display: none;
    }

    .mp-nav .mp-nav__mobile {
        display: block;
    }

    .mp-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 6px 24px 14px;
        background: var(--mp-bg);
        border-bottom: 1px solid var(--mp-line);
        box-shadow: 0 18px 30px -22px rgba(58, 32, 54, .4);
    }

    .mp-nav.is-open {
        display: flex;
    }

    .mp-nav a {
        padding: 12px 0;
        border-bottom: 1px solid var(--mp-line);
    }

    .mp-nav a:last-child {
        border-bottom: 0;
    }

    .mp-header__actions {
        margin-left: 0;
        justify-self: end;
    }

    .mp-burger {
        display: grid;
    }

    .mp-search__inner,
    .mp-subscribe__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .mp-subscribe__form {
        justify-self: start;
    }

    .mp-emblem--subscribe {
        display: none;
    }

    /* ряд категорий листается пальцем и уходит под край экрана */
    .mp-cats-wrap .mp-cats {
        display: flex;
        gap: 6px;
        width: 100%;
        padding: 4px 24px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .mp-cats::-webkit-scrollbar {
        display: none;
    }

    .mp-cat {
        flex: 0 0 104px;
        scroll-snap-align: start;
    }

    .mp-banners {
        grid-template-columns: minmax(0, 1fr);
    }

    .mp-benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 0;
    }

    .mp-benefit {
        justify-content: flex-start;
    }

    .mp-benefit:nth-child(odd) {
        border-left: 0;
    }

    .mp-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 24px;
    }

    .mp-footer__brand {
        grid-column: 1 / -1;
    }

    .mp-footer__col {
        padding-left: 0;
        border-left: 0;
    }

    .mp-carousel__btn {
        display: none;
    }
}

@media (max-width: 700px) {
    .mp-container {
        width: min(1200px, 100% - 32px);
    }

    .mp-header__inner {
        height: 62px;
    }

    .mp-brand {
        gap: 10px;
    }

    .mp-brand .mp-emblem {
        width: 40px;
    }

    .mp-brand__name {
        font-size: 23px;
    }

    .mp-brand__tag {
        font-size: 7px;
        gap: 6px;
    }

    .mp-brand__tag::before,
    .mp-brand__tag::after {
        width: 14px;
    }

    .mp-nav {
        padding-inline: 16px;
    }

    .mp-hero {
        padding: 44px 0 76px;
    }

    .mp-arch {
        display: none;
    }

    .mp-emblem--hero {
        width: 72px;
    }

    /* карточки магазинов — в два столбца, как на макете */
    .mp-hero__shops {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: min(100%, 420px);
        margin-top: 36px;
        scroll-margin-top: 80px;
    }

    .mp-shop-card {
        width: auto;
        min-height: 212px;
        padding: 18px 10px 18px;
        border-radius: 26px;
    }

    .mp-shop-card__logo img {
        width: min(128px, 100%);
    }

    .mp-shop-card--asiya .mp-shop-card__logo img {
        width: 96px;
        margin: -14px 0 -6px;
    }

    .mp-shop-card__name {
        font-size: 18px;
    }

    .mp-shop-card--asiya .mp-shop-card__name {
        font-size: 25px;
    }

    .mp-shop-card__subtitle {
        margin-top: 6px;
        font-size: 10px;
    }

    .mp-shop-card__arrow {
        width: 46px;
        height: 46px;
        margin-top: 12px;
    }

    .mp-shop-card__arrow .mp-icon {
        width: 20px;
        height: 20px;
    }

    .mp-search {
        padding-top: 34px;
    }

    .mp-searchbar {
        padding-left: 18px;
        gap: 10px;
    }

    .mp-searchbar input {
        height: 44px;
        font-size: 16px; /* меньше 16px iOS увеличивает страницу при фокусе */
    }

    .mp-subscribe__field input {
        font-size: 16px;
    }

    .mp-round-btn {
        width: 46px;
        height: 46px;
    }

    .mp-cats-wrap .mp-cats {
        padding-inline: 16px;
    }


    .mp-cat {
        flex-basis: 92px;
        font-size: 12px;
    }

    .mp-cat__icon {
        width: 66px;
        height: 66px;
    }

    .mp-cat__icon .mp-icon {
        width: 38px;
        height: 38px;
    }

    .mp-banner {
        min-height: 240px;
    }

    .mp-banner__body {
        padding: 22px 12px;
    }

    .mp-banner__logo {
        width: 108px;
    }

    .mp-banner__name {
        font-size: 17px;
    }

    .mp-banner--asiya .mp-banner__name {
        font-size: 26px;
    }

    .mp-banner__text {
        font-size: 10px;
        letter-spacing: .14em;
        margin: 12px 0 16px;
    }

    .mp-popular__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .mp-pop-card {
        flex-basis: 44%;
    }

    .mp-carousel__track {
        gap: 12px;
    }

    .mp-subscribe {
        padding: 40px 0 44px;
    }

    .mp-subscribe__veil {
        opacity: .5;
    }

    .mp-subscribe__field {
        padding-left: 18px;
    }

    .mp-btn {
        padding: 0 20px;
    }

    .mp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 12px;
    }

    /* фильтр категорий — одной прокручиваемой строкой */
    .mp-chips {
        flex-wrap: nowrap;
        margin-inline: -16px;
        padding-inline: 16px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .mp-chips::-webkit-scrollbar {
        display: none;
    }

    .mp-chip {
        flex: none;
        white-space: nowrap;
    }
}

@media (max-width: 420px) {
    .mp-subscribe__field .mp-icon {
        display: none;
    }

    /* на самых узких телефонах подпись с линиями шире названия и выталкивает шапку */
    .mp-header .mp-brand__tag::before,
    .mp-header .mp-brand__tag::after {
        display: none;
    }

    .mp-header .mp-brand__name {
        font-size: 21px;
    }

    /* профиль: в одну строку e-mail почти не виден — кнопка уходит под поле */
    .mp-profile .mp-subscribe__field {
        flex-wrap: wrap;
        padding: 7px;
        border-radius: 22px;
    }

    .mp-profile .mp-subscribe__field input {
        flex-basis: 100%;
        padding: 0 12px;
    }

    .mp-profile .mp-subscribe__field .mp-btn {
        width: 100%;
    }

    /* два преимущества в строке: на 320px тексту не хватало ширины */
    .mp-benefit {
        gap: 10px;
        padding: 6px 8px;
        font-size: 12px;
    }

    .mp-benefit .mp-icon {
        width: 28px;
        height: 28px;
    }

    .mp-footer__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mp *,
    .mp *::before,
    .mp *::after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
