@import url('/fonts/index.css');

/* Визия „скъпо зелено“: светъл фон с бавно движещи се изумрудени и златисти петна, бели карти и наситен градиент за главните действия.
   Всеки цвят на текст е подбран спрямо фона си с контраст поне 4.5:1. */
:root {
  --bg: #f3f6f1; --surface: #ffffff; --surface-2: #edf2ec; --ink: #1f2228; --muted: #5d6470;
  --line: #d9e3d8; --brand: #0d6446; --brand-dark: #094a33; --magenta: #13795a; --violet: #7a5c12;
  --grad: linear-gradient(120deg, #073d2a 0%, #0f6e4f 50%, #8a6a22 100%);
  --grad-btn: linear-gradient(120deg, #094a33 0%, #13795a 100%);
  --accent: #1f2228; --accent-ink: #fff; --auction: #f5b301; --auction-ink: #3a2600; --danger: #c62828; --good: #1e7a46;
  --radius: 14px; --shadow: 0 6px 20px rgba(12, 40, 28, .08); --shadow-up: 0 16px 36px rgba(12, 40, 28, .16);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 16px/1.55 "Manrope Variable", "Segoe UI", system-ui, -apple-system, sans-serif; }
/* Живият фон: цветни петна, които бавно се местят зад съдържанието. */
body::before {
  content: ''; position: fixed; inset: -25%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 38% at 12% 18%, rgba(19, 121, 90, .20), transparent 70%),
    radial-gradient(34% 34% at 88% 8%, rgba(176, 141, 60, .18), transparent 70%),
    radial-gradient(42% 42% at 72% 88%, rgba(7, 61, 42, .13), transparent 70%),
    radial-gradient(30% 30% at 20% 85%, rgba(201, 165, 74, .14), transparent 70%);
  animation: bg-drift 36s ease-in-out infinite alternate;
}
@keyframes bg-drift {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(4%, -3%, 0) rotate(6deg); }
  100% { transform: translate3d(-3%, 4%, 0) rotate(-5deg); }
}
/* Само начално състояние и fill-mode backwards: след края не остава transform, който би закачил position: fixed за предшественика. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes grad-move { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
@keyframes shine { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(220%) skewX(-20deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.015em; }
h1 { font-size: 1.95rem; font-weight: 800; margin: 0 0 16px; }
h2 { font-size: 1.3rem; font-weight: 800; margin: 26px 0 12px; }
h3 { margin: 8px 0 4px; font-size: 1rem; font-weight: 700; }
a { color: inherit; }
main a:not(.btn):not(.card):not(.share-btn) { color: var(--brand-dark); text-underline-offset: 3px; }

/* Меню: бяло, залепено отгоре, с цветна линия отдолу. */
nav { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; padding: 10px 24px; background: #fff; box-shadow: 0 2px 14px rgba(12, 40, 28, .06); } /* без backdrop-filter: иначе панелите с position: fixed се закачат за менюто, а не за екрана */
nav::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); background-size: 200% 100%; animation: grad-move 8s linear infinite alternate; }
nav .brand { margin-right: auto; display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); transition: transform .2s ease; }
nav .brand:hover { transform: scale(1.04); }
/* Логото е текст със шрифта на заглавията (Manrope 800), а не картинка: SVG в <img> не може да ползва шрифта на сайта. */
nav .brand { gap: 2px; text-decoration: none; }
.brand-text { font-weight: 800; font-size: 1.5rem; line-height: 1; letter-spacing: -0.02em; color: var(--brand-dark); }
.brand-spark { width: 13px; height: 13px; align-self: flex-start; fill: var(--brand-dark); transform-origin: 50% 50%; animation: brand-twinkle 2.8s ease-in-out infinite; }
@keyframes brand-twinkle { 0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; } 50% { transform: scale(.55) rotate(45deg); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .brand-spark { animation: none; } }
nav a, button.link { position: relative; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; padding: 4px 0; box-shadow: none; }
nav .nav-menu > a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--grad-btn); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
nav .nav-menu > a:hover::after { transform: scaleX(1); }
nav a:hover, button.link:hover { color: var(--brand); background: none; filter: none; transform: none; }
.nav-menu { display: flex; flex: 1; align-items: center; flex-wrap: wrap; gap: 4px 18px; padding-left: 8px; }
.nav-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; padding: 6px 10px; border-left: 1px solid var(--line); }
.nav-bell { position: relative; }
.bell-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); cursor: pointer; padding: 0; overflow: visible; box-shadow: none; }
.bell-button::after { display: none; }
.bell-button:hover { background: #e2efe6; color: var(--ink); filter: none; }
.notification-badge { position: absolute; top: -4px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; animation: pop .35s ease backwards; }
.notification-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(330px, 90vw); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-up); z-index: 40; overflow: hidden; animation: rise .2s ease backwards; }
.notification-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.notification-header strong { color: var(--ink); font-size: .95rem; }
.notification-close { display: none; width: 34px; height: 34px; min-height: 0; padding: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-size: 1.2rem; box-shadow: none; }
.notification-close:hover { background: var(--line); color: var(--ink); filter: none; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.notification-list { max-height: 320px; overflow: auto; display: grid; }
.notification-empty { margin: 0; padding: 14px 12px; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.notification-item { display: grid; justify-content: stretch; justify-items: start; gap: 4px; width: 100%; text-align: left; background: #fff; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; color: var(--ink); text-decoration: none; cursor: pointer; box-shadow: none; }
.notification-item:hover { background: var(--surface-2); color: var(--ink); }
.notification-item:last-child { border-bottom: 0; }
.notification-item.unread { background: #edf6f0; }
.notification-title { font-weight: 700; }
.notification-body { font-size: .86rem; font-weight: 500; color: var(--muted); line-height: 1.4; }
.notification-item small { font-size: .72rem; font-weight: 500; color: var(--muted); }
.menu-toggle { display: none; }
main { max-width: 1040px; margin: 0 auto; padding: 28px 20px 60px; min-height: 70vh; flex: 1; width: 100%; animation: rise .4s ease backwards; }

/* Долната част: бяла като менюто, с цветната линия отгоре. */
footer { position: relative; background: #fff; box-shadow: 0 -2px 14px rgba(12, 40, 28, .06); padding: 26px 20px; text-align: center; color: var(--muted); font-size: .9rem; margin-top: auto; }
footer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); background-size: 200% 100%; animation: grad-move 8s linear infinite alternate; }
footer a { color: var(--ink); font-weight: 600; margin: 0 10px; text-decoration: none; }
footer a:hover { color: var(--brand); text-decoration: underline; }

.holiday-greeting { display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: rgba(255, 255, 255, .85); border-bottom: 1px solid var(--line); color: var(--ink); }
.holiday-greeting p { flex: 1; margin: 0; }
.verify-bar { background: #fff4d6; }
.preview-bar { background: #fff4d6; }
.verify-bar button.link { flex: none; width: auto; font-weight: 700; text-decoration: underline; color: var(--brand-dark); }
.holiday-greeting em { color: var(--muted); white-space: nowrap; }
.holiday-icon { font-size: 1.5rem; line-height: 1; animation: float 3s ease-in-out infinite; }
.holiday-greeting .holiday-close { flex: none; width: 32px; height: 32px; min-height: 0; padding: 0; background: none; color: var(--muted); font-size: 1.3rem; box-shadow: none; }
.holiday-greeting .holiday-close:hover { background: var(--line); color: var(--ink); }
.holiday-fall { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 9; }
.holiday-fall span { position: absolute; top: -40px; font-size: 1.15rem; font-weight: 700; color: #8fb8d8; opacity: .7; animation: holiday-fall linear infinite; will-change: transform; }
.holiday-fall .chip { width: 9px; height: 13px; border: 1px solid rgba(18, 23, 28, .15); border-radius: 2px; }
@keyframes holiday-fall { to { transform: translateY(calc(100vh + 80px)) rotate(300deg); } }
.notice { position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 680px; margin: auto; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--radius); display: flex; gap: 14px; align-items: center; z-index: 50; font-size: .92rem; box-shadow: var(--shadow-up); animation: rise .4s ease backwards; }
.notice a { color: #c2dacb; }
.notice span { flex: 1; min-width: 0; }
.notice button { background: #fff; color: var(--ink); flex: none; width: auto; }
.notice button:hover { background: #dfede3; color: var(--ink); }

/* Карти на обяви: бели, с плавно появяване и повдигане при посочване. */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.card { position: relative; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; animation: rise .45s ease backwards; }
.grid > .card:nth-child(2) { animation-delay: .04s; } .grid > .card:nth-child(3) { animation-delay: .08s; } .grid > .card:nth-child(4) { animation-delay: .12s; }
.grid > .card:nth-child(5) { animation-delay: .16s; } .grid > .card:nth-child(6) { animation-delay: .2s; } .grid > .card:nth-child(7) { animation-delay: .24s; }
.grid > .card:nth-child(n+8) { animation-delay: .28s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-up); border-color: #b7d3c3; }
.card img, .card .noimg { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--surface-2); margin-bottom: 8px; transition: filter .3s ease; }
.card:hover img { filter: saturate(1.15) brightness(1.04); }
.card h3 { color: var(--ink); }
.card .price { color: var(--brand); font-size: 1.2rem; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
.badge.auction { background: var(--auction); color: var(--auction-ink); }
.card .badge.auction { animation: pop .4s ease backwards .2s; }
.badge.blocked { background: var(--danger); color: #fff; }
.badge.vip { background: linear-gradient(135deg, #f3d774, #c9a227); color: #3a2c05; font-weight: 800; letter-spacing: .04em; }
.badge.founder { background: #1f6b57; color: #fff; }
.badge.verified { background: #e3f4ea; color: #1b5e3a; }
.badge.weekly { background: var(--violet); color: #fff; }
.card.vip, .panel.vip { border: 2px solid #d4af37; box-shadow: 0 0 0 3px rgba(212, 175, 55, .22), var(--shadow); }
.item.vip { border-left: 4px solid #d4af37; padding-left: 10px; }
.vip-option { padding: 12px 14px; border: 2px solid #d4af37; border-radius: var(--radius); background: #fff8e3; }
.vip-option[hidden] { display: none; }

.user-search { display: flex; gap: 8px; flex-wrap: wrap; }
.user-search input { flex: 1 1 260px; }
.table-wrap { overflow-x: auto; }
.user-card { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 14px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.user-card.blocked { background: #fdeceb; border-color: var(--danger); }
.user-info { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.user-info p { margin: 0 0 2px; }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.user-grant { display: inline-flex; gap: 6px; }
.user-grant input { width: 90px; }
.user-card button { width: auto; }
@media (max-width: 480px) {
  .user-actions { width: 100%; }
  .user-actions > button { flex: 1 1 calc(50% - 8px); width: auto; padding: 9px 8px; line-height: 1.2; }
  .user-grant { flex: 1 1 100%; min-width: 0; }
  .user-grant input { flex: 1; width: auto; min-width: 0; }
  .user-grant button { flex: none; width: auto; }
}
.penalty-dialog { display: grid; gap: 10px; max-height: calc(100vh - 32px); overflow-y: auto; }
.penalty-dialog label[hidden] { display: none; }
.penalty-dialog select, .penalty-dialog input, .penalty-dialog textarea { width: 100%; }
.panel.deal { border-color: var(--auction); border-width: 2px; }
.price { font-weight: 800; font-size: 1.1rem; margin: 2px 0; }
#detail .price { color: var(--brand); font-size: 1.6rem; }
.meta, .empty { color: var(--muted); margin: 0; font-size: .92rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Формуляри: колоната никога не е по-широка от екрана, дори дълъг текст в падащо меню да иска повече място. */
form { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
label { min-width: 0; }
form label { grid-template-columns: minmax(0, 1fr); }
select { min-width: 0; }
.narrow { max-width: 500px; }
.searchrow, .row { display: flex; gap: 8px; flex-wrap: wrap; }
.searchrow input { flex: 1; min-width: 180px; }
.row { margin-top: 10px; }
.field-inline { display: grid; gap: 4px; min-width: 150px; font-size: .9rem; color: var(--muted); }
.field-inline > span:first-child { font-weight: 700; color: var(--ink); }
.field-inline input, .field-inline select { width: 100%; }
.field-inline--sort { min-width: 170px; }
.row input[type=number] { width: 100%; }
.upload-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-trigger { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--ink); border: 2px dashed #a7cab4; border-radius: var(--radius); padding: 11px 16px; font: inherit; font-weight: 700; cursor: pointer; box-shadow: none; transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
.file-trigger:hover { border-color: var(--brand); background: #f0f7f2; color: var(--ink); transform: translateY(-1px); }
.file-icon { font-size: 1.15rem; }
.file-label { color: var(--muted); font-size: .92rem; }
.camera-trigger { display: none; }
@media (pointer: coarse) { .camera-trigger { display: inline-flex; } }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; margin-top: 10px; background: #fff; padding: 3px; gap: 3px; }
.seg button { background: transparent; color: var(--ink); border-radius: 99px; padding: 7px 18px; font-weight: 700; box-shadow: none; }
.seg button:hover { background: var(--surface-2); color: var(--ink); }
.seg button.on { background: var(--grad-btn); color: #fff; }
label { display: grid; gap: 4px; font-weight: 700; font-size: .95rem; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check input { margin-top: 5px; accent-color: var(--brand); }
input, textarea, select { font: inherit; padding: 10px 12px; border: 1px solid #d0dfd4; border-radius: 12px; background: #fff; color: var(--ink); max-width: 100%; transition: border-color .2s ease, box-shadow .2s ease; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(13, 100, 70, .14); }
input::placeholder, textarea::placeholder { color: #8a8f99; }
textarea { min-height: 110px; resize: vertical; }
/* Полетата са в етикети с удебелен текст; съдържанието им е с нормална дебелина. */
label input, label select, label textarea, .price-box input { font-weight: 500; }

/* Бутони: всеки вид има свой фон и цвят на текста; посочването само ги повдига и изсветлява,
   без да сменя цветовете, затова текстът никога не изчезва във фона. */
button, .btn { position: relative; overflow: hidden; font: inherit; font-weight: 700; padding: 10px 18px; border: 0; border-radius: 12px; background: var(--grad-btn); color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 6px 16px rgba(9, 74, 51, .22); transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background-color .18s ease; }
button:hover, .btn:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 10px 22px rgba(9, 74, 51, .3); }
button:active, .btn:active { transform: translateY(0) scale(.98); }
button::after, .btn::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: translateX(-120%) skewX(-20deg); pointer-events: none; }
button:hover::after, .btn:hover::after { animation: shine .7s ease; }
a.btn { text-decoration: none; }
button.danger { background: var(--danger); box-shadow: 0 6px 16px rgba(198, 40, 40, .22); }
button.ghost, .btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
button.ghost:hover { background: var(--surface-2); color: var(--ink); filter: none; }
button.vip-btn { background: linear-gradient(135deg, #f3d774, #c9a227); color: #3a2c05; box-shadow: 0 6px 16px rgba(201, 162, 39, .3); }
button:disabled { opacity: .5; cursor: default; transform: none; filter: none; }
.listing-cta { min-height: 52px; padding: 14px 22px; border-radius: 14px; font-size: 1.02rem; line-height: 1.2; }
.listing-cta.primary { background: var(--grad-btn); color: #fff; }
.listing-cta.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
.listing-cta.secondary:hover { background: #f2f8f4; color: var(--ink); filter: none; }
.listing-cta.destructive { background: var(--danger); color: #fff; }
.phone-btn { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; white-space: nowrap; background: linear-gradient(120deg, #1e7a46, #12613a) !important; box-shadow: 0 8px 20px rgba(30, 122, 70, .28); }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; background: #fff; color: #1f1f1f; border: 1px solid #c4c7c5; font-weight: 700; box-shadow: var(--shadow); }
.google-btn:hover { background: #f6f6f6; color: #1f1f1f; filter: none; }
.share-btn { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: .9rem; font-weight: 700; text-decoration: none; width: auto; box-shadow: none; }
.share-btn:hover { background: #f2f8f4; color: var(--ink); filter: none; }
.share-btn.viber { color: #5b4f9e; } .share-btn.whatsapp { color: #0f7a41; } .share-btn.messenger { color: #0a5fc7; } .share-btn.facebook { color: #0b5fcc; }

/* Прозорци */
.confirm-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; }
.confirm-modal.hidden { display: none; }
.confirm-backdrop { position: absolute; inset: 0; background: rgba(10, 24, 18, .55); backdrop-filter: blur(3px); animation: rise .2s ease backwards; }
.confirm-dialog { position: relative; width: min(420px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 60px rgba(10, 24, 18, .25); padding: 22px 20px 18px; color: var(--ink); animation: pop .3s ease backwards; }
.confirm-dialog h3 { margin: 0 0 10px; font-size: 1.25rem; }
.confirm-message { margin: 0 0 16px; color: var(--ink); font-size: 1rem; line-height: 1.5; }
.confirm-warning { color: var(--danger); font-weight: 700; }
.spend-rows { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0 0 16px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; }
.spend-rows dt { color: var(--muted); }
.spend-rows dd { margin: 0; font-weight: 700; text-align: right; }
.confirm-ack { margin: 0 0 16px; }
.confirm-actions button:disabled { opacity: .5; cursor: not-allowed; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.confirm-actions .listing-cta { min-width: 130px; }
.error { color: var(--danger); min-height: 1.4em; margin: 0; }
.ok { color: var(--good); margin: 0; }
:focus-visible { outline: 3px solid #c9a54a; outline-offset: 2px; }

/* Галерия */
html:has(.slides) { overscroll-behavior-x: none; } /* плъзгане извън края на слайдера не връща към предишната страница */
.gallery { position: relative; }
.slides { display: flex; height: min(440px, 100vw); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; background: var(--surface-2); border-radius: var(--radius); }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: start; scroll-snap-stop: always; }
.gallery .slide-nav { position: absolute; top: calc(min(440px, 100vw) / 2); transform: translateY(-50%); width: 42px; height: 42px; min-height: 0; padding: 0; border-radius: 50%; background: rgba(31, 34, 40, .6); color: #fff; font-size: 1.6rem; line-height: 1; box-shadow: none; }
.gallery .slide-nav:hover { background: rgba(31, 34, 40, .85); transform: translateY(-50%) scale(1.08); filter: none; }
.gallery .slide-nav.prev { left: 10px; }
.gallery .slide-nav.next { right: 10px; }
@media (pointer: coarse) { .gallery .slide-nav { display: none; } } /* на телефон стрелките само биха пречели на плъзгането */
.slide-count { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(31, 34, 40, .6); color: #fff; font-size: .85rem; font-weight: 700; }
.slide-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.gallery .slide-dot { width: 10px; height: 10px; min-height: 0; padding: 0; border-radius: 50%; background: #d0dfd4; box-shadow: none; transition: width .25s ease, background-color .25s ease; }
.gallery .slide-dot:hover { transform: none; filter: none; background: #b2c8b8; }
.gallery .slide-dot.on { width: 24px; border-radius: 99px; background: var(--grad-btn); }
.previews { display: flex; gap: 6px; flex-wrap: wrap; }
.previews img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
.preview { position: relative; width: 64px; height: 64px; border-radius: 8px; background: var(--surface-2); animation: pop .3s ease backwards; }
.preview.no-preview::before { content: '📷'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.4rem; }
.preview .preview-remove { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%; font-size: .95rem; line-height: 1; overflow: visible; }
.item { display: flex; gap: 14px; align-items: center; padding: 12px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); flex-wrap: wrap; animation: rise .4s ease backwards; }
.item img, .item .noimg { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--surface-2); flex: none; }
.item .info { flex: 1; min-width: 180px; }
.item .actions { display: flex; gap: 8px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); margin-bottom: 18px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: .93rem; vertical-align: top; }
th { background: var(--surface-2); }
td input[type=number] { width: 80px; }

.prose { max-width: 760px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); }
.prose h2 { font-size: 1.1rem; margin: 24px 0 6px; }
.prose p, .prose li { color: #3a3f47; }
html[lang="bg"] [lang="en"] { display: none; }
html[lang="en"] [lang="bg"] { display: none; }

/* Начална страница: жив градиентен банер. */
.pitch { position: relative; overflow: hidden; margin: 0 0 20px; padding: 34px 28px; border-radius: 22px; color: #fff; background: var(--grad); background-size: 220% 220%; animation: grad-move 12s ease-in-out infinite alternate, rise .5s ease backwards; box-shadow: 0 18px 40px rgba(9, 74, 51, .28); }
.pitch::before, .pitch::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.pitch::before { width: 260px; height: 260px; right: -60px; top: -90px; background: radial-gradient(circle, rgba(255, 196, 0, .55), transparent 65%); animation: float 7s ease-in-out infinite; }
.pitch::after { width: 220px; height: 220px; left: 40%; bottom: -120px; background: radial-gradient(circle, rgba(255, 255, 255, .25), transparent 65%); animation: float 9s ease-in-out infinite reverse; }
.pitch > * { position: relative; z-index: 1; }
.pitch h1 { margin: 0 0 8px; font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1.1; color: #fff; text-shadow: 0 2px 12px rgba(0, 30, 18, .25); }
.pitch p { margin: 0 0 16px; color: #fff; font-size: 1.05rem; max-width: 560px; }
.pitch .pitch-free { display: inline-block; padding: 4px 12px; border-radius: 99px; background: rgba(255, 255, 255, .2); color: #fff; font-weight: 700; margin-top: -6px; }
.pitch .btn { display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--brand-dark); box-shadow: 0 10px 24px rgba(0, 30, 18, .25); }
.pitch .btn:hover { color: var(--brand-dark); }
.hero { background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 18px; box-shadow: var(--shadow); margin-bottom: 8px; }
.hero h2 { margin: 2px 0 12px; }
section.weekly { margin: 10px 0 18px; padding: 16px; border-radius: var(--radius); background: linear-gradient(135deg, #fbf5e4, #edf6f0); border: 1px solid #e3d2a0; }
section.weekly h2 { margin-top: 0; color: #6b4f0e; }
section.weekly h2::before { content: '🔨 '; display: inline-block; animation: float 2.5s ease-in-out infinite; }
section.weekly .grid { grid-template-columns: minmax(0, 340px); }
.save-search { width: auto; font-size: .9rem; padding: 8px 14px; }

/* До 1100 px (телефони, таблети, малки лаптопи) менюто е зад бутон ☰: логото и бутонът са на един ред. */
@media (max-width: 1240px) {
  nav { gap: 6px 12px; padding: 10px 16px; align-items: center; }
  nav a, button.link { font-size: .95rem; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; margin-left: auto; border: 1px solid var(--line); padding: 0;
    border-radius: 12px; background: #fff; color: var(--ink); font-size: 1.4rem; cursor: pointer; box-shadow: none;
  }
  .menu-toggle:hover { background: var(--surface-2); color: var(--ink); filter: none; }
  nav .brand { width: auto; margin-right: auto; padding: 6px 10px; }
  .brand-text { font-size: 1.3rem; }
  .nav-menu {
    display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 10px;
    padding: 12px 0 0; border-top: 1px solid var(--line); margin-top: 8px; flex: 1 0 100%;
  }
  .nav-menu.open { display: flex; animation: rise .25s ease backwards; max-height: calc(100vh - 80px); overflow-y: auto; }
  .nav-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 10px; margin-left: 0; border-left: 0; padding: 6px 0; }
  /* Известията излизат отдолу като лист на цялата ширина, вместо да висят от камбанката извън екрана. */
  .notification-panel { position: fixed; left: 10px; right: 10px; bottom: 10px; top: auto; width: auto; max-width: 560px; margin: 0 auto; max-height: min(72vh, 560px); display: flex; flex-direction: column; border-radius: 20px; z-index: 60; animation: sheet-up .28s ease backwards; }
  .notification-list { max-height: none; flex: 1; }
  .notification-close { display: inline-flex; }
}

@media (max-width: 900px) {
  .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .row input[type=number], .row select { width: 100%; }
  .chat { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  body { overflow-x: hidden; }
  nav { padding: 10px 14px; }
  main { padding: 20px 14px 50px; }
  h1 { font-size: 1.55rem; }
  .pitch { padding: 26px 20px; border-radius: 18px; }
  .prose { padding: 18px 16px; }
  .searchrow { flex-direction: column; }
  .searchrow input, .searchrow button { width: 100%; }
  .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .seg button { width: 100%; text-align: center; padding: 7px 4px; }
  .row { grid-template-columns: 1fr; }
  .head { flex-direction: column; align-items: flex-start; }
  .upload-row { width: 100%; }
  .file-trigger { width: 100%; justify-content: center; }
  .file-label { width: 100%; }
  .thread form { flex-direction: column; }
  .notice { left: 8px; right: 8px; bottom: 8px; padding: 10px 12px; }
}

@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  footer { padding: 20px 14px; }
  footer a { display: inline-block; margin: 4px 8px; }
  button, .btn, .listing-cta { width: 100%; text-align: center; }
  .btnrow, .item .actions { flex-direction: column; }
  .btnrow > * { min-width: 100%; flex: 0 0 auto; } /* в колона основата 220px иначе става височина */
  .item { align-items: flex-start; }
  .item img, .item .noimg { width: 64px; height: 64px; }
  .bidrow { flex-direction: column; align-items: stretch; }
}

.stars { color: #d97706; letter-spacing: 1px; }
.leader { font-weight: 700; }
.timer { font-weight: 800; font-size: 1.15rem; color: var(--brand); font-variant-numeric: tabular-nums; }
.good { color: var(--good); font-weight: 700; margin: 6px 0; }
.warn { color: var(--danger); font-weight: 700; margin: 6px 0; }
.bidrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.bidrow label { flex: 1; min-width: 180px; }
.bidrow button, .bidrow .listing-cta { min-width: 170px; min-height: 52px; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btnrow > * { flex: 1 1 220px; min-width: 180px; }
.btnrow .btn, .btnrow button, .listing-cta { min-height: 52px; }
/* След общото правило, за да го надделее: в колона основата 220px иначе става височина. */
@media (max-width: 480px) { .btnrow > * { min-width: 100%; flex: 0 0 auto; } }
.safe-link { margin-top: 6px; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.invite-row { display: flex; gap: 8px; margin: 8px 0; }
.invite-row input { flex: 1; min-width: 0; }
.invite-row button { width: auto; flex: none; }
.saved-search { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.saved-search button { width: auto; flex: none; padding: 6px 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 8px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); animation: rise .4s ease backwards; }
.stat-value { font-size: 1.7rem; font-weight: 800; background: var(--grad-btn); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: .9rem; color: var(--ink); }
#similar { margin-top: 18px; }
/* Любими: празна звезда със златен контур, която се запълва в златно. */
.fav-btn { gap: 8px; }
.fav-star { width: 22px; height: 22px; flex: none; fill: transparent; stroke: #b8860b; stroke-width: 1.8; stroke-linejoin: round; transition: fill .25s ease, transform .25s ease; }
.fav-btn:hover .fav-star { fill: #fff3c4; }
.fav-btn.on .fav-star { fill: #f5b301; stroke: #b8860b; filter: drop-shadow(0 1px 3px rgba(184, 134, 11, .45)); }
.fav-btn.on { border-color: #e9c46a; background: #fffaeb; }
.fav-btn.on:hover { background: #fff3d1; }
.fav-btn.pop .fav-star { animation: star-pop .5s ease; }
@keyframes star-pop { 0% { transform: scale(.6) rotate(-30deg); } 60% { transform: scale(1.35) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
@media (max-width: 700px) { #detail .fav-star { width: 18px; height: 18px; } }
/* На тесен телефон бутоните са в един ред: тук остава само звездата, а текстът е за четците на екран. */
@media (max-width: 420px) {
  #detail .btnrow > .fav-btn { flex: 0 0 52px; padding: 7px 0; }
  #detail .fav-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #detail .fav-star { width: 24px; height: 24px; }
}
/* Подкрепа: видима, но спокойна – малко копче до логото, втори бутон в банера и линк в долната част. */
nav .nav-donate { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1.5px solid #b7d3c3; background: #f2f8f4; color: var(--brand-dark); font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap; transition: background-color .2s ease, transform .2s ease; }
nav .nav-donate:hover { background: #e2efe6; color: var(--brand-dark); transform: translateY(-1px); }
nav .nav-donate::after { display: none; }
.nav-donate .heart, .pitch-donate span:first-child, .support-heart { display: inline-block; color: #d32f2f; animation: heartbeat 2.6s ease-in-out infinite; }
@keyframes heartbeat { 0%, 60%, 100% { transform: scale(1); } 70% { transform: scale(1.25); } 80% { transform: scale(1); } 90% { transform: scale(1.15); } }
@media (max-width: 1240px) { nav .nav-donate { margin-left: auto; } nav .menu-toggle { margin-left: 8px; } }
@media (max-width: 340px) { nav .nav-donate .txt { display: none; } }
.pitch-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pitch .pitch-donate, .pitch-donate { background: rgba(0, 30, 18, .24); color: #fff; border: 1.5px solid rgba(255, 255, 255, .75); box-shadow: none; }
.pitch .pitch-donate:hover { background: rgba(0, 30, 18, .34); color: #fff; }
.pitch .pitch-donate span:first-child { color: #fff; }
footer .foot-donate { color: var(--brand-dark); font-weight: 800; }
.thanks-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: linear-gradient(135deg, #f2f8f4, #fff); border-color: #b7d3c3; animation: rise .4s ease backwards; }
.thanks-card .thanks-icon { font-size: 1.8rem; }
.thanks-card .thanks-text { flex: 1 1 220px; }
.thanks-card .pitch-donate { background: #fff; color: var(--brand-dark); border-color: #b7d3c3; width: auto; }
.thanks-card .pitch-donate span:first-child { color: #d32f2f; }
.thanks-card .thanks-close { width: 32px; height: 32px; min-height: 0; padding: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); box-shadow: none; }
.thanks-card .thanks-close:hover { background: var(--line); color: var(--ink); filter: none; }
.support { max-width: 820px; margin: 0 auto; }
.support-hero { text-align: center; padding: 34px 22px; margin-bottom: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.support-hero .support-heart { font-size: 2.6rem; }
.support-hero h1 { margin: 6px 0 10px; }
.support-hero .lead { max-width: 560px; margin: 0 auto 18px; font-size: 1.08rem; color: var(--ink); }
.support-hero .donate-btn { display: inline-flex; width: auto; font-size: 1.1rem; padding: 16px 30px; margin-bottom: 8px; }
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.support-grid .panel { margin: 0; }
.support-note { text-align: center; margin-top: 18px; }
/* Избор на населено място с търсене. */
.place-picker { position: relative; display: block; min-width: 0; }
.place-picker .place-input { width: 100%; }
.place-list { position: absolute; z-index: 25; left: 0; right: 0; top: calc(100% + 4px); max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-up); animation: rise .15s ease backwards; }
.place-list li { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--ink); }
.place-list li small { font-weight: 400; color: var(--muted); font-size: .82rem; }
.place-list li.active, .place-list li:hover { background: #edf6f0; }
.place-list li.empty { cursor: default; font-weight: 400; color: var(--muted); }
.place-list li.empty:hover { background: none; }
/* Филтрите на началната страница: равна мрежа от четири полета. */
.filters .row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, .85fr); gap: 12px 14px; align-items: end; margin-top: 14px; }
.filters .field-inline { min-width: 0; }
.filters .field-inline select { width: 100%; height: 44px; } /* същата височина като полетата с търсене, за да е редът равен */
.price-range { display: flex; align-items: center; gap: 8px; }
.price-box { position: relative; display: block; flex: 1; min-width: 0; }
.price-box input { width: 100%; padding-right: 30px; }
.price-box > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.price-dash { color: var(--muted); font-weight: 700; }
@media (max-width: 1100px) { .filters .row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .filters .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 560px) { .filters .row { grid-template-columns: minmax(0, 1fr); } }
/* Заглавия на групите в менюто с категориите. */
.place-list li.group { position: sticky; top: -6px; z-index: 1; display: block; padding: 10px 10px 4px; background: #fff; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; cursor: default; }
.place-list li.group:hover { background: #fff; }
.place-list li.group-pick { color: var(--brand-dark); font-weight: 800; }
.place-list li.group-pick:not(:first-child) { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.rules-dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.rules-list { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 8px; color: var(--ink); }
.prose .lead { font-size: 1.08rem; color: var(--ink); }
/* Профилни снимки: кръгли, с бяла рамка; без снимка се показва сиво човече. */
.avatar { display: inline-block; flex: none; border-radius: 50%; object-fit: cover; background: #dfe2e6; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(12, 40, 28, .12); vertical-align: middle; }
.avatar-xs { width: 26px; height: 26px; border-width: 1px; }
.avatar-sm { width: 30px; height: 30px; }
.avatar-md { width: 42px; height: 42px; }
.avatar-lg { width: 96px; height: 96px; border-width: 3px; }
.nav-user { display: inline-flex; align-items: center; gap: 8px; }
.seller-link { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.avatar-edit { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.avatar-edit .avatar-lg { animation: pop .4s ease backwards; }
.avatar-actions { display: grid; gap: 8px; justify-items: start; flex: 1 1 220px; }
.avatar-actions button { width: auto; }
.user-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.user-head h1 { margin: 0; }
.conv { display: flex; align-items: center; gap: 10px; }
.conv-text { min-width: 0; flex: 1; }
.user-card > .avatar { align-self: flex-start; }
.ts-checks { list-style: none; padding: 0; }
.ts-checks li { margin: 4px 0; }
.about .lead { font-size: 1.12rem; color: var(--ink); }
.about-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.about-cta .btn { width: auto; display: inline-flex; align-items: center; justify-content: center; }
.about-cta .btn.secondary { color: var(--ink); }
html[lang="bg"] .prose section[lang="en"], html[lang="en"] .prose section[lang="bg"] { display: none; }
.google-box { margin-bottom: 4px; }
.google-box .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; margin: 16px 0 4px; }
.google-box .or::before, .google-box .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
/* На телефон бутоните на обява и търг са компактни и на един ред; дългите надписи се пренасят в самия бутон. */
@media (max-width: 700px) {
  #detail .btnrow { flex-direction: row; flex-wrap: nowrap; gap: 6px; }
  #detail .btnrow > * { flex: 1 1 0; width: auto; min-width: 0; }
  #detail .listing-cta { min-height: 42px; padding: 7px 6px; border-radius: 10px; font-size: .8rem; line-height: 1.15; box-shadow: none; overflow-wrap: anywhere; }
  #detail .phone-btn { min-height: 48px; font-size: 1.1rem; }
  #detail .bidrow { flex-direction: row; flex-wrap: nowrap; align-items: end; gap: 6px; }
  #detail form, #detail .bidrow label { grid-template-columns: minmax(0, 1fr); } /* иначе полето за число разтяга формата извън панела */
  #detail .bidrow label { min-width: 0; }
  #detail .bidrow input { width: 100%; min-width: 0; }
  #detail .bidrow .listing-cta { flex: none; width: auto; min-width: 88px; min-height: 42px; padding: 7px 14px; }
}

/* Чат */
.chat { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; margin-top: 12px; }
.convs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.conv { display: block; width: 100%; text-align: left; background: #fff; color: var(--ink); border-radius: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; font-weight: 600; box-shadow: none; }
.conv:hover { background: var(--surface-2); color: var(--ink); transform: none; filter: none; }
.conv.on { background: #edf6f0; color: var(--ink); box-shadow: inset 3px 0 0 var(--brand); }
.conv small { display: block; color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .75rem; text-align: center; margin-left: 6px; }
.thread { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 380px; box-shadow: var(--shadow); }
.thread header { padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.msgs { padding: 14px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 430px; flex: 1; }
.bubble { max-width: 78%; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); overflow-wrap: anywhere; animation: rise .25s ease backwards; }
.bubble.me { align-self: flex-end; background: var(--grad-btn); color: #fff; border-color: transparent; }
.bubble time { display: block; font-size: .72rem; opacity: .8; margin-top: 2px; }
/* В собственото съобщение всичко е бяло: сивото и червеното не се виждат върху градиента. */
.bubble.me .meta, .bubble.me a, main .bubble.me a:not(.btn) { color: #fff; }
.bubble.me .meta { opacity: .9; }
.thread form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.thread form textarea { flex: 1; min-height: 44px; max-height: 120px; }
@media (max-width: 700px) { .chat { grid-template-columns: 1fr; } }

/* Който е поискал по-малко движение в системата си, вижда всичко без анимации. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  body::before { animation: none; }
}

/* Магазини: корица, лого, значки, социални мрежи, мрежа от квадратни снимки. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.badge.shop { background: #e5eedf; color: #094a33; }
.shop-head { padding: 0; overflow: hidden; }
.shop-head > :not(.shop-cover) { margin-left: 22px; margin-right: 22px; }
.shop-cover { height: clamp(120px, 24vw, 260px); background: var(--grad) center / cover no-repeat; }
.shop-id { display: flex; align-items: flex-start; gap: 16px; margin-top: -52px; }
.shop-id .shop-title { padding-top: 60px; } /* името е под корицата, до логото */
.shop-logo { width: 104px; height: 104px; border-radius: 22px; object-fit: cover; background: #fff; border: 4px solid #fff; box-shadow: var(--shadow); flex: none; }
.shop-logo.sm { width: 52px; height: 52px; border-radius: 12px; border-width: 2px; }
.shop-title { min-width: 0; padding-bottom: 4px; }
.shop-title h1 { margin: 0 0 6px; overflow-wrap: anywhere; }
.shop-title p { margin: 0; }
.shop-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; color: var(--muted); }
.shop-stats strong { color: var(--ink); }
.shop-about { margin-top: 12px; overflow-wrap: anywhere; }
.shop-info p { margin: 4px 0; overflow-wrap: anywhere; }
.shop-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.social { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); transition: transform .18s ease, background-color .18s ease, color .18s ease; }
.social svg { width: 22px; height: 22px; }
.social:hover { transform: translateY(-2px); color: #fff; }
.social.website:hover { background: #2b3138; }
.social.facebook:hover { background: #1863d6; }
.social.instagram:hover { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); }
.social.tiktok:hover { background: #111; }
.social.youtube:hover { background: #d40000; }
.shop-head .btnrow { margin: 16px 22px 0; }
.shop-head #followMsg { margin-bottom: 18px; }
button.on { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.warn-box { border-left: 4px solid var(--danger); }
.shop-bar { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; }
.shop-search { flex: 1; }
.view-toggle { display: flex; gap: 4px; }
.view-toggle button { font-size: 1.2rem; padding: 6px 10px; background: none; color: var(--muted); box-shadow: none; }
.view-toggle button[aria-pressed="true"] { color: var(--brand-dark); background: var(--surface-2); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--surface-2); animation: rise .4s ease backwards; }
.tile img, .tile .noimg { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.tile:hover img { transform: scale(1.05); }
.tile-price { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 99px; background: rgba(20, 20, 24, .78); color: #fff; font-weight: 700; font-size: .85rem; }
@media (max-width: 560px) {
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .tile { border-radius: 4px; }
  .tile-price { font-size: .72rem; padding: 1px 6px; left: 3px; bottom: 3px; }
  .shop-logo { width: 84px; height: 84px; }
  .shop-id { flex-direction: column; gap: 10px; margin-top: -44px; }
  .shop-id .shop-title { padding-top: 0; }
  .shop-head > :not(.shop-cover), .shop-head .btnrow { margin-left: 14px; margin-right: 14px; }
}
.card-shop { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: .85rem; font-weight: 700; color: var(--ink); }
.card .card-shop img { width: 22px; height: 22px; aspect-ratio: 1; margin: 0; border-radius: 6px; }
.card-shop .tick { color: var(--good); }
.shop-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 12px 0 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--ink); text-decoration: none; }
.shop-card:hover { border-color: #b7d3c3; }
.shop-card-go { margin-left: auto; font-size: 1.6rem; color: var(--muted); }
.trader-note { font-size: .88rem; }
.shop-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); font-weight: 700; text-decoration: none; }
.shop-chip img { width: 28px; height: 28px; border-radius: 99px; object-fit: cover; }
.shop-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; min-width: 0; }
.shop-form legend { font-weight: 800; padding: 0 6px; }
.shop-images { position: relative; margin-bottom: 40px; }
.shop-cover-edit { height: 150px; border-radius: 14px; background: var(--grad) center / cover no-repeat; display: flex; align-items: flex-start; justify-content: flex-end; padding: 10px; }
.shop-logo-edit { position: absolute; left: 14px; bottom: -36px; display: flex; align-items: flex-end; gap: 10px; }
.shop-logo-edit .shop-logo { width: 84px; height: 84px; }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.danger-zone { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.as-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; min-width: 0; }
.as-box legend { font-weight: 800; padding: 0 6px; }
.as-box label span { display: inline-flex; align-items: center; gap: 6px; }
.as-box .avatar-xs { object-fit: cover; border-radius: 99px; }
/* Каталог на магазините и покана на началната страница. */
.shops-promo, .shops-band { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px; box-shadow: var(--shadow); margin-bottom: 22px; }
.shops-promo h1 { margin-bottom: 8px; }
.shops-perks { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 18px; }
.shops-perks li { position: relative; padding-left: 26px; }
.shops-perks li::before { content: '✓'; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--good); }
.shops-band { display: grid; gap: 18px; }
.shops-band h2 { margin: 0 0 6px; }
.shops-band p { margin: 0; color: var(--muted); }
.shops-band .pitch-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.shops-filter { margin-bottom: 8px; }
.shops-filter .row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.shop-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.shop-cards.band { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.shop-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0 14px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; overflow: hidden; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; animation: rise .45s ease backwards; }
.shop-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-up); }
.shop-tile-cover { display: block; height: 84px; margin: 0 -14px; background: #2b3138 center / cover no-repeat; }
.shop-tile .shop-logo.sm { margin-top: -28px; }
.shop-tile-name { font-size: 1.08rem; overflow-wrap: anywhere; }
.shop-tile-name .tick { color: var(--good); }
.shop-tile-about { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-tile-stats { margin-top: auto; padding-top: 4px; }
@media (max-width: 560px) {
  .shops-promo, .shops-band { padding: 20px 16px; }
  .shops-filter .row { grid-template-columns: minmax(0, 1fr); }
  .shop-cards, .shop-cards.band { grid-template-columns: minmax(0, 1fr); }
}
/* Средни екрани: менюто остава на един ред и с линка „Магазини“ (и при директор с „Токени“ и „Админ“). */
@media (min-width: 1241px) and (max-width: 1440px) {
  .nav-menu { gap: 4px 13px; }
  nav .nav-menu > a, nav .nav-actions a, nav .nav-actions button.link { font-size: .93rem; }
  .nav-actions { gap: 9px; padding: 6px 0 6px 10px; }
  .nav-user { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (min-width: 1241px) and (max-width: 1300px) {
  .nav-menu { gap: 4px 10px; }
  .nav-actions { gap: 7px; }
  nav .nav-menu > a, nav .nav-actions a, nav .nav-actions button.link { font-size: .9rem; }
  nav .nav-donate .txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Ревюта на магазини: избор със звезди (в DOM 5→1, показани 1→5, за да светят избраната и по-малките). */
.shop-reviews { margin-top: 28px; }
.shop-reviews h2 .stars { font-size: 1.1rem; }
.star-pick { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-pick label { display: inline-block; cursor: pointer; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick span[aria-hidden] { font-size: 2rem; line-height: 1; color: #d6cfc8; transition: color .15s ease, transform .15s ease; }
.star-pick label:has(input:checked) span[aria-hidden], .star-pick label:has(input:checked) ~ label span[aria-hidden],
.star-pick label:hover span[aria-hidden], .star-pick label:hover ~ label span[aria-hidden] { color: #d97706; }
.star-pick label:hover span[aria-hidden] { transform: scale(1.15); }
.star-pick label:has(input:focus-visible) span[aria-hidden] { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.shop-reviews .review p { margin: 4px 0; }
.stat-link { color: var(--muted); text-decoration: none; }
.stat-link:hover { color: var(--brand); }
.card-shop .liked { color: var(--brand); }.star-pick label { position: relative; }

/* История на автора на страницата за подкрепа. */
.support-story { margin: 22px 0; padding: 26px 28px; border-left: 5px solid var(--brand); }
.support-story h2 { margin-top: 0; }
.support-story p { font-size: 1.05rem; line-height: 1.7; }
.support-story .story-ask { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; }
.support-story .donate-btn { margin-top: 6px; }
@media (max-width: 560px) { .support-story { padding: 20px 16px; } .support-story p { font-size: 1rem; } }
/* Услуги, състояние и доставка, допълнителни филтри. */
.badge.service { background: var(--brand); color: #fff; }
.card .noimg.svc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(135deg, var(--surface-2), #fff); color: var(--brand-dark); text-align: center; padding: 10px; }
.noimg.svc span { font-size: 2.4rem; }
.noimg.svc small { font-weight: 700; font-size: .85rem; }
.card-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.card-chips span { font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.filters-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.more-toggle { color: var(--brand-dark); font-weight: 700; }
.more-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: #fff; font-size: .75rem; }
.more-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px 14px; align-items: end; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.more-filters select { width: 100%; height: 44px; }
.more-filters .ships-filter { align-self: center; white-space: nowrap; }
.more-filters #radiusHint { grid-column: 1 / -1; margin: 0; }
@media (max-width: 900px) { .more-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 560px) { .more-filters { grid-template-columns: minmax(0, 1fr); } .more-filters .ships-filter { white-space: normal; } }
@media (max-width: 360px) { .seg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.service-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600; }
.service-cta .btn { width: auto; }
/* Обиколка като в игра: затъмнен екран, осветена част, карта със стъпки и прогрес. */
.tour { position: fixed; inset: 0; z-index: 10000; }
.tour.center { background: rgba(8, 22, 16, .62); }
.tour.out { opacity: 0; transition: opacity .25s ease; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(8, 22, 16, .62), 0 0 0 3px #c9a54a; transition: top .3s ease, left .3s ease, width .3s ease, height .3s ease; pointer-events: none; animation: tour-glow 1.8s ease-in-out infinite; }
.tour.center .tour-spot { display: none; }
@keyframes tour-glow { 0%, 100% { box-shadow: 0 0 0 9999px rgba(8, 22, 16, .62), 0 0 0 3px #c9a54a; } 50% { box-shadow: 0 0 0 9999px rgba(8, 22, 16, .62), 0 0 0 7px rgba(201, 165, 74, .55); } }
.tour-card { position: fixed; width: min(380px, calc(100vw - 24px)); background: #fff; color: var(--ink); border-radius: 18px; padding: 16px 18px 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); border: 1px solid var(--line); }
.tour.center .tour-card { top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.tour-card.pop { animation: tour-pop .3s ease backwards; }
.tour.center .tour-card.pop { animation: tour-pop-center .3s ease backwards; }
@keyframes tour-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes tour-pop-center { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } }
.tour-top { display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; font-weight: 800; color: var(--brand-dark); text-transform: uppercase; letter-spacing: .04em; }
.tour-count { color: var(--muted); }
.tour-bar { height: 6px; border-radius: 99px; background: var(--surface-2); margin: 8px 0 10px; overflow: hidden; }
.tour-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), #c9a54a); transition: width .35s ease; }
.tour-icon { font-size: 2rem; line-height: 1; }
.tour-card h3 { margin: 6px 0 4px; font-size: 1.2rem; }
.tour-card p { margin: 0 0 12px; color: #3a3f47; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour.center .tour-actions { justify-content: center; flex-wrap: wrap; }
.tour-nav { display: flex; gap: 8px; }
.tour-actions button:not(.link) { min-height: 44px; width: auto; }
.tour-skip, .tour-off { color: var(--muted); font-size: .9rem; }
.tour-off { display: block; margin: 8px auto 0; font-size: .8rem; }
@media (max-width: 560px) {
  .tour:not(.center) .tour-card { left: 10px; right: 10px; bottom: 10px; width: auto; }
  .tour:not(.center) .tour-card.top { top: 10px; bottom: auto; }
}
.tour-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 10001; overflow: hidden; }
.tour-confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: tour-fall linear forwards; }
@keyframes tour-fall { to { transform: translateY(105vh) rotate(720deg); opacity: .8; } }
.pitch-tour { display: inline-flex; gap: 6px; margin-top: 14px; color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; width: auto !important; }
.pitch-tour:hover { color: #fff; opacity: .9; }.tour-actions button { white-space: nowrap; }
@media (max-width: 560px) { .tour-actions button:not(.link) { padding: 10px 14px; } .tour-skip { padding: 4px 0; } }

/* Каузи: списък, карта с лента на напредъка, страница на каузата, форма. */
.causes-hero, .causes-band { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px; box-shadow: var(--shadow); margin-bottom: 22px; }
.causes-hero h1 { margin-bottom: 8px; }
.causes-band { display: grid; gap: 14px; }
.causes-band h2 { margin: 0 0 6px; }
.causes-band p { margin: 0; color: var(--muted); }
.causes-band .btn { width: auto; }
.causes-filter { margin-bottom: 14px; }
.causes-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px 14px; align-items: end; margin-top: 12px; }
.causes-row select { width: 100%; height: 44px; }
.causes-row .check { align-self: center; white-space: nowrap; }
@media (max-width: 900px) { .causes-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 560px) { .causes-row { grid-template-columns: minmax(0, 1fr); } .causes-hero, .causes-band { padding: 20px 16px; } }
.cause-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cause-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; animation: rise .45s ease backwards; }
.cause-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-up); }
.cause-card.closed { opacity: .82; }
.cause-card img, .cause-noimg { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.cause-noimg { display: grid; place-items: center; font-size: 2.6rem; background: linear-gradient(135deg, #fbf5e4, var(--surface-2)); }
.cause-card-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; }
.cause-card-title { font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.badge.cause-cat { background: #fbf0d8; color: #6b4f0e; }
.cause-progress { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.cause-progress span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), #c9a54a); }
.cause-money { font-size: .92rem; }
.cause-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .cause-layout { grid-template-columns: minmax(0, 1fr); } .cause-side { order: -1; } }
.cause-main h1 { margin: 6px 0; overflow-wrap: anywhere; }
.cause-gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: -4px 0 12px; border-radius: 12px; }
.cause-gallery img { flex: 0 0 100%; max-height: 420px; object-fit: cover; border-radius: 12px; scroll-snap-align: start; }
.cause-story { line-height: 1.7; overflow-wrap: anywhere; }
table.budget { width: 100%; border-collapse: collapse; }
table.budget td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.budget .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.budget tr.total td { font-weight: 800; border-bottom: 0; }
.cause-update { border-left: 3px solid var(--brand); padding: 4px 0 4px 12px; margin: 10px 0; }
.cause-update p { margin: 2px 0; overflow-wrap: anywhere; }
.cause-tips { background: var(--surface-2); box-shadow: none; margin-top: 18px; }
.cause-tips ul { margin: 6px 0 0; padding-left: 20px; }
.cause-side { display: grid; gap: 14px; position: sticky; top: 90px; }
@media (max-width: 900px) { .cause-side { position: static; } }
.cause-raised { margin: 0 0 8px; font-size: 1.05rem; }
.cause-raised strong { font-size: 1.7rem; color: var(--brand-dark); }
.donate-links { display: grid; gap: 8px; }
.donate-links .btn { width: 100%; }
.iban-box { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.iban-box p { margin: 2px 0; }
.iban code { font-size: 1rem; font-weight: 700; letter-spacing: .02em; overflow-wrap: anywhere; }
.iban .btn, .iban button { width: auto; }
.money-note { font-size: .85rem; margin-top: 10px; }
.verified-note { font-size: .85rem; }
.report-link { color: var(--danger); }
.cause-owner form, .cause-admin form { margin-bottom: 10px; }
.cause-admin ul { padding-left: 18px; }
.budget-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 8px; margin-bottom: 8px; }
.cause-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; min-width: 0; }
.cause-form legend { font-weight: 800; padding: 0 6px; }
.cause-form .d-link { width: 100%; }
.cause-org { display: grid; gap: 12px; }
.agree span { font-size: .9rem; }
.my-causes { padding-left: 18px; }
.my-causes li { margin: 6px 0; }
.badge.cst-pending, .badge.cst-hidden { background: #fff3c4; color: #5c4400; }
.badge.cst-active { background: #e3f4ea; color: #1b5e3a; }
.badge.cst-rejected { background: var(--danger); color: #fff; }
.badge.cst-closed { background: var(--surface-2); color: var(--ink); }
.report-form .check { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
/* Любими и Съобщения: на широк екран само иконка с брояч; в менюто ☰ и с текст. */
.nav-ico { display: inline-flex; align-items: center; gap: 4px; }
.nav-ico .ico { font-size: 1.1rem; line-height: 1; }
.nav-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 800; }
@media (min-width: 1241px) { .nav-ico .nav-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.nav-user { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Оферти, панел на собственика, кауза към обява, размяна, „Даром“, „Зареди още“, чат, офлайн. */
.forgot-link { margin: -4px 0 0; font-size: .9rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.forgot-link .register-link { font-weight: 600; }
.owner-panel h4 { margin: 14px 0 6px; }
.owner-panel .btnrow { align-items: center; }
.bump-wait { align-self: center; }
.offers { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.offers li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.offers .small, button.small { padding: 6px 12px; font-size: .9rem; min-height: 0; width: auto; }
.offer-panel form.bidrow { margin-top: 8px; }
.offer-status.accepted { color: var(--good); font-weight: 700; }
.offer-status.declined { color: var(--danger); }
.cause-chip { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: #fbf0d8; color: #5c4400; font-weight: 700; text-decoration: none; border: 1px solid #ecd9a4; }
.cause-chip:hover { background: #f6e6bd; }
.card-chips .chip-cause { background: #fbf0d8; border-color: #ecd9a4; color: #5c4400; }
.swap-for { padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.badge.swap { background: #2c5f8a; color: #fff; }
.cause-link-box { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; }
.cause-link-box legend, .cause-link-box .meta { grid-column: 1 / -1; }
.cause-link-box select { height: 44px; }
.support-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.support-item { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; background: var(--surface); }
.support-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.support-item span { font-weight: 700; font-size: .9rem; overflow-wrap: anywhere; }
.load-more { text-align: center; margin: 18px 0; }
.load-more button { width: auto; min-width: 220px; }
.free-band { margin: 0 0 22px; padding: 18px 20px; border-radius: 20px; background: linear-gradient(135deg, #fbf5e4, var(--surface)); border: 1px solid #ecd9a4; box-shadow: var(--shadow); }
.free-band .head { margin: 0; }
.free-band h2 { margin: 0; }
.near-me { color: var(--brand-dark); font-weight: 700; }
.filters-bar { justify-content: flex-start; }
.filters-bar #clearFilters { margin-left: auto; }
.chat-img { display: block; max-width: 240px; max-height: 240px; border-radius: 10px; margin: 4px 0; object-fit: cover; }
.chat-attach { display: inline-grid; place-items: center; width: 44px; min-width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; font-size: 1.2rem; }
.chat-file { width: 100%; margin: 4px 0 0; }
#send { flex-wrap: wrap; }
.block-btn { margin-left: auto; font-size: .85rem; color: var(--muted); }
.thread header { display: flex; align-items: center; gap: 10px; }
.msg-report { font-size: .8rem; color: var(--muted); padding: 0 2px; }
.chat-note { padding: 8px 14px; }
.offline-box { max-width: 520px; margin: 40px auto; text-align: center; }
.offline-icon { font-size: 3rem; margin: 0; }/* Еднаква височина на надписите и полетата във филтрите, за да е редът точно равен. */
.filters .row .field-inline { grid-template-rows: 22px 44px; }
.filters .row .field-inline > span:first-child { line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filters .row .place-picker, .filters .row .price-range { height: 44px; }
/* Действията в Моите обяви се пренасят на нов ред, вместо да се режат. */
.item .actions { flex-wrap: wrap; max-width: 100%; }
.item .actions > * { white-space: nowrap; }
@media (max-width: 900px) { .item .actions { flex-basis: 100%; } }

/* Текстови бутони (Близо до мен, Още филтри, Изчисти, + Добави, Блокирай...) като чипове с отстъп, а не залепен текст. */
.filters-bar { gap: 8px; }
.filters-bar button, #clearHist, #addItem, #addLink, .block-btn, .report-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto !important; min-height: 40px;
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); line-height: 1.2; text-decoration: none;
}
.filters-bar button:hover, #clearHist:hover, #addItem:hover, #addLink:hover, .block-btn:hover { background: var(--surface-2); }
.report-link { border-color: #f1c4c4; }
.report-link:hover { background: #fdeceb; }
.filters-bar button[aria-expanded="true"] { background: var(--surface-2); border-color: var(--brand); }
#addItem, #addLink { justify-self: start; }
@media (max-width: 480px) { .filters-bar #clearFilters { margin-left: 0; } }@media (max-width: 480px) { .filters-bar button, #clearHist { padding: 7px 12px; font-size: .88rem; min-height: 38px; } .filters-bar { gap: 6px; } }
.owner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.owner-actions .btn, .owner-actions button { width: auto !important; padding: 9px 16px; min-height: 44px; }
.thread header .block-btn { flex-shrink: 0; white-space: nowrap; }
.thread header .seller-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) { .thread header .block-btn { padding: 6px 10px; font-size: .82rem; min-height: 36px; } }
.chat > *, .thread, .thread header, #send { min-width: 0; }
#send textarea { min-width: 0; flex: 1 1 160px; }

/* Превключвателят Всички / Обяви / Търгове / Услуги / Размяна на телефон: винаги един ред в балончето.
   На нормален телефон се събират всички; на много тесен екран редът се плъзга настрани. */
@media (max-width: 560px) {
  .seg { display: flex !important; flex-wrap: nowrap; gap: 2px; padding: 4px; width: 100%; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: 1 0 auto; width: auto !important; padding: 9px 8px; font-size: .86rem; white-space: nowrap; scroll-snap-align: start; }
}@media (max-width: 560px) { .seg { gap: 0; } .seg button { padding: 9px 6px; font-size: .84rem; } }
/* Много тесен телефон: два реда в заоблен правоъгълник (не балонче), всичко се вижда без плъзгане. */
@media (max-width: 360px) { .seg { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; overflow: visible; border-radius: 18px; } .seg button { padding: 8px 4px; } }

/* ===== Режим „Ремонт“ ===== */
.maint-bar { background: linear-gradient(90deg, #8a6a22, #b8860b); color: #fff; text-align: center; padding: 8px 14px; font-weight: 600; font-size: .92rem; }
.maint-bar a { color: #fff; text-decoration: underline; margin-left: 6px; }
#maintPanel.maint-on { border: 2px solid #b8860b; background: #fffaf0; }
#maintPanel label { display: block; margin: 10px 0; }
#maintPanel input { width: 100%; margin-top: 4px; }
.maint-btn { font-size: 1.05rem; padding: 12px 22px; }
.maint-note { background: #fff7e0; border-left: 4px solid #b8860b; padding: 10px 14px; border-radius: 8px; margin: 12px 0; text-align: left; }
.maint-body { min-height: 100vh; margin: 0; background: linear-gradient(135deg, #073d2a 0%, #0f6e4f 60%, #8a6a22 100%); display: flex; align-items: center; justify-content: center; }
.maint { max-width: 640px; width: 100%; padding: 24px 16px; }
.maint-card { background: #fff; border-radius: 22px; padding: 34px 30px 26px; box-shadow: 0 24px 60px rgba(0, 0, 0, .28); text-align: center; }
.maint-brand { font-weight: 800; font-size: 1.5rem; color: var(--brand-dark, #094a33); margin: 0 0 6px; letter-spacing: -.02em; }
.maint-icon { font-size: 3.4rem; margin: 6px 0 4px; animation: maint-tilt 2.4s ease-in-out infinite; display: inline-block; }
@keyframes maint-tilt { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
.maint-card h1 { margin: 6px 0 10px; font-size: 1.6rem; }
.maint-lead { font-size: 1.05rem; line-height: 1.55; color: #333; }
.maint-list { list-style: none; padding: 0; margin: 20px 0; text-align: left; display: grid; gap: 12px; }
.maint-list li { display: flex; gap: 12px; align-items: flex-start; background: #f3f8f5; border-radius: 12px; padding: 12px 14px; line-height: 1.45; }
.maint-list li > span:first-child { font-size: 1.3rem; line-height: 1.2; }
.maint-wait { color: var(--brand, #0d6446); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
.maint-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand, #0d6446); animation: maint-pulse 1.4s ease-in-out infinite; }
@keyframes maint-pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.maint-thanks { font-weight: 700; margin-top: 4px; }
.maint-en { margin-top: 18px; border-top: 1px solid #eee; padding-top: 12px; font-size: .85rem; }
@media (max-width: 480px) { .maint-card { padding: 26px 18px 20px; } .maint-card h1 { font-size: 1.35rem; } }
@media (prefers-reduced-motion: reduce) { .maint-icon, .maint-dot { animation: none; } }
.maint-bar .maint-stop { margin-left: 10px; background: #fff; color: #6b4f12; border: 0; border-radius: 999px; padding: 4px 14px; font-weight: 700; cursor: pointer; font-size: .88rem; }
.maint-bar .maint-stop:hover { background: #fff7e0; }
.maint-admin { margin: 14px 0 0; font-size: .85rem; }
.maint-admin a { color: #777; }
/* История на токените: таблицата се побира и на 320 px (дългите заглавия се пренасят). */
#history table { width: 100%; table-layout: fixed; }
#history th:first-child { width: 32%; }
#history th:last-child { width: 4.5em; }
#history td { overflow-wrap: anywhere; }
/* Предупреждение срещу измамни линкове в чата */
.bubble .scam-warn { margin: 8px 0 2px; padding: 8px 10px; border-radius: 10px; background: #fff4e0; border: 1px solid #e8b04a; color: #6b4300; font-size: .86rem; line-height: 1.4; }
.bubble .scam-warn a { color: #6b4300; font-weight: 700; text-decoration: underline; }
/* Профилите в социалните мрежи (долу на всяка страница, в „За нас“, „Подкрепи“ и „Контакти“) */
.foot-social { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }
footer .social-link { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 7px 14px; border-radius: 999px; background: var(--bg, #f3f7f5); border: 1px solid rgba(13, 100, 70, .15); color: var(--ink); font-weight: 700; text-decoration: none; }
footer .social-link:hover { text-decoration: none; color: #fff; }
footer .social-facebook:hover { background: #1877f2; border-color: #1877f2; }
footer .social-instagram:hover { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); border-color: #dc2743; }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.social-row a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; color: #fff; }
.social-row a.fb { background: #1877f2; }
.social-row a.ig { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); }
.social-row a:hover { filter: brightness(1.08); text-decoration: none; }
/* По-тъмни варианти на цветовете на мрежите: белият текст трябва да се чете добре (контраст поне 4.5:1). */
footer .social-facebook:hover { background: #1458b8; border-color: #1458b8; color: #fff; }
footer .social-instagram:hover { background: #a3195f; border-color: #a3195f; color: #fff; }
.social-row a.fb { background: #1458b8; }
.social-row a.ig { background: #a3195f; }
.social-row a.fb, .social-row a.ig, .social-row a.fb:hover, .social-row a.ig:hover { color: #fff !important; text-decoration: none !important; }

/* ===== „ТОП“ – избрано от директора (син знак и рамка, като VIP, но в синьо) ===== */
.badge.top { background: linear-gradient(135deg, #2f7de1, #1452b0); color: #fff; font-weight: 800; letter-spacing: .05em; box-shadow: 0 2px 8px rgba(20, 82, 176, .3); }
.card.top, .cause-card.top, .shop-tile.top { border: 2px solid #2f7de1; box-shadow: 0 0 0 3px rgba(47, 125, 225, .2), var(--shadow); }
.card.top.vip { border-color: #2f7de1; }
.shop-tile.top { position: relative; }
.shop-tile.top > .badge.top { position: absolute; top: 10px; left: 10px; z-index: 1; }
.top-form { display: grid; grid-template-columns: 160px minmax(0, 1fr) 150px auto; gap: 10px; align-items: end; }
.top-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.top-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.top-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--line); border-left: 4px solid #2f7de1; border-radius: 10px; background: var(--surface); }
.top-list li a { font-weight: 700; overflow-wrap: anywhere; }
.top-list li .meta { margin-left: auto; }
button.top-btn { background: linear-gradient(135deg, #2f7de1, #1452b0); color: #fff; box-shadow: 0 6px 16px rgba(20, 82, 176, .25); }
@media (max-width: 760px) { .top-form { grid-template-columns: minmax(0, 1fr); } }
.top-form { grid-template-columns: 220px minmax(0, 1fr) 150px auto; }
@media (max-width: 760px) { .top-form { grid-template-columns: minmax(0, 1fr); } }
/* По-наситено синьо: белият текст се чете добре (контраст над 4.5:1). */
.badge.top, button.top-btn { background: linear-gradient(135deg, #1d63c4, #0f4496); }

/* „Не съм робот“ (Cloudflare Turnstile) при регистрация */
.robot-box { min-height: 65px; margin: 4px 0 8px; }
.robot-box[hidden] { display: none; }

/* Непотвърден профил в Директорския панел */
.badge.unverified { background: #fff3cd; color: #7a5a00; }
