/* styles.css
   Version: 004
   Miljö: bolink.se
   Beskrivning: Huvudstylesheet för bolink.se
   Skapad: 2026-04-06 AJA
   Till AI: Uppdatera datum och versionsnummer +1 vid varje ändring. */

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

:root {
    --green:        #1a6b3c;
    --green-dark:   #155a31;
    --green-light:  #e8f5ee;
    --green-mid:    #c3e6cb;
    --orange:       #e85d24;
    --text:         #1a1a1a;
    --text-muted:   #666;
    --text-light:   #999;
    --border:       #e0e0e0;
    --border-light: #f0f0f0;
    --bg:           #f7f8fa;
    --bg-card:      #ffffff;
    --radius-sm:    6px;
    --radius:       10px;
    --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 4px 16px rgba(0,0,0,0.10);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* -- Layout ---------------------------------------------------------------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-wrap {
    max-width: 900px;
    margin: 32px auto;
    padding: 0 20px 60px;
}

main { flex: 1; }

/* -- Header ---------------------------------------------------------------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    display: flex;
    align-items: center;
    height: 58px;
    gap: 24px;
}

.site-logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--green);
    letter-spacing: -0.5px;
    white-space: nowrap;
    text-decoration: none;
}
.site-logo:hover { text-decoration: none; }
.site-logo span { color: var(--orange); }

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.site-nav a {
    font-size: 14px;
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}
.site-nav a:hover {
    color: var(--text);
    background: var(--bg);
    text-decoration: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.bonus-badge {
    font-size: 12px;
    background: #fff8e7;
    color: #7a5000;
    border: 1px solid #f0c060;
    border-radius: 20px;
    padding: 3px 10px;
    white-space: nowrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary  { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-outline  { border-color: var(--border); color: var(--text-muted); background: #fff; }
.btn-outline:hover { background: var(--bg); color: var(--text); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #a93226; }
.btn-warning { background: #e8a020; color: #fff; }
.btn-warning:hover { background: #d4911a; }

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    gap: 5px;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.25s;
}

/* Mobil-meny */
.mobile-menu {
    display: none;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 16px;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}
.mobile-menu a:last-child { border-bottom: none; }

/* -- Hero ------------------------------------------------------------------ */
.hero {
    background: linear-gradient(135deg, #1a6b3c 0%, #0f4526 100%);
    color: #fff;
    padding: 52px 20px 44px;
    text-align: center;
}
.hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}
.hero p {
    font-size: 16px;
    opacity: 0.88;
    margin-bottom: 28px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Sökfält */
.search-form {
    display: flex;
    gap: 8px;
    max-width: 700px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.search-form input,
.search-form select {
    padding: 11px 14px;
    font-size: 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    flex: 1;
    min-width: 140px;
}
.search-form input:focus,
.search-form select:focus { outline: 2px solid rgba(255,255,255,0.5); }
.search-form .btn-search {
    padding: 11px 24px;
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.search-form .btn-search:hover { background: #c94e1c; }

/* Prisbanner */
.price-banner {
    background: #fff8e7;
    border-bottom: 1px solid #f0d080;
    padding: 10px 20px;
    text-align: center;
    font-size: 13px;
    color: #7a5000;
}
.price-banner strong { color: var(--orange); }
.price-banner a { color: var(--green); font-weight: 500; }

/* -- Annonssektion --------------------------------------------------------- */
.ads-section { padding: 32px 0 40px; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-header h2 {
    font-size: 18px;
    font-weight: 600;
}
.section-header a { font-size: 14px; }

/* Rutnät för annonser */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Annons-kort */
.ad-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.ad-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: #ccc;
    text-decoration: none;
}

.ad-card-img {
    height: 160px;
    background: var(--green-light);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}
.ad-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
}
/* Badge i inline text-kontext (ad_view under annonsrubrik) */
.ad-info-meta .ad-badge {
    position: static;
    display: inline-block;
    vertical-align: middle;
    box-shadow: none;
}
.badge-hyresl   { background: #d4edda; color: #155724; }
.badge-bostadsratt { background: #cce5ff; color: #004085; }
.badge-agarlagenhet { background: #e2d9f3; color: #4a1b9a; }
.badge-villa-radhus { background: #f3e5ff; color: #5e0080; }
.badge-rum-inneboende { background: #fff3cd; color: #856404; }
.badge-stuga    { background: #d4edda; color: #0a4015; }
.badge-ovrigt   { background: #f0f0f0; color: #444; }

.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.15s;
}
.favorite-btn:hover { transform: scale(1.1); }

.ad-card-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ad-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2px;
}
.ad-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ad-card-meta span::after { content: '·'; margin-left: 6px; }
.ad-card-meta span:last-child::after { content: ''; }
.ad-card-location {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}
.ad-card-price {
    margin-top: auto;
    padding-top: 8px;
    font-size: 17px;
    font-weight: 700;
    color: var(--green);
}
.ad-card-price span {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}
.ad-card-avail {
    font-size: 12px;
    color: var(--text-light);
}
.stars { color: #e8a020; font-size: 12px; }

/* -- Inforutor (uthyrningsinfo) -------------------------------------------- */
.info-section {
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 40px 0;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}
.info-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.info-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 6px;
}
.info-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* -- CTA-sektion ----------------------------------------------------------- */
.cta-section {
    background: linear-gradient(135deg, #1a6b3c 0%, #0f4526 100%);
    color: #fff;
    padding: 48px 20px;
    text-align: center;
}
.cta-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}
.cta-section p {
    font-size: 15px;
    opacity: 0.88;
    margin-bottom: 24px;
}
.cta-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-cta-white {
    background: #fff;
    color: var(--green);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    text-decoration: none;
}
.btn-cta-white:hover { background: #f0f0f0; color: var(--green); text-decoration: none; }
.btn-cta-outline {
    background: transparent;
    color: #fff;
    font-weight: 500;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(255,255,255,0.5);
    font-size: 15px;
    text-decoration: none;
}
.btn-cta-outline:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }

/* Paketpaket-rutnät */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin: 24px 0;
}
.package-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    position: relative;
}
.package-card.featured {
    border-color: var(--green);
    box-shadow: 0 0 0 1px var(--green);
}
.package-popular {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.package-days { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.package-price { font-size: 24px; font-weight: 700; color: var(--green); }
.package-price span { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.package-save { font-size: 11px; color: var(--orange); margin-top: 2px; font-weight: 500; }

/* -- Min sida -------------------------------------------------------------- */
.my-page-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}
.my-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 100%;
    min-width: 0;
}
.my-sidebar-header {
    background: var(--green);
    color: #fff;
    padding: 20px;
    text-align: center;
}
.my-sidebar-avatar {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    margin: 0 auto 8px;
    color: #fff;
}
.my-sidebar-name { font-size: 15px; font-weight: 600; }
.my-sidebar-email { font-size: 12px; opacity: 0.8; margin-top: 2px; }
.my-sidebar-bonus {
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 12px;
    display: inline-block;
    margin-top: 8px;
}
.my-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}
.my-sidebar nav a:hover { background: var(--bg); text-decoration: none; }
.my-sidebar nav a.active { background: var(--green-light); color: var(--green); font-weight: 500; }
.my-sidebar nav a .badge-count {
    margin-left: auto;
    background: var(--orange);
    color: #fff;
    font-size: 11px;
    border-radius: 20px;
    padding: 1px 7px;
    font-weight: 600;
}

/* Stat-kort */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}
.stat-card .stat-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--green);
}
.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Tabell */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }

/* Status-badges */
.status-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
}
.status-active   { background: #d4edda; color: #155724; }
.status-pending  { background: #fff3cd; color: #856404; }
.status-inactive { background: #f0f0f0; color: #555; }
.status-blocked  { background: #f8d7da; color: #721c24; }
.status-expired  { background: #e2e3e5; color: #383d41; }
.status-draft    { background: #e2e3e5; color: #383d41; }
.status-pending_payment { background: #cce5ff; color: #004085; }
.status-pending_review  { background: #fff3cd; color: #856404; }

/* Kort */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
}
.content-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.content-card-header h3 { font-size: 16px; font-weight: 600; }
.content-card-body { padding: 20px; }

/* Tom-state */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 14px; margin-bottom: 16px; }

/* Formulär (generellt) */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid #d0d0d0;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(26,107,60,0.1);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group .hint { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.req { color: #c0392b; margin-left: 2px; }
.form-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* Meddelanden */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
}
.alert-error   { background: #fff0f0; border: 1px solid #f5c6cb; color: #c0392b; }
.alert-success { background: #f0f7f3; border: 1px solid var(--green-mid); color: var(--green); }
.alert-info    { background: #e8f4fd; border: 1px solid #bee5eb; color: #0c5460; }
.alert-warning { background: #fff8e7; border: 1px solid #f0d080; color: #7a5000; }

/* -- Footer ---------------------------------------------------------------- */
.site-footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
.footer-brand .logo {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 8px;
}
.footer-brand .logo span { color: var(--orange); }
.footer-brand p { font-size: 13px; color: #888; line-height: 1.6; }
.footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-col a {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    transition: color 0.15s;
}
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-bottom p { font-size: 12px; color: #666; }
.footer-bottom a { font-size: 12px; color: #666; }
.footer-bottom a:hover { color: #ccc; }

/* Lang-bar */
.lang-bar {
    background: #f7f8fa;
    border-bottom: 1px solid var(--border);
    padding: 4px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}
.lang-bar a {
    font-size: 12px;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 4px;
}
.lang-bar a:hover { background: var(--border-light); text-decoration: none; }
.lang-bar a.active { color: var(--green); font-weight: 500; }

/* -- Responsiv ------------------------------------------------------------- */
@media (max-width: 900px) {
    .ads-grid { grid-template-columns: repeat(2, 1fr); }
    .info-grid { grid-template-columns: repeat(2, 1fr); }
    .packages-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .my-page-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .site-nav { display: none; }
    .hamburger { display: flex; }
    .ads-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .packages-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 24px; }
    .form-row { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .header-right .btn-outline { display: none; }
}

/* -- ad_view responsiv layout -------------------------------------------- */
.ad-view-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 700px) {
    .ad-view-grid {
        grid-template-columns: 1fr;
    }
}

/* -- ads.php responsiv layout -------------------------------------------- */
.ads-layout-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 700px) {
    .ads-layout-grid {
        grid-template-columns: 1fr;
    }
    .ads-filter-sidebar {
        margin-bottom: 12px;
    }
}

/* -- Badge-klasser (komplettering) --------------------------------------- */
.badge-hyreslagenhet  { background: #d4edda; color: #155724; }
.badge-forstahand     { background: #d1ecf1; color: #0c5460; }
.badge-jordbruk       { background: #e8f5e9; color: #2e7d32; }
.badge-tomt           { background: #fce4ec; color: #880e4f; }

/* Featured-paket: orange ram (ej grön som valt) */
.package-card.featured {
    border-color: #e8a020;
    box-shadow: 0 0 0 1px #e8a020;
}
.package-card.selected {
    border-color: var(--green);
    box-shadow: 0 0 0 2px var(--green);
    background: #f0f7f3;
}
.package-popular {
    background: #e8a020;
}

/* Badge i inline text-kontext (ad_view under annonsrubrik) */
.ad-info-meta .ad-badge {
    position: static;
    display: inline-block;
    vertical-align: middle;
    box-shadow: none;
}

/* -- my_page mobilanpassning ----------------------------------------------- */
@media (max-width: 700px) {
    .my-page-grid {
        grid-template-columns: 1fr;
    }
    /* Sidebar på mobil: horisontell scrollbar med tabs */
    .my-sidebar {
        border-radius: var(--radius);
    }
    .my-sidebar-header {
        padding: 14px;
    }
    .my-sidebar-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .my-sidebar nav {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .my-sidebar nav a {
        display: inline-flex;
        border-bottom: none;
        border-right: 1px solid var(--border-light);
        padding: 10px 14px;
        font-size: 13px;
        flex-shrink: 0;
    }
    .my-sidebar nav a:last-child {
        border-right: none;
    }
    .my-sidebar nav a i {
        margin-right: 4px;
    }
}

/* -- Dölj element på mobil ----------------------------------------------- */
@media (max-width: 700px) {
    .hide-mobile { display: none; }
}

/* -- ad_view responsiv layout -------------------------------------------- */
.ad-view-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 700px) {
    .ad-view-grid { grid-template-columns: 1fr; }
}

/* -- ads.php responsiv layout -------------------------------------------- */
.ads-layout-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 700px) {
    .ads-layout-grid { grid-template-columns: 1fr; }
    .ads-filter-sidebar { margin-bottom: 12px; }
}

/* -- Badge-klasser (komplettering) --------------------------------------- */
.badge-hyreslagenhet { background: #d4edda; color: #155724; }
.badge-forstahand    { background: #d1ecf1; color: #0c5460; }
.badge-jordbruk      { background: #e8f5e9; color: #2e7d32; }
.badge-tomt          { background: #fce4ec; color: #880e4f; }

/* Featured-paket: orange (ej grön som valt) */
.package-card.featured {
    border-color: #e8a020;
    box-shadow: 0 0 0 1px #e8a020;
}
.package-card.selected {
    border-color: var(--green);
    box-shadow: 0 0 0 2px var(--green);
    background: #f0f7f3;
}
.package-popular { background: #e8a020; }

/* Badge i inline text-kontext */
.ad-info-meta .ad-badge {
    position: static;
    display: inline-block;
    vertical-align: middle;
    box-shadow: none;
}

/* -- my_page mobilanpassning --------------------------------------------- */
@media (max-width: 700px) {
    .my-page-grid { grid-template-columns: 1fr; }
    .my-sidebar { border-radius: var(--radius); }
    .my-sidebar-header { padding: 14px; }
    .my-sidebar-avatar { width: 40px; height: 40px; font-size: 16px; }
    .my-sidebar nav {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .my-sidebar nav a {
        display: inline-flex;
        border-bottom: none;
        border-right: 1px solid var(--border-light);
        padding: 10px 14px;
        font-size: 13px;
        flex-shrink: 0;
    }
    .my-sidebar nav a:last-child { border-right: none; }
    .my-sidebar nav a i { margin-right: 4px; }
    .hide-mobile { display: none; }
}