/* -----------------------
   General Variables
------------------------ */
:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --primary: #2d8cff;
    --muted: #7b8a93;
    --vip: #ffd966;
    --danger: #ff4d4f;
    --border-radius: 10px;
    --shadow: 0 6px 12px rgba(0,0,0,0.08);
    --font: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

/* -----------------------
   Global Styles
------------------------ */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    margin: 0;
    background: var(--bg);
    color: #111;
}

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

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

/* -----------------------
   Header & Navigation
------------------------ */
.header-bar {
    background: var(--card);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.header-bar h1 {
    margin: 0;
    font-size: 20px;
}

.nav-links a {
    margin-left: 12px;
    color: var(--muted);
    font-weight: 500;
}

/* -----------------------
   Buttons & Inputs
------------------------ */
.btn {
    background: var(--primary);
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

input, select, textarea {
    padding: 10px;
    border-radius: var(--border-radius);
    border: 1px solid #d7e3ef;
    width: 100%;
    font-size: 14px;
}

/* -----------------------
   Search Bar
------------------------ */
.top-search {
    margin: 16px 0;
    display: flex;
    gap: 10px;
}

/* -----------------------
   Announcement Cards
------------------------ */
.card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.card {
    background: var(--card);
    border-radius: var(--border-radius);
    padding: 12px;
    width: 320px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
}

.card .title {
    font-weight: 600;
    margin-top: 8px;
}

.card .price {
    color: var(--primary);
    font-weight: 600;
}

.card .small {
    font-size: 0.85em;
    color: var(--muted);
}

.vip {
    border: 2px solid var(--vip);
}

/* -----------------------
   Chat & Inbox
------------------------ */
.chat-modal {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 420px;
    height: 520px;
    background: var(--card);
    border-radius: var(--border-radius);
    box-shadow: 0 12px 36px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 12px;
    border-bottom: 1px solid #eef3f8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-body {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(180deg,#f7fbff,transparent);
}

.msg {
    max-width: 75%;
    padding: 10px;
    border-radius: var(--border-radius);
    line-height: 1.3;
    word-wrap: break-word;
}

.msg.sent {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.msg.recv {
    background: #fff;
    border: 1px solid #e6eef6;
    color: #111;
    align-self: flex-start;
}

.msg .time {
    display: block;
    font-size: 0.75em;
    color: #6f7f89;
    margin-top: 6px;
    text-align: right;
}

.chat-input {
    padding: 10px;
    border-top: 1px solid #eef3f8;
    display: flex;
    gap: 8px;
}

.chat-input textarea {
    flex: 1;
    padding: 8px;
    border-radius: var(--border-radius);
    border: 1px solid #dfeaf6;
    resize: none;
    height: 44px;
}

.chat-input button {
    padding: 10px;
    border-radius: var(--border-radius);
    border: none;
    background: var(--primary);
    color: #fff;
}

/* Inbox conversation list */
.convos {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.convo {
    background: var(--card);
    padding: 10px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: 1px solid #eef3f8;
}

.convo:hover {
    box-shadow: var(--shadow);
}

.convo .meta {
    flex: 1;
}

.badge {
    background: var(--danger);
    color: #fff;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.8em;
}

/* -----------------------
   Responsive
------------------------ */
@media(max-width: 700px){
    .chat-modal {
        width: 100%;
        height: 60vh;
        right: 0;
        bottom: 0;
        border-radius: 12px 12px 0 0;
    }
    .card {
        width: 100%;
    }
}
.contact-seller {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-seller textarea {
    width: 100%;
    height: 80px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #d7e3ef;
    resize: none;
    font-family: var(--font);
}

.contact-seller button {
    width: 120px;
    padding: 8px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}

.contact-seller button:hover {
    opacity: 0.9;
}

/* === VIP DESIGN === */
.vip-badge {
    background: linear-gradient(90deg, #ffd700, #ffcc33, #e6b800);
    color: #000;
    font-weight: bold;
    padding: 6px 14px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 10px;
    box-shadow: 0 0 10px rgba(212,175,55,0.5);
    letter-spacing: 0.5px;
}

.vip-border {
    border: 2px solid #d4af37 !important;
    box-shadow: 0 0 20px rgba(212,175,55,0.4);
    border-radius: 12px;
    padding: 15px;
    background: #fffef5;
}

.vip-title {
    color: #d4af37;
    text-shadow: 0 0 8px rgba(212,175,55,0.4);
}