/* listing-detail.css — public listing detail (/listings/{id}).
   Tokens from tokens.css. Dark-mode cue: price flips to neon
   magenta — money is the focal point, draw the eye. */

body.listing-detail-page {
    background:
        radial-gradient(circle at top right, var(--bg-radial) 0, transparent 28rem),
        linear-gradient(180deg, var(--bg-edge) 0%, var(--bg) 50%, var(--bg-edge) 100%);
    color: var(--text);
}
body.listing-detail-page header {
    background: var(--surface);
    border-bottom-color: var(--border);
}
body.listing-detail-page .site-name { color: var(--text); }
body.listing-detail-page header nav a { color: var(--accent); }
body.listing-detail-page main { max-width: 60rem; padding: 2rem 1rem 3rem; }

.flash-error {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    border-radius: 0.75rem;
    color: var(--danger);
    font-size: 0.9rem;
}

.ld-back {
    display: inline-block;
    margin-bottom: 1.25rem;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}
.ld-back:hover { color: var(--accent-dark); }

/* --- Two-column grid (photo + info) ------------------------------ */

.ld-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.ld-photo {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--image-placeholder);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-card);
}
.ld-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ld-photo-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c7b8e6;
}
.ld-photo-empty svg { width: 38%; height: 38%; }

/* --- Info column -------------------------------------------------- */

.ld-info { display: flex; flex-direction: column; gap: 1rem; }
.ld-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: var(--accent-pale);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
}
.ld-badge.cat-food { background: var(--cat-food-bg); color: var(--cat-food-fg); }
.ld-badge.cat-academic { background: var(--cat-academic-bg); color: var(--cat-academic-fg); }
.ld-badge.cat-services { background: var(--cat-services-bg); color: var(--cat-services-fg); }
.ld-badge.cat-lifestyle { background: var(--cat-lifestyle-bg); color: var(--cat-lifestyle-fg); }

.ld-title { margin: 0; font-size: clamp(1.5rem, 3.5vw, 2rem); line-height: 1.2; color: var(--text); }
.ld-price { margin: 0; font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1; }
/* Dark-mode cue: price draws the eye in neon magenta. */
html[data-theme="dark"] .ld-price { color: var(--accent-hot); }

.ld-status-removed {
    align-self: flex-start;
    margin: 0;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 600;
}

/* --- CTA buttons -------------------------------------------------- */

.ld-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ld-cta .inline-form { margin: 0; }
.ld-btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.ld-btn-primary { background: var(--accent); color: var(--text-on-accent); }
.ld-btn-primary:hover { background: var(--accent-dark); }
.ld-btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger-border); }
.ld-btn-danger:hover { background: var(--danger-bg); }
.ld-btn-secondary { background: var(--surface); color: var(--accent); border-color: var(--border); }
.ld-btn-secondary:hover { background: var(--accent-pale); border-color: var(--accent); }

/* --- Seller card -------------------------------------------------- */

.ld-seller {
    margin-top: 0.25rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
}
.ld-seller-line { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.ld-seller-line strong { color: var(--text); font-weight: 600; }

/* --- Description ------------------------------------------------- */

.ld-description-section {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-card);
}
.ld-desc-heading {
    margin: 0 0 0.85rem;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ld-description { color: var(--text); line-height: 1.7; overflow-wrap: anywhere; }

/* --- Contact modal ----------------------------------------------- */

.ld-modal {
    border: none;
    border-radius: 1rem;
    padding: 0;
    background: transparent;
    max-width: 28rem;
    width: 90%;
}
.ld-modal::backdrop { background: rgba(36, 20, 56, 0.55); }
.ld-modal-card {
    padding: 1.75rem;
    background: var(--surface);
    border-radius: 1rem;
    box-shadow: 0 24px 48px rgba(80, 45, 130, 0.18);
}
.ld-modal-card h3 { margin: 0 0 0.65rem; font-size: 1.15rem; color: var(--text); }
.ld-modal-card p { margin: 0 0 1.25rem; color: var(--text-muted); line-height: 1.6; }

.ld-contact-form { display: flex; flex-direction: column; gap: 0.75rem; }
.ld-contact-textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    resize: vertical;
    min-height: 5rem;
    max-height: 14rem;
    box-sizing: border-box;
}
.ld-contact-textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}
.ld-contact-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.ld-btn-cancel {
    background: var(--surface);
    color: var(--accent);
    border: 1px solid var(--border);
}
.ld-btn-cancel:hover { background: var(--accent-pale); border-color: var(--accent); }

/* --- Mobile ------------------------------------------------------- */

@media (max-width: 700px) {
    body.listing-detail-page main { padding: 1.5rem 1rem 2.5rem; }
    .ld-grid { grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
    .ld-title { font-size: 1.5rem; }
    .ld-price { font-size: 1.65rem; }
    .ld-cta { flex-direction: column; }
    .ld-cta > * { width: 100%; }
    .ld-description-section { padding: 1.25rem; }
}
