/* ==========================================================================
   Snappat – Swedish Buy/Sell Marketplace Theme for Osclass
   Complete Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --primary: #4182c3;
  --primary-dark: #346a9e;
  --primary-light: #5a9ad5;
  --green: #49b975;
  --green-dark: #3a9d62;
  --red: #ef404f;
  --red-dark: #d63340;
  --orange: #f0a030;
  --purple: #7c5cbf;
  --bg: #f5f6f8;
  --card: #fff;
  --border: #e8eaed;
  --text: #2d2d2d;
  --text-light: #5f6672;
  --text-muted: #737985;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition: 0.2s ease;
  --header-h: 64px;
  --max-w: 1240px;
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   1. Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

body { overflow-x: hidden; max-width: 100%; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.3;
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
}

.skip-link:focus {
  top: 8px;
  color: #fff;
}

/* --------------------------------------------------------------------------
   2. Header
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 100%;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.logo img {
  height: 32px;
  width: auto;
}

.logo:hover {
  color: var(--primary);
  opacity: 0.9;
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--bg);
  color: var(--text);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(65, 130, 195, 0.08);
}

.nav-link svg,
.nav-link i {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: var(--red);
  border-radius: 99px;
}

.nav-link .badge {
  position: absolute;
  top: 2px;
  right: 4px;
}

.btn-publish {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--green);
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
  margin-left: 8px;
}

.btn-publish:hover {
  background: var(--green-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-publish svg {
  width: 16px;
  height: 16px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.hamburger:hover {
  background: var(--bg);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card);
  z-index: 899;
  padding: 16px 20px;
  overflow-y: auto;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu .nav-link {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
}

.mobile-menu .btn-publish {
  margin: 12px 0 0;
  justify-content: center;
  padding: 14px 20px;
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   3. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: #1e2a38;
  color: #c5cbd6;
  padding: 48px 20px 0;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 40px;
}

.footer-col h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: #9ba3b0;
  font-size: 14px;
  padding: 4px 0;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: #fff;
}

.footer-col p {
  font-size: 14px;
  line-height: 1.7;
  color: #9ba3b0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 13px;
  color: #717a8a;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #9ba3b0;
  font-size: 16px;
  transition: background var(--transition), color var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  color: #fff;
}

/* --------------------------------------------------------------------------
   4. Back to Top
   -------------------------------------------------------------------------- */
.back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 800;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), visibility var(--transition),
    transform var(--transition), background var(--transition);
}

.back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* --------------------------------------------------------------------------
   5. Hero (Homepage)
   -------------------------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, #3b7bbf 0%, #1f5a96 100%);
  color: #fff;
  padding: 56px 20px 64px;
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero p {
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 28px;
}

.hero-search {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 6px;
  display: flex;
  gap: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.hero-search input {
  flex: 1;
  padding: 14px 18px;
  font-size: 15px;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text);
  min-width: 0;
}

.hero-search input::placeholder {
  color: var(--text-muted);
}

.hero-search select {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-light);
  border-left: 1px solid var(--border);
  cursor: pointer;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.hero-search .btn-search {
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background var(--transition);
  white-space: nowrap;
}

.hero-search .btn-search:hover {
  background: var(--primary-dark);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 32px;
}

.hero-stats .stat {
  text-align: center;
}

.hero-stats .stat-num {
  font-size: 24px;
  font-weight: 700;
  display: block;
}

.hero-stats .stat-label {
  font-size: 13px;
  opacity: 0.75;
}

/* --------------------------------------------------------------------------
   6. Categories
   -------------------------------------------------------------------------- */
.cat-section {
  padding: 48px 20px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.cat-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.cat-section .section-header h2 {
  font-size: 22px;
}

.cat-section .section-header a {
  font-size: 14px;
  font-weight: 500;
}

.cat-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.cat-grid::-webkit-scrollbar {
  height: 6px;
}

.cat-grid::-webkit-scrollbar-track {
  background: transparent;
}

.cat-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.cat-card {
  flex: 0 0 140px;
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
  cursor: pointer;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.cat-card .cat-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border-radius: 12px;
  background: rgba(65, 130, 195, 0.08);
  color: var(--primary);
}

.cat-card .cat-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.cat-card .cat-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   7. Torget Preview (Homepage)
   -------------------------------------------------------------------------- */
.torget-section {
  padding: 0 20px 48px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.torget-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.torget-section .section-header h2 {
  font-size: 22px;
}

.torget-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tp-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.tp-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.tp-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.tp-card-top .tp-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.tp-card-top .tp-user {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.tp-card-top .tp-time {
  font-size: 12px;
  color: var(--text-muted);
}

.tp-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tp-badge.sell {
  background: rgba(73, 185, 117, 0.12);
  color: var(--green);
}

.tp-badge.buy {
  background: rgba(65, 130, 195, 0.12);
  color: var(--primary);
}

.tp-badge.free {
  background: rgba(240, 160, 48, 0.12);
  color: var(--orange);
}

.tp-badge.help {
  background: rgba(124, 92, 191, 0.12);
  color: var(--purple);
}

.tp-card-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 12px;
}

.tp-card-body p {
  margin-bottom: 8px;
}

.tp-card-img {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}

.tp-card-img img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.tp-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.tp-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tp-stats span svg,
.tp-stats span i {
  width: 15px;
  height: 15px;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   8. Latest Ads (Homepage)
   -------------------------------------------------------------------------- */
.ads-section {
  padding: 0 20px 56px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.ads-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.ads-section .section-header h2 {
  font-size: 22px;
}

.ads-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.ad-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.ad-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.ad-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg);
}

.ad-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.ad-card:hover .ad-card-img img {
  transform: scale(1.04);
}

.ad-card-img .ad-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  transition: color var(--transition), background var(--transition);
  backdrop-filter: blur(4px);
}

.ad-card-img .ad-fav:hover,
.ad-card-img .ad-fav.active {
  color: var(--red);
  background: #fff;
}

.ad-card-img .ad-premium-label {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
}

.ad-card-body {
  padding: 14px;
}

.ad-card-body .ad-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-card-body .ad-title a {
  color: inherit;
}

.ad-card-body .ad-title a:hover {
  color: var(--primary);
}

.ad-card-body .ad-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 8px;
}

.ad-card-body .ad-price.free {
  color: var(--orange);
}

.ad-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.ad-card-meta .ad-location {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* --------------------------------------------------------------------------
   9. CTA Banner
   -------------------------------------------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, #49b975 0%, #3a9d62 100%);
  color: #fff;
  padding: 56px 20px;
  text-align: center;
}

.cta-banner-inner {
  max-width: 620px;
  margin: 0 auto;
}

.cta-banner h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
}

.cta-banner p {
  font-size: 15px;
  opacity: 0.9;
  margin-bottom: 24px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cta-buttons .btn-cta {
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
}

.cta-buttons .btn-cta-primary {
  background: #fff;
  color: var(--green);
}

.cta-buttons .btn-cta-primary:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

.cta-buttons .btn-cta-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.cta-buttons .btn-cta-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   10. Torget Feed (torget.html)
   -------------------------------------------------------------------------- */
.torget-top {
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.torget-top-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.torget-top-inner::-webkit-scrollbar {
  display: none;
}

.torget-tab {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}

.torget-tab:hover {
  color: var(--text);
}

.torget-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.feed-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Compose trigger */
.compose-trigger {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: box-shadow var(--transition);
}

.compose-trigger:hover {
  box-shadow: var(--shadow-sm);
}

.compose-trigger .ct-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.compose-trigger .ct-text {
  flex: 1;
  font-size: 14px;
  color: var(--text-muted);
}

.compose-trigger .ct-btn {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--green);
  border-radius: var(--radius-sm);
}

/* Compose overlay */
.compose-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.compose-overlay.open {
  opacity: 1;
  visibility: visible;
}

.compose-modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.compose-overlay.open .compose-modal {
  transform: translateY(0);
}

.compose-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.compose-modal-header h3 {
  font-size: 16px;
}

.compose-modal-header .close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 20px;
  color: var(--text-muted);
  transition: background var(--transition);
}

.compose-modal-header .close-btn:hover {
  background: var(--bg);
}

.compose-modal-body {
  padding: 20px;
}

.compose-modal-body .type-select {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.compose-modal-body .type-select button {
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-light);
  transition: all var(--transition);
}

.compose-modal-body .type-select button.active {
  border-color: var(--primary);
  background: rgba(65, 130, 195, 0.08);
  color: var(--primary);
}

.compose-modal-body textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
  font-size: 14px;
  line-height: 1.6;
}

.compose-modal-body textarea:focus {
  border-color: var(--primary);
}

.compose-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.compose-modal-footer .compose-actions {
  display: flex;
  gap: 8px;
}

.compose-modal-footer .compose-actions button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  transition: background var(--transition);
}

.compose-modal-footer .compose-actions button:hover {
  background: var(--bg);
}

.compose-modal-footer .btn-post {
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.compose-modal-footer .btn-post:hover {
  background: var(--primary-dark);
}

/* Feed post cards */
.post {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 0;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.post-user-info {
  flex: 1;
  min-width: 0;
}

.post-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.post-time {
  font-size: 12px;
  color: var(--text-muted);
}

.post-type {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.post-type.sell {
  background: rgba(73, 185, 117, 0.12);
  color: var(--green);
}

.post-type.buy {
  background: rgba(65, 130, 195, 0.12);
  color: var(--primary);
}

.post-type.free {
  background: rgba(240, 160, 48, 0.12);
  color: var(--orange);
}

.post-type.help {
  background: rgba(124, 92, 191, 0.12);
  color: var(--purple);
}

.post-body {
  padding: 12px 18px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}

.post-img {
  width: 100%;
}

.post-img img {
  width: 100%;
  display: block;
}

.post-actions {
  display: flex;
  border-top: 1px solid var(--border);
}

.post-actions button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  font-size: 13px;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}

.post-actions button:hover {
  background: var(--bg);
  color: var(--text);
}

.post-actions button.liked {
  color: var(--red);
}

/* Replies */
.replies {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 12px 18px;
}

.re {
  display: flex;
  gap: 10px;
  padding: 10px 0;
}

.re + .re {
  border-top: 1px solid var(--border);
}

.re .re-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.re-content {
  flex: 1;
  min-width: 0;
}

.re-content .re-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.re-content .re-text {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
}

.re-content .re-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.re-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.re-input .re-input-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.re-input input {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 13px;
  background: var(--card);
}

.re-input input:focus {
  border-color: var(--primary);
}

.re-input .btn-reply {
  padding: 7px 14px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 99px;
  transition: background var(--transition);
}

.re-input .btn-reply:hover {
  background: var(--primary-dark);
}

/* Floating action button */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 800;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 16px rgba(73, 185, 117, 0.35);
  transition: background var(--transition), transform var(--transition);
}

.fab:hover {
  background: var(--green-dark);
  color: #fff;
  transform: scale(1.08);
}

/* --------------------------------------------------------------------------
   11. Single Ad (annons.html)
   -------------------------------------------------------------------------- */
.ad-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 20px 56px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

/* Gallery */
.gallery {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery-main {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #000;
}

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

.gallery-main .gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 18px;
  box-shadow: var(--shadow);
  transition: background var(--transition);
}

.gallery-main .gallery-nav:hover {
  background: #fff;
}

.gallery-main .gallery-prev {
  left: 12px;
}

.gallery-main .gallery-next {
  right: 12px;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.gallery-thumbs .thumb {
  flex: 0 0 72px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition), border-color var(--transition);
}

.gallery-thumbs .thumb.active,
.gallery-thumbs .thumb:hover {
  opacity: 1;
  border-color: var(--primary);
}

.gallery-thumbs .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ad info */
.ad-info {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.ad-info .ad-type-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 99px;
  background: rgba(65, 130, 195, 0.1);
  color: var(--primary);
  margin-bottom: 10px;
}

.ad-info h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ad-info .ad-detail-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 16px;
}

.ad-info .ad-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.ad-info .ad-detail-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ad-info .ad-description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-light);
}

.ad-info .ad-description p {
  margin-bottom: 12px;
}

.ad-info .ad-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ad-info .ad-tags a {
  padding: 4px 12px;
  font-size: 12px;
  background: var(--bg);
  color: var(--text-light);
  border-radius: 99px;
  transition: background var(--transition), color var(--transition);
}

.ad-info .ad-tags a:hover {
  background: rgba(65, 130, 195, 0.1);
  color: var(--primary);
}

/* Sidebar cards */
.seller-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  text-align: center;
}

.seller-card .seller-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
}

.seller-card .seller-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.seller-card .seller-since {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.seller-card .seller-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.seller-card .seller-stats strong {
  display: block;
  font-size: 16px;
  color: var(--text);
}

.seller-card .btn-contact {
  display: block;
  width: 100%;
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: background var(--transition);
}

.seller-card .btn-contact:hover {
  background: var(--primary-dark);
  color: #fff;
}

.seller-card .btn-phone {
  display: block;
  width: 100%;
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  transition: background var(--transition);
}

.seller-card .btn-phone:hover {
  background: rgba(65, 130, 195, 0.06);
}

.location-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.location-card h3 {
  font-size: 15px;
  margin-bottom: 12px;
}

.location-card .map-placeholder {
  width: 100%;
  height: 160px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.location-card .location-text {
  font-size: 14px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.safety-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.safety-card h3 {
  font-size: 15px;
  margin-bottom: 12px;
}

.safety-card ul {
  list-style: none;
}

.safety-card li {
  font-size: 13px;
  color: var(--text-light);
  padding: 6px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.safety-card li svg,
.safety-card li i {
  color: var(--green);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Similar ads */
.similar {
  margin-top: 32px;
}

.similar h2 {
  font-size: 20px;
  margin-bottom: 18px;
}

.similar .ads-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* --------------------------------------------------------------------------
   12. Search Results (snappat.html)
   -------------------------------------------------------------------------- */
.search-bar {
  background: var(--primary);
  padding: 20px;
}

.search-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  gap: 8px;
}

.search-bar input {
  flex: 1;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  background: #fff;
  color: var(--text);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar select {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.search-bar .btn-search {
  padding: 12px 24px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background var(--transition);
  white-space: nowrap;
}

.search-bar .btn-search:hover {
  background: var(--green-dark);
}

/* Category row */
.cat-row {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cat-row::-webkit-scrollbar {
  display: none;
}

.cat-row-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  gap: 6px;
}

.cat-row .cat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  background: var(--bg);
  border-radius: 99px;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.cat-row .cat-chip:hover,
.cat-row .cat-chip.active {
  background: rgba(65, 130, 195, 0.1);
  color: var(--primary);
}

.cat-row .cat-chip svg,
.cat-row .cat-chip i {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* Main wrap */
.main-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

/* Filter box */
.filter-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.filter-box h3 {
  font-size: 16px;
  margin-bottom: 16px;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.filter-group input[type="number"],
.filter-group input[type="text"],
.filter-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--card);
  transition: border-color var(--transition);
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: var(--primary);
}

.filter-price-row {
  display: flex;
  gap: 8px;
}

.filter-price-row input {
  flex: 1;
  min-width: 0;
}

.filter-group .checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group .checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
}

.filter-group .checkbox-item input[type="checkbox"],
.filter-group .checkbox-item input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.filter-box .btn-filter {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  margin-top: 16px;
  transition: background var(--transition);
}

.filter-box .btn-filter:hover {
  background: var(--primary-dark);
}

.filter-box .btn-reset {
  width: 100%;
  padding: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  transition: color var(--transition);
}

.filter-box .btn-reset:hover {
  color: var(--red);
}

/* Results area */
.results-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-top .results-tabs {
  display: flex;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.results-top .results-tab {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}

.results-top .results-tab.active {
  background: var(--primary);
  color: #fff;
}

.results-top .results-tab:hover:not(.active) {
  background: var(--bg);
}

.results-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-sort select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--card);
  cursor: pointer;
}

.results-view {
  display: flex;
  gap: 4px;
}

.results-view button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--card);
  transition: all var(--transition);
}

.results-view button.active {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(65, 130, 195, 0.06);
}

.results-count {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Listing list */
.listing-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-ad {
  display: flex;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.list-ad:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-light);
}

.list-ad.premium {
  border-color: var(--orange);
  background: rgba(240, 160, 48, 0.03);
  position: relative;
}

.list-ad.premium::before {
  content: "Premium";
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--orange);
  color: #fff;
  border-radius: 4px;
}

.list-ad-img {
  flex: 0 0 180px;
  height: 130px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}

.list-ad-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-ad-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.list-ad-body .list-ad-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.list-ad-body .list-ad-title a {
  color: inherit;
}

.list-ad-body .list-ad-title a:hover {
  color: var(--primary);
}

.list-ad-body .list-ad-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-ad-body .list-ad-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
}

.list-ad-body .list-ad-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.list-ad-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}

.list-ad-right .list-ad-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}

.list-ad-right .list-ad-fav {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}

.list-ad-right .list-ad-fav:hover {
  color: var(--red);
  background: var(--bg);
}

/* Listing grid (alternative view) */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination .active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination .disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pagination .dots {
  background: transparent;
  border: none;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   13. User Dashboard (mina-sidor.html)
   -------------------------------------------------------------------------- */
.dash-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 20px 56px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

/* Profile card */
.profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}

.profile-card .profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 3px solid var(--border);
}

.profile-card .profile-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 2px;
}

.profile-card .profile-email {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.profile-card .btn-edit-profile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  transition: background var(--transition);
}

.profile-card .btn-edit-profile:hover {
  background: rgba(65, 130, 195, 0.06);
}

/* Menu card */
.menu-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  font-size: 14px;
  color: var(--text-light);
  border-left: 3px solid transparent;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition);
}

.menu-item:hover {
  background: var(--bg);
  color: var(--text);
}

.menu-item.active {
  background: rgba(65, 130, 195, 0.06);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.menu-item svg,
.menu-item i {
  width: 18px;
  height: 18px;
  font-size: 18px;
  flex-shrink: 0;
}

.menu-item .menu-badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--red);
  color: #fff;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-item + .menu-item {
  border-top: 1px solid var(--border);
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-card .stat-icon.blue {
  background: rgba(65, 130, 195, 0.1);
  color: var(--primary);
}

.stat-card .stat-icon.green {
  background: rgba(73, 185, 117, 0.1);
  color: var(--green);
}

.stat-card .stat-icon.orange {
  background: rgba(240, 160, 48, 0.1);
  color: var(--orange);
}

.stat-card .stat-icon.red {
  background: rgba(239, 64, 79, 0.1);
  color: var(--red);
}

.stat-card .stat-info .stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stat-card .stat-info .stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* Section card */
.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.section-card-header h2 {
  font-size: 17px;
}

.section-card-header a {
  font-size: 13px;
  font-weight: 500;
}

.section-card-body {
  padding: 0;
}

/* My ad rows */
.my-ad {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.my-ad:last-child {
  border-bottom: none;
}

.my-ad:hover {
  background: var(--bg);
}

.my-ad-img {
  flex: 0 0 64px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}

.my-ad-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-ad-info {
  flex: 1;
  min-width: 0;
}

.my-ad-info .my-ad-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.my-ad-info .my-ad-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.my-ad .status-badge {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
}

.status-badge.active {
  background: rgba(73, 185, 117, 0.12);
  color: var(--green);
}

.status-badge.pending {
  background: rgba(240, 160, 48, 0.12);
  color: var(--orange);
}

.status-badge.expired {
  background: rgba(239, 64, 79, 0.12);
  color: var(--red);
}

.status-badge.sold {
  background: rgba(115, 121, 133, 0.12);
  color: var(--text-muted);
}

.my-ad-actions {
  display: flex;
  gap: 6px;
}

.my-ad-actions button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 16px;
  transition: background var(--transition), color var(--transition);
}

.my-ad-actions button:hover {
  background: var(--bg);
  color: var(--text);
}

.my-ad-actions button.delete:hover {
  color: var(--red);
}

/* Activity feed */
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.alert-item:last-child {
  border-bottom: none;
}

.alert-item .alert-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.alert-item .alert-icon.msg {
  background: rgba(65, 130, 195, 0.1);
  color: var(--primary);
}

.alert-item .alert-icon.heart {
  background: rgba(239, 64, 79, 0.1);
  color: var(--red);
}

.alert-item .alert-icon.bell {
  background: rgba(240, 160, 48, 0.1);
  color: var(--orange);
}

.alert-item .alert-icon.check {
  background: rgba(73, 185, 117, 0.1);
  color: var(--green);
}

.alert-item .alert-body {
  flex: 1;
  min-width: 0;
}

.alert-item .alert-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.alert-item .alert-text strong {
  font-weight: 600;
}

.alert-item .alert-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   14. Create Ad Form (skapa-annons.html)
   -------------------------------------------------------------------------- */
.create-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 56px;
}

.create-wrap > h1 {
  font-size: 24px;
  margin-bottom: 24px;
}

.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.form-card h2 {
  font-size: 17px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Photo upload */
.photo-upload {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.photo-slot {
  width: 110px;
  height: 110px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}

.photo-slot:hover {
  border-color: var(--primary);
  background: rgba(65, 130, 195, 0.04);
}

.photo-slot svg,
.photo-slot i {
  font-size: 24px;
  margin-bottom: 2px;
}

.photo-slot.filled {
  border-style: solid;
  border-color: var(--border);
}

.photo-slot.filled img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-slot .remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: opacity var(--transition);
}

.photo-slot.filled:hover .remove-photo {
  opacity: 1;
}

.photo-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Form rows */
.form-row {
  margin-bottom: 18px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-row label .required {
  color: var(--red);
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="number"],
.form-row input[type="tel"],
.form-row input[type="url"],
.form-row input[type="password"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--card);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(65, 130, 195, 0.12);
}

.form-row textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row .form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-row-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Type grid */
.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.type-grid .type-option {
  padding: 12px;
  text-align: center;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.type-grid .type-option:hover {
  border-color: var(--primary-light);
}

.type-grid .type-option.active {
  border-color: var(--primary);
  background: rgba(65, 130, 195, 0.06);
}

.type-grid .type-option .type-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.type-grid .type-option .type-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* Condition toggle */
.condition-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.condition-toggle .cond-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--text-light);
  transition: all var(--transition);
  cursor: pointer;
}

.condition-toggle .cond-btn:hover {
  border-color: var(--primary-light);
}

.condition-toggle .cond-btn.active {
  border-color: var(--primary);
  background: rgba(65, 130, 195, 0.08);
  color: var(--primary);
  font-weight: 600;
}

/* Premium box */
.premium-box {
  background: linear-gradient(135deg, rgba(240, 160, 48, 0.08), rgba(240, 160, 48, 0.02));
  border: 1px solid rgba(240, 160, 48, 0.3);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.premium-box .premium-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(240, 160, 48, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--orange);
  flex-shrink: 0;
}

.premium-box .premium-info h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.premium-box .premium-info p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.premium-box .premium-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 8px;
}

.premium-box .btn-premium {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--orange);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.premium-box .btn-premium:hover {
  background: #db8f22;
}

/* Submit row */
.submit-row {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.submit-row .btn-draft {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.submit-row .btn-draft:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.submit-row .btn-submit {
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--green);
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
}

.submit-row .btn-submit:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   15. Chat (chatt.html)
   -------------------------------------------------------------------------- */
.chat-wrap {
  display: flex;
  height: calc(100vh - var(--header-h));
  max-width: var(--max-w);
  margin: 0 auto;
  background: var(--card);
}

/* Conversation list */
.conv-list {
  width: 320px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.conv-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.conv-header h2 {
  font-size: 17px;
}

.conv-search {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.conv-search input {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 13px;
  background: var(--bg);
}

.conv-search input:focus {
  border-color: var(--primary);
  background: var(--card);
}

.conv-items {
  flex: 1;
  overflow-y: auto;
}

.conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}

.conv-item:hover {
  background: var(--bg);
}

.conv-item.active {
  background: rgba(65, 130, 195, 0.06);
  border-left: 3px solid var(--primary);
}

.conv-item.unread {
  background: rgba(65, 130, 195, 0.04);
}

.conv-item .conv-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  position: relative;
}

.conv-item .conv-online {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--card);
  position: absolute;
  bottom: 0;
  right: 0;
}

.conv-item .conv-info {
  flex: 1;
  min-width: 0;
}

.conv-item .conv-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.conv-item .conv-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.conv-item .conv-last {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-item.unread .conv-last {
  color: var(--text);
  font-weight: 500;
}

.conv-item .conv-unread-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Chat area */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.chat-top .chat-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-top .chat-user-info {
  flex: 1;
}

.chat-top .chat-user-name {
  font-size: 15px;
  font-weight: 600;
}

.chat-top .chat-user-status {
  font-size: 12px;
  color: var(--green);
}

.chat-top .chat-user-status.offline {
  color: var(--text-muted);
}

.chat-top .chat-actions {
  display: flex;
  gap: 6px;
}

.chat-top .chat-actions button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  transition: background var(--transition);
}

.chat-top .chat-actions button:hover {
  background: var(--bg);
}

/* Messages */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 70%;
  display: flex;
  flex-direction: column;
}

.msg.received {
  align-self: flex-start;
}

.msg.sent {
  align-self: flex-end;
}

.msg .msg-bubble {
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.msg.received .msg-bubble {
  background: var(--bg);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.msg.sent .msg-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg .msg-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}

.msg.sent .msg-time {
  text-align: right;
}

.msg .msg-img {
  max-width: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4px;
}

.msg .msg-img img {
  width: 100%;
  display: block;
}

/* Typing indicator */
.typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.typing-dots {
  display: flex;
  gap: 3px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.2s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* Chat input */
.chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.chat-input .chat-attach {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 20px;
  transition: background var(--transition);
  flex-shrink: 0;
}

.chat-input .chat-attach:hover {
  background: var(--bg);
}

.chat-input input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 14px;
  background: var(--bg);
}

.chat-input input:focus {
  border-color: var(--primary);
  background: var(--card);
}

.chat-input .chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: background var(--transition);
}

.chat-input .chat-send:hover {
  background: var(--primary-dark);
}

/* Chat mobile tabs */
.chat-mobile-tabs {
  display: none;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.chat-mobile-tabs button {
  flex: 1;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.chat-mobile-tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Chat empty state */
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
}

.chat-empty svg,
.chat-empty i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.chat-empty h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 6px;
}

.chat-empty p {
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   16. Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
}

.breadcrumb-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .separator {
  color: var(--border);
  font-size: 11px;
}

.breadcrumb .current {
  color: var(--text);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   17. Utilities - Osclass integration
   -------------------------------------------------------------------------- */

/* Flash messages */
.flash-message {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.flash-message.success {
  background: rgba(73, 185, 117, 0.1);
  color: var(--green-dark);
  border: 1px solid rgba(73, 185, 117, 0.25);
}

.flash-message.error {
  background: rgba(239, 64, 79, 0.08);
  color: var(--red-dark);
  border: 1px solid rgba(239, 64, 79, 0.2);
}

.flash-message.warning {
  background: rgba(240, 160, 48, 0.1);
  color: #9a6e10;
  border: 1px solid rgba(240, 160, 48, 0.25);
}

.flash-message.info {
  background: rgba(65, 130, 195, 0.08);
  color: var(--primary-dark);
  border: 1px solid rgba(65, 130, 195, 0.2);
}

.flash-message .flash-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 18px;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  padding: 0 4px;
  transition: opacity var(--transition);
}

.flash-message .flash-close:hover {
  opacity: 1;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Form validation errors */
.form-row.has-error input,
.form-row.has-error select,
.form-row.has-error textarea {
  border-color: var(--red);
}

.form-row.has-error input:focus,
.form-row.has-error select:focus,
.form-row.has-error textarea:focus {
  box-shadow: 0 0 0 3px rgba(239, 64, 79, 0.12);
}

.form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Image aspect ratios */
.aspect-1-1 {
  aspect-ratio: 1 / 1;
}

.aspect-4-3 {
  aspect-ratio: 4 / 3;
}

.aspect-16-9 {
  aspect-ratio: 16 / 9;
}

.aspect-3-2 {
  aspect-ratio: 3 / 2;
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

/* Line clamping */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Generic button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-green {
  background: var(--green);
  color: #fff;
}

.btn-green:hover {
  background: var(--green-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-light);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 13px 28px;
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   18. Responsive Breakpoints
   -------------------------------------------------------------------------- */

/* ---- 1024px ---- */
@media (max-width: 1024px) {
  /* Header */
  .header-nav {
    gap: 2px;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 13px;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hero */
  .hero h1 {
    font-size: 28px;
  }

  .hero-search select {
    display: none;
  }

  /* Ads grid */
  .ads-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Torget preview */
  .torget-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Single ad */
  .ad-wrap {
    grid-template-columns: 1fr 280px;
  }

  /* Search results */
  .main-wrap {
    grid-template-columns: 220px 1fr;
  }

  .list-ad-img {
    flex: 0 0 150px;
    height: 110px;
  }

  /* Dashboard */
  .dash-wrap {
    grid-template-columns: 220px 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Similar */
  .similar .ads-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Listing grid */
  .listing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Chat */
  .conv-list {
    width: 280px;
  }
}

/* ---- 768px ---- */
@media (max-width: 768px) {
  :root {
    --header-h: 56px;
  }

  /* Header */
  .hamburger {
    display: flex;
  }

  .header-nav {
    display: none;
  }

  .btn-publish {
    display: none;
  }

  .header-inner {
    padding: 0 16px;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Hero */
  .hero {
    padding: 40px 16px 48px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero p {
    font-size: 14px;
  }

  .hero-search {
    flex-direction: column;
    padding: 12px;
    gap: 8px;
  }

  .hero-search input {
    border-radius: var(--radius);
    border: 1px solid var(--border);
  }

  .hero-search select {
    display: block;
    border-left: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
  }

  .hero-search .btn-search {
    padding: 12px;
    border-radius: var(--radius);
    text-align: center;
  }

  .hero-stats {
    gap: 24px;
  }

  .hero-stats .stat-num {
    font-size: 20px;
  }

  /* Categories */
  .cat-section {
    padding: 32px 16px;
  }

  .cat-card {
    flex: 0 0 120px;
  }

  /* Torget preview */
  .torget-section {
    padding: 0 16px 32px;
  }

  .torget-grid {
    grid-template-columns: 1fr;
  }

  /* Ads grid */
  .ads-section {
    padding: 0 16px 40px;
  }

  .ads-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* CTA banner */
  .cta-banner {
    padding: 40px 16px;
  }

  .cta-banner h2 {
    font-size: 22px;
  }

  /* Torget feed */
  .feed-wrap {
    padding: 16px 16px 80px;
  }

  /* Single ad */
  .ad-wrap {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .ad-info h1 {
    font-size: 20px;
  }

  .ad-info .ad-detail-price {
    font-size: 24px;
  }

  /* Search results */
  .search-bar-inner {
    flex-direction: column;
  }

  .main-wrap {
    grid-template-columns: 1fr;
  }

  .filter-box {
    position: static;
    display: none;
  }

  .filter-box.open {
    display: block;
  }

  .list-ad {
    flex-direction: column;
    gap: 12px;
  }

  .list-ad-img {
    flex: none;
    width: 100%;
    height: 200px;
  }

  .list-ad-right {
    flex-direction: row;
    align-items: center;
    width: 100%;
  }

  .listing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Similar ads */
  .similar .ads-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Dashboard */
  .dash-wrap {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .profile-card,
  .menu-card {
    margin-bottom: 16px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Create ad */
  .create-wrap {
    padding: 16px;
  }

  .create-wrap > h1 {
    font-size: 20px;
  }

  .form-card {
    padding: 18px;
  }

  .type-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row-inline {
    grid-template-columns: 1fr;
  }

  .photo-slot {
    width: 90px;
    height: 90px;
  }

  .submit-row {
    flex-direction: column;
  }

  .submit-row .btn-draft,
  .submit-row .btn-submit {
    width: 100%;
    justify-content: center;
  }

  /* Chat */
  .chat-wrap {
    flex-direction: column;
  }

  .conv-list {
    width: 100%;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .conv-list.hidden {
    display: none;
  }

  .chat-area.hidden {
    display: none;
  }

  .chat-mobile-tabs {
    display: flex;
  }

  .conv-items {
    max-height: calc(100vh - var(--header-h) - 140px);
  }

  .messages {
    height: calc(100vh - var(--header-h) - 140px);
  }

  .msg {
    max-width: 85%;
  }
}

/* ---- 480px ---- */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  /* Header */
  .logo {
    font-size: 19px;
  }

  /* Hero */
  .hero h1 {
    font-size: 20px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 12px;
  }

  /* Categories */
  .cat-card {
    flex: 0 0 100px;
    padding: 14px 8px;
  }

  .cat-card .cat-icon {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .cat-card .cat-name {
    font-size: 12px;
  }

  /* Ads grid */
  .ads-grid {
    grid-template-columns: 1fr;
  }

  .ad-card-body {
    padding: 12px;
  }

  /* CTA banner */
  .cta-banner h2 {
    font-size: 19px;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-buttons .btn-cta {
    width: 100%;
    text-align: center;
  }

  /* Torget tabs */
  .torget-tab {
    padding: 12px 14px;
    font-size: 13px;
  }

  /* Post cards */
  .post-header {
    padding: 12px 14px 0;
  }

  .post-body {
    padding: 10px 14px;
  }

  .replies {
    padding: 10px 14px;
  }

  /* Single ad */
  .gallery-thumbs .thumb {
    flex: 0 0 60px;
    height: 45px;
  }

  .ad-info {
    padding: 18px;
  }

  .ad-info h1 {
    font-size: 18px;
  }

  .ad-info .ad-detail-price {
    font-size: 22px;
  }

  .ad-info .ad-detail-meta {
    flex-direction: column;
    gap: 8px;
  }

  /* Search */
  .cat-row .cat-chip {
    padding: 6px 10px;
    font-size: 12px;
  }

  .results-top {
    flex-direction: column;
    align-items: stretch;
  }

  .results-right {
    justify-content: space-between;
  }

  .list-ad-img {
    height: 170px;
  }

  .listing-grid {
    grid-template-columns: 1fr;
  }

  /* Dashboard */
  .stats-row {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 16px;
  }

  .my-ad {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }

  .my-ad-actions {
    width: 100%;
    justify-content: flex-end;
  }

  /* Create ad */
  .type-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-upload {
    gap: 8px;
  }

  .photo-slot {
    width: 80px;
    height: 80px;
  }

  .premium-box {
    flex-direction: column;
  }

  /* Chat */
  .msg .msg-bubble {
    font-size: 13px;
    padding: 9px 14px;
  }

  .chat-input {
    padding: 10px 14px;
  }

  /* Pagination */
  .pagination a,
  .pagination span {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
  }

  /* Breadcrumb */
  .breadcrumb {
    font-size: 12px;
  }

  /* Similar */
  .similar .ads-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   19. Print Styles
   -------------------------------------------------------------------------- */
@media print {
  .header,
  .footer,
  .back-top,
  .fab,
  .chat-input,
  .btn-publish,
  .hamburger,
  .mobile-menu {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .ad-wrap {
    display: block;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}

/* --------------------------------------------------------------------------
   Listing Cards (ads-grid items)
   -------------------------------------------------------------------------- */
.listing-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .2s, transform .15s;
}
.listing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.listing-card .ac-star {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--orange);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 2;
}
.ac-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: #f0f0f0;
}
.ac-info {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.ac-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ac-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.ac-price.free {
  color: var(--green);
}
.ac-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.ac-meta i {
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   Torget Preview (homepage)
   -------------------------------------------------------------------------- */
.torget-preview {
  padding: 36px 0;
  background: var(--bg);
}
.torget-preview-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
.torget-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 768px) {
  .torget-preview-grid {
    grid-template-columns: 1fr;
  }
}
.torget-preview-grid .post {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.torget-preview-grid .post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 0;
}
.torget-preview-grid .post-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.torget-preview-grid .post-who { flex: 1; }
.torget-preview-grid .post-name { font-size: 13px; font-weight: 600; color: var(--text); }
.torget-preview-grid .post-when { font-size: 11px; color: var(--text-muted); }
.torget-preview-grid .post-content { padding: 10px 16px 14px; }
.torget-preview-grid .post-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
}
.torget-preview-grid .post-type.sell { background: #ecfdf5; color: #059669; }
.torget-preview-grid .post-type.buy { background: #fef2f2; color: #ef4444; }
.torget-preview-grid .post-type.free { background: #fffbeb; color: #d97706; }
.torget-preview-grid .post-type.help { background: #f5f3ff; color: #7c3aed; }
.torget-preview-grid .post-text { font-size: 14px; color: var(--text-light); line-height: 1.5; }
.torget-preview-grid .post-loc { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.torget-preview-grid .post-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
.torget-preview-grid .pact { display: flex; align-items: center; gap: 5px; }

/* --------------------------------------------------------------------------
   CTA Banner
   -------------------------------------------------------------------------- */
.cta-banner {
  padding: 48px 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  text-align: center;
  color: #fff;
}
.cta-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px;
}
.cta-inner h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.cta-inner p { font-size: 15px; opacity: .85; margin-bottom: 20px; }
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.cta-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* ==========================================================================
   Pagination (Day 55) — Override OSClass <ul><li>-output med horisontella pills
   ========================================================================== */
.sn-pag {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  width: 100%;
  text-align: center;
}
.sn-pag ul {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 0;
}
.sn-pag li {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1;
}
.sn-pag a, .sn-pag span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  transition: all .15s ease;
  box-sizing: border-box;
  vertical-align: middle;
}
.sn-pag a:hover {
  border-color: #3b7bbf;
  color: #3b7bbf;
  background: #eff6ff;
}
.sn-pag .searchPaginationSelected {
  background: #3b7bbf;
  border-color: #3b7bbf;
  color: #fff;
  cursor: default;
}
.sn-pag .searchPaginationPrev,
.sn-pag .searchPaginationNext {
  font-weight: 600;
}
.sn-pag .list-first.searchPaginationPrev[href=""],
.sn-pag .list-last.searchPaginationNext[href=""] {
  opacity: .35;
  pointer-events: none;
}
@media (max-width: 480px) {
  .sn-pag a, .sn-pag span {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.8125rem;
  }
}
