/* =====================================================================
   Личный кабинет ИЗНУТРИ — стили модуля newaccount (префикс классов ac-)
   Формы гостя используют классы модалки входа из styles.css (acc-*).
   ===================================================================== */

:root {
    --ac-bg: var(--cream, #faf8f3);
    --ac-surface: #ffffff;
    --ac-ink: var(--dark-burgundy, #5e3b39);
    --ac-ink-2: rgba(94, 59, 57, .74);
    --ac-ink-3: rgba(94, 59, 57, .52);
    --ac-line: rgba(94, 59, 57, .12);
    --ac-line-strong: rgba(94, 59, 57, .24);
    --ac-accent: var(--rich-crimson, #ae6965);
    --ac-accent-soft: var(--dusty-pink, #d1a9a5);
    --ac-sage: var(--dark-teal, #7d8a6e);
    --ac-sage-soft: var(--dried-sage, #9fac90);
    --ac-oak: var(--warm-oak, #a58b71);
    --ac-beige: var(--light-beige, #f5e6d3);
    --ac-bone: var(--bone, #e5dfd6);
    --ac-halo: var(--logo-halo-color, rgba(255, 188, 140, .6));
    --ac-radius: 20px;
    --ac-radius-sm: 12px;
    --ac-shadow: 0 14px 36px rgba(94, 59, 57, .08);
    --ac-shadow-hover: 0 20px 44px rgba(94, 59, 57, .14);
    --ac-font-head: 'Doloman Pavljenko', 'Montserrat', serif;
    --ac-header-h: 96px;
}

/* ---------- страница ---------- */
.ac-page {
    background: var(--ac-bg);
    color: var(--ac-ink);
    font-family: 'Montserrat', sans-serif;
    padding: 28px 0 80px;
    min-height: 70vh;
}
.ac-page--plain { padding-top: 0; }
.ac-container { max-width: 1160px; }
.ac-page a { color: inherit; }
.ac-page *, .ac-page *::before, .ac-page *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

.ac-boot { display: flex; justify-content: center; padding: 90px 0; }
.ac-boot span {
    width: 30px; height: 30px; border-radius: 50%;
    border: 3px solid var(--ac-bone); border-top-color: var(--ac-accent);
    animation: ac-spin .8s linear infinite;
}
@keyframes ac-spin { to { transform: rotate(360deg); } }

/* ---------- гость ---------- */
.ac-guest { padding: 12px 0 30px; }
.ac-guest__card { box-shadow: var(--ac-shadow); }

/* ---------- оболочка: меню слева + содержимое ---------- */
.ac-shell {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}
.ac-content { min-width: 0; }

.ac-nav {
    position: sticky;
    top: calc(var(--ac-header-h) + 20px);
    background: var(--ac-surface);
    border: 1px solid var(--ac-line);
    border-radius: var(--ac-radius);
    padding: 16px 12px 12px;
    box-shadow: var(--ac-shadow);
}
.ac-nav__me {
    display: flex; align-items: center; gap: 12px;
    padding: 4px 8px 16px; margin-bottom: 8px;
    border-bottom: 1px solid var(--ac-line);
    text-decoration: none;
}
.ac-nav__who { display: flex; flex-direction: column; min-width: 0; }
.ac-nav__who b { font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-nav__who span { font-size: .74rem; color: var(--ac-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-nav__list { display: flex; flex-direction: column; gap: 4px; }
.ac-nav__item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: 12px;
    color: var(--ac-ink-2); text-decoration: none;
    font-size: .92rem; font-weight: 500;
    transition: background .2s, color .2s, transform .15s;
}
.ac-nav__item svg { width: 20px; height: 20px; flex: none; }
.ac-nav__item:hover { background: rgba(94, 59, 57, .06); color: var(--ac-ink); }
.ac-nav__item.is-active { background: var(--gradient-primary, var(--ac-ink)); color: #fff; box-shadow: 0 8px 18px rgba(94, 59, 57, .2); }
.ac-nav__logout {
    display: flex; align-items: center; gap: 10px;
    width: 100%; margin-top: 10px; padding: 10px 12px;
    border: 0; background: none; border-radius: 12px;
    color: var(--ac-ink-3); font: 500 .84rem 'Montserrat', sans-serif; cursor: pointer;
    transition: background .2s, color .2s;
}
.ac-nav__logout svg { width: 18px; height: 18px; }
.ac-nav__logout:hover { background: rgba(94, 59, 57, .06); color: var(--ac-ink); }

/* ---------- аватар ---------- */
.ac-avatar { display: inline-flex; flex: none; border-radius: 50%; overflow: hidden; background: var(--ac-bone); }
.ac-avatar svg { display: block; width: 100%; height: 100%; }
.ac-avatar--sm { width: 44px; height: 44px; }
.ac-avatar--md { width: 64px; height: 64px; }
.ac-avatar--xl { width: 104px; height: 104px; box-shadow: 0 10px 26px rgba(94, 59, 57, .18); }

/* ---------- типографика ---------- */
.ac-h1 {
    font-family: var(--ac-font-head); font-weight: normal;
    font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.08; margin: 0; color: var(--ac-ink);
}
.ac-h2 { font-family: var(--ac-font-head); font-weight: normal; font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.15; margin: 0; }
.ac-h3 { font-size: 1.02rem; font-weight: 600; margin: 0; }
.ac-muted { color: var(--ac-ink-3); font-size: .9rem; margin: 6px 0 0; }
.ac-small { font-size: .8rem; color: var(--ac-ink-3); }
.ac-link { background: none; border: 0; padding: 0; color: var(--ac-ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; font-size: .88rem; }
.ac-link:hover { color: var(--ac-accent); }

.ac-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.ac-head__id { display: flex; align-items: center; gap: 20px; min-width: 0; }
.ac-head__text { min-width: 0; }
.ac-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.ac-section { margin-top: 34px; }
.ac-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 14px; }

/* ---------- карточки и сетки ---------- */
.ac-card {
    background: var(--ac-surface);
    border: 1px solid var(--ac-line);
    border-radius: var(--ac-radius);
    padding: 24px;
    box-shadow: var(--ac-shadow);
}
.ac-grid { display: grid; gap: 18px; }
.ac-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .ac-grid--2 { grid-template-columns: 1fr; } }

/* ---------- кнопки ---------- */
.ac-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
    background: var(--gradient-primary, var(--ac-ink)); color: #fff;
    font: 600 .9rem 'Montserrat', sans-serif; line-height: 1.2; letter-spacing: .01em;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: transform .15s, box-shadow .2s, background .2s, color .2s, opacity .2s;
}
.ac-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(94, 59, 57, .2); }
.ac-btn:active { transform: translateY(0); }
.ac-btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.ac-btn svg { width: 18px; height: 18px; }
.ac-btn--ghost { background: transparent; color: var(--ac-ink); border-color: var(--ac-line-strong); }
.ac-btn--ghost:hover { background: rgba(94, 59, 57, .05); box-shadow: none; }
.ac-btn--soft { background: var(--ac-beige); color: var(--ac-ink); }
.ac-btn--soft:hover { background: #efdcc4; box-shadow: none; }
.ac-btn--danger { background: #a8443a; }
.ac-btn--sm { padding: 9px 16px; font-size: .82rem; }
.ac-btn--block { width: 100%; }
.ac-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- чипы, табы, бейджи ---------- */
.ac-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ac-chip {
    padding: 8px 15px; border-radius: 999px; border: 1px solid var(--ac-line-strong);
    background: transparent; color: var(--ac-ink-2); font: 500 .82rem 'Montserrat', sans-serif; cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.ac-chip:hover { background: rgba(94, 59, 57, .05); }
.ac-chip.is-active { background: var(--ac-ink); color: #fff; border-color: var(--ac-ink); }

.ac-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(94, 59, 57, .06); margin-bottom: 22px; }
.ac-tab {
    padding: 9px 18px; border: 0; border-radius: 999px; background: none;
    color: var(--ac-ink-2); font: 600 .86rem 'Montserrat', sans-serif; cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
}
.ac-tab.is-active { background: #fff; color: var(--ac-ink); box-shadow: 0 2px 8px rgba(94, 59, 57, .1); }
.ac-tab__count { margin-left: 6px; font-size: .74rem; color: var(--ac-ink-3); }

.ac-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: rgba(94, 59, 57, .08); color: var(--ac-ink-2); white-space: nowrap; }
.ac-badge--new { background: rgba(125, 138, 110, .16); color: #4f5c43; }
.ac-badge--processing { background: rgba(165, 139, 113, .2); color: #6b5433; }
.ac-badge--shipped { background: rgba(212, 165, 116, .24); color: #6b4f2a; }
.ac-badge--completed { background: rgba(94, 122, 70, .16); color: #4d7a46; }
.ac-badge--cancelled { background: rgba(168, 68, 58, .12); color: #a8443a; }
.ac-badge--pending_link { background: rgba(174, 105, 101, .14); color: var(--ac-accent); }

.ac-level-badge {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
    padding: 5px 12px; border-radius: 999px;
    background: var(--ac-beige); color: var(--ac-ink); font-size: .78rem; font-weight: 600;
}

/* ---------- товары ---------- */
.ac-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.ac-product {
    position: relative; display: flex; flex-direction: column;
    background: var(--ac-surface); border: 1px solid var(--ac-line); border-radius: 16px; overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.ac-product:hover { transform: translateY(-2px); box-shadow: var(--ac-shadow-hover); }
.ac-product__pic { display: block; }
.ac-product__img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--ac-beige); }
.ac-product__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.ac-product__name {
    font-size: .84rem; line-height: 1.3; text-decoration: none; color: var(--ac-ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ac-product__price { font-weight: 600; font-size: .95rem; }
.ac-product__cart { margin-top: auto; align-self: flex-start; }
.ac-product__out { margin-top: auto; font-size: .78rem; color: var(--ac-ink-3); }
.ac-product__fav, .ac-product__remove {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    width: 34px; height: 34px; border-radius: 50%; border: 0;
    background: rgba(255, 255, 255, .92); color: var(--ac-accent);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 4px 12px rgba(94, 59, 57, .14); transition: transform .15s;
}
.ac-product__fav:hover, .ac-product__remove:hover { transform: scale(1.08); }
.ac-product__fav svg { width: 18px; height: 18px; }
.ac-product__fav.is-on svg { fill: currentColor; }
.ac-product__remove { font-size: 1.3rem; line-height: 1; color: var(--ac-ink-2); }
.ac-product__badge { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .92); font-size: .7rem; font-weight: 600; color: var(--ac-ink-2); }
.ac-product__select { position: absolute; top: 10px; left: 10px; z-index: 3; cursor: pointer; }
.ac-product__select input { position: absolute; opacity: 0; width: 0; height: 0; }
.ac-product__select span {
    display: block; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #fff;
    background: rgba(255, 255, 255, .75); box-shadow: 0 2px 8px rgba(94, 59, 57, .2); transition: background .15s;
}
.ac-product__select input:checked + span { background: var(--ac-accent); border-color: var(--ac-accent); }
.ac-product__select input:checked + span::after {
    content: ""; position: absolute; left: 9px; top: 4px; width: 6px; height: 12px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.ac-product--select.is-checked { outline: 2px solid var(--ac-accent); outline-offset: -2px; }

/* ---------- пусто, скелеты, сообщения ---------- */
.ac-empty { text-align: center; padding: 44px 20px; color: var(--ac-ink-3); font-size: .92rem; }
.ac-empty__icon { width: 64px; height: 64px; margin: 0 auto 12px; color: var(--ac-accent-soft); }
.ac-empty__icon svg { width: 100%; height: 100%; }
.ac-empty p { margin: 0 0 16px; }
.ac-empty a { color: var(--ac-ink); }

.ac-skel { border-radius: 10px; background: linear-gradient(90deg, #f1ebe4 25%, #f9f5ef 50%, #f1ebe4 75%); background-size: 200% 100%; animation: ac-shimmer 1.3s infinite; }
.ac-skel--card { aspect-ratio: 1 / 1.35; }
@keyframes ac-shimmer { to { background-position: -200% 0; } }

.ac-msg { margin: 14px 0 0; font-size: .88rem; color: #4d7a46; }
.ac-msg.is-error { color: #a8443a; }
.ac-note { padding: 14px 18px; border-radius: 14px; background: var(--ac-beige); font-size: .88rem; color: var(--ac-ink-2); }
.ac-verify { margin-bottom: 18px; padding: 12px 16px; border-radius: 14px; background: rgba(212, 165, 116, .22); font-size: .86rem; color: #6b5433; }
.ac-verify .ac-link { color: #6b5433; margin-left: 6px; }

/* ---------- формы кабинета ---------- */
.ac-form { display: flex; flex-direction: column; gap: 14px; }
.ac-field { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; color: var(--ac-ink-2); }
.ac-field small { color: var(--ac-ink-3); }
.ac-input, .ac-field input, .ac-field textarea, .ac-field select {
    width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--ac-line-strong);
    background: #fff; font: 400 .92rem 'Montserrat', sans-serif; color: var(--ac-ink);
    transition: border-color .2s, box-shadow .2s;
}
.ac-field textarea { min-height: 96px; resize: vertical; }
.ac-input:focus, .ac-field input:focus, .ac-field textarea:focus, .ac-field select:focus { outline: none; border-color: var(--ac-accent); box-shadow: 0 0 0 3px rgba(174, 105, 101, .14); }
.ac-field input:disabled { background: rgba(94, 59, 57, .04); color: var(--ac-ink-3); }
.ac-row { display: flex; gap: 14px; flex-wrap: wrap; }
.ac-row .ac-field { flex: 1; min-width: 180px; }
.ac-check { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--ac-ink-2); cursor: pointer; }
.ac-check input { width: 17px; height: 17px; accent-color: var(--ac-accent); cursor: pointer; }

/* ---------- модальные окна ---------- */
.ac-modal {
    position: fixed; inset: 0; z-index: 4000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(31, 26, 24, .48); opacity: 0; transition: opacity .2s;
}
.ac-modal.is-open { opacity: 1; }
.ac-modal__box {
    position: relative; width: min(600px, 100%); max-height: 92vh; overflow: auto;
    background: var(--ac-surface); border-radius: 22px; padding: 28px;
    box-shadow: 0 30px 80px rgba(31, 26, 24, .3); transform: translateY(12px); transition: transform .2s;
}
.ac-modal.is-open .ac-modal__box { transform: none; }
.ac-modal--sm .ac-modal__box { width: min(420px, 100%); }
.ac-modal--lg .ac-modal__box { width: min(920px, 100%); }
.ac-modal__close {
    position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0;
    background: rgba(94, 59, 57, .06); color: var(--ac-ink); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.ac-modal__close:hover { background: rgba(94, 59, 57, .12); }
.ac-modal__body > .ac-h2:first-child { margin-bottom: 14px; padding-right: 36px; }
.ac-confirm { margin: 6px 0 20px; font-size: .95rem; line-height: 1.5; }
body.ac-modal-open { overflow: hidden; }
@media (max-width: 600px) {
    .ac-modal { align-items: flex-end; padding: 0; }
    .ac-modal__box { border-radius: 22px 22px 0 0; max-height: 94vh; padding: 24px 18px; }
}

/* ---------- мобильная версия оболочки ---------- */
@media (max-width: 900px) {
    .ac-page { padding-top: 14px; }
    .ac-shell { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .ac-nav {
        position: sticky; top: var(--ac-header-h); z-index: 20;
        min-width: 0; padding: 8px; border-radius: 16px;
    }
    .ac-nav__me, .ac-nav__logout { display: none; }
    .ac-nav__list { flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .ac-nav__list::-webkit-scrollbar { display: none; }
    .ac-nav__item { flex: none; padding: 9px 13px; font-size: .82rem; gap: 8px; }
    .ac-nav__item svg { width: 17px; height: 17px; }
    .ac-nav__item.is-active { box-shadow: none; }
    .ac-head__id { gap: 14px; }
    .ac-avatar--xl { width: 76px; height: 76px; }
    .ac-card { padding: 18px; border-radius: 16px; }
    .ac-products { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}
@media (max-width: 480px) {
    .ac-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ac-btn { padding: 11px 18px; }
}

/* =====================================================================
   Профиль: уровень, баллы, баннер карт, превью товаров, настройки
   ===================================================================== */
.ac-eyebrow { display: block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ac-accent); font-weight: 600; margin-bottom: 6px; }

.ac-level__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ac-level__avatar { flex: none; }
.ac-level__name { margin-bottom: 4px; }
.ac-level__perk { margin: 6px 0 16px; font-size: .88rem; color: var(--ac-ink-2); }
.ac-level__next { margin: 10px 0 0; font-size: .84rem; color: var(--ac-ink-2); }
.ac-level__next b { color: var(--ac-ink); }

.ac-progress { height: 10px; border-radius: 999px; background: rgba(94, 59, 57, .1); overflow: hidden; }
.ac-progress__bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ac-sage-soft), var(--ac-accent)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }

.ac-ladder { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; position: relative; }
.ac-ladder::before { content: ""; position: absolute; left: 6%; right: 6%; top: 7px; height: 2px; background: rgba(94, 59, 57, .12); }
.ac-ladder__step { position: relative; text-align: center; font-size: .68rem; line-height: 1.25; color: var(--ac-ink-3); padding-top: 22px; }
.ac-ladder__step i { position: absolute; left: 50%; top: 0; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #fff; border: 2px solid rgba(94, 59, 57, .2); }
.ac-ladder__step span { display: block; font-weight: 600; color: var(--ac-ink-2); }
.ac-ladder__step small { display: block; margin-top: 2px; font-size: .64rem; }
.ac-ladder__step.is-done i { background: var(--ac-sage-soft); border-color: var(--ac-sage-soft); }
.ac-ladder__step.is-current i { background: var(--ac-accent); border-color: var(--ac-accent); box-shadow: 0 0 0 4px rgba(174, 105, 101, .18); }
.ac-ladder__step.is-current span { color: var(--ac-ink); }

.ac-points__balance { font-family: var(--ac-font-head); font-size: 3rem; line-height: 1; margin: 2px 0 10px; color: var(--ac-ink); }
.ac-points__balance small { font-family: 'Montserrat', sans-serif; font-size: .8rem; color: var(--ac-ink-3); margin-left: 8px; }
.ac-points__rule { margin: 0 0 12px; font-size: .84rem; color: var(--ac-ink-2); }
.ac-points__expire { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: rgba(212, 165, 116, .22); font-size: .8rem; color: #6b5433; }
.ac-points__recent { list-style: none; margin: 0 0 10px; padding: 0; border-top: 1px solid var(--ac-line); }
.ac-points__recent li { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--ac-line); font-size: .82rem; }
.ac-points__recent b { font-size: .9rem; }
.ac-points__recent b.is-plus { color: #4d7a46; }
.ac-points__recent b.is-minus { color: #a8443a; }
.ac-points__recent span { color: var(--ac-ink-2); }
.ac-points__recent span small { display: block; color: var(--ac-ink-3); font-size: .72rem; }
.ac-points__recent time { color: var(--ac-ink-3); font-size: .76rem; white-space: nowrap; }
.ac-points__recent--full { max-height: 60vh; overflow: auto; }
.ac-points__empty { margin: 0; font-size: .84rem; color: var(--ac-ink-3); }

/* баннер подарочных карт */
.ac-gift-banner {
    position: relative; overflow: hidden; margin-top: 22px; padding: 28px 30px;
    display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; align-items: center;
    border-radius: var(--ac-radius); color: var(--ac-bg);
    background: radial-gradient(420px 260px at 12% 10%, rgba(255, 188, 140, .28), transparent 70%),
                radial-gradient(400px 300px at 90% 90%, rgba(159, 172, 144, .3), transparent 70%),
                linear-gradient(135deg, #5e3b39 0%, #7d8a6e 100%);
    box-shadow: 0 24px 50px rgba(94, 59, 57, .22);
}
.ac-gift-banner .ac-h2 { color: var(--ac-bg); margin-bottom: 8px; }
.ac-gift-banner p { margin: 0 0 18px; font-size: .9rem; line-height: 1.55; color: rgba(250, 248, 243, .86); max-width: 520px; }
.ac-gift-banner .ac-btn { background: var(--ac-bg); color: var(--ac-ink); }
.ac-gift-banner .ac-btn--ghost { background: transparent; color: var(--ac-bg); border-color: rgba(250, 248, 243, .55); }
.ac-gift-banner .ac-btn--ghost:hover { background: rgba(250, 248, 243, .12); }
.ac-gift-banner__art { display: flex; justify-content: center; }
.ac-gift-card-mini {
    position: relative; width: 220px; aspect-ratio: 1.6; border-radius: 16px; transform: rotate(-6deg);
    background: radial-gradient(160px 120px at 80% 20%, rgba(255, 217, 168, .55), transparent 70%), linear-gradient(135deg, #ae6965 0%, #d1a9a5 100%);
    box-shadow: 0 18px 36px rgba(31, 26, 24, .35), inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.ac-gift-card-mini__logo { position: absolute; left: 16px; top: 14px; font-family: var(--ac-font-head); font-size: 1.05rem; letter-spacing: .12em; color: rgba(250, 248, 243, .95); }
.ac-gift-card-mini__sum { position: absolute; right: 16px; bottom: 12px; font-family: var(--ac-font-head); font-size: 1.6rem; color: #faf8f3; }
.ac-gift-card-mini::after { content: ""; position: absolute; left: 16px; bottom: 16px; width: 34px; height: 24px; border-radius: 5px; background: rgba(250, 248, 243, .35); }

/* превью товаров на профиле */
.ac-products--preview { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ac-products--empty { display: block; }
.ac-settings__logout { margin: 18px 0 0; text-align: right; }

@media (max-width: 900px) {
    .ac-gift-banner { grid-template-columns: 1fr; padding: 22px; }
    .ac-gift-banner__art { display: none; }
    .ac-products--preview { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .ac-products--preview::-webkit-scrollbar { display: none; }
    .ac-products--preview .ac-product { flex: 0 0 150px; scroll-snap-align: start; }
    .ac-products--preview.ac-products--empty { display: block; }
    .ac-ladder__step span { font-size: .62rem; }
    .ac-ladder__step small { display: none; }
    .ac-points__balance { font-size: 2.4rem; }
}

/* =====================================================================
   Мои заказы
   ===================================================================== */
.ac-orders-years { margin-bottom: 18px; }
.ac-orders { display: flex; flex-direction: column; gap: 14px; }
.ac-order { background: var(--ac-surface); border: 1px solid var(--ac-line); border-radius: var(--ac-radius); box-shadow: var(--ac-shadow); overflow: hidden; }
.ac-order__head {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto 28px; gap: 18px; align-items: center;
    width: 100%; padding: 18px 20px; border: 0; background: none; text-align: left; cursor: pointer;
    font: inherit; color: inherit; transition: background .2s;
}
.ac-order__head:hover { background: rgba(94, 59, 57, .03); }
.ac-order__main { min-width: 0; }
.ac-order__title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ac-order__num { font-size: .98rem; }
.ac-order__dates { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: .8rem; color: var(--ac-ink-3); }
.ac-order__dates .is-done { color: #4d7a46; }
.ac-order__thumbs { display: flex; }
.ac-order__thumb {
    width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex: none;
    background: var(--ac-beige); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(94, 59, 57, .12);
    display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 600; color: var(--ac-ink-2);
}
.ac-order__thumbs .ac-order__thumb + .ac-order__thumb { margin-left: -12px; }
.ac-order__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-order__sum { text-align: right; white-space: nowrap; }
.ac-order__sum b { display: block; font-size: 1.05rem; }
.ac-order__sum small { font-size: .74rem; color: var(--ac-ink-3); }
.ac-order__chevron { width: 28px; height: 28px; border-radius: 50%; background: rgba(94, 59, 57, .06); display: flex; align-items: center; justify-content: center; color: var(--ac-ink-2); transition: transform .25s; }
.ac-order__chevron svg { width: 16px; height: 16px; }
.ac-order.is-open .ac-order__chevron { transform: rotate(180deg); }
.ac-order__body { padding: 4px 20px 20px; border-top: 1px solid var(--ac-line); }
.ac-order__items { list-style: none; margin: 0 0 16px; padding: 0; }
.ac-order__items li { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ac-line); font-size: .86rem; }
.ac-order__items li:last-child { border-bottom: 0; }
.ac-order__item-name { color: var(--ac-ink); text-decoration: none; line-height: 1.3; }
.ac-order__item-name:hover { color: var(--ac-accent); }
.ac-order__item-qty { color: var(--ac-ink-3); white-space: nowrap; }
.ac-order__item-sum { white-space: nowrap; }
.ac-order__info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin-bottom: 16px; }
.ac-order__block .ac-h3 { margin-bottom: 8px; font-size: .92rem; }
.ac-order__block > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .84rem; }
.ac-order__block > div span { color: var(--ac-ink-3); }
.ac-order__block > div b { font-weight: 500; text-align: right; }
.ac-order__block > div.is-total { border-top: 1px solid var(--ac-line); margin-top: 4px; padding-top: 8px; }
.ac-order__block > div.is-total b { font-weight: 700; }
.ac-order__block a { color: var(--ac-accent); }
.ac-order__comment { margin: 0 0 14px; font-size: .84rem; color: var(--ac-ink-2); }

@media (max-width: 760px) {
    .ac-order__head { grid-template-columns: minmax(0, 1fr) 28px; gap: 10px 12px; padding: 16px; }
    .ac-order__thumbs { grid-column: 1 / -1; }
    .ac-order__sum { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; gap: 10px; }
    .ac-order__body { padding: 4px 16px 16px; }
    .ac-order__info { grid-template-columns: 1fr; }
    .ac-order__items li { grid-template-columns: 40px minmax(0, 1fr) auto; }
    .ac-order__item-qty { grid-column: 2; font-size: .76rem; }
    .ac-order__item-sum { grid-column: 3; grid-row: 1 / span 2; }
}

/* =====================================================================
   Избранное и вишлисты
   ===================================================================== */
.ac-pane { min-width: 0; }

.ac-wishlists { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.ac-wl-card {
    display: flex; flex-direction: column; text-decoration: none; color: inherit;
    background: var(--ac-surface); border: 1px solid var(--ac-line); border-radius: 18px; overflow: hidden;
    box-shadow: var(--ac-shadow); transition: transform .2s, box-shadow .2s; cursor: pointer; font: inherit; text-align: left; padding: 0;
}
.ac-wl-card:hover { transform: translateY(-2px); box-shadow: var(--ac-shadow-hover); }
.ac-wl-card__cover { position: relative; display: block; aspect-ratio: 16 / 9; padding: 18px; }
.ac-wl-card__title { position: absolute; left: 18px; right: 18px; top: 18px; font-family: var(--ac-font-head); font-size: 1.35rem; line-height: 1.1; text-shadow: 0 1px 8px rgba(0, 0, 0, .12); }
.ac-wl-card__thumbs { position: absolute; right: 14px; bottom: 12px; display: flex; }
.ac-wl-card__thumbs img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 4px 10px rgba(0, 0, 0, .15); background: var(--ac-beige); }
.ac-wl-card__thumbs img + img { margin-left: -10px; }
.ac-wl-card__body { display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px 14px; font-size: .84rem; color: var(--ac-ink-2); }
.ac-wl-card__lock { font-size: .74rem; color: var(--ac-ink-3); }
.ac-wl-card--new { align-items: center; justify-content: center; text-align: center; padding: 28px 20px; border: 2px dashed var(--ac-line-strong); background: transparent; box-shadow: none; min-height: 200px; color: var(--ac-ink-2); }
.ac-wl-card--new:hover { border-color: var(--ac-accent); color: var(--ac-ink); box-shadow: none; }
.ac-wl-card__plus { width: 46px; height: 46px; border-radius: 50%; background: var(--ac-beige); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 12px; color: var(--ac-accent); }
.ac-wl-card__new-title { font-weight: 600; font-size: .95rem; }
.ac-wl-card--new small { margin-top: 6px; font-size: .76rem; color: var(--ac-ink-3); max-width: 220px; line-height: 1.4; }

/* ---------- мастер (шаги) ---------- */
.ac-steps { list-style: none; display: flex; gap: 8px; margin: 14px 0 20px; padding: 0; }
.ac-steps li { display: flex; align-items: center; gap: 8px; flex: 1; font-size: .78rem; color: var(--ac-ink-3); padding-bottom: 10px; border-bottom: 2px solid rgba(94, 59, 57, .1); }
.ac-steps li i { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: .72rem; font-weight: 700; background: rgba(94, 59, 57, .08); flex: none; }
.ac-steps li.is-current { color: var(--ac-ink); border-color: var(--ac-accent); }
.ac-steps li.is-current i { background: var(--ac-accent); color: #fff; }
.ac-steps li.is-done { color: var(--ac-sage); border-color: var(--ac-sage-soft); }
.ac-steps li.is-done i { background: var(--ac-sage-soft); color: #fff; }
.ac-wizard__body { min-height: 200px; }
.ac-wizard__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.ac-wizard__title-field .ac-input { font-size: 1.1rem; padding: 14px 16px; }
.ac-wizard__counter { text-align: right; }
.ac-wizard__sugg { margin-top: 14px; }
.ac-wizard__hint { margin: 0 0 12px; font-size: .86rem; color: var(--ac-ink-2); }
.ac-products--pick { max-height: 52vh; overflow: auto; padding: 4px; }
.ac-products--pick .ac-product a { pointer-events: none; }

/* ---------- выбор дизайна с превью в ноутбуке и телефоне ---------- */
.ac-design-pick { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.ac-design-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ac-design { position: relative; display: flex; flex-direction: column; gap: 6px; cursor: pointer; border-radius: 12px; padding: 4px; border: 2px solid transparent; transition: border-color .2s; }
.ac-design input { position: absolute; opacity: 0; pointer-events: none; }
.ac-design__thumb { display: block; aspect-ratio: 16 / 10; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.ac-design__name { font-size: .74rem; color: var(--ac-ink-2); text-align: center; }
.ac-design__name small { display: block; font-size: .64rem; color: var(--ac-ink-3); }
.ac-design.is-active { border-color: var(--ac-accent); }
.ac-design.is-active .ac-design__name { color: var(--ac-ink); font-weight: 600; }
.ac-design:hover { border-color: var(--ac-line-strong); }
.ac-device-preview { display: flex; align-items: flex-end; gap: 18px; }
.ac-laptop { flex: 1; min-width: 0; }
.ac-laptop__screen { border: 10px solid #2b2422; border-bottom-width: 14px; border-radius: 14px 14px 4px 4px; background: #fff; overflow: hidden; aspect-ratio: 16 / 10; box-shadow: 0 20px 40px rgba(31, 26, 24, .25); }
.ac-laptop__base { height: 12px; margin: 0 -14px; border-radius: 0 0 14px 14px; background: linear-gradient(#3a302d, #241e1c); position: relative; }
.ac-laptop__base::before { content: ""; position: absolute; left: 50%; top: 0; width: 70px; height: 4px; margin-left: -35px; border-radius: 0 0 4px 4px; background: #16110f; }
.ac-phone { width: 92px; flex: none; }
.ac-phone__screen { border: 6px solid #2b2422; border-radius: 16px; background: #fff; overflow: hidden; aspect-ratio: 9 / 18; box-shadow: 0 14px 30px rgba(31, 26, 24, .25); }
.ac-mini { display: flex; flex-direction: column; height: 100%; background: #faf8f3; font-size: 6px; }
.ac-mini__bar { height: 9%; min-height: 10px; background: #ad957b; display: flex; align-items: center; justify-content: space-between; padding: 0 8%; }
.ac-mini__bar i { width: 12%; height: 2px; background: rgba(255, 255, 255, .7); border-radius: 2px; }
.ac-mini__bar b { width: 18%; height: 3px; background: rgba(255, 255, 255, .9); border-radius: 2px; }
.ac-mini__cover { height: 30%; display: flex; align-items: center; padding: 0 8%; font-family: var(--ac-font-head); font-size: 1.9em; line-height: 1.1; }
.ac-phone .ac-mini__cover { height: 22%; font-size: 1.5em; }
.ac-mini__grid { display: grid; gap: 5%; padding: 5% 6%; flex: 1; align-content: start; }
.ac-mini__grid--4 { grid-template-columns: repeat(4, 1fr); }
.ac-mini__grid--2 { grid-template-columns: repeat(2, 1fr); }
.ac-mini__thumb { aspect-ratio: 1; border-radius: 12%; background: #e5dfd6; overflow: hidden; }
.ac-mini__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-mini__thumb--empty { background: linear-gradient(135deg, #efe7dc, #e5dfd6); }

/* ---------- страница вишлиста ---------- */
.ac-wl { padding-bottom: 20px; }
.ac-wl__back { display: inline-block; margin: 18px 0 14px; text-decoration: none; }
.ac-wl__hero { position: relative; border-radius: 26px; padding: clamp(36px, 6vw, 72px) clamp(22px, 5vw, 60px); margin: 8px 0 22px; overflow: hidden; box-shadow: 0 24px 50px rgba(94, 59, 57, .18); }
.ac-wl__hero-in { position: relative; max-width: 720px; }
.ac-wl__eyebrow { margin: 0 0 10px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--d-muted, inherit); font-weight: 600; }
.ac-wl__title { margin: 0; font-family: var(--ac-font-head); font-weight: normal; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; }
.ac-wl__private { margin: 12px 0 0; font-size: .84rem; color: var(--d-muted, inherit); }
.ac-wl__panel { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; padding: 8px; border-radius: 16px; background: var(--ac-surface); border: 1px solid var(--ac-line); box-shadow: var(--ac-shadow); }
.ac-wl__act { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ac-ink-2); font: 500 .82rem 'Montserrat', sans-serif; cursor: pointer; transition: background .2s, color .2s; }
.ac-wl__act svg { width: 18px; height: 18px; }
.ac-wl__act:hover { background: rgba(94, 59, 57, .06); color: var(--ac-ink); }
.ac-wl__act.is-danger { margin-left: auto; color: #a8443a; }
.ac-wl__act.is-danger:hover { background: rgba(168, 68, 58, .08); }
.ac-wl__grid { margin-bottom: 26px; }
.ac-wl__cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 10px 0 30px; }
.ac-wl__missing { padding: 60px 0; }
.ac-wl__add-actions { margin-top: 14px; }

.ac-share__public { margin: 6px 0 16px; }
.ac-share__link { display: flex; gap: 8px; margin-bottom: 14px; }
.ac-share__link .ac-input { flex: 1; min-width: 0; }
.ac-share__btns { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 760px) {
    .ac-design-pick { grid-template-columns: 1fr; }
    .ac-design-list { grid-template-columns: repeat(3, 1fr); }
    .ac-device-preview { gap: 12px; }
    .ac-phone { width: 72px; }
    .ac-wl__panel { gap: 2px; }
    .ac-wl__act { padding: 9px 10px; font-size: .76rem; gap: 6px; }
    .ac-wl__act span { display: none; }
    .ac-wl__act svg { width: 20px; height: 20px; }
    .ac-wl__act.is-danger { margin-left: auto; }
    .ac-wishlists { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
    .ac-products--pick { max-height: 46vh; }
}
@media (max-width: 480px) {
    .ac-wishlists { grid-template-columns: 1fr; }
}

/* модалки живут вне .ac-page — задаём цвет и шрифт явно */
.ac-modal__box { color: var(--ac-ink); font-family: 'Montserrat', sans-serif; }
