:root {
    --af-ink: #0f172a;
    --af-muted: #64748b;
    --af-line: #e6edf5;
    --af-bg: #f4f7fb;
    --af-card: #ffffff;
    --af-navy: #0b1220;
    --af-green: #0c9a5b;
    --af-green-d: #087a48;
    --af-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    --af-radius: 18px;
}

body.af {
    background: var(--af-bg) !important;
    color: var(--af-ink);
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.af .user-page { flex: 1 0 auto; padding-bottom: 72px; }

body.af .preloader { display: none !important; }
body.af .scroll-top {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--af-green) !important;
    color: #fff !important;
}

body.af a { text-decoration: none; }
body.af h1, body.af h2, body.af h3, body.af h4, body.af h5, body.af h6 {
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: var(--af-ink);
    letter-spacing: -0.03em;
}

.af-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--af-line);
}

.af-open { position: absolute; opacity: 0; pointer-events: none; }

.af-header__top {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
}

.af-logo img { height: 42px; width: auto; display: block; }

.af-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid var(--af-line);
    border-radius: 999px;
    padding: 0 8px 0 16px;
    min-width: 0;
}

.af-search i { color: var(--af-muted); font-size: 18px; }
.af-search input {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 46px !important;
    padding: 0 !important;
    width: 100%;
}

.af-header__actions { display: flex; align-items: center; gap: 10px; }

.af-balance {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: #ecfdf3;
    color: var(--af-green-d) !important;
    font-weight: 700;
    font-size: 14px;
}

.af-btn, body.af .btn.btn--base, body.af .btn.btn--success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 12px !important;
    border: 0 !important;
    background: var(--af-green) !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(12, 154, 91, 0.22);
}

.af-btn:hover, body.af .btn.btn--base:hover, body.af .btn.btn--success:hover {
    background: var(--af-green-d) !important;
    color: #fff !important;
}

button.af-btn { cursor: pointer; }
.af-btn:disabled {
    background: #e8eef5 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

.af-btn--ghost, body.af a.btn-outline--base {
    background: #fff !important;
    color: var(--af-ink) !important;
    border: 1px solid var(--af-line) !important;
    box-shadow: none !important;
}

.af-btn--ghost:hover, body.af a.btn-outline--base:hover {
    background: #f8fafc !important;
    color: var(--af-ink) !important;
}

body.af .btn.btn--base:disabled, body.af .btn:disabled {
    background: #e8eef5 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

.af-burger { display: none; }

.af-menu {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 14px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.af-menu a {
    flex: 0 0 auto;
    color: #334155 !important;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 999px;
}

.af-menu a:hover { background: #eef6f2; color: var(--af-green-d) !important; }

.af-hero {
    max-width: 1180px;
    margin: 28px auto 8px;
    padding: 0 20px;
}

.af-hero__panel {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 42px 40px;
    background:
        radial-gradient(600px 220px at 90% 0%, rgba(12, 154, 91, 0.35), transparent 60%),
        linear-gradient(135deg, #0b1220 0%, #132033 60%, #0e3b2c 100%);
    color: #fff;
    box-shadow: var(--af-shadow);
}

.af-hero__panel h1,
body.af .af-hero__panel h1 {
    color: #fff !important;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 800;
    max-width: 680px;
    margin: 0 0 12px;
}

.af-hero__panel p,
body.af .af-hero__panel p {
    color: #d5deea !important;
    max-width: 560px;
    font-size: 16px;
    margin: 0 0 22px;
}

.af-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.af-pills span {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
}

.af-wrap { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; }

.af-section { margin-bottom: 34px; }
.af-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.af-section__head h2 { margin: 0; font-size: 22px; }

.af-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.af-card {
    background: var(--af-card);
    border: 1px solid var(--af-line);
    border-radius: var(--af-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    box-shadow: var(--af-shadow);
}

.af-card__media {
    display: grid;
    place-items: center;
    height: 168px;
    background: linear-gradient(180deg, #f8fafc, #eef3f8);
}
.af-card__media img { width: 92px; height: 92px; object-fit: contain; border-radius: 16px; }

.af-card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.af-card__title {
    color: var(--af-ink) !important;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 65px;
}
.af-card__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.af-price { font-size: 18px; font-weight: 800; color: var(--af-ink); }
.af-stock {
    font-size: 12px;
    font-weight: 700;
    color: var(--af-green-d);
    background: #ecfdf3;
    border-radius: 999px;
    padding: 5px 8px;
}
.af-stock.is-out { color: #b45309; background: #fff7ed; }
.af-card .af-btn, .af-card .btn { width: 100%; }

.af-detail {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 22px;
    background: #fff;
    border: 1px solid var(--af-line);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--af-shadow);
}
.af-detail__shot {
    background: #f8fafc;
    border-radius: 18px;
    display: grid;
    place-items: center;
    min-height: 280px;
}
.af-detail__shot img { width: 180px; height: 180px; object-fit: contain; }
.af-detail h1 { font-size: 28px; margin-bottom: 12px; }
.af-detail__desc { color: #334155; line-height: 1.7; }
.af-detail__meta { display: flex; gap: 18px; margin: 18px 0; }
.af-detail__meta strong { display: block; font-size: 20px; }

.af-footer { background: var(--af-navy); color: #d5deea; margin-top: auto; flex-shrink: 0; }
.af-footer a { color: #d5deea !important; }
.af-footer a:hover { color: #fff !important; }
.af-footer__grid {
    max-width: 1180px;
    margin: 0 auto;
    padding: 48px 20px 24px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1.1fr;
    gap: 28px;
}
.af-footer h5 { color: #fff; margin-bottom: 12px; font-size: 15px; }
.af-footer p { color: #b7c3d4; font-size: 14px; line-height: 1.7; }
.af-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.af-footer__logo { background: #fff; display: inline-block; border-radius: 12px; padding: 8px 10px; margin-bottom: 12px; }
.af-footer__logo img { height: 36px; }
.af-socials { display: flex; gap: 8px; margin-top: 14px; }
.af-socials a {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255,255,255,0.08);
}
.af-subscribe { display: flex; margin-top: 12px; }
.af-subscribe input {
    flex: 1; border: 0; border-radius: 12px 0 0 12px; padding: 0 12px; height: 44px;
}
.af-subscribe button { border-radius: 0 12px 12px 0 !important; }
.af-footer__bar {
    border-top: 1px solid rgba(255,255,255,0.08);
    max-width: 1180px; margin: 0 auto; padding: 14px 20px 22px;
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    color: #93a0b5; font-size: 13px;
}

.af-shell {
    max-width: 1180px;
    margin: 28px auto 40px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}
.af-side {
    background: #fff;
    border: 1px solid var(--af-line);
    border-radius: 22px;
    padding: 16px;
    box-shadow: var(--af-shadow);
    position: sticky;
    top: 96px;
}
.af-side__balance { text-align: center; padding: 8px 8px 16px; border-bottom: 1px solid var(--af-line); margin-bottom: 12px; }
.af-side__balance span { color: var(--af-muted); font-size: 13px; font-weight: 600; }
.af-side__balance strong { display: block; font-size: 26px; margin: 4px 0 12px; }
.af-side nav { display: grid; gap: 4px; }
.af-side nav a {
    color: #334155 !important;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 12px;
}
.af-side nav a:hover, .af-side nav a.is-on { background: #ecfdf3; color: var(--af-green-d) !important; }
.af-main { min-width: 0; }
.af-crumb { color: var(--af-muted); font-size: 13px; margin-bottom: 14px; }
.af-crumb a { color: var(--af-muted) !important; font-weight: 600; }

.af-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.af-stat {
    background: #fff;
    border: 1px solid var(--af-line);
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--af-shadow);
    position: relative;
}
.af-stat span { color: var(--af-muted); font-size: 13px; font-weight: 600; }
.af-stat strong, body.af .af-stat strong { display: block; margin-top: 6px; font-size: 24px; color: var(--af-ink) !important; }
.af-stat i {
    position: absolute; right: 14px; top: 14px;
    width: 38px; height: 38px; border-radius: 12px;
    display: grid; place-items: center; color: #fff; font-size: 16px;
}
.af-stat:nth-child(1) i { background: #2563eb; }
.af-stat:nth-child(2) i { background: var(--af-green); }
.af-stat:nth-child(3) i { background: #7c3aed; }

.af-panel, body.af .account-form, body.af .card, body.af .contact-form, body.af .blog-item {
    background: #fff !important;
    border: 1px solid var(--af-line) !important;
    border-radius: 20px !important;
    box-shadow: var(--af-shadow) !important;
}
.af-panel { padding: 18px; }
.af-panel h3, .af-panel h4, .af-panel h5 { margin-top: 0; }

body.af .form--control, body.af .form-control, body.af select.form--control, body.af textarea.form--control {
    border: 1px solid #dbe3ee !important;
    border-radius: 12px !important;
    min-height: 46px;
    background: #fff !important;
    color: var(--af-ink) !important;
    box-shadow: none !important;
}
body.af .form--label, body.af label { color: #334155; font-weight: 600; font-size: 14px; }
body.af .account { background: transparent !important; padding: 36px 0 10px !important; }
body.af .account-form { padding: 32px !important; }
body.af .account-form__title { font-size: 30px; margin-bottom: 6px; }
body.af .text--base { color: var(--af-green-d) !important; }

body.af .custom--table, body.af .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}
body.af .custom--table thead th, body.af .table thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 12px !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--af-line) !important;
    padding: 14px 12px !important;
}
body.af .custom--table td, body.af .table td {
    padding: 14px 12px !important;
    color: #1e293b;
    border-color: #eef2f7 !important;
    vertical-align: middle;
}
body.af .badge {
    border-radius: 999px !important;
    padding: 5px 10px !important;
    font-weight: 700 !important;
}
body.af .pagination { gap: 8px; margin-top: 18px; }
body.af .page-link {
    border-radius: 10px !important;
    border: 1px solid var(--af-line) !important;
    color: var(--af-ink) !important;
    font-weight: 700;
}
body.af .page-item.active .page-link { background: var(--af-navy) !important; color: #fff !important; border-color: var(--af-navy) !important; }

body.af .modal-content { border: 0; border-radius: 22px; overflow: hidden; }
body.af .modal-header { border-bottom: 1px solid var(--af-line); }
body.af .modal-title { font-weight: 800; }
body.af #proceedToPaymentBtn { border-radius: 0 !important; min-height: 52px; }

body.af .contact-section, body.af .blog, body.af .py-120, body.af .catalog-details-section, body.af .catalog-section {
    background: transparent !important;
    padding-top: 28px !important;
    padding-bottom: 20px !important;
}
body.af .blog-item { overflow: hidden; height: 100%; }
body.af .blog-item__thumb img { width: 100%; height: 180px; object-fit: cover; }
body.af .blog-item__content { padding: 16px; }
body.af .blog-item__title-link { color: var(--af-ink) !important; }
body.af .blog-item__link { color: var(--af-green-d) !important; font-weight: 700; }

.af-blog { padding: 36px 0 12px; }
.af-blog__head { margin-bottom: 22px; }
.af-blog__head p { margin: 0 0 4px; color: var(--af-green-d); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.af-blog__head h1 { margin: 0; font-size: 36px; }
.af-post, .af-article, .af-blog-side {
    background: #fff;
    border: 1px solid var(--af-line);
    border-radius: 22px;
    box-shadow: var(--af-shadow);
    height: 100%;
}
.af-post { overflow: hidden; display: flex; flex-direction: column; }
.af-post__thumb { display: block; overflow: hidden; }
.af-post__thumb img, .af-article__cover { width: 100%; height: 220px; object-fit: cover; display: block; }
.af-post__thumb img { transition: transform .35s ease; }
.af-post:hover .af-post__thumb img { transform: scale(1.05); }
.af-post__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.af-post time, .af-article > time, .af-latest time { color: var(--af-muted); font-size: 13px; font-weight: 600; }
.af-post h2 { margin: 0; font-size: 18px; line-height: 1.4; }
.af-post h2 a { color: var(--af-ink) !important; }
.af-post h2 a:hover, .af-latest strong:hover { color: var(--af-green-d) !important; }
.af-post p { margin: 0; color: var(--af-muted); font-size: 14px; line-height: 1.6; }
.af-post__more { margin-top: auto; color: var(--af-green-d) !important; font-weight: 800; }
.af-article { padding: 14px; }
.af-article__cover { height: 360px; border-radius: 16px; }
.af-article > time { display: inline-block; margin: 16px 10px 0; }
.af-article > h1 { margin: 8px 10px 0; font-size: 34px; line-height: 1.25; }
.af-article__body { padding: 8px 10px 4px; color: #334155; font-size: 16px; line-height: 1.8; }
.af-article__body h2, .af-article__body h3, .af-article__body h4 { margin: 28px 0 10px; color: var(--af-ink); line-height: 1.3; }
.af-article__body h3 { font-size: 24px; }
.af-article__body p { margin: 0 0 14px; }
.af-article__body ul, .af-article__body ol { margin: 0 0 16px; padding-left: 22px; }
.af-article__body li { margin: 6px 0; }
.af-article__body a { color: var(--af-green-d) !important; text-decoration: underline; }
.af-article__body blockquote {
    margin: 18px 0;
    padding: 14px 18px;
    border-left: 4px solid var(--af-green);
    background: #f3fbf7;
    border-radius: 0 14px 14px 0;
}
.af-article__body hr { border: 0; border-top: 1px solid var(--af-line); margin: 22px 0; }
.af-share { display: flex; align-items: center; gap: 8px; margin: 8px 10px 8px; padding-top: 14px; border-top: 1px solid var(--af-line); }
.af-share span { font-weight: 800; margin-right: 4px; }
.af-share a {
    width: 36px; height: 36px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #ecfdf3; color: var(--af-green-d) !important;
}
.af-blog-side { padding: 18px; height: auto; position: sticky; top: 18px; }
.af-blog-side h2, .af-side-news h2 { font-size: 18px; margin: 0 0 14px; }
.af-latest { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.af-latest img { width: 84px; height: 64px; object-fit: cover; border-radius: 12px; flex: 0 0 84px; }
.af-latest span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.af-latest strong { color: var(--af-ink); font-size: 14px; line-height: 1.35; }
.af-side-news { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--af-line); }
.af-side-news p { color: var(--af-muted); margin: 0 0 10px; }
.af-side-news input {
    width: 100%; border: 1px solid var(--af-line); border-radius: 12px;
    min-height: 44px; padding: 0 12px; margin-bottom: 10px;
}
.af-side-news .af-btn { width: 100%; }
@media (max-width: 991px) {
    .af-article > h1 { font-size: 28px; }
    .af-article__cover { height: 220px; }
    .af-blog-side { position: static; }
}

body.af .empty-data, body.af .alert { border-radius: 14px; }

@media (max-width: 991px) {
    .af-header__top { grid-template-columns: auto auto; }
    .af-search { grid-column: 1 / -1; order: 3; }
    .af-grid, .af-stats { grid-template-columns: 1fr 1fr; }
    .af-detail, .af-shell, .af-footer__grid { grid-template-columns: 1fr; }
    .af-side { position: static; min-width: 0; }
    .af-side nav { display: flex; overflow-x: auto; max-width: 100%; }
    .af-main, .af-panel { min-width: 0; }
    .af-side nav a { white-space: nowrap; }
    .af-hero__panel { padding: 28px 22px; }
}

@media (max-width: 640px) {
    .af-grid, .af-stats { grid-template-columns: 1fr; }
    .af-balance { display: none; }
}
