/* ═══════════════════════════════════════════════════
   SeekerAfric — Master Stylesheet
   ═══════════════════════════════════════════════════ */

:root {
    --red: #e63946;
    --red-dark: #c1121f;
    --dark: #111111;
    --dark-2: #1a1a1a;
    --dark-3: #222222;
    --g1: #444444;
    --g2: #666666;
    --g3: #888888;
    --g4: #aaaaaa;
    --g5: #cccccc;
    --border: #e0e0e0;
    --bg: #f9f9f9;
    --white: #ffffff;
    --sh-sm: 0 2px 8px rgba(0, 0, 0, .06);
    --sh-md: 0 4px 16px rgba(0, 0, 0, .10);
    --sh-lg: 0 8px 32px rgba(0, 0, 0, .14);
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-full: 9999px;
    --gray-1: #444444;
    --gray-2: #666666;
    --gray-3: #888888;
    --gray-4: #aaaaaa;
    --gray-5: #cccccc;
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .10);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, .14);
}

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

html {
    scroll-behavior: smooth;
}

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

html {
    touch-action: pan-x pan-y;
    -ms-touch-action: pan-x pan-y;
}
a {
    color: var(--red);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    display: block;
    max-width: 100%;
}

/* ════════════════════════════════════════
   SITE HEADER  (index / public pages)
   ════════════════════════════════════════ */
.site-header {
    background: var(--dark);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: var(--sh-md);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.header-brand {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--white);
    text-decoration: none;
}

.header-brand span,
.dash-brand span {
    color: var(--red);
}

.header-tagline {
    font-size: .78rem;
    color: var(--g4);
    margin-top: 2px;
}

/* account buttons in header */
.account-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.account-bar a {
    padding: 7px 16px;
    border-radius: var(--r-full);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
    border: 1px solid transparent;
}

.btn-signin {
    color: var(--g4);
    border-color: #444;
}

.btn-signin:hover {
    color: var(--white);
    background: var(--dark-2);
    border-color: #666;
    text-decoration: none;
}

.btn-signup {
    background: var(--red);
    color: var(--white) !important;
    border-color: var(--red);
}

.btn-signup:hover {
    background: var(--red-dark);
    text-decoration: none;
}

.btn-dashboard {
    background: var(--white);
    color: var(--dark) !important;
}

.btn-dashboard:hover {
    background: #eee;
    text-decoration: none;
}

.btn-logout {
    color: var(--g4);
    border-color: #444;
}

.btn-logout:hover {
    color: var(--white);
    background: var(--dark-2);
    text-decoration: none;
}

/* category nav tabs */
.cat-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px 16px 0;
}

.cat-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    color: var(--g4);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 500;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
    transition: all .2s;
}

.cat-nav a:hover {
    color: var(--white);
    background: var(--dark-2);
}

.cat-nav a.active {
    color: var(--white);
    background: var(--red);
    font-weight: 700;
}

/* ════════════════════════════════════════
   SEARCH BAR
   ════════════════════════════════════════ */
.search-wrap {
    background: var(--white);
    border-bottom: 1px solid #eee;
    padding: 14px 24px;
    display: flex;
    justify-content: center;
}

.search-form {
    display: flex;
    width: 100%;
    max-width: 600px;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 11px 16px;
    border: 2px solid var(--border);
    border-radius: var(--r-sm);
    font-size: .95rem;
    font-family: inherit;
    background: var(--white) !important;
    color: var(--dark-3) !important;
    -webkit-text-fill-color: var(--dark-3) !important;
    outline: none;
    transition: border-color .2s;
}

.search-input:focus {
    border-color: var(--red);
}

.search-input::placeholder {
    color: var(--g5);
}

.search-btn {
    padding: 11px 22px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: var(--r-sm);
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
    font-family: inherit;
}

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

/* ════════════════════════════════════════
   CATEGORY HEADING (index page)
   ════════════════════════════════════════ */
.cat-heading {
    max-width: 1100px;
    margin: 28px auto 14px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-heading h2 {
    font-size: 1.3rem;
    color: var(--dark);
    border-left: 4px solid var(--red);
    padding-left: 12px;
}

.result-count {
    font-size: .84rem;
    color: var(--g3);
}

/* ════════════════════════════════════════
   LISTING GRID & CARDS
   ════════════════════════════════════════ */
.main-container {
    max-width: 1100px;
    margin: 0 auto 48px;
    padding: 0 24px;
    flex: 1;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* card */
.card {
    background: var(--white);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-md);
}

/* image slider */
.card-slider {
    position: relative;
    width: 100%;
    height: 190px;
    background: #f0f0f0;
    overflow: hidden;
}

.card-slider-track,
.slider-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform .3s ease;
    will-change: transform;
}

.card-slider img {
    min-width: 100%;
    width: 100%;
    height: 190px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.card-no-img {
    width: 100%;
    height: 190px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--g5);
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .45);
    color: var(--white);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
    z-index: 2;
}

.card:hover .slider-prev,
.card:hover .slider-next {
    opacity: 1;
}

.slider-prev {
    left: 8px;
}

.slider-next {
    right: 8px;
}

.slider-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, .55);
    color: var(--white);
    font-size: .72rem;
    padding: 2px 8px;
    border-radius: var(--r-full);
}

/* card body */
.card-body {
    padding: 14px 16px 16px;
}

.card-title {
    font-size: .98rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--red);
    margin-bottom: 6px;
}

.card-desc {
    font-size: .82rem;
    color: var(--g2);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.card-tag {
    font-size: .74rem;
    background: var(--bg);
    color: var(--g2);
    padding: 3px 10px;
    border-radius: var(--r-full);
    border: 1px solid #eee;
}

.card-contact {
    margin-top: 12px;
}

.card-contact a {
    display: inline-block;
    padding: 7px 14px;
    background: var(--dark);
    color: var(--white);
    border-radius: var(--r-sm);
    font-size: .8rem;
    text-decoration: none;
    transition: background .2s;
}

.card-contact a:hover {
    background: var(--red);
}

/* empty state */
.empty-state {
    text-align: center;
    padding: 70px 24px;
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 14px;
}

.empty-title {
    font-size: 1.1rem;
    color: var(--g3);
    margin-bottom: 6px;
}

.empty-text {
    font-size: .88rem;
    color: var(--g5);
}

.empty-text a {
    color: var(--red);
}

/* ════════════════════════════════════════
   AUTH PAGES  (signup / login)
   ════════════════════════════════════════ */
.auth-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-box {
    background: var(--white);
    border-radius: var(--r-md);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--sh-md);
}

.auth-logo {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--dark);
    margin-bottom: 6px;
}

.auth-logo span {
    color: var(--red);
}

.auth-tagline {
    text-align: center;
    font-size: .84rem;
    color: var(--g3);
    margin-bottom: 28px;
}

.auth-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    border-left: 4px solid var(--red);
    padding-left: 12px;
    margin-bottom: 22px;
}

.auth-links {
    text-align: center;
    margin-top: 18px;
    font-size: .88rem;
    color: var(--g3);
}

.auth-links a {
    color: var(--red);
    font-weight: 600;
}

/* ════════════════════════════════════════
   SHARED FORM ELEMENTS
   ════════════════════════════════════════ */
.form-group {
    margin-bottom: 16px;
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.form-grid .full {
    grid-column: 1/-1;
}

label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--g1);
    margin-bottom: 5px;
}

label .req {
    color: var(--red);
    margin-left: 2px;
}

input[type=text],
input[type=email],
input[type=password],
input[type=tel],
input[type=number],
input[type=url],
select,
textarea {
    width: 100%;
    padding: 10px 13px;
    border: 2px solid var(--border);
    border-radius: var(--r-sm);
    font-size: .93rem;
    font-family: inherit;
    background: var(--white) !important;
    color: var(--dark-3) !important;
    -webkit-text-fill-color: var(--dark-3) !important;
    outline: none;
    transition: border-color .2s;
}

input::placeholder,
textarea::placeholder {
    color: var(--g5);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--red);
}

textarea {
    resize: vertical;
    min-height: 86px;
}

input[type=file] {
    padding: 9px 12px;
    cursor: pointer;
    background: var(--bg) !important;
    border-style: dashed;
}

.file-hint {
    display: block;
    font-size: .74rem;
    color: var(--g4);
    margin-top: 4px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: var(--r-sm);
    font-size: .92rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .2s;
    text-decoration: none;
    font-family: inherit;
    line-height: 1;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.btn-primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    text-decoration: none;
    color: var(--white);
}

.btn-dark {
    background: var(--dark);
    color: var(--white);
    border-color: var(--dark);
}

.btn-dark:hover {
    background: var(--dark-2);
    text-decoration: none;
    color: var(--white);
}

.btn-ghost {
    background: transparent;
    color: var(--g2);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: var(--g3);
    color: var(--dark);
    text-decoration: none;
}

.btn-danger {
    background: transparent;
    color: var(--red);
    border-color: var(--red);
}

.btn-danger:hover {
    background: var(--red);
    color: var(--white);
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 13px;
    font-size: .8rem;
}

/* ── Alerts ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--r-sm);
    margin-bottom: 18px;
    font-size: .9rem;
    font-weight: 500;
}

.alert-success {
    background: #f0fff4;
    border: 1px solid #34a853;
    color: #1e7e34;
}

.alert-error {
    background: #fff0f0;
    border: 1px solid var(--red);
    color: var(--red-dark);
}

.alert-info {
    background: #f0f4ff;
    border: 1px solid #4267b2;
    color: #2a4491;
}

/* ════════════════════════════════════════
   DASHBOARD
   ════════════════════════════════════════ */
.dash-header {
    background: var(--dark);
    color: var(--white);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.dash-brand {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: var(--white);
    text-decoration: none;
}

.dash-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dash-email {
    font-size: .84rem;
    color: var(--g4);
}

.dash-page {
    max-width: 1060px;
    margin: 0 auto;
    padding: 28px 24px 60px;
    flex: 1;
}

/* ── Category overview cards ── */
.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    border-left: 4px solid var(--red);
    padding-left: 12px;
    margin-bottom: 16px;
}

.cat-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
}

.cat-mgmt-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.cat-mgmt-card:hover {
    border-color: var(--red);
    transform: translateY(-2px);
    box-shadow: var(--sh-sm);
    text-decoration: none;
}

.cat-mgmt-card.on {
    border-color: var(--red);
    background: #fff8f8;
}

.cmg-icon {
    font-size: 2.2rem;
}

.cmg-label {
    font-size: .88rem;
    font-weight: 700;
    color: var(--dark);
}

.cmg-status {
    font-size: .74rem;
    color: var(--g3);
}

.cat-mgmt-card.on .cmg-status {
    color: var(--red);
    font-weight: 600;
}

/* ── Manage panel ── */
.manage-panel {
    background: var(--white);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
    overflow: hidden;
}

.panel-head {
    background: var(--dark);
    color: var(--white);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.panel-head h2 {
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-body {
    padding: 26px;
}

/* ── Panel sections ── */
.panel-section-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    margin-top: 0;
}

.profile-note {
    font-size: .85rem;
    color: var(--g3);
    margin-bottom: 18px;
}

.panel-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid #f0f0f0;
}

/* ── Image upload: 5-slot grid ── */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 10px 0 6px;
}

.upload-slot {
    aspect-ratio: 1;
    border: 2px dashed var(--border);
    border-radius: var(--r-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
    overflow: hidden;
    position: relative;
    background: var(--bg);
}

.upload-slot:hover {
    border-color: var(--red);
    background: #fff8f8;
}

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

/* hidden file input layered on top of slot */
.upload-slot input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    background: transparent !important;
}

/* icon/number shown when empty */
.slot-icon {
    font-size: 1.4rem;
    color: var(--g5);
    pointer-events: none;
}

.slot-num {
    font-size: .68rem;
    color: var(--g4);
    pointer-events: none;
}

/* preview image inside slot */
.slot-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    pointer-events: none;
}

.upload-slot.filled .slot-icon,
.upload-slot.filled .slot-num {
    display: none;
}

.upload-slot.filled .slot-preview {
    display: block;
}

/* ── Single image upload ── */
.single-preview {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: var(--r-sm);
    margin-top: 8px;
    border: 1px solid var(--border);
    display: none;
}

/* ── Listings table ── */
.listings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

.listings-table th {
    background: var(--bg);
    padding: 9px 13px;
    text-align: left;
    font-size: .76rem;
    color: var(--g3);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.listings-table td {
    padding: 11px 13px;
    border-top: 1px solid #f5f5f5;
    vertical-align: middle;
}

.listing-thumb {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: var(--r-sm);
    background: var(--bg);
}

.listing-no-thumb {
    width: 46px;
    height: 46px;
    border-radius: var(--r-sm);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.listing-name {
    font-weight: 700;
    color: var(--dark);
}

.listing-price {
    font-weight: 700;
    color: var(--red);
}

.listing-date {
    color: var(--g4);
    font-size: .8rem;
    white-space: nowrap;
}

.empty-table td {
    text-align: center;
    padding: 36px;
    color: var(--g4);
    font-size: .9rem;
}

/* ════════════════════════════════════════
   PRIVACY PAGE
   ════════════════════════════════════════ */
.privacy-wrap {
    max-width: 820px;
    margin: 48px auto;
    background: var(--white);
    border-radius: var(--r-md);
    padding: 48px;
    box-shadow: var(--sh-sm);
    flex: 1;
}

.privacy-wrap .last-updated {
    font-size: .84rem;
    color: var(--g4);
    margin-bottom: 26px;
}

.privacy-wrap h2 {
    font-size: 1.05rem;
    margin-top: 30px;
    margin-bottom: 9px;
    color: var(--dark);
    border-left: 4px solid var(--red);
    padding-left: 12px;
}

.privacy-wrap p {
    margin-bottom: 12px;
    color: var(--g1);
}

.privacy-wrap ul {
    margin: 8px 0 14px 20px;
    color: var(--g1);
}

.privacy-wrap ul li {
    margin-bottom: 7px;
}

.highlight-box {
    background: #fff8f8;
    border-left: 4px solid var(--red);
    padding: 13px 17px;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    margin: 14px 0;
    font-size: .9rem;
    color: var(--g1);
}

.contact-box {
    background: var(--bg);
    border-radius: var(--r-sm);
    padding: 18px 22px;
    margin-top: 12px;
}

.contact-box p {
    margin-bottom: 5px;
}

.cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 16px;
    list-style: none;
    padding: 0;
}

.cat-chip {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    padding: 4px 14px;
    font-size: .84rem;
    color: var(--g2);
}

/* ════════════════════════════════════════
   LISTING DETAIL MODAL
   ════════════════════════════════════════ */
.listing-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
    padding: 16px;
    overflow-y: auto;
}

.listing-modal.open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.listing-modal-box {
    background: var(--white);
    border-radius: var(--r-lg);
    width: 100%;
    max-width: 680px;
    margin: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalIn 0.22s ease;
}

@keyframes modalIn {
    from {
        transform: translateY(24px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close button */
.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.55);
    color: var(--white);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.modal-close-btn:hover {
    background: var(--red);
}

/* ── Image gallery ── */
.modal-gallery {
    position: relative;
    width: 100%;
    min-height: 260px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-main-img {
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    display: block;
}

.modal-no-img {
    font-size: 5rem;
    padding: 48px;
    color: var(--gray-4);
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 5;
}

.modal-nav-btn:hover {
    background: var(--red);
}

.modal-prev {
    left: 12px;
}

.modal-next {
    right: 12px;
}

/* ── Thumbnails ── */
.modal-thumbs {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    background: #1a1a1a;
    overflow-x: auto;
    scrollbar-width: thin;
}

.modal-thumb {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: var(--r-sm);
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.65;
    transition: all 0.2s;
}

.modal-thumb:hover {
    opacity: 1;
    border-color: #fff;
}

.modal-thumb.active {
    opacity: 1;
    border-color: var(--red);
}

/* ── Details ── */
.modal-details {
    padding: 22px 24px 28px;
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.modal-price {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--red);
    margin-bottom: 12px;
}

.modal-desc {
    font-size: 0.92rem;
    color: var(--gray-2);
    line-height: 1.7;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

/* ── Action buttons ── */
.modal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-call-btn,
.modal-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--r-sm);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
}

.modal-call-btn {
    background: var(--dark);
    color: var(--white);
}

.modal-call-btn:hover {
    background: var(--red);
    color: var(--white);
    text-decoration: none;
}

.modal-whatsapp-btn {
    background: #25D366;
    color: var(--white);
}

.modal-whatsapp-btn:hover {
    background: #1da851;
    color: var(--white);
    text-decoration: none;
}

.site-footer {
    text-align: center;
    padding: 18px 24px;
    font-size: .84rem;
    color: var(--g4);
    border-top: 1px solid #eee;
    background: var(--white);
}

.site-footer a {
    color: var(--red);
}

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 768px) {
    .header-brand {
        font-size: 1.3rem;
    }

    .cat-nav a {
        padding: 7px 10px;
        font-size: .78rem;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
        gap: 14px;
    }

    .card-slider,
    .card-slider img,
    .card-no-img {
        height: 150px;
    }

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

    .dash-page {
        padding: 18px 14px 40px;
    }

    .panel-body {
        padding: 18px;
    }

    .privacy-wrap {
        margin: 20px 12px;
        padding: 24px 18px;
    }

    .auth-box {
        padding: 26px 18px;
    }

    .upload-grid {
        gap: 7px;
    }
}

@media (max-width: 600px) {
    .listing-modal {
        padding: 0;
        align-items: flex-end;
    }

    .listing-modal-box {
        border-radius: var(--r-lg) var(--r-lg) 0 0;
        max-width: 100%;
        margin: 0;
    }

    .modal-main-img {
        max-height: 240px;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .modal-price {
        font-size: 1.2rem;
    }

    .modal-details {
        padding: 16px 16px 24px;
    }

    .modal-call-btn,
    .modal-whatsapp-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-top {
        padding: 12px 16px;
    }

    .account-bar a {
        padding: 6px 11px;
        font-size: .78rem;
    }

    .search-wrap {
        padding: 10px 14px;
    }

    .main-container {
        padding: 0 12px;
    }

    .cat-overview {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .upload-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .listings-table th,
    .listings-table td {
        padding: 8px 9px;
    }
}

/* ── Payment page specific styles ── */
.pay-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
}

.pay-box {
    background: var(--white);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
}

.pay-header {
    background: var(--dark);
    color: var(--white);
    padding: 22px 28px;
    text-align: center;
}

.pay-brand {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.pay-brand span {
    color: var(--red);
}

.pay-header p {
    color: var(--gray-4);
    font-size: 0.84rem;
    margin-top: 4px;
}

.pay-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 2px solid var(--border);
}

.pay-tab {
    padding: 14px;
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-3);
    border: none;
    background: none;
    transition: all 0.2s;
    font-family: inherit;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.pay-tab:hover {
    color: var(--dark);
}

.pay-tab.active {
    align-self: center;
    color: var(--red);
    border-bottom-color: var(--red);
}

.pay-body {
    padding: 28px;
}

.pay-panel {
    display: none;
}

.pay-panel.active {
    display: block;
}

/* Amount display */
.amount-display {
    text-align: center;
    margin-bottom: 24px;
}

.amount-label {
    font-size: 0.8rem;
    color: var(--gray-3);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.amount-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--dark);
}

.amount-value span {
    color: var(--red);
}

/* Network selector */
.network-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.network-btn {
    border: 2px solid var(--border);
    border-radius: var(--r-sm);
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
    font-family: inherit;
}

.network-btn .net-icon {
    font-size: 1.4rem;
    display: block;
}

.network-btn .net-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-2);
    margin-top: 4px;
    display: block;
}

.network-btn.selected {
    border-color: var(--red);
    background: #fff8f8;
}

.network-btn.selected .net-name {
    color: var(--red);
}

input[name=network] {
    display: none;
}

/* Steps */
.step {
    display: none;
}

.step.active {
    display: block;
}

/* Status box */
.status-box {
    text-align: center;
    padding: 24px 16px;
}

.status-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.status-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.status-msg {
    font-size: 0.88rem;
    color: var(--gray-2);
    margin-bottom: 20px;
    line-height: 1.6;
}

.status-box.success .status-icon::before {
    content: '✅';
}

.status-box.pending .status-icon::before {
    content: '⏳';
}

.status-box.failed .status-icon::before {
    content: '❌';
}

/* Polling dots */
.polling-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    margin: 0 3px;
    animation: dotBounce 1.2s infinite;
}

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

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

@keyframes dotBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* USSD instruction box */
.ussd-box {
    background: #f9f9f9;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 16px;
    text-align: center;
    margin-bottom: 20px;
}

.ussd-code {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--dark);
    letter-spacing: 3px;
    margin: 8px 0 4px;
}

.ussd-sub {
    font-size: 0.8rem;
    color: var(--gray-3);
}

.pay-footer {
    text-align: center;
    padding: 16px 28px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.78rem;
    color: var(--gray-4);
}

.pay-footer img {
    height: 18px;
    vertical-align: middle;
    margin-left: 4px;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 0.84rem;
    color: var(--gray-3);
    cursor: pointer;
}

.back-link:hover {
    color: var(--red);
}

@media (max-width: 480px) {
    .pay-body {
        padding: 20px 16px;
    }

    .amount-value {
        font-size: 1.6rem;
    }
}
