@charset "UTF-8";
/* ============================================================
   NAPAFFKAN — вътрешни страници
   ============================================================ */

/* ---------- Заглавие на страница ---------- */
.page-head {
    position: relative;
    padding: 34px 0 30px;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-2);
}

.page-head h1 { margin-bottom: 6px; }
.page-head p { max-width: 70ch; font-size: .95rem; }
.page-head .container { position: relative; z-index: 2; }

/* ---------- Каталог ---------- */
.catalog {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    align-items: start;
    padding: 30px 0 60px;
}

.catalog-filters {
    position: sticky;
    top: calc(var(--header-h) + 14px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
}

.filter-group { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.filter-group h4 {
    font-size: .82rem;
    letter-spacing: .08em;
    margin-bottom: 12px;
    color: var(--text-2);
}

.filter-list { display: flex; flex-direction: column; gap: 9px; max-height: 230px; overflow-y: auto; }

.filter-list label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: .875rem;
    color: var(--text-2);
    cursor: pointer;
    transition: color .15s;
}

.filter-list label:hover { color: var(--text); }
.filter-list input { accent-color: var(--neon); width: 16px; height: 16px; }
.filter-list .cnt { margin-left: auto; font-size: .76rem; color: var(--muted); }

.price-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.price-row input { min-height: 40px; padding: 8px 10px; text-align: center; }
.price-row span { color: var(--muted); }

.catalog-main { min-width: 0; }

.catalog-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.catalog-bar .count { font-size: .875rem; color: var(--muted); }
.catalog-bar select { min-height: 42px; min-width: 190px; }

.filter-toggle { display: none; }

/* чипове на приложените филтри */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: .8rem;
}

.chip a { color: var(--muted); display: grid; place-items: center; }
.chip a:hover { color: var(--bad); }

/* ---------- Странициране ---------- */
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pager a, .pager span {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-size: .9rem;
    font-weight: 500;
    transition: all .2s var(--ease);
}

.pager a:hover { border-color: var(--neon); color: var(--neon); }
.pager .is-current { background: var(--neon); border-color: var(--neon); color: #0A0C06; }
.pager .is-gap { background: none; border: 0; color: var(--muted); }

/* ---------- Продуктова страница ---------- */
.product-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 44px;
    padding: 24px 0 50px;
}

.gallery { position: sticky; top: calc(var(--header-h) + 14px); }

.gallery-main {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(145deg, var(--surface-2), var(--bg-2));
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    display: grid;
    place-items: center;
    padding: 36px;
    overflow: hidden;
}

.gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; }

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.gallery-thumbs button {
    aspect-ratio: 1;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    transition: border-color .2s;
}

.gallery-thumbs button.is-active, .gallery-thumbs button:hover { border-color: var(--neon); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }

.product-info > * + * { margin-top: 16px; }

.product-brand {
    font-family: var(--ff-display);
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--neon);
}

.product-title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }

.product-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: .82rem;
    color: var(--muted);
}

.product-meta .stars { color: var(--warn); }

.product-price-box {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px 0;
    border-block: 1px solid var(--border);
}

.product-price-box .now {
    font-family: var(--ff-display);
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--neon);
    line-height: 1;
}

.product-price-box .was { font-size: 1.1rem; color: var(--muted); text-decoration: line-through; }

.product-price-box .save {
    padding: 4px 11px;
    background: var(--bad);
    color: #fff;
    border-radius: 4px;
    font-size: .82rem;
    font-weight: 600;
}

.product-price-box .per-piece {
    font-size: .82rem;
    color: var(--muted);
}

/* сумата за избраното количество */
.buy-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 16px;
    background: var(--neon-soft);
    border: 1px solid rgba(163, 224, 18, .28);
    border-radius: var(--r);
    font-size: .95rem;
    color: var(--text-2);
}

.buy-total strong[data-line-sum] {
    font-family: var(--ff-display);
    font-size: 1.35rem;
    color: var(--neon);
    white-space: nowrap;
}

/* доплащането, изписано върху чипа на варианта */
.variant-chip .chip-diff {
    margin-left: 6px;
    font-size: .78rem;
    color: var(--neon);
    font-weight: 600;
}

.variant-chip .chip-diff.is-less { color: var(--ok); }
.variant-chip:has(input:checked) .chip-diff { color: inherit; }
.variant-chip.is-out { opacity: .4; pointer-events: none; text-decoration: line-through; }

.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }

.spec {
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
}

.spec dt { font-size: .74rem; color: var(--muted); margin-bottom: 3px; }
.spec dd { font-size: .92rem; font-weight: 600; }

.variants { display: flex; flex-wrap: wrap; gap: 9px; }

.variant-chip {
    position: relative;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-size: .875rem;
    cursor: pointer;
    transition: all .2s;
}

.variant-chip input { position: absolute; opacity: 0; pointer-events: none; }
.variant-chip:has(input:checked) { border-color: var(--neon); background: var(--neon-soft); color: var(--neon); }
.variant-chip.is-out { opacity: .4; pointer-events: none; text-decoration: line-through; }

.buy-row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }

.qty-box {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    overflow: hidden;
    flex: none;
}

.qty-box button {
    width: 44px;
    height: 52px;
    display: grid;
    place-items: center;
    color: var(--text-2);
    font-size: 1.2rem;
    transition: all .15s;
}

.qty-box button:hover { background: var(--surface-2); color: var(--neon); }

.qty-box input {
    width: 54px;
    height: 52px;
    border: 0;
    background: none;
    text-align: center;
    font-weight: 600;
    -moz-appearance: textfield;
}

.qty-box input::-webkit-outer-spin-button,
.qty-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.buy-row .btn { height: 52px; flex: 1; min-width: 180px; }

.stock-line { display: flex; align-items: center; gap: 8px; font-size: .875rem; }
.stock-line .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.stock-line.is-low .dot { background: var(--warn); }
.stock-line.is-out .dot { background: var(--bad); }

.product-perks { display: grid; gap: 12px; padding-top: 6px; }
.product-perks div { display: flex; align-items: center; gap: 11px; font-size: .875rem; color: var(--text-2); }
.product-perks svg { width: 20px; height: 20px; color: var(--neon); flex: none; }

/* табове */
.tabs { border-bottom: 1px solid var(--border); display: flex; gap: 4px; margin-bottom: 26px; flex-wrap: wrap; }

.tabs button {
    padding: 13px 20px;
    font-family: var(--ff-display);
    font-size: .92rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all .2s;
}

.tabs button:hover { color: var(--text); }
.tabs button.is-active { color: var(--neon); border-bottom-color: var(--neon); }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeIn .3s var(--ease); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } }

.prose { max-width: 75ch; }
.prose p { margin-bottom: 14px; line-height: 1.75; }
.prose h2, .prose h3 { margin: 26px 0 12px; }
.prose ul, .prose ol { margin: 0 0 14px 22px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 7px; color: var(--text-2); }
.prose a { color: var(--neon); text-decoration: underline; }
.prose strong { color: var(--text); }

/* отзиви */
.review {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.review-head strong { font-size: .92rem; }
.review-head .stars { color: var(--warn); }
.review-head time { font-size: .78rem; color: var(--muted); margin-left: auto; }
.review p { font-size: .9rem; line-height: 1.7; }

.rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rating-input input { position: absolute; opacity: 0; }
.rating-input label { font-size: 1.6rem; color: var(--surface-3); cursor: pointer; transition: color .15s; }
.rating-input label:hover, .rating-input label:hover ~ label,
.rating-input input:checked ~ label { color: var(--warn); }

/* ---------- Количка ---------- */
.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
    padding: 24px 0 60px;
}

.cart-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.cart-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto auto auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border-bottom: 1px solid var(--border);
}

.cart-row:last-child { border-bottom: 0; }

.cart-row .thumb {
    width: 92px;
    height: 92px;
    padding: 8px;
    background: var(--bg-2);
    border-radius: var(--r-sm);
    object-fit: contain;
}

.cart-row .name { font-weight: 500; font-size: .95rem; margin-bottom: 3px; display: block; }
.cart-row .name:hover { color: var(--neon); }
.cart-row .vari { font-size: .8rem; color: var(--muted); }
.cart-row .unit { font-size: .875rem; color: var(--text-2); white-space: nowrap; }
.cart-row .total { font-family: var(--ff-display); font-size: 1.1rem; color: var(--neon); white-space: nowrap; }

.cart-row .drop {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--muted);
    border-radius: var(--r-sm);
    transition: all .18s;
}

.cart-row .drop:hover { color: var(--bad); background: rgba(248,113,113,.1); }
.cart-row .drop svg { width: 17px; height: 17px; }

.cart-row .qty-box button { height: 40px; width: 34px; font-size: 1rem; }
.cart-row .qty-box input { height: 40px; width: 44px; }

.summary {
    position: sticky;
    top: calc(var(--header-h) + 14px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px;
}

.summary h3 { margin-bottom: 18px; font-size: 1.1rem; }

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    font-size: .92rem;
    color: var(--text-2);
}

.summary-row.is-discount { color: var(--ok); }

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.summary-total span { font-family: var(--ff-display); font-size: 1.05rem; text-transform: uppercase; }
.summary-total strong { font-family: var(--ff-display); font-size: 1.8rem; color: var(--neon); }

.coupon-form { display: flex; gap: 8px; margin: 16px 0; }
.coupon-form input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 14px; text-transform: uppercase; }

.free-ship {
    margin: 14px 0;
    padding: 12px 14px;
    background: var(--neon-soft);
    border: 1px solid rgba(163,224,18,.25);
    border-radius: var(--r-sm);
    font-size: .82rem;
    color: var(--neon);
}

.free-bar { height: 5px; background: var(--surface-3); border-radius: 4px; margin-top: 9px; overflow: hidden; }
.free-bar i { display: block; height: 100%; background: var(--neon); border-radius: 4px; transition: width .4s var(--ease); }

/* ---------- Поръчка ---------- */
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 30px;
    align-items: start;
    padding: 24px 0 60px;
}

.co-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    margin-bottom: 18px;
}

.co-block h3 {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.co-block h3 .n {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    background: var(--neon);
    color: #0A0C06;
    border-radius: 50%;
    font-size: .85rem;
    flex: none;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- Куриери ---------- */
.courier-card { align-items: center; gap: 14px; }

.courier-card .courier-logo {
    width: 72px;
    height: 26px;
    object-fit: contain;
    flex: none;
    border-radius: 4px;
}

.courier-card .courier-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.courier-card .courier-price {
    margin-left: auto;
    align-self: center;
    font-family: var(--ff-display);
    font-size: 1.05rem;
    color: var(--neon);
    white-space: nowrap;
}

.courier-notice {
    display: block;
    margin-top: 5px;
    padding: 5px 9px;
    background: rgba(251, 191, 36, .1);
    border-radius: var(--r-sm);
    font-size: .74rem;
    color: var(--warn);
}

.co-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.co-item { display: flex; align-items: center; gap: 12px; }

.co-item img {
    width: 54px; height: 54px;
    padding: 5px;
    background: var(--bg-2);
    border-radius: var(--r-sm);
    object-fit: contain;
    flex: none;
}

.co-item .nm { font-size: .875rem; line-height: 1.35; }
.co-item .qt { font-size: .76rem; color: var(--muted); }
.co-item .pr { margin-left: auto; font-size: .92rem; font-weight: 600; white-space: nowrap; }

/* резултат */
.done-box { max-width: 680px; margin: 0 auto; text-align: center; padding: 60px 20px; }

.done-icon {
    width: 86px; height: 86px;
    margin: 0 auto 26px;
    display: grid;
    place-items: center;
    border: 3px solid var(--neon);
    border-radius: 50%;
    color: var(--neon);
    box-shadow: 0 0 40px var(--neon-glow);
    animation: pop .5s var(--ease);
}

@keyframes pop { from { transform: scale(.6); opacity: 0; } }

.done-icon svg { width: 42px; height: 42px; }

.done-number {
    display: inline-block;
    margin: 18px 0 24px;
    padding: 12px 26px;
    background: var(--surface);
    border: 1px dashed var(--border-2);
    border-radius: var(--r);
    font-family: var(--ff-display);
    font-size: 1.4rem;
    letter-spacing: .06em;
    color: var(--neon);
}

/* ---------- Профил / вход ---------- */
.auth-wrap {
    max-width: 460px;
    margin: 0 auto;
    padding: 50px 20px 70px;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 34px;
}

.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; text-align: center; }
.auth-card .sub { text-align: center; font-size: .9rem; margin-bottom: 26px; }
.auth-foot { margin-top: 20px; text-align: center; font-size: .875rem; color: var(--muted); }
.auth-foot a { color: var(--neon); }

.account-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: start;
    padding: 28px 0 60px;
}

.account-nav {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 10px;
}

.account-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-size: .9rem;
    color: var(--text-2);
    transition: all .18s;
}

.account-nav a:hover { background: var(--surface-2); color: var(--text); }
.account-nav a.is-active { background: var(--neon-soft); color: var(--neon); }
.account-nav svg { width: 18px; height: 18px; }

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
}

.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 1.15rem; margin-bottom: 18px; }

/* таблица с поръчки */
.data-table { width: 100%; font-size: .9rem; }
.data-table th {
    text-align: left;
    padding: 11px 12px;
    font-size: .76rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    white-space: nowrap;
}
.data-table td { padding: 13px 12px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .num { font-family: var(--ff-display); color: var(--neon); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Адаптивност ---------- */

/*
 * Колоните са minmax(0, 1fr), а не само 1fr.
 *
 * Разликата личи чак на тесен екран: при 1fr колоната не може да
 * стане по-тясна от съдържанието си, затова дълга дума, широка
 * снимка или вложена решетка я разпъват и всичко излиза извън
 * картата. На страницата за поръчка полетата стърчаха с трийсетина
 * пиксела навън и се режеха от края на екрана. minmax(0, …) позволява
 * на колоната да се свие и съдържанието се подрежда вътре.
 */
@media (max-width: 1000px) {
    .catalog { grid-template-columns: minmax(0, 1fr); }
    .catalog-filters {
        position: static;
        display: none;
    }
    .catalog-filters.is-open { display: block; }
    .filter-toggle { display: inline-flex; }
    .cart-layout, .checkout-layout { grid-template-columns: minmax(0, 1fr); }
    .summary { position: static; }
    .product-top { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .gallery { position: static; }
    .account-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .cart-row {
        grid-template-columns: 72px 1fr auto;
        grid-template-areas:
            "img name drop"
            "img qty  total";
        gap: 10px 12px;
    }
    .cart-row .thumb { grid-area: img; width: 72px; height: 72px; }
    .cart-row .info  { grid-area: name; }
    .cart-row .qty-box { grid-area: qty; }
    .cart-row .total { grid-area: total; text-align: right; }
    .cart-row .drop  { grid-area: drop; }
    .cart-row .unit  { display: none; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .buy-row .btn { min-width: 0; }
    .specs { grid-template-columns: 1fr 1fr; }
}

/* ---------- Въпроси и отговори ---------- */
.section-sub {
    margin: -14px 0 22px;
    color: var(--text-2);
    font-size: .95rem;
}

.faq-list {
    display: grid;
    gap: 10px;
    max-width: 860px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    transition: border-color .2s var(--ease);
}
.faq-item[open] { border-color: var(--border-2); }
.faq-item:hover { border-color: var(--border-2); }

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    list-style: none;
}
/* Стрелката на браузъра си отива — слагаме наша. */
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ''; }

.faq-item summary svg {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--neon);
    transition: transform .22s var(--ease);
}
.faq-item[open] summary svg { transform: rotate(180deg); }

.faq-answer {
    padding: 0 18px 18px;
    color: var(--text-2);
    line-height: 1.75;
    font-size: .95rem;
}

@media (max-width: 600px) {
    .faq-item summary { padding: 14px 15px; font-size: .95rem; }
    .faq-answer { padding: 0 15px 15px; font-size: .9rem; }
}
