*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root{
    --font-color: #fff;
    --buttons-color: #931e1e;
    --another-font: #110f0f;
    --tick-color: #3d9f38;
}

body{
    font-family: sans-serif;
    background: #fafafa;
    max-width: 480px;
    margin: 0 auto;
}

/* ── Onboarding Splash ── */
.onboarding-overlay{
    position: fixed;
    inset: 0;
    background: var(--buttons-color);
    z-index: 9999;
    display: none;              /* hidden until we know this visitor needs it (no flash for returning users) */
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}
html.ub-onb .onboarding-overlay{ display: flex; }
.onboarding-overlay.fade-out{ opacity: 0; }

.onboarding-card{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 32px 24px;
    text-align: center;
    color: #fff;
    max-width: 340px;
    width: 100%;
}

.onboarding-logo{ line-height: 0; }
.onboarding-logo img{ width: min(270px, 72vw); height: auto; display: block; }

.onboarding-title{
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.onboarding-gestures{
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.gesture-item{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    opacity: 0.92;
}

.gesture-icon{
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.gesture-icon.pass{ background: rgba(229,57,53,0.35); }
.gesture-icon.want{ background: rgba(61,159,56,0.35); }
.gesture-icon.undo{ background: rgba(255,255,255,0.2); }

.onboarding-btn{
    background: #fff;
    color: var(--buttons-color);
    border: none;
    border-radius: 30px;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
    transition: transform 0.15s;
}
.onboarding-btn:active{ transform: scale(0.95); }

/* ── Search & Filters ── */
.search-bar-container{
    width: 100%;
    padding: 10px 12px 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.search{
    font-size: 0.95rem;
    height: 34px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 0 14px;
    outline: none;
    background: #f5f5f5;
}
.search:focus{ border-color: var(--buttons-color); background: #fff; }

.filter-heading{
    margin: 12px 0;
    font-weight: normal;
    font-size: 0.75rem;
    color: #666;
}

.filter-by-category{
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.filter-by-category::-webkit-scrollbar{ display: none; }

.btn{
    border: 1px solid #ddd;
    white-space: nowrap;
    padding: 4px 12px;
    font-size: 0.75rem;
    color: #555;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}
.btn.active, .btn:hover{
    background: var(--buttons-color);
    color: #fff;
    border-color: var(--buttons-color);
}
.cat-icon{ font-size: 0.72rem; }

/* ── Card Stack ── */
/* --card-top is set by JS (distance from top of page to the card area).
   120px = swipe-button row (~60px) + bottom nav (52px) + small gap.      */
:root{
    --card-area-h: min(calc(100dvh - var(--card-top, 260px) - 120px), 640px);
}
.main-container-cards{
    position: relative;
    overflow-x: clip;          /* a card sliding in/out (undo) must never widen the page */
    height: var(--card-area-h);
    min-height: 260px;
    width: 100%;
    margin-top: 8px;
    padding-bottom: 0;
}

.basecard-container{
    position: absolute;
    display: block;
    height: 100%;
    width: 100%;
    padding: 0 16px;
    top: 0;
    z-index: 1;
}

.base-container{
    width: 100%;
    height: calc(100% - 84px);
    min-height: 170px;
    background: #e8e8e8;
    border-radius: 12px;
}

.card-container{
    position: absolute;
    display: none;
    width: 100%;
    padding: 0 16px;
    top: 0;
    z-index: 2;
    cursor: pointer;
}

/* Make card image fill available height too */
.price-card img.item {
    height: clamp(170px, calc(var(--card-area-h) - 84px), 640px);
}

.price-card{
    position: relative;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.price-card img{
    position: relative;
    left: 0;
    width: 100%;
    height: clamp(170px, calc(var(--card-area-h) - 84px), 640px);
    object-fit: cover;
    display: block;
}

.description-container{
    width: 100%;
    background: #fff;
    padding: 8px 12px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.vendor-name{ font-size: 0.78rem; color: #666; }
.name{ font-size: 0.95rem; font-weight: 600; color: #1f1f1f; }
.description{ font-size: 0.82rem; color: #555; }

/* ── Card Badges ── */
.card-badges{
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.stars-badge{
    background: rgba(0,0,0,0.55);
    color: #ffd700;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    letter-spacing: 1px;
}

.negotiable-badge{
    background: var(--buttons-color);
    color: #fff;
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ── Ad Cards ── */
.ad-card{ cursor: default; }

.ad-badge{
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff9800;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ad-cta-overlay{
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    padding: 20px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ad-cta-label{
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.ad-cta-btn{
    background: #ff9800;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    align-self: flex-start;
}

.ad-desc{
    background: #fff8e1;
    border-top: 2px solid #ff9800;
}

.ad-tag-inline{
    font-size: 0.65rem;
    color: #ff9800;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 2px;
}

/* ── Sold overlay ── */
.sold-overlay{
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 4px;
    border-radius: 12px;
}

/* ── Swipe Buttons ── */
.swipe-container{
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 480px;
    position: fixed;
    bottom: 56px;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 100;
    padding: 6px 16px;
    background: linear-gradient(to top, rgba(250,250,250,1) 60%, rgba(250,250,250,0));
    pointer-events: none;
}

.swipe-btn{
    font-size: 1.1rem;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.15s;
    pointer-events: all;
}
.swipe-btn:active{ transform: scale(0.92); }
.swipe-left{ color: #e53935; }
.swipe-right{ color: var(--tick-color); }
.swipe-reverse{ color: #666; font-size: 1rem; }

/* ── Bottom Nav ── */
.navigation{
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 52px;
    list-style-type: none;
    justify-content: space-around;
    align-items: center;
    background-color: var(--buttons-color);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    z-index: 50;
}

a{
    font-size: 1.2rem;
    color: var(--font-color);
    text-decoration: none;
}

/* ── "I want this" modal ── */
.i-want-this{
    position: fixed;
    width: 80%;
    max-width: 320px;
    border-radius: 12px;
    z-index: 100;
    left: 50%;
    transform: translateX(-50%);
    top: 200px;
    background: #fff;
    display: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    flex-direction: column;
    padding: 12px 16px;
    gap: 8px;
}

.message-seller{
    text-align: center;
    color: var(--tick-color);
    font-size: 1rem;
}

.contact-seller-form{
    display: flex;
    gap: 8px;
}

.the-seller{
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.85rem;
    outline: none;
}

.cancelbtn{
    background: transparent;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    align-self: flex-end;
    color: #666;
}

.sendbtn{
    background: var(--buttons-color);
    border: none;
    font-size: 0.85rem;
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
}

/* ── Item Detail Modal ── */
.detail-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 500;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.detail-overlay.open .detail-sheet{
    transform: translateY(0);
}

.detail-sheet{
    background: #fff;
    width: 100%;
    max-width: 480px;
    border-radius: 18px 18px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    position: relative;
}

.detail-close{
    position: absolute;
    top: 12px;
    right: 14px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    color: #555;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-img{
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 18px 18px 0 0;
    display: block;
}

.detail-body{
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-top-row{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.detail-title{ font-size: 1.1rem; font-weight: 700; }
.detail-seller{ font-size: 0.78rem; color: #666; margin-top: 2px; }
.detail-stars{ font-size: 0.82rem; color: #f59e0b; margin-top: 2px; }
.detail-price-tag{
    background: var(--buttons-color);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
}
.detail-desc{ font-size: 0.88rem; color: #555; line-height: 1.5; }

.detail-badges{ display: flex; gap: 6px; flex-wrap: wrap; }

.detail-actions{
    display: flex;
    gap: 10px;
}

.detail-want-btn{
    flex: 1;
    background: var(--tick-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.detail-share-btn{
    background: #f0f0f0;
    color: #444;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.9rem;
    cursor: pointer;
}

.detail-sold-btn{
    width: 100%;
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
}

/* ── New listing modal ── */
.new-listing{
    position: fixed;
    width: 88%;
    max-width: 340px;
    border-radius: 12px;
    z-index: 100;
    left: 50%;
    transform: translateX(-50%);
    top: 80px;
    background: #fff;
    display: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    flex-direction: column;
    padding: 14px 16px;
    gap: 8px;
    max-height: 80vh;
    overflow-y: auto;
}

.new-listing-form{
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.new-listing-form input,
.new-listing-form textarea,
.new-listing-form select{
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 0.88rem;
    outline: none;
    width: 100%;
}

.new-listing-form input:focus,
.new-listing-form textarea:focus,
.new-listing-form select:focus{
    border-color: var(--buttons-color);
}

#img-preview{
    display: none;
    width: 100%;
    max-height: 100px;
    object-fit: cover;
    border-radius: 6px;
}

.negotiable-check-label{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
}
.negotiable-check-label input{ width: auto; }

/* ── States ── */
.appear{ display: block; }

/* ── Empty states (shared by the home feed + lost & found) ── */
.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: absolute;
    top: 0; left: 0; right: 0;
    height: calc(100% - 6px);
    box-sizing: border-box;
    padding: 28px 24px;
    gap: 8px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 5;
}

/* hide the grey placeholder card while an empty state is showing */
.main-container-cards:has(.empty-state[style*="flex"]) .basecard-container { display: none; }

/* nothing to swipe → hide the swipe buttons (the "seen it all" state keeps them so undo still works) */
body:has(#noResults[style*="flex"]) .swipe-container { visibility: hidden; }

.empty-icon-wrap {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: #fdf2f2;
    box-shadow: 0 0 0 9px #fef8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.empty-icon-wrap i {
    font-size: 1.9rem;
    color: var(--buttons-color);
}

.empty-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2b2b2b;
    margin: 0;
}

.empty-sub {
    font-size: 0.84rem;
    color: #666;
    max-width: 250px;
    line-height: 1.55;
    margin: 0;
}

.empty-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
}

.empty-reset-btn {
    background: var(--buttons-color);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 10px 26px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}
.empty-reset-btn:hover  { opacity: 0.85; }
.empty-reset-btn:active { transform: scale(0.97); }

.empty-link-btn {
    background: transparent;
    border: none;
    color: var(--buttons-color);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 10px;
    cursor: pointer;
}
.empty-link-btn i { font-size: 0.7rem; margin-right: 3px; }

/* ── Animations ── */
.rotate-left{
    animation: rotateleft 0.45s ease forwards;
}

@keyframes rotateleft{
    0%{ transform: translateX(0) rotate(0); opacity: 1; }
    100%{ transform: translateX(-120%) rotate(-22deg); opacity: 0; }
}

.rotate-right{
    animation: rotateright 0.45s ease forwards;
}

@keyframes rotateright{
    0%{ transform: translateX(0) rotate(0); opacity: 1; }
    100%{ transform: translateX(120%) rotate(22deg); opacity: 0; }
}

/* Undo from right (was swiped right) */
.reverse{
    animation: reverseFromRight 0.38s cubic-bezier(0.34,1.4,0.64,1) forwards;
}

@keyframes reverseFromRight{
    0%{ transform: translateX(70%) rotate(12deg); opacity: 0; }
    100%{ transform: translateX(0) rotate(0); opacity: 1; }
}

/* Undo from left (was swiped left) */
.reverse-from-left{
    animation: reverseFromLeft 0.38s cubic-bezier(0.34,1.4,0.64,1) forwards;
}

@keyframes reverseFromLeft{
    0%{ transform: translateX(-70%) rotate(-12deg); opacity: 0; }
    100%{ transform: translateX(0) rotate(0); opacity: 1; }
}

/* ── Toast ── */
.toast{
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 600;
    pointer-events: none;
    white-space: nowrap;
}
.toast.show{ opacity: 1; }

/* bottom nav spacing */
main, body > section:last-of-type{ padding-bottom: 60px; }

/* ── Nav badge counters ── */
nav li, .bottom-nav li {
    position: relative;
}
.nav-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    background: #fff;
    color: #931e1e;
    font-size: 0.6rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    pointer-events: none;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* ── Card tags strip ── */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}
.card-tag {
    font-size: 0.65rem;
    background: #f0f0f0;
    color: #777;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
}

/* ── Featured card badge ── */
.featured-card .price-card { border: 2px solid #f59e0b; border-radius: 12px 12px 0 0; }
.featured-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(90deg, #f59e0b, #e67e22);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 12px;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 5;
}

/* ── Tags input in listing form ── */
.tags-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.tags-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
}
.tags-hint {
    font-size: 0.7rem;
    color: #666;
    font-weight: normal;
}
.tags-input-wrap {
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 6px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    background: #fafafa;
    min-height: 40px;
    cursor: text;
}
.tags-input-wrap:focus-within { border-color: #931e1e; background: #fff; }
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #931e1e;
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
}
.tag-remove {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.tags-text-input {
    border: none;
    outline: none;
    font-size: 0.82rem;
    background: transparent;
    min-width: 120px;
    flex: 1;
    color: #333;
}
.tags-counter {
    font-size: 0.7rem;
    color: #666;
    text-align: right;
}

/* ── Boost / featured ad section ── */
.boost-section {
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
}
.boost-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 12px;
    background: #fafafa;
}
.boost-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}
.boost-title i { color: #f59e0b; }
.boost-sub { font-size: 0.72rem; color: #666; margin-top: 2px; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0;
    background: #ccc; border-radius: 22px; cursor: pointer;
    transition: background 0.2s;
}
.toggle-slider::before {
    content: "";
    position: absolute;
    width: 16px; height: 16px;
    left: 3px; top: 3px;
    background: #fff; border-radius: 50%;
    transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: #931e1e; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

.boost-fields {
    padding: 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.boost-how {
    background: #fffbf0;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 12px;
}
.boost-how-title { font-size: 0.75rem; font-weight: 700; color: #b45309; margin-bottom: 4px; }
.boost-how-text  { font-size: 0.72rem; color: #92400e; line-height: 1.5; }

.bid-input-row {
    display: flex;
    align-items: center;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}
.bid-currency {
    padding: 0 10px;
    font-weight: 700;
    color: #555;
    font-size: 0.9rem;
    background: #f0f0f0;
    border-right: 1px solid #e0e0e0;
    height: 38px;
    display: flex;
    align-items: center;
}
.bid-amount-input {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 10px !important;
    height: 38px;
    flex: 1;
}

.bid-estimate {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.75rem;
    color: #1e40af;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    line-height: 1.5;
}
.bid-estimate i { margin-top: 1px; flex-shrink: 0; }

.boost-disclaimer {
    font-size: 0.68rem;
    color: #666;
    line-height: 1.5;
}

/* ── Empty state illustration SVG box ── */
.empty-state {
    padding-top: 60px;
}

/* ── Report listing button ── */
.detail-report-btn {
    width: 100%;
    background: transparent;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 9px;
    font-size: 0.8rem;
    color: #991b1b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s;
}
.detail-report-btn:hover { background: #fdf2f2; }

/* ── Report modal ── */
.report-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 600;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.report-modal {
    background: #fff;
    width: 100%;
    max-width: 480px;
    border-radius: 18px 18px 0 0;
    padding: 20px 18px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: slideUp 0.28s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.report-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.report-modal-title { font-size: 1rem; font-weight: 700; color: #1a1a1a; }
.report-close-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
}
.report-modal-sub { font-size: 0.8rem; color: #666; }
.report-reasons { display: flex; flex-direction: column; gap: 8px; }
.report-reason {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.83rem;
    color: #333;
    transition: border-color 0.15s, background 0.15s;
}
.report-reason:has(input:checked) {
    border-color: #931e1e;
    background: #fdf2f2;
    color: #931e1e;
    font-weight: 600;
}
.report-reason input { accent-color: #931e1e; }
.report-note {
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.82rem;
    resize: none;
    height: 68px;
    outline: none;
    color: #333;
    font-family: inherit;
}
.report-note:focus { border-color: #931e1e; }
.report-error { font-size: 0.75rem; color: #d32f2f; min-height: 16px; }
.report-submit-btn {
    background: #931e1e;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}
.report-submit-btn:hover { opacity: 0.88; }

/* ── Multi-image upload zone ── */
.img-upload-zone {
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
    transition: border-color 0.2s;
}
.img-upload-zone:focus-within { border-color: var(--buttons-color); }

.img-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px 12px;
    cursor: pointer;
    color: #666;
    font-size: 0.82rem;
    transition: color 0.15s;
}
.img-upload-label:hover { color: var(--buttons-color); }
.img-upload-label i { font-size: 1.6rem; }
.img-upload-hint { font-size: 0.68rem; color: #ccc; }

.img-preview-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 10px 10px;
}
.img-thumb-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.img-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.img-thumb-remove {
    position: absolute;
    top: 2px; right: 2px;
    background: rgba(0,0,0,0.55);
    border: none;
    border-radius: 50%;
    width: 18px; height: 18px;
    color: #fff;
    font-size: 0.55rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-count-label {
    font-size: 0.7rem;
    color: #666;
    text-align: center;
    padding: 0 10px 8px;
}

/* ── Detail sheet gallery ── */
.detail-gallery {
    position: relative;
    background: #000;
}
.gallery-track {
    display: flex;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    border-radius: 18px 18px 0 0;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    contain: layout paint;
}
.gallery-main-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    user-select: none; -webkit-user-drag: none;
    transform: translateZ(0);
}
.gallery-dots {
    position: absolute;
    bottom: 52px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 5px;
    z-index: 2;
}
.gallery-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.gallery-dot.active {
    background: #fff;
    transform: scale(1.3);
}
.gallery-thumbs {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    background: #111;
    overflow-x: auto;
    scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 5px;
    opacity: 0.55;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: opacity 0.15s, border-color 0.15s;
}
.gallery-thumb.active {
    opacity: 1;
    border-color: #fff;
}

/* ── Detail tags strip ── */
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

/* ── Verified student badge on listing cards ── */
.verified-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(22, 101, 52, 0.92);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
    letter-spacing: 0.3px;
    z-index: 5;
    backdrop-filter: blur(2px);
}
.verified-badge i { font-size: 0.62rem; color: #86efac; }

/* ── Renew button in dashboard ── */
.renew-btn {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #1e40af;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: background 0.15s;
}
.renew-btn:hover { background: #dbeafe; }

/* ── Expired campaign label ── */
.expired-label {
    color: #d32f2f !important;
}

/* ── Campaign budget bar in dashboard ── */
.budget-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 4px;
}
.budget-bar {
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
}
.budget-fill {
    height: 100%;
    background: #3d9f38;
    border-radius: 2px;
    transition: width 0.4s ease;
}
.budget-label {
    font-size: 0.65rem;
    color: #666;
}

/* ── Expiry label ── */
.expiry-label {
    font-size: 0.68rem;
    color: #666;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Image Lightbox / Zoom ────────────────────────────────────────────────*/
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0,0,0,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pinch-zoom;
}

.lb-track {
    position: absolute; inset: 0;
    display: flex;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pinch-zoom;
}
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide {
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: normal;
    contain: layout paint;
    display: flex; align-items: center; justify-content: center;
}
.lb-slide img {
    max-width: 95vw; max-height: 85vh;
    object-fit: contain; border-radius: 6px;
    user-select: none; -webkit-user-drag: none;
    will-change: transform;
}
.lightbox-close, .lightbox-prev, .lightbox-next, .lightbox-counter { z-index: 2; }

.lightbox-img {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    user-select: none;
    transition: transform .2s ease;
}

.lightbox-close {
    position: absolute;
    top: 16px; right: 16px;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 38px; height: 38px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 9001;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 9001;
    transition: background .2s;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.3); }
.lightbox-prev[style*="display:none"],
.lightbox-next[style*="display:none"] { display: none !important; }

.lightbox-counter {
    position: absolute;
    bottom: 18px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,.7);
    font-size: .8rem;
    background: rgba(0,0,0,.4);
    padding: 4px 12px;
    border-radius: 20px;
}

/* Make images in detail sheet and cards show a zoom cursor */
.detail-img,
.detail-gallery img,
.price-card img {
    cursor: zoom-in;
}

/* ── Lost & Found floating nav shortcut ──────────────────────────────────*/
.lf-nav-shortcut {
    position: fixed;
    bottom: 70px;          /* vertically centred on the swipe-button row */
    right: 10px;
    z-index: 200;
    background: #931e1e;
    color: #fff;
    border-radius: 14px;
    padding: 4px 9px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .62rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(147,30,30,.35);
    transition: transform .15s ease, box-shadow .15s ease;
    letter-spacing: 0;
    white-space: nowrap;
}

/* On desktop the app container is max-width 480px centered.
   Right edge of container = 50vw - 240px from viewport right.
   We position the button 16px inside that right edge. */
@media (min-width: 480px) {
    .lf-nav-shortcut {
        right: calc(50% - 230px); /* container right edge minus 10px inset */
    }
}

.lf-nav-shortcut:active {
    transform: scale(.95);
    box-shadow: 0 2px 8px rgba(147,30,30,.3);
}

.lf-nav-shortcut i {
    font-size: .6rem;
}

/* ── Tablets: keep swipe buttons + L&F pill directly under the card ── */
@media (min-width: 600px) {
    .swipe-container{
        bottom: auto;
        top: calc(var(--card-top, 260px) + var(--card-area-h) + 8px);
        background: none;
    }
    .lf-nav-shortcut{
        bottom: auto;
        top: calc(var(--card-top, 260px) + var(--card-area-h) + 8px + 15px);
    }
}


/* "i want this" box: say which item the message is about, and hide the next product behind it */
.want-summary{display:flex;align-items:center;gap:10px;background:#fafafa;border:1px solid #eee;border-radius:10px;padding:8px 10px;margin:0 0 10px;text-align:left}
.want-summary img{width:48px;height:48px;object-fit:cover;border-radius:8px;flex-shrink:0;background:#eee}
.want-summary-text{display:flex;flex-direction:column;min-width:0}
.want-summary-text b{font-size:.88rem;color:#222;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.want-summary-text span{font-size:.8rem;color:#777}
body.want-open .card-container{visibility:hidden}

/* services: when the seller is free, and tappable seller names (opens their reviews) */
.avail-line{margin:2px 0 4px;font-size:.74rem;color:#931e1e;font-weight:600}
.avail-line i{margin-right:4px}
.detail-avail{margin:6px 0 2px;font-size:.84rem;color:#931e1e;font-weight:600}
.vendor-name{cursor:pointer}
.vendor-name:not(:empty)::after{content:" ›";opacity:.5}
.card-container[data-mine="true"] .vendor-name{cursor:default}
.card-container[data-mine="true"] .vendor-name::after{content:""}
.detail-seller.tappable{cursor:pointer;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}


/* ── Every card the same height: the text block is a fixed 84px, one line per row ── */
.description-container{ height: 84px; box-sizing: border-box; overflow: hidden; }
.description-container .vendor-name,
.description-container .name,
.description-container .description,
.description-container .avail-line{
    margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35;
}
.description-container .description{ display: flex; gap: 6px; align-items: baseline; }
.description .dtxt{ flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.description .dprice{ flex: none; font-weight: 700; color: #931e1e; }
.description-container .avail-line{ margin-top: 3px; font-size: .74rem; color: #931e1e; font-weight: 600; }
.description-container .card-tags{ flex-wrap: nowrap; overflow: hidden; margin-top: 3px; }


/* ── Flat cards: a thin edge instead of heavy shadows ── */
.price-card{ box-shadow: none; border: 1px solid #e7e2e2; border-bottom: 0; }
.description-container{ box-shadow: none; border: 1px solid #e7e2e2; border-top: 0; }
.stars-badge, .negotiable-badge, .verified-badge{ box-shadow: none; }
.base-container{ box-shadow: none; }

.empty-state{ box-shadow: none !important; border: 1px solid #e7e2e2; }
.swipe-btn{ box-shadow: 0 1px 3px rgba(0,0,0,.12) !important; }

/* "add to wish list" in the i-want-this box */
.wish-btn{
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; margin-top: 10px; padding: 9px 12px;
    background: #fff; color: var(--buttons-color, #800000);
    border: 1.5px solid var(--buttons-color, #800000); border-radius: 8px;
    font-size: .88rem; font-weight: 600; cursor: pointer;
}
.wish-btn:active{ transform: scale(.98); }

/* the "stand in line" shortcut: an outlined, tinted pill with a "new" tag, so it reads as a feature link and never
   looks like a selected (solid red) category */
.btn.stand-btn{ background:#fff4f4; color:#800000; border:1.5px solid #800000; font-weight:700; gap:6px; }
.btn.stand-btn .cat-icon{ color:#800000; }
.btn.stand-btn:hover, .btn.stand-btn.active{ background:#fde8e8; color:#800000; border-color:#800000; }
.btn.stand-btn[hidden]{ display:none; }
