/* ══════════════════════════════════════════════════════
   Plombir Flowers — Mini App
   Стилистика адаптирована под сайт plombirflowers.ru
   Шрифт: Nunito Sans (Google Fonts) ≈ Circe (Paratype)
   ══════════════════════════════════════════════════════ */

:root {
    --bg: #ffffff;
    --text: #000000;
    --text-secondary: #555555;
    --hint: #999999;
    --border: #e8e8e8;
    --secondary-bg: #f7f7f7;
    --btn-dark: #000000;
    --btn-dark-text: #ffffff;
    --btn-outline-border: #000000;
    --danger: #e53935;
    --success: #43a047;
    --radius: 20px;
    --radius-sm: 16px;
    --font: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --letter-spacing: 0.08em;
    --letter-spacing-sm: 0.04em;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-overflow-scrolling: touch;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

#app {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    background: var(--bg);
}

/* ══════════════════════════════════════════════
   HEADER — минимализм как на сайте
   ══════════════════════════════════════════════ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    transition: box-shadow 0.3s ease;
}
.header.header--scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.header__logo {
    border: none;
    background: transparent;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-sm);
    text-align: center;
    flex: 1;
    cursor: pointer;
}

.header__logo-wrap {
    width: 140px;
    height: 44px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.header__logo img {
    height: auto;
    width: 176px;
    max-width: none;
    display: block;
    object-fit: contain;
}

.header__logo-accent {
    font-style: italic;
    font-weight: 300;
}

.header__menu {
    width: 28px;
    height: 24px;
    border: none;
    background: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.header__menu span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.header__cart {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    flex-shrink: 0;
}

.header__cart svg {
    width: 24px;
    height: 24px;
    stroke: var(--text);
    fill: none;
    stroke-width: 1.5;
}

.header__cart-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--text);
    color: var(--bg);
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: var(--font);
}

/* ══════════════════════════════════════════════
   HERO + TICKER
   ══════════════════════════════════════════════ */
.hero {
    position: relative;
    margin: 0;
    overflow: hidden;
    border: none;
    border-radius: 0;
    background: transparent;
}

.hero__track {
    position: relative;
    min-height: 0;
    height: auto;
    overflow: hidden;
}

.hero__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    background: var(--banner-placeholder, #f2ece4);
    opacity: 1;
    pointer-events: none;
    display: none;
    border: 0;
    padding: 0;
    overflow: hidden;
}

.hero__slide.is-placeholder {
    background: var(--secondary-bg);
    border: 1px solid var(--border);
}

.hero__slide.is-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(110deg, #f0f0f0 8%, #e0e0e0 18%, #f0f0f0 33%);
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
}

.hero__slide.active {
    display: block;
    pointer-events: auto;
}

.hero__img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.35s ease;
    position: relative;
    z-index: 2;
}

.hero__slide.loaded .hero__img {
    opacity: 1;
}

.hero__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0 8px;
    background: var(--bg);
}

.hero__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #c4c4c4;
    cursor: pointer;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.hero__dot.active {
    background: #151515;
    transform: scale(1.15);
}

.hero-swiper {
    width: 100%;
}

.hero-swiper__slide {
    width: 100%;
    border: 0;
    padding: 0;
    margin: 0;
    display: block;
    background: transparent;
    cursor: pointer;
}

.hero-swiper__img,
.hero-swiper__placeholder {
    width: 100%;
    height: min(58vw, 320px);
    min-height: 210px;
    object-fit: cover;
    display: block;
}

.hero-swiper__placeholder {
    background: var(--banner-placeholder, #f2ece4);
}

.hero-swiper__img--contain {
    object-fit: contain;
    background: #f3f3f3;
}

.ticker {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 8px 0 2px;
    background: #fff;
}

.ticker__inner {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    white-space: nowrap;
    padding: 10px 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-sm);
    text-transform: uppercase;
    animation: tickerMove 22s linear infinite;
}

.ticker__item {
    flex: 0 0 auto;
}

/* ══════════════════════════════════════════════
   SIDE MENU (бургер + drawer)
   ══════════════════════════════════════════════ */
.side-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 220;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg);
    z-index: 230;
    transform: translateX(-100%);
    transition: transform 0.26s ease;
    display: flex;
    flex-direction: column;
    padding: 48px 40px 38px;
}

.side-menu--open {
    transform: translateX(0);
}

.side-menu-overlay--open {
    opacity: 1;
    pointer-events: auto;
}

.side-menu__header {
    display: flex;
    justify-content: flex-end;
    position: absolute;
    top: 5px;
    right: 5px;
}

.side-menu__close {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--text);
    position: relative;
    padding: 0;
    cursor: pointer;
}

.side-menu__close span {
    display: block;
    position: absolute;
    width: 24px;
    height: 2px;
    left: 8px;
    top: 19px;
    background: currentColor;
}

.side-menu__close--open span:nth-child(1),
.side-menu__close--open span:nth-child(4) {
    width: 0;
    left: 20px;
}

.side-menu__close--open span:nth-child(2) {
    transform: rotate(45deg);
}

.side-menu__close--open span:nth-child(3) {
    transform: rotate(-45deg);
}

.side-menu__nav {
    display: flex;
    flex-direction: column;
    margin-top: 4px;
}

.side-menu__link {
    border: none;
    background: none;
    text-align: left;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.35;
    letter-spacing: var(--letter-spacing-sm);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 15px;
    cursor: pointer;
    color: var(--text);
}

.side-menu__link.active {
    color: #ffffff;
    background: #111111;
    padding: 8px 10px;
    margin-left: -10px;
    width: fit-content;
}

.side-menu__link:last-child {
    margin-bottom: 0;
}

.side-menu__footer {
    margin-top: auto;
    display: grid;
    gap: 14px;
    padding-bottom: 0;
}

.side-menu__socials {
    display: flex;
    gap: 10px;
}

.side-menu__icon-link {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #151515;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.side-menu__icon-link i {
    font-size: 16px;
    line-height: 1;
}

.side-menu__icon-link svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
}

.side-menu__icon-link:hover,
.side-menu__icon-link:active {
    background: #151515;
    transform: none;
    opacity: 1;
}

.side-menu__call {
    margin-top: 2px;
    border: 1px solid var(--text);
    border-radius: 10px;
    background: var(--text);
    color: var(--bg);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    padding: 12px 12px;
}

body.menu-open {
    overflow: hidden;
}

@media (max-width: 360px) {
    .side-menu {
        padding: 44px 24px 28px;
    }
}

/* Info pages */
.info-page {
    padding: 16px;
}

.info-page__header {
    margin-bottom: 16px;
}

.info-page__title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: var(--letter-spacing);
    text-transform: uppercase;
}

.info-page__subtitle {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.info-page__content {
    display: grid;
    gap: 12px;
}

.info-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
}

.info-card__title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    font-weight: 700;
    margin-bottom: 8px;
}

.info-card__text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.info-card__text a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.info-card__text strong {
    color: var(--text);
}

/* About page - mobile layout from screenshots */
.info-page--about-mobile {
    background: #ffffff;
    padding: 0 12px;
}

.about-mobile__line {
    height: 1px;
    background: #e6e6e6;
    margin: 0;
}

.about-mobile__section {
    padding: 18px 0;
}

.about-mobile__section--top {
    padding-top: 22px;
}

.about-mobile__title {
    font-size: clamp(38px, 12vw, 56px);
    line-height: 1;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 26px;
}

.about-mobile__subtitle {
    font-size: 15px;
    line-height: 1.25;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 10px;
}

.about-mobile__subtitle:not(:first-of-type) {
    margin-top: 20px;
}

.about-mobile__text {
    font-size: 14px;
    line-height: 1.38;
    margin-bottom: 10px;
    color: #191919;
}

.about-mobile__ph {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dedede;
    background: #f8f8f8;
    color: #636363;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    border-radius: 12px;
}

.about-mobile__ph--xl {
    width: 100%;
    aspect-ratio: 0.82;
    margin-top: 8px;
}

.about-mobile__img-wrap {
    border: 1px solid #dedede;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.about-mobile__img-wrap--xl {
    width: 100%;
    aspect-ratio: 0.82;
    margin-top: 8px;
}

.about-mobile__img-wrap--side {
    min-height: 155px;
}

.about-mobile__img-wrap--wide {
    width: 100%;
    aspect-ratio: 1.32;
    margin-bottom: 10px;
}

.about-mobile__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-mobile__img-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8f8f8f;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #f8f8f8;
}

.about-mobile__mission-title {
    font-size: 20px;
    line-height: 1.08;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.about-mobile__script {
    display: inline-block;
    font-family: "Times New Roman", serif;
    font-style: italic;
    font-weight: 400;
    text-transform: none;
    font-size: 1.5em;
    line-height: 0.6;
    transform: rotate(-7deg);
}

.about-mobile__text--mission {
    margin-top: 20px;
    margin-bottom: 24px;
}

.about-mobile__founders {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    align-items: center;
}

.about-mobile__avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 1px solid #c8c8c8;
    background: #dfdfdf;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.about-mobile__avatar-img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 1px solid #c8c8c8;
    object-fit: cover;
    display: block;
}

.about-mobile__founders p {
    font-size: 16px;
    line-height: 1.2;
}

.about-mobile__visit-title {
    font-size: 18px;
    line-height: 1.08;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.about-mobile__visit-text {
    font-size: 14px;
    line-height: 1.34;
    max-width: 360px;
    margin-bottom: 14px;
}

.about-mobile__visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.about-mobile__visit-card {
    border: 1px solid #dedede;
    border-radius: 16px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 155px;
    background: #ffffff;
}

.about-mobile__visit-address {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 6px;
}

.about-mobile__visit-hours {
    font-size: 13px;
    margin-bottom: 12px;
}

.about-mobile__visit-btn {
    margin-top: auto;
    display: inline-block;
    border-radius: 10px;
    border: 1px solid #111;
    background: #111;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    padding: 11px 12px;
    text-align: center;
}

.about-mobile__faq {
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    text-transform: uppercase;
}

/* Contacts page - close to plombirflowers.ru/contacts */
.info-page--contacts-mobile {
    background: #ffffff;
    padding: 0;
}

.contacts-mobile {
    max-width: 760px;
    margin: 0 auto;
    padding: 30px 16px 36px;
}

.contacts-mobile__header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: end;
    margin-bottom: 34px;
}

.contacts-mobile__title {
    font-size: clamp(42px, 13vw, 72px);
    line-height: 0.95;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.contacts-mobile__time {
    font-size: 18px;
    line-height: 1.25;
    text-align: left;
}

.contacts-mobile__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 18px;
}

.contacts-mobile__item {
    min-width: 0;
}

.contacts-mobile__label {
    font-size: 16px;
    line-height: 1.25;
    font-weight: 700;
    margin-bottom: 8px;
}

.contacts-mobile__link {
    color: #141414;
    text-decoration: none;
    font-size: 20px;
    line-height: 1.25;
    word-break: break-word;
}

.contacts-mobile__address-block {
    margin-top: 28px;
}

.contacts-mobile__label--home {
    margin-bottom: 10px;
}

.contacts-mobile__address {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: #141414;
    text-decoration: none;
    font-size: 22px;
    line-height: 1.2;
}

.contacts-mobile__pin {
    font-size: 19px;
    line-height: 1;
}

.contacts-mobile__notice {
    margin-top: 28px;
    color: #5e1720;
    font-size: 22px;
    line-height: 1.24;
    text-transform: uppercase;
    font-weight: 700;
}

.contacts-mobile__map-wrap {
    margin-top: 22px;
    border-radius: 10px;
    overflow: hidden;
}

.contacts-mobile__map {
    width: 100%;
    height: 520px;
    border: 0;
    display: block;
    background: #efefef;
}

.contacts-mobile__map--gray {
    filter: grayscale(1) saturate(0.35) contrast(0.95);
}

@media (max-width: 720px) {
    .contacts-mobile {
        padding: 22px 14px 30px;
    }

    .contacts-mobile__header,
    .contacts-mobile__grid {
        grid-template-columns: 1fr;
    }

    .contacts-mobile__header {
        margin-bottom: 24px;
    }

    .contacts-mobile__title {
        font-size: clamp(34px, 12vw, 54px);
    }

    .contacts-mobile__time {
        font-size: 15px;
    }

    .contacts-mobile__label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .contacts-mobile__link {
        font-size: 18px;
    }

    .contacts-mobile__address {
        font-size: 17px;
    }

    .contacts-mobile__notice {
        font-size: 15px;
    }

    .contacts-mobile__map {
        height: 420px;
    }
}

/* Delivery / Payment pages */
.info-page--service-mobile {
    background: #ffffff;
    padding: 0;
}

.service-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 560px;
    margin: 0 auto;
    gap: 24px;
    padding: 36px 16px 28px;
}

.service-switcher__item {
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: center;
    color: #111;
}

.service-switcher__item img {
    width: min(28vw, 104px);
    height: min(28vw, 104px);
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 10px;
    border: 0;
}

.service-switcher__item span {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.service-mobile {
    max-width: 760px;
    margin: 0 auto;
    padding: 10px 16px 44px;
}

.service-mobile__title {
    font-size: clamp(46px, 12vw, 74px);
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    font-weight: 700;
    margin-bottom: 30px;
}

.service-mobile__lead {
    font-size: 21px;
    line-height: 1.3;
    max-width: 40ch;
    margin-bottom: 28px;
}

.service-mobile__text {
    font-size: 18px;
    line-height: 1.45;
    max-width: 58ch;
    margin-bottom: 20px;
}

.service-mobile__list {
    margin: 0 0 22px 20px;
    padding: 0;
    font-size: 18px;
    line-height: 1.45;
    max-width: 58ch;
}

.service-mobile__list li {
    margin-bottom: 8px;
}

.service-mobile__subtitle {
    font-size: 19px;
    line-height: 1.3;
    font-weight: 800;
    margin: 34px 0 12px;
}

.service-mobile__help {
    margin-top: 40px;
    border-top: 1px solid #e7e7e7;
    padding-top: 24px;
}

.service-mobile__help h3 {
    font-size: 44px;
    line-height: 0.95;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.service-mobile__help p {
    font-size: 18px;
    line-height: 1.45;
    max-width: 54ch;
    margin-bottom: 12px;
}

.service-mobile__help a {
    display: block;
    color: #111;
    text-decoration: none;
    font-size: 18px;
    line-height: 1.45;
    margin-bottom: 8px;
}

@media (max-width: 720px) {
    .service-switcher {
        gap: 14px;
        padding: 24px 14px 20px;
    }

    .service-switcher__item img {
        width: min(30vw, 96px);
        height: min(30vw, 96px);
    }

    .service-switcher__item span {
        font-size: 11px;
        letter-spacing: 0.05em;
    }

    .service-mobile {
        padding: 12px 14px 34px;
    }

    .service-mobile__title {
        font-size: clamp(34px, 12vw, 56px);
        margin-bottom: 18px;
    }

    .service-mobile__lead {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 16px;
    }

    .service-mobile__text {
        font-size: 13px;
        line-height: 1.42;
        margin-bottom: 14px;
    }

    .service-mobile__list {
        font-size: 13px;
        line-height: 1.42;
        margin: 0 0 14px 18px;
    }

    .service-mobile__subtitle {
        font-size: 14px;
        margin: 20px 0 8px;
    }

    .service-mobile__help {
        margin-top: 22px;
        padding-top: 14px;
    }

    .service-mobile__help h3 {
        font-size: clamp(32px, 11vw, 46px);
        margin-bottom: 10px;
    }

    .service-mobile__help p,
    .service-mobile__help a {
        font-size: 13px;
        line-height: 1.42;
        margin-bottom: 6px;
    }
}

/* ══════════════════════════════════════════════
   CATEGORIES — текстовые ссылки, uppercase
   Как на сайте: простой текст по центру
   ══════════════════════════════════════════════ */
.categories {
    display: flex;
    gap: 4px;
    padding: 16px 16px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
}
.categories::-webkit-scrollbar { display: none; }

.category-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    border: none;
    border-radius: 0;
    background: none;
    color: var(--hint);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.category-btn:hover {
    color: var(--text);
}
.category-btn.active {
    color: var(--text);
    border-bottom-color: var(--text);
}

/* ══════════════════════════════════════════════
   PRICE FILTER — текстовые кнопки, uppercase
   ══════════════════════════════════════════════ */
.price-filter {
    display: flex;
    gap: 4px;
    padding: 8px 16px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.price-filter::-webkit-scrollbar { display: none; }

.price-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: none;
    color: var(--hint);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.price-btn.active {
    border-color: var(--text);
    color: var(--btn-dark-text);
    background: var(--text);
}

/* ══════════════════════════════════════════════
   CATALOG TOOLBAR — поиск + сортировка (как на сайте Tilda)
   ══════════════════════════════════════════════ */
.catalog-toolbar {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 0 16px 16px;
}
.catalog-toolbar__search {
    flex: 1;
    min-width: 0;
    padding: 0 !important;
}

.sort-dropdown {
    position: relative;
    flex-shrink: 0;
    align-self: center;
}
/* Иконка фильтра (как в мобильных приложениях) */
.sort-dropdown__trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.sort-dropdown__trigger:hover {
    border-color: var(--text);
}
.sort-dropdown__trigger:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}
.sort-dropdown__trigger--open {
    border-color: var(--text);
    background: var(--secondary-bg);
}
.sort-dropdown__trigger--dirty {
    color: var(--text);
    border-color: var(--text);
}
.sort-dropdown__icon {
    font-size: 22px;
    line-height: 1;
}

/* Подложка + прямоугольник под строкой поиска (как выпадашка на сайте, без шторки) */
.sort-popover {
    position: fixed;
    inset: 0;
    z-index: 4000;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.sort-popover.sort-popover--open {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
}
.sort-popover__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    -webkit-tap-highlight-color: transparent;
}
.sort-popover__box {
    position: fixed;
    left: 16px;
    right: 16px;
    max-width: 528px;
    margin-left: auto;
    margin-right: auto;
    top: 120px;
    max-height: min(52vh, 400px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
    padding: 0 0 6px;
    z-index: 1;
}
.sort-popover__title {
    padding: 14px 16px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-sm);
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.sort-dropdown__option {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    padding: 11px 14px 11px 10px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 400;
    font-family: var(--font);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}
.sort-dropdown__option:hover {
    background: var(--secondary-bg);
}
.sort-dropdown__option:active {
    background: #eee;
}
.sort-dropdown__check {
    display: flex;
    width: 22px;
    flex-shrink: 0;
    justify-content: center;
    font-size: 16px;
    color: var(--text);
    opacity: 0;
}
.sort-dropdown__option--active .sort-dropdown__check {
    opacity: 1;
}
.sort-dropdown__option .ri-check-line {
    font-weight: 600;
}

/* ══════════════════════════════════════════════
   SEARCH — чистый, минималистичный
   ══════════════════════════════════════════════ */
.search-bar {
    padding: 0 16px 16px;
}
.search-bar input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--secondary-bg);
    color: var(--text);
    font-size: 14px;
    outline: none;
    font-family: var(--font);
    letter-spacing: 0.01em;
    transition: border-color 0.2s;
}
.search-bar input:focus {
    border-color: var(--text);
}
.search-bar input::placeholder {
    color: var(--hint);
    font-weight: 400;
}

/* ══════════════════════════════════════════════
   PRODUCT GRID — как на сайте: 2 колонки
   ══════════════════════════════════════════════ */
.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 0 6px;
}

/* ══════════════════════════════════════════════
   PRODUCT CARD — чистая, без теней и скруглений
   Как на сайте: фото + название + цена + кнопки
   ══════════════════════════════════════════════ */
.product-card {
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}
.product-card:active {
    opacity: 0.85;
}

.product-card__img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    background: var(--secondary-bg);
}

.product-card__info {
    padding: 12px 10px 4px;
    text-align: left;
}

.product-card__name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    color: var(--text);
}

.product-card__price {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}

.product-card__split {
    margin-top: 6px;
    font-size: 11px;
    color: #6b6b6b;
    line-height: 1.35;
}

.split-component {
    min-height: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.split-component--fallback {
    color: #6b6b6b;
    font-size: 11px;
    line-height: 1.35;
}

.product-card__price--old {
    font-size: 12px;
    font-weight: 400;
    color: var(--hint);
    text-decoration: line-through;
    margin-left: 6px;
}
.product-card__price--range {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

.product-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    letter-spacing: 0;
}

/* ══ Card buttons ══ */
.product-card__buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 10px 16px;
    margin-top: auto;
}
.product-card__btn {
    display: block;
    width: 100%;
    padding: 10px 0;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    transition: all 0.2s;
}
.product-card__btn--detail {
    border: 1px solid var(--border);
    background: none;
    color: var(--text);
}
.product-card__btn--detail:active {
    background: var(--secondary-bg);
}
.product-card__btn--cart {
    border: none;
    background: var(--btn-dark);
    color: var(--btn-dark-text);
}
.product-card__btn--cart:active {
    opacity: 0.85;
}
.product-card__btn--cart.btn-added {
    background: var(--success);
}

/* ══════════════════════════════════════════════
   LOAD MORE — как на сайте: "ЗАГРУЗИТЬ ЕЩЁ"
   ══════════════════════════════════════════════ */
.load-more {
    padding: 32px 16px;
    text-align: center;
}
.btn-load-more {
    padding: 12px 40px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: none;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    transition: all 0.2s;
}
.btn-load-more:active {
    background: var(--text);
    color: var(--bg);
}
.btn-load-more.loading-spinner {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

/* ══════════════════════════════════════════════
   LOADING SPINNER
   ══════════════════════════════════════════════ */
.loading {
    display: none;
    padding: 40px;
    text-align: center;
}
.loading.visible { display: block; }
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   BUTTONS — как на сайте:
   Primary = чёрный (сплошной), uppercase
   Secondary = белый с чёрным бордером, uppercase
   ══════════════════════════════════════════════ */
.btn-primary {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border: 1px solid var(--btn-dark);
    border-radius: 6px;
    background: var(--btn-dark);
    color: var(--btn-dark-text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: opacity 0.2s;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
}
.btn-primary:active { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
    display: block;
    width: 100%;
    padding: 12px 24px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    transition: all 0.2s;
}
.btn-secondary:active {
    background: var(--text);
    color: var(--bg);
}

/* ══════════════════════════════════════════════
   PRODUCT DETAIL
   ══════════════════════════════════════════════ */
.detail__gallery {
    position: relative;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    display: flex;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.detail__gallery::-webkit-scrollbar { display: none; }

.detail__gallery img {
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    scroll-snap-align: start;
}

.detail__gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px;
}
.gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s;
}
.gallery-dot.active {
    background: var(--text);
}

.detail__body {
    padding: 20px 16px 32px;
}

.detail__name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    line-height: 1.4;
    color: var(--text);
}

.detail__price-block {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.detail__price {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.02em;
}
.detail__old-price {
    font-size: 14px;
    color: var(--hint);
    text-decoration: line-through;
}

.detail__split {
    margin-top: 4px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #606060;
}

.detail__ultimate-widget {
    margin: 8px 0 14px;
}

.detail__variants {
    margin: 20px 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.detail__variants-title {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    color: var(--text-secondary);
}
.detail__variants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail__variant-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: none;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
    letter-spacing: 0.02em;
}
.detail__variant-btn.active {
    border-color: var(--text);
    background: var(--text);
    color: var(--bg);
}

.detail__add-to-cart {
    width: 100%;
    margin: 20px 0 0;
}

.detail__desc {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-line;
}

/* ══════════════════════════════════════════════
   CART
   ══════════════════════════════════════════════ */
.cart {
    padding-bottom: 24px;
}

.cart__header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 16px 16px 8px;
}

.cart__title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
}

.cart__items {
    padding: 0 16px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item__img {
    width: 72px;
    height: 96px;
    border-radius: var(--radius);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--secondary-bg);
}

.cart-item__info {
    flex: 1;
    min-width: 0;
}

.cart-item__name {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item__variant {
    font-size: 11px;
    color: var(--hint);
    margin-top: 3px;
}

.cart-item__price {
    font-size: 14px;
    font-weight: 400;
    margin-top: 6px;
}

.cart-item__controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cart-item__qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: none;
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    transition: all 0.2s;
}
.cart-item__qty-btn:active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.cart-item__qty {
    font-size: 14px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item__remove {
    background: none;
    border: none;
    color: var(--hint);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    transition: color 0.2s;
}
.cart-item__remove:hover {
    color: var(--danger);
}

.cart__footer {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    padding: 0 0 12px;
    border-bottom: 1px solid var(--border);
}

.cart__total-price {
    font-size: 18px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.02em;
}

.cart__continue {
    margin-top: 4px;
}

/* ══════════════════════════════════════════════
   ORDER FORM
   ══════════════════════════════════════════════ */
.order-form {
    padding-bottom: 32px;
    overflow: hidden;
}

.order-form form {
    padding: 0 16px;
}

.form-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    color: var(--text-secondary);
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.form-section-title:first-child {
    margin-top: 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-sm);
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    outline: none;
    font-family: var(--font);
    transition: border-color 0.2s;
    -webkit-appearance: none;
}
.form-input:focus {
    border-color: var(--text);
}

.form-textarea {
    resize: vertical;
    min-height: 70px;
}

select.form-input {
    cursor: pointer;
}

/* iOS date input — ограничиваем ширину, чтобы не вылезал за контейнер */
input[type="date"].form-input {
    min-height: 44px;
    max-width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

select.form-input {
    min-height: 44px;
}

/* ── Placeholder видимость на iOS ── */
.form-input::placeholder {
    color: var(--hint);
    opacity: 1;
    -webkit-text-fill-color: var(--hint);
}

.form-textarea::placeholder {
    color: var(--hint);
    opacity: 1;
    -webkit-text-fill-color: var(--hint);
}

/*
 * iOS Safari: -webkit-text-fill-color переопределяет color,
 * поэтому нужно явно задавать его для всех состояний.
 * НЕ ставим -webkit-text-fill-color на .form-input глобально —
 * это убивает placeholder.
 */
.form-input:not(:placeholder-shown),
.form-textarea:not(:placeholder-shown) {
    -webkit-text-fill-color: var(--text);
}

.form-input:placeholder-shown,
.form-textarea:placeholder-shown {
    -webkit-text-fill-color: var(--hint);
}

/* Для select — всегда нормальный цвет текста */
select.form-input {
    -webkit-text-fill-color: var(--text);
}

/* ══ Order Summary ══ */
.order-summary {
    background: var(--secondary-bg);
    border-radius: var(--radius);
    padding: 16px;
    margin: 24px 0;
}

.order-summary__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
    margin-bottom: 12px;
}

.order-summary__item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    gap: 12px;
}

.order-summary__item span:first-child {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-summary__total {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-sm);
}

.order-form__submit {
    margin-top: 8px;
}

.payment-methods {
    display: grid;
    gap: 10px;
    margin-bottom: 8px;
}

.payment-methods__item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
}

.payment-methods__item strong {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
}

.payment-methods__item span {
    color: #6d6d6d;
    font-size: 11px;
    line-height: 1.35;
}

.payment-methods__item--disabled {
    opacity: 0.55;
}

.order-hint {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.35;
    color: #696969;
}

.order-split {
    margin: 2px 0 10px;
}

.order__ultimate-widget {
    margin: 2px 0 14px;
    max-height: 140px;
    overflow: hidden;
    /* Виджет YaPay иногда перехватывает тапы в Telegram WebView; оплата всё равно через ЮKassa. */
    pointer-events: none;
}

/* ══════════════════════════════════════════════
   ORDER SUCCESS
   ══════════════════════════════════════════════ */
.success {
    text-align: center;
    padding: 80px 24px;
}

.success__icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.success__title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing);
}

.success__text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.success__btn {
    margin-top: 32px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

/* ══════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════ */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text);
    color: var(--bg);
    padding: 10px 28px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════ */
.empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--hint);
    font-size: 14px;
    letter-spacing: 0.02em;
    grid-column: 1 / -1;
}

/* ══════════════════════════════════════════════
   SKELETON CARDS
   ══════════════════════════════════════════════ */
.skeleton-card {
    background: var(--bg);
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.skeleton-card__img {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: linear-gradient(110deg, #f0f0f0 8%, #e0e0e0 18%, #f0f0f0 33%);
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
}
.skeleton-card__info {
    padding: 12px 10px 4px;
    text-align: left;
}
.skeleton-card__line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(110deg, #f0f0f0 8%, #e0e0e0 18%, #f0f0f0 33%);
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
    margin: 0 0 8px;
}
.skeleton-card__line--title {
    width: 75%;
}
.skeleton-card__line--price {
    width: 40%;
    height: 14px;
}
.skeleton-card__buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 10px 12px;
}
.skeleton-card__btn {
    width: 100%;
    height: 36px;
    border-radius: 6px;
    background: linear-gradient(110deg, #f0f0f0 8%, #e0e0e0 18%, #f0f0f0 33%);
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ══════════════════════════════════════════════
   SEPARATOR — тонкая линия как на сайте
   ══════════════════════════════════════════════ */
.separator {
    height: 1px;
    background: var(--border);
    margin: 0 16px;
}

/* ══════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════ */

/* ── Keyframes ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes badgeBounce {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.5); }
    50%  { transform: scale(0.85); }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes cartPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes successPop {
    0%   { opacity: 0; transform: scale(0.5); }
    60%  { opacity: 1; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ── Product card staggered appear ── */
.product-card.animate-in {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
    animation-delay: var(--appear-delay, 0s);
}

/* ── Image fade-in on load ── */
.product-card__img,
.cart-item__img,
.detail__gallery img {
    opacity: 0;
    transition: opacity 0.4s ease;
}
.product-card__img.loaded,
.cart-item__img.loaded,
.detail__gallery img.loaded {
    opacity: 1;
}

/* ── Screen transitions ── */
#screen-product {
    animation: slideUp 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#screen-cart.screen-enter,
#screen-order.screen-enter,
#screen-success.screen-enter {
    animation: fadeIn 0.3s ease;
}

/* ── Detail body content appear ── */
.detail__body {
    animation: fadeInUp 0.4s ease 0.15s both;
}

/* ── Cart badge bounce ── */
.header__cart-badge.bounce {
    animation: badgeBounce 0.4s ease;
}

/* ── Cart icon pulse on add ── */
.header__cart.pulse {
    animation: cartPulse 0.3s ease;
}

/* cart items — no animation, instant render */

/* ── Add to cart button feedback ── */
.btn-primary.btn-added {
    background: var(--success);
    transition: background 0.2s ease;
}

/* ── Success screen icon pop ── */
.success__icon {
    animation: successPop 0.5s cubic-bezier(0.17, 0.67, 0.29, 1.27) 0.1s both;
}
.success__title {
    animation: fadeInUp 0.4s ease 0.3s both;
}
.success__text {
    animation: fadeInUp 0.4s ease 0.4s both;
}
.success__btn {
    animation: fadeInUp 0.4s ease 0.5s both;
}

/* ── Category/price filter — smooth switch fade ── */
.products.fade-out {
    opacity: 0.3;
    transition: opacity 0.15s ease;
}
.products.fade-in {
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* ── Skeleton / placeholder while loading ── */
.product-card__img-skeleton {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: linear-gradient(90deg, var(--secondary-bg) 25%, #efefef 50%, var(--secondary-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ── Load more button hover + spinner ── */
.btn-load-more {
    transition: all 0.25s ease;
}
.btn-load-more:hover {
    background: var(--text);
    color: var(--bg);
}
.btn-load-more:disabled {
    opacity: 0.6;
    cursor: wait;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

/* ── Variant button transition ── */
.detail__variant-btn {
    transition: all 0.2s ease;
}

/* ── Form input focus transition ── */
.form-input {
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-input:focus {
    border-color: var(--text);
    box-shadow: 0 0 0 1px var(--text);
}

/* ── Cart qty change animation ── */
.cart-item__qty.changed {
    animation: badgeBounce 0.3s ease;
}

/* ── Smooth scrollbar for categories ── */
.categories, .price-filter {
    scroll-behavior: smooth;
}

@keyframes tickerMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════
   Стили для подскази адресов
   ══════════════════════════════════════════════ */
.address-suggest-wrap {
    position: relative;
}

.address-suggest-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 500;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    /* Ограничиваем высоту — на мобиле список не должен уходить под клавиатуру */
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;  /* не пробрасываем скролл на страницу */
    /* анимация появления */
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.address-suggest-dropdown.address-suggest-dropdown--open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.address-suggest-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 48px;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.1s;
    user-select: none;
    -webkit-user-select: none;
}

.address-suggest-item:last-child {
    border-bottom: none;
}

.address-suggest-item:hover,
.address-suggest-item--active {
    background: var(--secondary-bg);
}

.address-suggest-item:active {
    background: #e8e8e8;
}

.address-suggest-item--empty {
    pointer-events: none;
    color: var(--hint);
    font-size: 13px;
    justify-content: center;
}

.address-suggest-item__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

.address-suggest-item__value mark {
    background: transparent;
    color: var(--text);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.address-suggest-item__zone {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-secondary);
}

.address-suggest-item__zone--distance {
    color: var(--text-secondary);
    font-weight: 600;
}

.address-suggest-item__zone--outside {
    color: var(--hint);
}

.address-suggest-wrap .address-suggest-spinner {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: suggestSpin 0.7s linear infinite;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.address-suggest-wrap.address-suggest-wrap--loading .address-suggest-spinner {
    opacity: 1;
}

@keyframes suggestSpin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.address-zone-badge {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    display: none;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    line-height: 1.4;
}

.address-zone-badge--visible {
    display: flex;
}

.address-zone-badge__price {
    font-weight: 700;
    color: var(--success);
}

/* ══════════════════════════════════════════════
   TAB BAR — нижняя навигация
   ══════════════════════════════════════════════ */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 560px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.tab-bar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0 10px;
    gap: 3px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--hint);
    font-family: var(--font);
    transition: color 0.2s;
}

.tab-bar__item.active {
    color: var(--text);
}

.tab-bar__item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tab-bar__label {
    font-size: 10px;
    letter-spacing: 0.03em;
}

/* Отступ снизу чтобы контент не прятался за tab bar */
#app {
    padding-bottom: 60px;
}

/* ══════════════════════════════════════════════
   PROFILE SCREEN
   ══════════════════════════════════════════════ */
.profile {
    padding: 20px 16px;
}

.profile__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.profile__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--secondary-bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--hint);
    flex-shrink: 0;
}

.profile__name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-sm);
}

.profile__subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile__section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hint);
    margin-bottom: 12px;
}

.profile__empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.order-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-card__id {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-sm);
}

.order-card__date {
    font-size: 12px;
    color: var(--hint);
}

.order-card__status {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.order-card__status--created    { background: #f0f0f0; color: #666; }
.order-card__status--paid       { background: #e8f5e9; color: #2e7d32; }
.order-card__status--florist    { background: #fff3e0; color: #e65100; }
.order-card__status--courier    { background: #e3f2fd; color: #1565c0; }
.order-card__status--delivered  { background: #e8f5e9; color: #2e7d32; }
.order-card__status--cancelled  { background: #ffebee; color: #c62828; }

.order-card__items {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.order-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

.order-card__total {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-sm);
}

.order-card__repeat-btn {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 6px 14px;
    border: 1.5px solid var(--btn-outline-border);
    border-radius: 20px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.2s, color 0.2s;
}

.order-card__repeat-btn:active {
    background: var(--text);
    color: var(--bg);
}

/* ══════════════════════════════════════════════
   ORDERS SWITCHER
   ══════════════════════════════════════════════ */
.orders-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.orders-switcher__btn {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.orders-switcher__btn.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.orders-switcher__count {
    font-size: 11px;
    font-weight: 700;
    background: rgba(255,255,255,0.25);
    padding: 1px 6px;
    border-radius: 10px;
}

.orders-switcher__btn:not(.active) .orders-switcher__count {
    background: var(--border);
    color: var(--text-secondary);
}
