/* Fammech homepage — 2026 redesign */

:root {
	--ink: #16181D;
	--muted: #5B606B;
	--line: #E6E6EA;
	--line-strong: #DCDCE2;
	--soft: #F4F4F6;
	--field: #F7F7F9;
	--placeholder: #EFEFF2;
	--accent: #C81E33;
	--accent-hover: #A8182A;
	--accent-soft: rgba(200, 30, 51, 0.10);
	--dark: #16181D;
	--dark-2: #22252C;
	--dark-muted: #C4C7CE;
	--radius: 16px;
	--wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: #FFFFFF;
	color: var(--ink);
	font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.sr {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
	position: absolute; left: 16px; top: -60px; z-index: 100;
	background: var(--ink); color: #FFFFFF; padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 12px; color: #FFFFFF; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.ico { flex: none; }

/* Buttons */
.btn-primary {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px;
	background: var(--accent); color: #FFFFFF; font-weight: 700; font-size: 15px;
	cursor: pointer; white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: 16px; border-radius: 12px; }

.btn-ghost {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 44px; padding: 0 14px; border-radius: 10px; font-weight: 600; font-size: 15px; white-space: nowrap;
}

.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border-radius: 999px;
}
.icon-btn:hover { background: var(--soft); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #FFFFFF; position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 16px 24px; padding-top: 12px; padding-bottom: 12px; }

.logo { display: inline-flex; align-items: center; gap: 0.3em; font-size: 26px; font-weight: 800; letter-spacing: -0.045em; color: var(--ink); line-height: 1; white-space: nowrap; }
.logo-mark { display: block; width: 1.2em; height: 1.2em; flex: none; }
.logo:hover { color: var(--ink); }

.main-nav { display: flex; gap: 2px; flex: 0 0 auto; }
.main-nav a { white-space: nowrap; padding: 10px 8px; font-size: 14px; font-weight: 600; border-radius: 8px; }
.main-nav a:hover { background: var(--soft); color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* Hero */
.hero { background: var(--soft); }
.hero-inner {
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px;
	padding-top: 72px; padding-bottom: 64px;
}
.hero h1 {
	font-size: clamp(34px, 5vw, 56px); line-height: 1.05; font-weight: 800;
	letter-spacing: -0.035em; max-width: 820px;
}
.lead { font-size: 18px; color: var(--muted); max-width: 560px; }

.search {
	margin-top: 12px; width: 100%; max-width: 920px;
	display: flex; flex-wrap: wrap; gap: 8px; padding: 8px;
	background: #FFFFFF; border: 1px solid #E1E1E6; border-radius: 16px;
	box-shadow: 0 10px 30px rgba(22, 24, 29, 0.06); text-align: left;
}
.field {
	flex: 1 1 170px; display: flex; align-items: center; gap: 8px;
	min-height: 52px; padding: 0 12px; border-radius: 10px; background: var(--field); color: var(--muted);
}
.field-q { flex: 3 1 260px; padding: 0 14px; }
.field input, .field select {
	flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; color: var(--ink); outline: none;
}
.field input { font-size: 16px; }
.field select { font-size: 15px; font-weight: 600; cursor: pointer; }
.field:focus-within { outline: 2px solid var(--ink); outline-offset: -2px; }
.btn-search { flex: 0 1 auto; min-height: 52px; padding: 0 28px; font-size: 16px; }

.popular { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: 14px; }
.popular > span { color: var(--muted); font-weight: 500; }
.pill {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
	border: 1px solid var(--line-strong); border-radius: 999px; background: #FFFFFF; font-weight: 600;
}

/* Sections */
.section { padding-top: 56px; padding-bottom: 8px; }
.section h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent); padding: 10px 0; }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.cat-tile {
	display: flex; flex-direction: column; gap: 14px; padding: 22px;
	border: 1px solid var(--line); border-radius: var(--radius); background: #FFFFFF;
	transition: border-color .15s, box-shadow .15s;
}
.cat-tile:hover { color: var(--ink); border-color: var(--line-strong); box-shadow: 0 8px 24px rgba(22, 24, 29, 0.06); }
.cat-icon {
	width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
	background: var(--accent-soft); color: var(--accent);
}
.cat-name { font-size: 18px; font-weight: 700; }
.cat-desc { font-size: 14px; color: var(--muted); }

/* Filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
	min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px;
	background: #FFFFFF; font-size: 14px; font-weight: 600; cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; font-weight: 700; }

/* Listing cards */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card {
	position: relative; display: flex; flex-direction: column; overflow: hidden;
	border: 1px solid var(--line); border-radius: var(--radius); background: #FFFFFF;
}
.card.is-hidden { display: none; }
.card-media { display: block; position: relative; aspect-ratio: 4 / 3; background: var(--placeholder); overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.no-photo { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #8A8F99; }
.card-tag {
	position: absolute; left: 12px; top: 12px; max-width: calc(100% - 80px);
	padding: 6px 10px; border-radius: 999px; background: #FFFFFF;
	font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fav {
	position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border: 0; border-radius: 999px;
	background: #FFFFFF; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.fav.is-on { color: var(--accent); }
.fav.is-on svg { fill: currentColor; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.price { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.title {
	font-size: 15px; font-weight: 600; line-height: 1.35;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.title::after { content: ""; position: absolute; inset: 0; } /* whole card is clickable */
.fav, .card-tag { z-index: 1; }
.meta { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-top: 2px; }

.empty { padding: 48px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--muted); }

.ad-slot { margin-top: 32px; min-height: 100px; }

/* Sell CTA */
.sell {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px;
	padding: 48px; border-radius: 24px; background: var(--dark); color: #FFFFFF; margin-bottom: 72px;
}
.sell-text { flex: 1 1 380px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.sell h2 { font-size: 34px; line-height: 1.1; margin: 0; }
.sell p { font-size: 17px; color: var(--dark-muted); margin-bottom: 8px; }
.steps { flex: 1 1 380px; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: 14px; background: var(--dark-2); }
.steps .num {
	flex: none; width: 36px; height: 36px; border-radius: 999px; background: #FFFFFF; color: var(--ink);
	display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.steps li > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.steps small { font-size: 14px; color: var(--dark-muted); }

/* Footer */
.site-footer { background: var(--soft); border-top: 1px solid var(--line); }
.footer-grid {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px;
	padding-top: 48px; padding-bottom: 32px;
}
.footer-grid p { margin-top: 12px; font-size: 14px; color: var(--muted); }
.footer-grid nav { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-grid strong { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.footer-seo { padding-bottom: 28px; }
.footer-seo p { max-width: 960px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.footer-seo a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
.footer-seo a:hover { color: var(--accent); }
.copyright { padding-top: 20px; padding-bottom: 32px; border-top: 1px solid #E1E1E6; font-size: 13px; color: var(--muted); }

/* Mobile tab bar */
.tabbar { display: none; }

@media (max-width: 1200px) {
	.main-nav { display: none; }
	.header-inner { justify-content: space-between; }
}

@media (max-width: 640px) {
	.wrap { padding-left: 16px; padding-right: 16px; }
	.header-actions .btn-ghost, .header-actions .btn-primary { display: none; }
	.hero-inner { padding-top: 36px; padding-bottom: 36px; align-items: stretch; text-align: left; }
	.lead { font-size: 16px; }
	.btn-search { flex: 1 1 100%; }
	.popular { justify-content: flex-start; }
	.section { padding-top: 40px; }
	.section h2 { font-size: 22px; margin-bottom: 16px; }
	.cat-grid { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 4px; scroll-snap-type: x mandatory; }
	.cat-tile { flex: 0 0 160px; padding: 16px; scroll-snap-align: start; }
	.cat-desc { display: none; }
	.chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
	.chip { flex: none; }
	.ad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.card-body { padding: 10px 12px 12px; }
	.price { font-size: 16px; }
	.title { font-size: 13px; }
	.card-tag { display: none; }
	.sell { padding: 28px 20px; margin-bottom: 40px; }
	.sell h2 { font-size: 26px; }

	body { padding-bottom: 84px; }
	.tabbar {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
		display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
		padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
		background: #FFFFFF; border-top: 1px solid var(--line);
	}
	.tabbar a {
		display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px; justify-content: center;
		font-size: 11px; font-weight: 600; color: var(--muted);
	}
	.tabbar a[aria-current="page"] { color: var(--accent); font-weight: 700; }
	.tabbar .tab-post {
		justify-self: center; width: 52px; height: 52px; border-radius: 16px;
		background: var(--accent); color: #FFFFFF;
	}
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* ================================================================== */
/* Shared page components                                              */
/* ================================================================== */

.main-nav a[aria-current="page"] { background: var(--soft); color: var(--accent); }

.page-head { padding-top: 28px; padding-bottom: 8px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; font-weight: 800; letter-spacing: -0.025em; }
.page-head p { margin-top: 8px; color: var(--muted); }

.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: #A0A4AD; }
.crumbs a { color: var(--muted); text-decoration: underline; text-decoration-color: transparent; }
.crumbs a:hover { color: var(--ink); text-decoration-color: currentColor; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

.notice { padding: 14px 16px; border-radius: 12px; font-size: 15px; margin: 16px 0; border: 1px solid; }
.notice-success { background: #EEF8F1; border-color: #BFE3C9; color: #1D5B30; }
.notice-error { background: #FDEFF1; border-color: #F3C3CA; color: #8E1526; }
.notice-info { background: #EFF4FD; border-color: #C7D6F5; color: #1E3E7B; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }

.btn-secondary {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 10px;
	background: #FFFFFF; color: var(--ink); font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-block { width: 100%; }
.btn-danger { color: #A3172A; }
.btn-danger:hover { border-color: #A3172A; color: #A3172A; }
.link { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Pager */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 32px 0 8px; }
.pager-num, .pager-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 4px;
	min-width: 44px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong);
	font-weight: 600; font-size: 15px; background: #FFFFFF;
}
.pager-num:hover, .pager-btn:hover { border-color: var(--ink); color: var(--ink); }
.pager-num.is-current { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.pager-gap { color: var(--muted); padding: 0 4px; }

/* ================================================================== */
/* Listing pages (category / search / selection)                       */
/* ================================================================== */

.listing { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-bottom: 72px; }
.filters { flex: 1 1 260px; max-width: 300px; position: sticky; top: 88px; }
.results { flex: 999 1 560px; min-width: 0; }
.results .ad-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.filters-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #FFFFFF; display: flex; flex-direction: column; gap: 16px; }
.filters-box h2 { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.filters-toggle { display: none; }

.subcats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.subcats a { display: flex; justify-content: space-between; padding: 9px 10px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.subcats a:hover { background: var(--soft); color: var(--ink); }
.subcats a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.results-count { font-size: 15px; color: var(--muted); }
.results-count strong { color: var(--ink); }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.active-filters a {
	display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
	border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 600;
}

/* ================================================================== */
/* Forms                                                               */
/* ================================================================== */

.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row > label, .form-label { font-size: 14px; font-weight: 700; }
.form-hint { font-size: 13px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.input, .select, .textarea {
	width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 10px;
	background: #FFFFFF; font-size: 16px; color: var(--ink);
}
.textarea { min-height: 180px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.input-short { max-width: 140px; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #A3172A; }
.req { color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong);
	border-radius: 999px; font-size: 14px; font-weight: 600; background: #FFFFFF;
}
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: #FFFFFF; }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.01em; }
.panel > p { color: var(--muted); margin-bottom: 16px; }
.panel-body { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.narrow { max-width: 720px; margin: 0 auto; }
.narrow-sm { max-width: 460px; margin: 0 auto; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.stack { display: flex; flex-direction: column; gap: 20px; padding-bottom: 72px; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--soft); border-radius: 12px; margin-bottom: 20px; }
.tabs a, .tabs button {
	flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent;
	border-radius: 9px; font-weight: 700; font-size: 15px; color: var(--muted); cursor: pointer;
}
.tabs [aria-selected="true"], .tabs [aria-current="page"] { background: #FFFFFF; color: var(--ink); box-shadow: 0 1px 3px rgba(22,24,29,.08); }

/* Photo uploader */
.uploader { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.uploader-drop {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 4 / 3;
	border: 2px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; padding: 8px;
}
.uploader-drop:hover, .uploader-drop:focus-within { border-color: var(--ink); color: var(--ink); }
.uploader-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--placeholder); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button, .thumb label.thumb-remove {
	position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border-radius: 999px; border: 0;
	background: rgba(22,24,29,.75); color: #FFFFFF; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.thumb-first::after {
	content: "Photo principale"; position: absolute; left: 6px; bottom: 6px; padding: 3px 8px; border-radius: 999px;
	background: #FFFFFF; font-size: 11px; font-weight: 700;
}

/* ================================================================== */
/* Detail page                                                         */
/* ================================================================== */

.detail { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-top: 20px; padding-bottom: 56px; }
.detail-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.detail-side { flex: 1 1 320px; max-width: 380px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }

.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery-main {
	position: relative; aspect-ratio: 4 / 3; max-height: 560px; width: 100%; border-radius: 18px; overflow: hidden;
	background: var(--placeholder); display: flex; align-items: center; justify-content: center; color: #8A8F99;
}
.gallery-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #111317; }
.gallery-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.gallery-nav {
	position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; border: 0;
	background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-count { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(22,24,29,.75); color: #FFFFFF; font-size: 13px; font-weight: 600; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs button { flex: none; width: 88px; height: 66px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--placeholder); }
.gallery-thumbs button[aria-current="true"] { border-color: var(--ink); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail-title h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.detail-price { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin-top: 10px; }
.detail-price small { font-size: 16px; font-weight: 600; color: var(--muted); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.detail-meta span { display: inline-flex; align-items: center; gap: 6px; }

.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 0; }
.specs div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.specs dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.specs dd { margin: 4px 0 0; font-size: 16px; font-weight: 600; }

.detail-section h2 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.description { font-size: 16px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }

.contact-card { border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: #FFFFFF; box-shadow: 0 10px 30px rgba(22, 24, 29, 0.05); }
.seller { display: flex; align-items: center; gap: 12px; }
.avatar { width: 48px; height: 48px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: none; }
.seller strong { display: block; font-size: 16px; }
.seller span { font-size: 13px; color: var(--muted); }
.phone-btn { width: 100%; min-height: 52px; font-size: 17px; }
.expired { padding: 14px; border-radius: 12px; background: var(--soft); color: var(--muted); font-size: 14px; text-align: center; }

.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tools a, .tools button {
	display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
	background: #FFFFFF; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.tools a:hover, .tools button:hover { border-color: var(--ink); color: var(--ink); }
.tools .is-on { color: var(--accent); }
.tools .is-on svg { fill: currentColor; }
.safety { font-size: 13px; color: var(--muted); line-height: 1.6; padding: 16px; border-radius: 14px; background: var(--soft); }
.safety strong { color: var(--ink); }

.similar { padding-bottom: 72px; }
.similar h2 { font-size: 24px; font-weight: 800; margin-bottom: 20px; }

/* ================================================================== */
/* Account                                                             */
/* ================================================================== */

.account { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-top: 20px; padding-bottom: 72px; }
.account-nav { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 88px; }
.account-nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.account-nav a:hover { background: var(--soft); color: var(--ink); }
.account-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.account-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi strong { display: block; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }

.my-ads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.my-ad { display: flex; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px; flex-wrap: wrap; }
.my-ad-media { width: 120px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--placeholder); flex: none; display: flex; align-items: center; justify-content: center; color: #8A8F99; position: relative; }
.my-ad-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.my-ad-body { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.my-ad-body a { font-weight: 700; }
.my-ad-body small { color: var(--muted); font-size: 13px; }
.my-ad-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.my-ad-actions form { display: contents; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; align-self: flex-start; }
.badge-on { background: #EEF8F1; color: #1D5B30; }
.badge-off { background: var(--soft); color: var(--muted); }

/* Static content */
.prose { max-width: 760px; font-size: 16px; line-height: 1.75; padding-bottom: 72px; }
.prose h2 { font-size: 22px; font-weight: 800; margin: 32px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose a { color: var(--accent); text-decoration: underline; }

.contact-bar { display: none; }

@media (max-width: 900px) {
	.has-contact-bar .tabbar { display: none; }
	.has-contact-bar { padding-bottom: 84px; }
	.contact-bar {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 10px;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #FFFFFF; border-top: 1px solid var(--line);
	}
	.contact-bar a { flex: 1; min-height: 52px; font-size: 16px; }
	.filters { position: static; max-width: none; flex-basis: 100%; }
	.filters-toggle { display: inline-flex; }
	.filters-box.is-collapsed .filters-form { display: none; }
	.detail-side { position: static; max-width: none; }
	.account-nav { position: static; max-width: none; flex-direction: row; overflow-x: auto; flex-basis: 100%; }
	.account-nav a { flex: none; }
}

@media (max-width: 640px) {
	.listing, .detail, .account { gap: 20px; }
	.results .ad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gallery-main { border-radius: 0; margin: 0 -16px; width: calc(100% + 32px); }
	.panel { padding: 18px; }
	.detail-price { font-size: 26px; }
	.my-ad-media { width: 96px; }
}

@media print {
	.site-header, .site-footer, .tabbar, .tools, .ad-slot, .similar, .gallery-thumbs, .gallery-nav, .crumbs, .phone-btn, .skip { display: none !important; }
	.detail-side { position: static; }
	body { padding: 0; }
}
