/* ============================================================
   Ababoa — Design System
   هوية بصرية موحدة لكل صفحات الموقع
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@500;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
    --ink: #1B2A44;
    --ink-soft: #57667D;
    --paper: #F3F5F8;
    --card: #FFFFFF;
    --brand: #3F66B1;
    --brand-dark: #2C4A85;
    --brand-tint: #E8EDF7;
    --teal: #58C1C7;
    --teal-tint: #E4F6F7;
    --accent: #F37521;
    --accent-tint: #FDEADD;
    --gray: #A9A7A8;
    --urgent: #C1443F;
    --line: #DFE3E9;
    --radius-lg: 8px;
    --radius-md: 5px;
    --radius-sm: 3px;
    --shadow: 0 2px 10px rgba(27, 42, 68, 0.07);
    --font-display: 'Cairo', 'IBM Plex Sans Arabic', sans-serif;
}

h1, h2, h3, .logo, .card-title, .fav-btn { font-family: var(--font-display); }

* { box-sizing: border-box; }

html, body { height: 100%; }
body {
    margin: 0;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background: #fff;
    color: var(--ink);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.container, .page-narrow, .page-with-sidebar { flex: 1 0 auto; width: 100%; }
footer { flex-shrink: 0; }

a { color: inherit; }

/* ===== Top Bar ===== */
.topbar {
    position: sticky; top: 0; z-index: 10;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
}
.logo {
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: 21px; color: var(--brand-dark);
    text-decoration: none;
}
.logo img { height: 40px !important; }
.topbar-brand-group { display: flex; align-items: center; gap: 16px; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }

/* روابط نصية بسيطة بدون مربعات */
.nav-link {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
    white-space: nowrap;
}
.nav-link:hover { color: var(--brand); }
.nav-link-active { color: var(--brand); font-weight: 700; }

/* ===== Profile Dropdown ===== */
.profile-dropdown { position: relative; }
.profile-trigger {
    display: flex; align-items: center; gap: 6px;
    background: none; border: none; cursor: pointer;
    padding: 0; font-family: inherit; color: var(--ink);
}
.profile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    max-width: calc(100vw - 32px);
    background: var(--card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    min-width: 180px;
    padding: 8px 0;
    z-index: 20;
}
#notif-menu {
    inset-inline-end: auto;
    inset-inline-start: 50%;
    transform: translateX(-50%);
}
html[dir="rtl"] #notif-menu { transform: translateX(50%); }
@media (max-width: 500px) {
    #notif-menu { inset-inline-start: auto; inset-inline-end: -60px; transform: none; }
}
.profile-menu.open { display: block; }
.profile-menu a {
    display: block; padding: 10px 16px; text-decoration: none;
    color: var(--ink); font-size: 14px;
}
.profile-menu a:hover { background: var(--paper); }
.profile-menu hr { border: none; border-top: 1px solid var(--line); margin: 6px 0; }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: transparent; color: var(--brand-dark); border: 1.5px solid var(--brand); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn:disabled { background: #B7BEB9; cursor: not-allowed; transform: none; }
.btn-text-short { display: none; }

/* ===== Layout ===== */
.container { max-width: 1320px; margin: 0 auto; padding: 24px 32px; }
.page-narrow { max-width: 550px; margin: 0 auto; padding: 30px 20px; }

/* ===== Cards / Grid ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
@media (min-width: 1150px) {
    .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1000px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    body { font-size: 14px; }
    .card-title { font-size: 13.5px; }
    .card-description { font-size: 11.5px; }
    p, label, input, select, textarea, button { font-size: 14px; }
    h2 { font-size: 19px; }
    h3 { font-size: 16px; }
}

/* ===== Form Grid — عمودين للفورمات الطويلة (رفع منتج، إلخ) ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}
.form-grid .field { min-width: 0; }
.form-full { grid-column: 1 / -1; }
@media (max-width: 700px) {
    .form-grid { grid-template-columns: 1fr; }
}

.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(27, 42, 68, 0.14);
    border: 1px solid rgba(0,0,0,0.06);
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card:hover { transform: translateY(-3px); }
.card-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-weight: 600; font-size: 15px; margin: 6px 0; }

.card-meta-row {
    display: flex; gap: 12px;
    margin-bottom: 8px;
}
.card-stat { font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 3px; }

.card-seller-row {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: inherit;
    padding-top: 8px;
}
.card-description {
    font-size: 12.5px;
    color: var(--ink-soft);
    margin: 0 0 8px;
    line-height: 1.5;
}
.card-inner-divider { border: none; border-top: 1px solid rgba(0,0,0,0.2); margin: 6px 0; }
.card-seller-avatar, .card-seller-avatar-placeholder {
    width: 28px; height: 28px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    background: var(--paper);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.card-seller-info { display: flex; flex-direction: column; min-width: 0; }
.card-seller-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-seller-city { font-size: 11px; color: var(--ink-soft); }

.thumb { width: 100%; height: 160px; object-fit: cover; background: var(--paper); display: block; }
.thumb.placeholder {
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-soft); font-size: 13px; font-family: 'IBM Plex Mono', monospace;
}

/* ===== Hover Overlay: كشف "المطلوب في المقابل" عند الهوفر ===== */
.thumb-wrap { position: relative; overflow: hidden; }
.hover-overlay {
    position: absolute; inset: 0;
    background: rgba(27, 42, 68, 0.88);
    color: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 14px;
    opacity: 0; transition: opacity 0.2s ease;
    gap: 6px;
}
.hover-reveal:hover .hover-overlay { opacity: 1; }
.overlay-icon { font-size: 28px; }
.overlay-text { font-size: 13.5px; font-weight: 600; line-height: 1.4; }

/* ===== Badges ===== */
.badge {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11.5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}
.badge-specific { background: var(--accent-tint); color: #A64A0F; }
.badge-open { background: var(--teal-tint); color: #2D7A7F; }

/* ===== Favorite Button (زي زرار أضف للسلة) ===== */
.fav-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1.5px solid var(--line);
    background: var(--card);
    color: var(--ink-soft);
    text-decoration: none;
    white-space: nowrap;
}
.fav-btn:hover { border-color: var(--accent); color: var(--accent); }
.fav-btn-active {
    background: var(--accent-tint);
    border-color: var(--accent);
    color: #A64A0F;
}

/* ===== Notification Bell (Flat) ===== */
.notif-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--ink-soft);
    transition: color 0.15s ease;
}
.notif-bell svg { width: 21px; height: 21px; fill: currentColor; }
.notif-bell:hover { color: var(--brand); }
.notif-count {
    position: absolute;
    top: -6px; left: -8px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ===== Forms ===== */
.panel {
    background: var(--card);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: 0 3px 14px rgba(27, 42, 68, 0.14);
    border: 1px solid rgba(0,0,0,0.06);
}
label { display: block; margin-top: 16px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=email], select, textarea {
    width: 100%;
    padding: 11px 12px;
    margin-top: 6px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14.5px;
    background: var(--paper);
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--brand);
}
small { color: var(--ink-soft); font-size: 12.5px; }
.error-box { color: var(--urgent); background: #FBEAEA; padding: 12px; border-radius: var(--radius-sm); font-size: 14px; }
.success-banner {
    background: var(--brand-tint); color: var(--brand-dark);
    padding: 14px; border-radius: var(--radius-md);
    margin-bottom: 20px; text-align: center; font-weight: 600;
}

/* ===== Empty state ===== */
.empty-state {
    text-align: center; color: var(--ink-soft);
    padding: 70px 20px; font-size: 15px;
}

/* ===== Slideshow (product-view) ===== */
.slideshow {
    position: relative; width: 100%; height: 350px;
    border-radius: var(--radius-lg); overflow: hidden; background: var(--paper);
}
.slideshow img {
    position: absolute; top: 0; right: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0; transition: opacity 0.4s ease;
}
.slideshow img.active { opacity: 1; }
.nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(27,42,68,0.55); color: #fff; border: none;
    width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 18px;
}
.nav-arrow.prev { left: 10px; }
.nav-arrow.next { right: 10px; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); cursor: pointer; border: none; }
.dot.active { background: var(--brand); }

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .container { padding: 16px; }
    .topbar { padding: 12px 16px; }
    .thumb { height: 120px; }
    .btn-text-full { display: none; }
    .btn-text-short { display: inline; }
}

/* ===== Category Icons Strip ===== */
.section-divider { border: none; border-top: 1px solid rgba(0,0,0,0.2); margin: 36px 0; }

.category-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px 6px;
    padding: 4px 2px 12px;
    margin-bottom: 6px;
}
.category-chip {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 4px 4px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 13.8px;
    text-align: center;
}
.category-chip .category-icon {
    background: var(--paper);
    width: 72px; height: 72px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-soft);
}
.category-chip .category-icon svg { width: 30px; height: 30px; }
.category-chip.active .category-icon { background: var(--brand-tint); color: var(--brand); }
.category-chip.active { color: var(--brand-dark); font-weight: 600; }
.category-chip:hover .category-icon { background: var(--brand-tint); color: var(--brand); }

@media (max-width: 700px) {
    .category-chip .category-icon { width: 46px; height: 46px; }
    .category-chip .category-icon svg { width: 20px; height: 20px; }
    .category-chip { font-size: 10.5px; }
}

.overlay-icon svg { width: 26px; height: 26px; color: #fff; }

/* ===== Promo Carousel ===== */
.promo-carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    height: 224px;
    box-shadow: 0 6px 20px rgba(27, 42, 68, 0.12);
}
.promo-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 28px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    overflow: hidden;
}
.promo-slide.active { opacity: 1; transform: translateX(0); pointer-events: auto; }
.promo-pattern { position: absolute; inset: 0; width: 100%; height: 100%; }
.promo-badge {
    position: relative;
    z-index: 1;
    width: 90px; height: 90px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}
.promo-badge svg { width: 54px; height: 54px; }
.promo-text { position: relative; z-index: 1; }
.promo-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
}
.promo-text h3 { color: #fff; font-size: 23px; margin: 0 0 8px; }
.promo-text p { color: rgba(255,255,255,0.92); font-size: 15px; margin: 0; max-width: 460px; }
.promo-dots {
    position: absolute;
    bottom: 12px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px;
    z-index: 2;
}
.promo-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s;
}
.promo-dot.active { background: #fff; }
@media (max-width: 600px) {
    .promo-carousel { height: 190px; }
    .promo-slide { flex-direction: column; text-align: center; align-items: center; gap: 8px; padding: 16px 20px 28px; }
    .promo-badge { width: 58px; height: 58px; }
    .promo-badge svg { width: 34px; height: 34px; }
    .promo-text h3 { font-size: 15px; }
    .promo-text p { font-size: 12px; }
}

/* ===== Search + Radius Filter ===== */
.search-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.search-input-group {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 250px;
}
.search-input {
    flex: 1;
    min-width: 150px;
    padding: 11px 16px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14.5px;
    background: var(--card);
}
.search-input:focus { outline: none; border-color: var(--brand); }
.radius-filter {
    display: flex; flex-direction: column; gap: 2px;
    font-size: 12px; color: var(--ink-soft);
    min-width: 140px;
}
.radius-filter input[type="range"] { width: 100%; accent-color: var(--brand); }
@media (max-width: 600px) {
    .search-input-group { width: 100%; }
    .radius-filter { width: 100%; }
}

/* ===== Grid Banners ===== */
.grid-banner {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--brand-tint);
    color: var(--brand-dark);
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 14.5px;
    text-align: center;
}
.banner-icon { font-size: 20px; }

/* ===== Sidebar (ديسكتوب بس) — الشريط على هامش الشاشة الحقيقي ===== */
.page-with-sidebar {
    display: flex;
    gap: 28px;
    width: 100%;
    padding: 24px 32px;
    align-items: flex-start;
    box-sizing: border-box;
}
.page-with-sidebar > .main-column { flex: 1; min-width: 0; }
.sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 84px;
    margin-top: 46px;
}
.sidebar-box {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow);
}
.sidebar-box h4 { margin: 0 0 12px; font-size: 14px; }
.sidebar-stat-row {
    display: flex; justify-content: space-between;
    font-size: 13px; padding: 6px 0;
    border-bottom: 1px solid var(--line);
}
.sidebar-stat-row:last-child { border-bottom: none; }
.match-products-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    margin: 10px 0 8px;
}
.match-product-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--ink);
    width: 90px;
}
.match-product-circle-wrap {
    width: 64px; height: 64px;
    border-radius: 50%;
    border: 2px solid var(--line);
    padding: 2px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.match-product-col.mine .match-product-circle-wrap { border: 2.5px solid var(--brand); }
.match-product-circle-wrap img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.match-product-placeholder {
    width: 100%; height: 100%; border-radius: 50%; background: var(--paper);
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.match-product-name {
    font-weight: 600; font-size: 12px;
    text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 90px;
}
.match-swap-icon { flex-shrink: 0; margin-top: 22px; color: var(--brand); }
.match-swap-icon svg { width: 22px; height: 22px; }

.hidden-block { display: none; }

.account-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.account-info-cell {
    display: flex; flex-direction: column; gap: 4px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}
.account-info-cell:nth-last-child(-n+2) { border-bottom: none; }
@media (max-width: 600px) {
    .account-info-grid { grid-template-columns: 1fr; }
    .account-info-cell:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
    .account-info-cell:last-child { border-bottom: none; }
}

.nav-tabs {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}
.nav-tab {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink-soft);
    background: var(--paper);
}
.nav-tab.active { background: var(--brand); color: #fff; }

.wanted-banner {
    background: var(--brand-tint);
    padding: 28px 20px;
    border-radius: var(--radius-lg);
    margin: 32px 0 12px;
    border: 1px solid var(--line);
}
.wanted-banner-title { text-align: center; margin: 0 0 6px; }
.wanted-banner-subtitle { text-align: center; color: var(--ink-soft); font-size: 13.5px; margin: 0 0 20px; }
.wanted-card { background: var(--card); }
.wanted-card-placeholder {
    height: 160px;
    display: flex; align-items: center; justify-content: center;
    background: var(--paper);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin-bottom: 8px;
}
.wanted-card-placeholder-circle {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--brand-tint);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand);
}
.wanted-card-placeholder svg { width: 30px; height: 30px; }
@media (max-width: 600px) {
    .wanted-card-placeholder { height: 110px; }
    .wanted-card-placeholder-circle { width: 48px; height: 48px; }
    .wanted-card-placeholder svg { width: 22px; height: 22px; }
}

.wanted-slider-viewport {
    position: relative;
    padding: 0 40px;
}
.wanted-slider-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}
.wanted-slide {
    flex: 0 0 140px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: var(--shadow);
}
.wanted-slide-img {
    width: 100%; height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    background: var(--paper);
}
.wanted-slide-placeholder {
    display: flex; align-items: center; justify-content: center;
    color: var(--brand);
}
.wanted-slide-placeholder svg { width: 28px; height: 28px; }
.wanted-slide-title { font-size: 12.5px; font-weight: 600; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wanted-slide-desc { font-size: 11px; color: var(--ink-soft); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wanted-slider-arrow {
    position: absolute;
    top: 40px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: var(--shadow);
    font-size: 18px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.wanted-slider-arrow.prev { left: 0; }
.wanted-slider-arrow.next { right: 0; }

@media (max-width: 600px) {
    .wanted-slider-viewport { padding: 0 10px; }
    .wanted-slider-arrow { display: none; }
    .wanted-slider-track {
        display: grid;
        grid-auto-flow: column;
        grid-template-rows: repeat(2, auto);
        gap: 10px;
    }
    .wanted-slide { flex: none; width: 110px; }
    .wanted-slide-img { height: 60px; }
}

.page-header-banner {
    text-align: center;
    padding: 32px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    color: #fff;
}
.page-header-banner h2 { margin: 0 0 6px; color: #fff; }
.page-header-banner p { margin: 0; color: rgba(255,255,255,0.85); font-size: 13.5px; }
.page-header-banner.tone-brand { background: linear-gradient(120deg, #2D4A85 0%, #3F66B1 100%); }
.page-header-banner.tone-teal { background: linear-gradient(120deg, #2D7A7F 0%, #58C1C7 100%); }
.page-header-banner.tone-slate { background: linear-gradient(120deg, #3A4657 0%, #5C6B80 100%); }
.page-header-banner.tone-dark { background: linear-gradient(120deg, #262E3D 0%, #3E4A5C 100%); }
@media (max-width: 600px) {
    .page-header-banner { padding: 24px 16px; }
    .page-header-banner h2 { font-size: 19px; }
    .page-header-banner p { font-size: 12.5px; }
}

.product-check { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.product-check label { display: inline; font-weight: normal; margin: 0; }

.want-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 3px 14px rgba(27, 42, 68, 0.14);
    border: 1px solid rgba(0,0,0,0.06);
}

.hint-box {
    background: var(--brand-tint);
    color: var(--ink);
    font-size: 13px;
    line-height: 1.6;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    margin: 10px 0 0;
}

.sidebar-hint {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    font-size: 11.5px;
    color: var(--ink-soft);
    line-height: 1.6;
}
.sidebar-suggestion {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: var(--ink);
    padding: 6px 0; font-size: 13px;
    border-bottom: 1px solid var(--line);
}
.sidebar-suggestion:last-child { border-bottom: none; }
.sidebar-suggestion img, .sidebar-suggestion-placeholder {
    width: 36px; height: 36px; border-radius: 8px; object-fit: cover;
    background: var(--paper); flex-shrink: 0;
}

.site-footer {
    margin-top: 48px;
    padding: 36px 20px 24px;
    background: var(--paper);
    border-top: 1px solid rgba(0,0,0,0.08);
}
.footer-inner { max-width: 560px; margin: 0 auto; text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; }
.footer-brand-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--brand); }
.footer-slogan { font-weight: 600; color: var(--ink); font-size: 15px; margin: 0 0 6px; }
.footer-tagline { color: var(--ink-soft); font-size: 13px; margin: 0 0 20px; line-height: 1.6; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 18px; font-size: 13px; }
.footer-links a { color: var(--ink-soft); }
.footer-bottom {
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.08);
    color: var(--ink-soft);
    font-size: 12px;
}
.footer-bottom a { color: var(--ink-soft); text-decoration: underline; }
.footer-dot { margin: 0 6px; }
.want-edit-form { display: none; background: var(--paper); padding: 12px; border-radius: var(--radius-md); }
.want-edit-form.open { display: block; }

.empty-state-box {
    text-align: center;
    padding: 48px 24px;
    color: var(--ink-soft);
}
.empty-state-box .icon { font-size: 40px; margin-bottom: 12px; opacity: 0.6; }
.empty-state-box h3 { color: var(--ink-soft); font-weight: 600; margin: 0 0 6px; }
.empty-state-box p { color: var(--ink-soft); margin: 0 0 18px; font-size: 14px; }

.sidebar-promo-banner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 10px;
    min-height: 260px;
    padding: 24px 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, #2D4A85 0%, #3F66B1 60%, #4E7BC7 100%);
    text-decoration: none;
    overflow: hidden;
}
.sidebar-promo-banner svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sidebar-promo-icon { position: relative; font-size: 34px; }
.sidebar-promo-text { position: relative; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.5; max-width: 190px; }
.sidebar-promo-cta {
    position: relative;
    color: #fff; font-size: 12.5px; font-weight: 600;
    background: rgba(255,255,255,0.18);
    padding: 6px 14px; border-radius: 20px;
    margin-top: 4px;
}

@media (max-width: 800px) {
    .page-with-sidebar { flex-direction: column; padding: 16px; }
    .sidebar { display: none; }
}

/* ===== Cards Grid — 3 أعمدة ثابتة على الديسكتوب ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (min-width: 1150px) {
    .cards-grid { grid-template-columns: repeat(4, 1fr); }
}
.cards-grid > * { margin-bottom: 0 !important; }

@media (max-width: 1000px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .cards-grid { grid-template-columns: 1fr; }
    .wanted-listing-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
