/* =========================================================
   ПИНЬЯТА СМЯТА — MOBILE APP v2.1
   Плюс: админка-приложение. Проверено на desktop.
   ========================================================= */

* { -webkit-tap-highlight-color: transparent; }
button, a, .cat-btn, .clothing-tab, .palette-swatch, .granny {
    touch-action: manipulation;
}
body { -webkit-text-size-adjust: 100%; }

@media (max-width: 900px) {
    .form-field input,
    .form-field textarea,
    .form-field select,
    .yarn-add input,
    .price-modal input,
    .price-modal select { font-size: 16px; }
}

/* =========================================================
   BOTTOM NAVIGATION
   ========================================================= */
.mobile-app-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    z-index: 150;
    background: linear-gradient(180deg,
        rgba(253, 250, 246, .98) 0%,
        rgba(248, 240, 232, .96) 100%);
    backdrop-filter: blur(24px) saturate(170%);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    border-top: 1px solid rgba(199, 154, 85, .22);
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0));
    box-shadow: 0 -10px 30px rgba(54, 28, 31, .08);
    transform: translateY(0);
    transition: transform .45s cubic-bezier(.19,1,.22,1), opacity .35s;
}
.mobile-app-nav.hidden-by-scroll {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
}
.mobile-app-nav__inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    align-items: end;
}
.mobile-app-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px 6px;
    min-height: 52px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #8B6F47;
    font-family: inherit;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    border: 0;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: color .25s, background .25s, transform .3s cubic-bezier(.16,1,.3,1);
}
.mobile-app-nav__item:active {
    transform: scale(.95);
    background: rgba(126, 31, 59, .05);
}
.mobile-app-nav__icon {
    width: 22px;
    height: 22px;
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: currentColor;
    transition: transform .35s cubic-bezier(.16,1,.3,1), color .3s;
}
.mobile-app-nav__icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.4;
}
.mobile-app-nav__label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .72;
    margin-top: 2px;
    color: inherit;
    white-space: nowrap;
}
.mobile-app-nav__item.active {
    color: #7E1F3B;
    background: transparent;
}
.mobile-app-nav__item.active .mobile-app-nav__icon {
    transform: translateY(-1px) scale(1.06);
}
.mobile-app-nav__item.active .mobile-app-nav__icon svg {
    stroke-width: 1.7;
}
.mobile-app-nav__item.active .mobile-app-nav__label {
    opacity: 1;
    color: #5C142B;
}
.mobile-app-nav__item.active .mobile-app-nav__icon::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #C79A55;
    box-shadow: 0 0 0 3px rgba(199, 154, 85, .18);
}
.mobile-app-nav__item--accent {
    color: #5C142B;
    background: transparent;
    overflow: visible;
}
.mobile-app-nav__item--accent .mobile-app-nav__icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 4px;
    background: linear-gradient(180deg, #7E1F3B 0%, #5C142B 100%);
    color: #FBF3E8;
    border-radius: 50%;
    border: 0;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .16) inset,
        0 4px 10px rgba(92, 20, 43, .26),
        0 0 0 2px rgba(255, 252, 249, .96),
        0 0 0 3px rgba(199, 154, 85, .42);
    overflow: visible;
    transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.mobile-app-nav__item--accent .mobile-app-nav__icon::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, .22) 0%,
        rgba(255, 255, 255, 0) 55%);
    pointer-events: none;
}
.mobile-app-nav__item--accent .mobile-app-nav__icon svg {
    width: 17px;
    height: 17px;
    stroke: #FBF3E8;
    stroke-width: 1.6;
}
.mobile-app-nav__item--accent .mobile-app-nav__label {
    color: #5C142B;
    opacity: 1;
    font-weight: 800;
}
.mobile-app-nav__item--accent:active .mobile-app-nav__icon {
    transform: scale(.92);
}
.mobile-app-nav__item--accent:active,
.mobile-app-nav__item--accent.active {
    background: transparent;
    transform: none;
}
@media (max-width: 900px) {
    .mobile-app-nav { display: block; }
    body { padding-bottom: calc(82px + env(safe-area-inset-bottom, 0)); }
    footer { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0)); }
    .nav > .btn-primary { display: none; }
    .how-contact .row .btn-primary { display: none; }
}

/* =========================================================
   BOTTOM SHEET МОДАЛКИ
   ========================================================= */
@media (max-width: 900px) {
    .modal-bg { align-items: flex-end; padding: 0; }
    .modal {
        border-radius: 28px 28px 0 0;
        padding: 12px 22px calc(28px + env(safe-area-inset-bottom, 0));
        max-height: 92vh;
        max-width: 100%;
        transform: translateY(100%) scale(1);
        opacity: 1;
        transition: transform .5s cubic-bezier(.19,1,.22,1);
        touch-action: pan-y;
    }
    .modal-bg.open .modal { transform: translateY(0) scale(1); }
    .modal::before {
        content: '';
        display: block;
        width: 44px; height: 5px;
        border-radius: 999px;
        background: linear-gradient(90deg, #C79A55, #7E1F3B);
        margin: 0 auto 18px;
    }
    .modal-close { top: 18px; right: 18px; width: 36px; height: 36px; }
    .modal h2 { font-size: 24px; }
    .modal-sub { font-size: 12.5px; margin-bottom: 20px; }

    .price-modal-bg { align-items: flex-end; padding: 0; }
    .price-modal {
        border-radius: 28px 28px 0 0;
        padding: 12px 22px calc(28px + env(safe-area-inset-bottom, 0));
        max-width: 100%;
    }
    .price-modal::before {
        content: '';
        display: block;
        width: 44px; height: 5px;
        border-radius: 999px;
        background: linear-gradient(90deg, #C79A55, #7E1F3B);
        margin: 0 auto 18px;
    }
}

/* =========================================================
   КАТАЛОГ — 2 КОМПАКТНЫЕ КОЛОНКИ
   ========================================================= */
@media (max-width: 640px) {
    .catalog { grid-template-columns: 1fr 1fr; gap: 12px; }
    .product { border-radius: 20px; }
    .product-img-wrap, .product img, .product-placeholder { aspect-ratio: 1 / 1; }
    .product-placeholder { font-size: 42px; }
    .product-info { padding: 12px 12px 14px; }
    .product h3 { font-size: 13.5px; margin-bottom: 4px; line-height: 1.25; }
    .product p {
        font-size: 11.5px;
        margin-bottom: 10px;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .product .price { font-size: 15px; padding-top: 6px; margin: 4px 0 10px; }
    .product .btn { padding: 10px 12px; font-size: 11.5px; border-radius: 999px; }

    .stock-sidebar .catalog { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stock-sidebar .product-img-wrap,
    .stock-sidebar .product img,
    .stock-sidebar .product-placeholder { height: 110px; aspect-ratio: auto; }
    .stock-sidebar .product-info { padding: 10px 10px 12px; }
    .stock-sidebar .product h3 { font-size: 12px; }
    .stock-sidebar .product p { font-size: 10.5px; -webkit-line-clamp: 2; }
    .stock-sidebar .product .price { font-size: 13.5px; }
    .stock-sidebar .product .btn { padding: 8px 10px; font-size: 10.5px; }
}

/* =========================================================
   КАТЕГОРИИ — SNAP SCROLL
   ========================================================= */
@media (max-width: 640px) {
    .cats {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        justify-content: flex-start;
        margin: 0 -5% 22px;
        padding: 4px 5% 12px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-padding: 0 5%;
    }
    .cats::-webkit-scrollbar { display: none; }
    .cats .cat-btn { flex: 0 0 auto; scroll-snap-align: start; }
    .cats-sub { margin-bottom: 28px; padding-bottom: 8px; }
    .cat-btn { padding: 9px 16px; font-size: 12px; }
    .cat-btn-main { padding: 10px 20px; font-size: 13px; }
    .cat-btn-sub  { padding: 8px 14px; font-size: 11.5px; }
    .cat-btn-link { padding-right: 38px; }
    .cat-btn-link::after { right: 14px; font-size: 13px; }
}

/* =========================================================
   HEADER / МОБИЛЬНОЕ МЕНЮ
   ========================================================= */
@media (max-width: 900px) {
    header {
        background: rgba(245, 240, 234, .92);
        backdrop-filter: blur(24px) saturate(170%);
        -webkit-backdrop-filter: blur(24px) saturate(170%);
    }
    :root { --header-height: 60px; }
    .logo { font-size: 14px; gap: 8px; }
    .logo img { width: 34px; height: 34px; }
    .menu-toggle { width: 40px; height: 40px; border-radius: 12px; }
    .nav { gap: 10px; }

    .mobile-menu {
        top: var(--header-height);
        padding: 8px 5% calc(20px + env(safe-area-inset-bottom, 0));
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
    .mobile-menu a {
        padding: 18px 6px;
        font-size: 16px;
        border-radius: 12px;
    }
    .mobile-menu a:hover, .mobile-menu a.active {
        padding-left: 14px;
        background: rgba(165, 47, 82, .05);
    }
    .mobile-menu a[data-open-order] {
        margin-top: 10px;
        background: linear-gradient(180deg, #7E1F3B 0%, #5C142B 100%);
        color: #FBF3E8 !important;
        text-align: center;
        border: 0;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: .12em;
        text-transform: uppercase;
        box-shadow: 0 10px 24px rgba(92, 20, 43, .28);
    }
}

/* =========================================================
   HERO + WELCOME
   ========================================================= */
@media (max-width: 900px) {
    .hero-section .container {
        grid-template-columns: 1fr !important;
        gap: 34px !important;
    }
    .hero-card-block { transform: none !important; order: -1; }
    .hero-card-block img { max-height: 300px !important; }
    .hero-text-block h1 { font-size: clamp(36px, 9vw, 52px) !important; }

    .welcome-section {
        margin-top: 0 !important;
        padding: 60px 0 70px !important;
        border-radius: 32px 32px 0 0 !important;
    }
    .welcome-section::before { top: 30px !important; }
    .welcome-topline { top: 18px !important; }
    .welcome-title { font-size: clamp(28px, 7vw, 40px) !important; }
    .welcome-lead { font-size: 15.5px !important; margin-bottom: 36px !important; }
    .welcome-item { padding: 24px 0 !important; }
    .welcome-item__content { gap: 16px !important; }
    .welcome-item__icon { width: 44px !important; height: 44px !important; font-size: 20px !important; border-radius: 12px !important; }
    .welcome-item__text { font-size: 14.5px !important; padding-top: 4px !important; }
    .welcome-final { padding: 32px 22px 26px !important; }
    .welcome-final__quote { font-size: 80px !important; top: 8px !important; left: 14px !important; }
    .welcome-final__text { font-size: 16px !important; }
}

/* Скрываем цифры 01/02/03 */
.welcome-item__num { display: none !important; }
.welcome-item {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 0 !important;
}
.welcome-item__content {
    display: flex !important;
    gap: 20px !important;
    width: 100% !important;
    align-items: flex-start !important;
}
.welcome-item__icon { flex-shrink: 0 !important; }
.welcome-item__text { padding-top: 6px !important; }
@media (max-width: 800px) {
    .welcome-item__content { gap: 16px !important; }
}
@media (max-width: 480px) {
    .welcome-item { padding: 20px 0 !important; }
    .welcome-item__content { gap: 12px !important; }
}

/* =========================================================
   КОНСТРУКТОР
   ========================================================= */
@media (max-width: 640px) {
    .constructor { padding: 24px 0 60px; }
    .clothing-tabs {
        gap: 6px;
        margin-bottom: 22px;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 4px 5% 8px;
        margin-left: -5%;
        margin-right: -5%;
        scrollbar-width: none;
    }
    .clothing-tabs::-webkit-scrollbar { display: none; }
    .clothing-tab { flex: 0 0 auto; padding: 10px 16px; font-size: 12.5px; }

    .constructor-stage { padding: 14px 6px 24px; }
    .outfit {
        --sq: 32px;
        --gap: 3px;
        padding: 20px 34px 24px;
        border-radius: 26px;
    }
    .cardigan-sleeve--left, .cardigan-sleeve--right,
    .sweatshirt-sleeve--left, .sweatshirt-sleeve--right {
        padding: 5px 3px;
        border-radius: 14px;
    }
    .cardigan-sleeve--left, .sweatshirt-sleeve--left { left: -28px; }
    .cardigan-sleeve--right, .sweatshirt-sleeve--right { right: -28px; }
    .granny { border-radius: 8px; }
    .granny::before { inset: 14%; border-radius: 5px; }
    .granny::after  { inset: 32%; border-radius: 3px; }

    .constructor-controls { grid-template-columns: 1fr; gap: 12px; margin-bottom: 22px; }
    .palette-group { padding: 14px 14px 16px; border-radius: 16px; }
    .palette { grid-template-columns: repeat(7, 1fr); gap: 5px; max-height: none; }
    .palette-swatch { border-radius: 6px; }

    .constructor-actions { flex-direction: column; gap: 8px; }
    .constructor-actions .btn { width: 100%; padding: 13px 20px; }
    .constructor-counter { font-size: 12px; margin-top: 12px; }
}
@media (max-width: 480px) {
    .outfit { --sq: 28px; --gap: 3px; padding: 16px 28px 20px; }
    .cardigan-sleeve--left, .sweatshirt-sleeve--left { left: -22px; }
    .cardigan-sleeve--right, .sweatshirt-sleeve--right { right: -22px; }
}

/* =========================================================
   АДМИНКА-ПРИЛОЖЕНИЕ
   ========================================================= */

/* Общие блоки */
@media (max-width: 640px) {
    .yarn-add { grid-template-columns: 1fr; gap: 10px; }
    .yarn-add > div:last-child .btn { width: 100%; }
    .yarn-list { grid-template-columns: 1fr 1fr; gap: 10px; }
    .yarn-card { padding: 10px; border-radius: 12px; }
    .yarn-card__swatch { height: 46px; border-radius: 8px; }
    .yarn-card__name { font-size: 12px; }
    .yarn-card__hex { font-size: 10px; }
    .yarn-card__actions button { padding: 6px 4px; font-size: 10.5px; }
}
body.no-bottom-nav { padding-bottom: 0 !important; }
body.no-bottom-nav footer { padding-bottom: 20px !important; }

.admin-app { max-width: 1200px; margin: 0 auto; position: relative; }

.admin-app__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}
.admin-app__title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.04em;
    margin: 6px 0 0;
}
.admin-app__exit {
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid rgba(199, 154, 85, .35);
    background: rgba(255, 252, 249, .7);
    color: #6B4E2B;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .3s;
}
.admin-app__exit:hover {
    background: #7E1F3B;
    color: #FBF3E8;
    border-color: #7E1F3B;
}

/* ===== ТАБЫ ===== */
.admin-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 6px;
    background: rgba(255, 252, 249, .55);
    border: 1px solid rgba(199, 154, 85, .22);
    border-radius: 16px;
    margin-bottom: 22px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: calc(var(--header-height, 82px) + 10px);
    z-index: 20;
}
.admin-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 0;
    background: transparent;
    color: #6B4E2B;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .3s cubic-bezier(.16, 1, .3, 1);
}
.admin-tab:hover { background: rgba(199, 154, 85, .08); color: #7E1F3B; }
.admin-tab.active {
    background: linear-gradient(180deg, #7E1F3B 0%, #5C142B 100%);
    color: #FBF3E8;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .14) inset,
        0 6px 16px rgba(92, 20, 43, .25);
}
.admin-tab__icon {
    font-size: 16px;
    line-height: 1;
    filter: grayscale(1) opacity(.75);
    transition: filter .3s;
}
.admin-tab.active .admin-tab__icon { filter: none; }
.admin-tab__label { display: inline; }
.admin-tab__badge {
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(126, 31, 59, .1);
    color: #7E1F3B;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    letter-spacing: 0;
}
.admin-tab.active .admin-tab__badge {
    background: rgba(255, 255, 255, .22);
    color: #FBF3E8;
}
.admin-tab__badge:empty,
.admin-tab__badge[data-count="0"] { display: none; }

/* ===== ВИДЫ ===== */
.admin-panel-view {
    display: none;
    animation: adminFadeIn .4s cubic-bezier(.16, 1, .3, 1);
}
.admin-panel-view.active { display: block; }
@keyframes adminFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== ТУЛБАР ===== */
.admin-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
}
.admin-search {
    flex: 1;
    min-width: 0;
    padding: 12px 16px 12px 40px;
    border-radius: 12px;
    border: 1px solid rgba(199, 154, 85, .28);
    background: rgba(255, 252, 249, .85) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23817577' stroke-width='1.6' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>") no-repeat 14px center / 16px;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    transition: all .3s;
}
.admin-search:focus {
    outline: none;
    background-color: #fff;
    border-color: rgba(199, 154, 85, .6);
    box-shadow: 0 0 0 3px rgba(199, 154, 85, .12);
}
.admin-filter {
    padding: 11px 16px;
    border-radius: 12px;
    border: 1px solid rgba(199, 154, 85, .28);
    background: rgba(255, 252, 249, .7);
    color: #6B4E2B;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: all .25s;
}
.admin-filter:hover { background: #fff; border-color: rgba(199, 154, 85, .5); }
.admin-filter.active {
    background: linear-gradient(180deg, #7E1F3B 0%, #5C142B 100%);
    color: #FBF3E8;
    border-color: #7E1F3B;
}

/* ===== КАРТОЧКИ ТОВАРОВ ===== */
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-row {
    display: grid;
    grid-template-columns: 64px minmax(180px, 1fr) auto auto auto auto;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255, 252, 249, .85);
    border: 1px solid rgba(166, 141, 130, .18);
    border-radius: 16px;
    transition: all .3s cubic-bezier(.16, 1, .3, 1);
}
.admin-row:hover {
    background: #fff;
    border-color: rgba(199, 154, 85, .4);
    box-shadow: 0 8px 22px rgba(92, 68, 51, .07);
    transform: translateY(-1px);
}
.admin-row--flash {
    background: rgba(79, 117, 68, .08) !important;
    border-color: rgba(79, 117, 68, .5) !important;
    animation: flashPulse .9s ease;
}
@keyframes flashPulse {
    0%   { box-shadow: 0 0 0 0 rgba(79, 117, 68, .4); }
    70%  { box-shadow: 0 0 0 8px rgba(79, 117, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 117, 68, 0); }
}
.admin-row__thumb {
    width: 64px; height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(145deg, #F8D9DE, #FCEDE6);
    flex-shrink: 0;
}
.admin-row__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-row__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.ar-input {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 8px;
    padding: 6px 8px;
    font-family: inherit;
    font-size: 13px;
    color: var(--ink);
    transition: all .2s;
    min-width: 0;
}
.ar-input:hover { background: rgba(255, 255, 255, .7); }
.ar-input:focus {
    outline: none;
    background: #fff;
    border-color: rgba(199, 154, 85, .5);
    box-shadow: 0 0 0 3px rgba(199, 154, 85, .12);
}
.ar-input--title { font-weight: 700; font-size: 14px; }
.ar-input--desc {
    font-size: 12px;
    color: var(--mute);
    resize: none;
    line-height: 1.45;
    overflow: hidden;
    min-height: 28px;
}
.admin-row__price { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ar-price-wrap { position: relative; display: flex; align-items: center; }
.ar-input--price {
    width: 90px;
    text-align: right;
    padding-right: 24px;
    font-weight: 700;
    font-size: 13px;
}
.ar-price-cur {
    position: absolute;
    right: 8px;
    font-size: 12px;
    color: var(--mute);
    pointer-events: none;
}
.ar-input--price-to { width: 70px; text-align: right; font-weight: 700; font-size: 13px; }

.ar-select {
    border: 1px solid transparent;
    background: rgba(255, 255, 255, .6);
    border-radius: 8px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 12px;
    color: var(--ink);
    cursor: pointer;
    transition: all .2s;
}
.ar-select:hover { background: #fff; border-color: rgba(199, 154, 85, .3); }
.ar-select:focus {
    outline: none;
    border-color: rgba(199, 154, 85, .6);
    box-shadow: 0 0 0 3px rgba(199, 154, 85, .12);
}
.ar-select--ptype { width: 78px; }
.ar-select--main  { min-width: 130px; }
.ar-select--sub   { min-width: 120px; }
.admin-row__cats { display: flex; gap: 6px; flex-shrink: 0; }

.admin-row__stock { flex-shrink: 0; }
.ar-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .6);
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all .25s;
    white-space: nowrap;
}
.ar-stock:hover { background: #fff; border-color: rgba(199, 154, 85, .35); }
.ar-stock input { width: 16px; height: 16px; margin: 0; accent-color: #4f7544; cursor: pointer; }
.ar-stock:has(input:checked) {
    background: rgba(79, 117, 68, .1);
    border-color: rgba(79, 117, 68, .4);
    color: #3d5c35;
}

.admin-row__actions { flex-shrink: 0; display: flex; gap: 4px; }
.ar-btn {
    width: 34px; height: 34px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 18px;
    line-height: 1;
    color: var(--mute);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s;
}
.ar-btn:hover {
    background: rgba(200, 60, 60, .08);
    border-color: rgba(200, 60, 60, .3);
    color: #a33;
}

/* ===== FAB ===== */
.admin-fab {
    position: fixed;
    right: 22px;
    bottom: 28px;
    z-index: 100;
    width: 60px; height: 60px;
    border-radius: 50%;
    border: 0;
    background: linear-gradient(180deg, #7E1F3B 0%, #5C142B 100%);
    color: #FBF3E8;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .18) inset,
        0 12px 30px rgba(92, 20, 43, .35),
        0 0 0 3px rgba(255, 252, 249, .95),
        0 0 0 4px rgba(199, 154, 85, .45);
    transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s;
}
.admin-fab svg { width: 26px; height: 26px; }
.admin-fab:hover { transform: translateY(-3px) scale(1.03); }
.admin-fab:active { transform: scale(.92); }
.admin-fab.visible { display: flex; }

@media (max-width: 900px) {
    .admin-fab { bottom: calc(96px + env(safe-area-inset-bottom, 0)); }
}

/* ===== SWITCH ===== */
.admin-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 252, 249, .7);
    border: 1px solid rgba(199, 154, 85, .25);
    border-radius: 12px;
    cursor: pointer;
    transition: all .3s;
    margin-top: 4px;
}
.admin-switch:hover { background: #fff; border-color: rgba(199, 154, 85, .5); }
.admin-switch input { position: absolute; opacity: 0; pointer-events: none; }
.admin-switch__slider {
    position: relative;
    width: 44px; height: 26px;
    border-radius: 999px;
    background: rgba(166, 141, 130, .25);
    transition: background .3s;
    flex-shrink: 0;
}
.admin-switch__slider::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
.admin-switch input:checked + .admin-switch__slider {
    background: linear-gradient(180deg, #7E1F3B 0%, #5C142B 100%);
}
.admin-switch input:checked + .admin-switch__slider::after {
    transform: translateX(18px);
}
.admin-switch__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
    letter-spacing: .02em;
}

/* ===== МОБИЛЬНЫЙ АДАПТИВ ===== */
@media (max-width: 900px) {
    .admin-tabs {
        grid-template-columns: repeat(4, 1fr);
        padding: 4px;
        gap: 4px;
        overflow-x: auto;
        scrollbar-width: none;
        position: sticky;
        top: calc(var(--header-height, 60px) + 8px);
    }
    .admin-tabs::-webkit-scrollbar { display: none; }
    .admin-tab { padding: 10px 8px; font-size: 10.5px; flex-direction: column; gap: 4px; min-width: 70px; }
    .admin-tab__label { font-size: 9.5px; letter-spacing: .08em; }
    .admin-tab__badge { position: absolute; top: 4px; right: 4px; font-size: 9px; padding: 1px 5px; min-width: 16px; }

    .admin-app__title { font-size: 24px; }
    .admin-app__exit { padding: 9px 14px; font-size: 10px; }

    .admin-toolbar { flex-wrap: wrap; }
    .admin-search { flex: 1 1 100%; }
    .admin-filter { flex: 1; padding: 10px 12px; font-size: 10.5px; }

    .admin-row {
        grid-template-columns: 56px 1fr auto;
        grid-template-areas:
            "thumb info actions"
            "thumb price price"
            "thumb cats stock";
        gap: 8px;
        padding: 12px;
        border-radius: 18px;
    }
    .admin-row__thumb { grid-area: thumb; width: 56px; height: 56px; border-radius: 14px; }
    .admin-row__info { grid-area: info; }
    .admin-row__price { grid-area: price; flex-wrap: wrap; }
    .admin-row__cats { grid-area: cats; flex-wrap: wrap; }
    .admin-row__stock { grid-area: stock; justify-self: end; }
    .admin-row__actions { grid-area: actions; }

    .ar-input--price { width: 80px; }
    .ar-input--price-to { width: 68px; }
    .ar-select--main, .ar-select--sub { min-width: 0; flex: 1; font-size: 11px; padding: 7px 8px; }
    .ar-stock { padding: 7px 10px; font-size: 11px; }
}
@media (max-width: 560px) {
    .admin-row { padding: 10px; gap: 6px; }
    .admin-row__thumb { width: 52px; height: 52px; }
    .ar-input { padding: 5px 7px; font-size: 12.5px; }
    .ar-input--title { font-size: 13.5px; }
    .ar-input--desc { font-size: 11.5px; }
    .ar-select { padding: 6px 8px; font-size: 11px; }
    .ar-stock span { font-size: 10.5px; }
    .ar-btn { width: 30px; height: 30px; font-size: 16px; }
}

/* Пустое состояние */
.admin-empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--mute);
}
.admin-empty__icon { font-size: 44px; margin-bottom: 12px; opacity: .5; }
.admin-empty__text { font-size: 14px; }

/* =========================================================
   PREMIUM BUTTONS
   ========================================================= */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition:
        background .4s cubic-bezier(.16, 1, .3, 1),
        color .3s ease,
        border-color .3s ease,
        transform .35s cubic-bezier(.16, 1, .3, 1),
        box-shadow .4s cubic-bezier(.16, 1, .3, 1);
    box-shadow: none;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity .35s ease;
}
.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled, .btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.btn-primary {
    background: linear-gradient(180deg, #7E1F3B 0%, #5C142B 100%);
    color: #FBF3E8;
    border: 1px solid rgba(199, 154, 85, .35);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .12) inset,
        0 8px 22px rgba(92, 20, 43, .22);
}
.btn-primary:hover {
    background: linear-gradient(180deg, #8F2647 0%, #6A1830 100%);
    border-color: rgba(199, 154, 85, .6);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .16) inset,
        0 12px 30px rgba(92, 20, 43, .3);
}
.btn-outline {
    background: rgba(255, 252, 249, .72);
    color: #4A3728;
    border: 1px solid rgba(199, 154, 85, .38);
    box-shadow: 0 1px 2px rgba(92, 68, 51, .04);
}
.btn-outline:hover {
    background: rgba(255, 252, 249, .96);
    color: #7E1F3B;
    border-color: rgba(199, 154, 85, .75);
    box-shadow: 0 6px 18px rgba(199, 154, 85, .14);
}
.btn-soft {
    background: linear-gradient(180deg, #FBF6EF 0%, #F5EDE0 100%);
    color: #6B4E2B;
    border: 1px solid rgba(199, 154, 85, .3);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset;
}
.btn-soft:hover {
    background: linear-gradient(180deg, #FFF9F1 0%, #F7EFE2 100%);
    color: #7E1F3B;
    border-color: rgba(199, 154, 85, .55);
    box-shadow: 0 6px 18px rgba(199, 154, 85, .12);
}
.btn-small { padding: 11px 22px; font-size: 11px; letter-spacing: .1em; border-radius: 12px; }

.cat-btn {
    border-radius: 12px !important;
    border: 1px solid rgba(199, 154, 85, .3) !important;
    background: rgba(255, 252, 249, .7) !important;
    color: #6B4E2B !important;
    font-weight: 700 !important;
    letter-spacing: .06em !important;
}
.cat-btn:hover {
    background: rgba(255, 252, 249, 1) !important;
    border-color: rgba(199, 154, 85, .65) !important;
    color: #7E1F3B !important;
    transform: translateY(-1px);
}
.cat-btn.active {
    background: linear-gradient(180deg, #7E1F3B 0%, #5C142B 100%) !important;
    border-color: rgba(199, 154, 85, .5) !important;
    color: #FBF3E8 !important;
    box-shadow: 0 6px 14px rgba(92, 20, 43, .22) !important;
}
.clothing-tab {
    border-radius: 12px !important;
    border: 1px solid rgba(199, 154, 85, .3) !important;
    background: rgba(255, 252, 249, .75) !important;
    color: #6B4E2B !important;
    font-weight: 700 !important;
    letter-spacing: .04em !important;
}
.clothing-tab:hover {
    border-color: rgba(199, 154, 85, .65) !important;
    color: #7E1F3B !important;
    transform: translateY(-1px);
}
.clothing-tab.active {
    background: linear-gradient(180deg, #7E1F3B 0%, #5C142B 100%) !important;
    border-color: rgba(199, 154, 85, .5) !important;
    color: #FBF3E8 !important;
    box-shadow: 0 6px 14px rgba(92, 20, 43, .22) !important;
}
.modal-close, .close-x {
    background: rgba(255, 252, 249, .7) !important;
    border: 1px solid rgba(199, 154, 85, .3) !important;
    color: #6B4E2B !important;
    transition: all .35s cubic-bezier(.16, 1, .3, 1) !important;
}
.modal-close:hover, .close-x:hover {
    background: #7E1F3B !important;
    color: #FBF3E8 !important;
    border-color: #7E1F3B !important;
    transform: rotate(90deg);
}
.star-btn {
    color: rgba(199, 154, 85, .35) !important;
    background: none !important;
    border: 0 !important;
}
.star-btn:hover, .star-btn.active { color: #C79A55 !important; }

/* =========================================================
   RIPPLE
   ========================================================= */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(165, 47, 82, .22);
    pointer-events: none;
    animation: rippleAnim .6s cubic-bezier(.19,1,.22,1);
    z-index: 0;
}
.btn-primary .ripple { background: rgba(199, 154, 85, .28); }
.mobile-app-nav__item .ripple { background: rgba(126, 31, 59, .10); }
@keyframes rippleAnim { to { transform: scale(2.4); opacity: 0; } }

/* =========================================================
   SKELETON
   ========================================================= */
.skeleton {
    background: linear-gradient(90deg,
        rgba(166, 141, 130, .08) 25%,
        rgba(166, 141, 130, .16) 50%,
        rgba(166, 141, 130, .08) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s linear infinite;
    border-radius: 14px;
}
.skeleton-card { aspect-ratio: 1 / 1; border-radius: 20px; }
@keyframes skeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =========================================================
   PAGE TRANSITIONS
   ========================================================= */
@media (max-width: 900px) {
    body { animation: pageFadeIn .4s cubic-bezier(.16,1,.3,1); }
    @keyframes pageFadeIn {
        from { opacity: 0; transform: translateY(6px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    body.page-leaving { animation: pageFadeOut .25s ease forwards; }
    @keyframes pageFadeOut {
        to { opacity: 0; transform: translateY(-6px); }
    }
}

/* =========================================================
   ТОНКОСТИ
   ========================================================= */
@media (max-width: 560px) {
    body { background-attachment: scroll; }
    section { padding: 52px 0; }
    .how-contact { border-radius: 22px; }
    .how-contact .row { flex-direction: column; gap: 10px; }
    .how-contact .row .btn { width: 100%; }
    .modal h2 { font-size: 22px; }
    .modal .btn { padding: 15px 22px; font-size: 13.5px; }
    .form-field input, .form-field textarea, .form-field select {
        padding: 14px 16px;
        border-radius: 14px;
    }
    .reviews-grid { grid-template-columns: 1fr; }
    .review-card { padding: 20px; border-radius: 20px; }
    .footer-top { padding: 42px 0 30px; gap: 30px; }
    .footer-brand img { width: 42px; height: 42px; }
    .footer-brand .name { font-size: 15px; }
}