/* ==========================================================================
   سوقنا — Ivory Minimal Theme
   Marketplace CSS v3.0 — Redesign
   Palette: ink / paper / emerald accent / antique gold
   ========================================================================== */

/* ===== CSS Custom Properties ===== */
:root {
    /* Ink (text) */
    --ink-900: #14171F;
    --ink-700: #4B4F58;
    --ink-500: #7C7F87;
    --ink-300: #A9ACB2;
    --ink-100: #D8D7D2;

    /* Paper (surfaces) */
    --paper: #FFFFFF;
    --paper-soft: #FAF9F6;
    --paper-deep: #F3F1EB;

    /* Hairlines */
    --line: #E7E4DC;
    --line-soft: #F0EEE7;

    /* Emerald accent (primary interactive) */
    --accent-50:  #EAF3EE;
    --accent-100: #D2E6DA;
    --accent-400: #2F8A64;
    --accent-500: #0E6B4C;
    --accent-600: #0A5A40;
    --accent-700: #084832;

    /* Antique gold (signature / price emphasis) */
    --gold-50:  #FBF5E6;
    --gold-300: #D9BB78;
    --gold-500: #B8923F;
    --gold-600: #96742E;

    /* Semantic */
    --success-bg: #EDF5EC;
    --success-text: #2E6B37;
    --success-border: #CFE3CC;
    --danger-bg: #FBEDEC;
    --danger-text: #A3372A;
    --danger-border: #F0CFC9;
    --warning-bg: #FBF3E4;
    --warning-text: #8A6420;
    --warning-border: #EEDFB8;

    /* Functional aliases (kept for compatibility with existing markup) */
    --primary: var(--accent-500);
    --primary-50: var(--accent-50);
    --primary-100: var(--accent-100);
    --primary-200: var(--accent-100);
    --primary-300: var(--accent-400);
    --primary-400: var(--accent-400);
    --primary-500: var(--accent-500);
    --primary-600: var(--accent-500);
    --primary-700: var(--accent-600);
    --primary-800: var(--accent-700);
    --primary-900: var(--accent-700);
    --primary-dark: var(--accent-700);
    --primary-light: var(--accent-400);
    --accent-500b: var(--gold-500);
    --accent-600b: var(--gold-600);

    --gray-50: var(--paper-soft);
    --gray-100: var(--line-soft);
    --gray-200: var(--line);
    --gray-300: var(--ink-100);
    --gray-400: var(--ink-300);
    --gray-500: var(--ink-500);
    --gray-600: var(--ink-700);
    --gray-700: var(--ink-700);
    --gray-800: var(--ink-900);
    --gray-900: var(--ink-900);

    --bg-body: var(--paper-soft);
    --bg-card: var(--paper);
    --text-primary: var(--ink-900);
    --text-secondary: var(--ink-500);
    --text-light: var(--ink-300);
    --border-color: var(--line);

    --shadow-sm: 0 1px 2px rgba(20, 23, 31, 0.05);
    --shadow-md: 0 6px 16px rgba(20, 23, 31, 0.06);
    --shadow-lg: 0 14px 34px rgba(20, 23, 31, 0.08);
    --shadow-xl: 0 24px 48px rgba(20, 23, 31, 0.10);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.75;
    font-size: 15px;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ===== Container ===== */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ===== Utility Classes ===== */
.text-primary { color: var(--accent-500) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-white { color: #ffffff !important; }
.bg-primary { background-color: var(--accent-500) !important; }
.bg-white { background-color: var(--bg-card) !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }

/* ===== Top Bar / Header ===== */
.top-bar {
    background: var(--paper);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--line);
    box-shadow: none;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink-900);
    letter-spacing: 0.3px;
}

.logo a { text-decoration: none; }

.nav-links { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

.nav-links a:not(.btn) {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
}

.nav-links a:not(.btn):hover { color: var(--accent-500); background: var(--accent-50); }

.user-name { color: var(--text-secondary); font-size: 0.9rem; font-weight: 600; padding: 0.5rem 0.75rem; }
.user-name strong { color: var(--accent-500); }

/* ===== Buttons ===== */
.btn {
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-500);
    color: #ffffff !important;
    box-shadow: none;
}
.btn-primary:hover { background: var(--accent-600); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
    border: 1.5px solid var(--ink-900);
    color: var(--ink-900) !important;
    background: transparent;
}
.btn-outline:hover { background: var(--ink-900); color: #ffffff !important; transform: translateY(-1px); }

.btn-google {
    background: #ffffff !important;
    color: var(--ink-700) !important;
    border: 1px solid var(--line) !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}
.btn-google:hover { background: var(--paper-soft) !important; transform: translateY(-1px); }
.btn-google svg { margin-left: 10px; }

.btn-danger { background: #B5453A; color: #ffffff !important; }
.btn-danger:hover { background: #96392F; transform: translateY(-1px); }

.btn-success { background: var(--accent-500); color: #ffffff !important; }
.btn-success:hover { background: var(--accent-600); transform: translateY(-1px); }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; }

/* ===== Hero Section ===== */
.hero-section {
    background: var(--paper);
    padding: 4.5rem 0 3.5rem;
    color: var(--text-primary);
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line-soft);
}

.hero-section > .container { position: relative; z-index: 1; }
.hero-section h2 { display: none; }
.hero-section > .container > p { display: none; }

/* ===== Search Container ===== */
.search-container {
    background: var(--paper);
    padding: 6px;
    border: 1.5px solid var(--ink-900);
    border-radius: var(--radius-lg);
    display: flex;
    max-width: 680px;
    margin: 0 auto 2rem;
    box-shadow: none;
}

.search-container input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-primary);
}
.search-container input::placeholder { color: var(--ink-300); }

.search-container button {
    background: var(--ink-900);
    color: #ffffff;
    border: none;
    padding: 0.4rem 1.4rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    align-self: center;
    margin-top: -4px;
}
.search-container button:hover { background: var(--accent-600); }

/* ===== Section Title (signature: hairline + gold dot) ===== */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif !important;
    margin-bottom: 1.75rem;
    position: relative;
    padding-bottom: 1rem;
    color: var(--ink-900);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}
.section-title i {
    color: #f97316;
    font-size: 0.85em;
}
.section-title-icon {
    width: 2.1em;
    height: 2.1em;
    object-fit: contain;
    flex-shrink: 0;
    position: relative;
    top: -4px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 46px;
    height: 2px;
    background: var(--gold-500);
}
.section-title::before {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 50px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-500);
}

/* ===== Product Grid ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
    margin-bottom: 3rem;
}

/* ===== Product Card ===== */
.product-card {
    background: var(--paper);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: none;
    border: 1px solid var(--line);
    transition: var(--transition);
    position: relative;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--ink-100);
}

.product-image { width: 100%; height: 220px; object-fit: cover; transition: var(--transition); }
.product-card:hover .product-image { transform: scale(1.02); }
.product-image-wrapper { overflow: hidden; position: relative; }
.product-content { padding: 1.4rem; }

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold-600);
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--ink-900);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line-soft);
}

.product-card .btn { width: 100%; }
/* ==========================================================================
   Clean Auth Forms — Thin inputs, elegant slim back button
   ========================================================================== */

.auth-clean-page {
    min-height: 100vh;
    background: #fafafa;
    padding: 5rem 1.5rem 2.5rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
}

.auth-clean-wrap {
    width: 100%;
    max-width: 500px;
}

/* ===== Back button — slim elegant chevron ===== */
.auth-clean-back {
    position: fixed;
    top: 1.4rem;
    left: 1.4rem;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #ececec;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.auth-clean-back:hover {
    background: #C2410C;
    border-color: #C2410C;
    color: #fff;
    transform: translateX(-3px);
    box-shadow: 0 6px 16px rgba(194, 65, 12, 0.3);
}

.auth-clean-back:active {
    transform: translateX(0);
}

.auth-clean-back svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* ===== Logo ===== */
.auth-clean-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 2.2rem;
}

.auth-clean-logo img {
    height: 68px;
    width: auto;
    display: block;
}

/* ===== Form ===== */
.auth-clean-form {
    display: flex;
    flex-direction: column;
    gap: 1.55rem;
}

.form-field {
    position: relative;
    margin-top: 12px;
}

.form-field label {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #f0f0f0;
    color: #333;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 3px 15px;
    border-radius: 5px;
    line-height: 1.4;
    z-index: 2;
    white-space: nowrap;
}

/* === THIN inputs === */
.form-field input {
    width: 100%;
    padding: 11px 18px;
    border: 1.5px solid #e6e6e6;
    border-radius: 8px;
    background: #fdfdfd;
    font-family: inherit;
    font-size: 0.95rem;
    color: #14171F;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    height: 48px;
    line-height: 1.2;
}

.form-field input:focus {
    border-color: #C2410C;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.08);
}

.form-field input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 40px #fff inset;
    -webkit-text-fill-color: #14171F;
}

/* ===== Forgot link ===== */
.auth-clean-forgot {
    display: flex;
    justify-content: flex-start;
    margin-top: -0.5rem;
}

.auth-clean-forgot a {
    color: #C2410C;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-clean-forgot a:hover {
    text-decoration: underline;
}

/* ===== Primary button (thin) ===== */
.auth-clean-btn {
    width: 100%;
    padding: 0.95rem;
    border: none;
    border-radius: 8px;
    background: #C2410C;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    height: 50px;
    letter-spacing: 0.2px;
    margin-top: 0.3rem;
}

.auth-clean-btn:hover {
    background: #9A3412;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(194, 65, 12, 0.25);
}

.auth-clean-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ===== Footer ===== */
.auth-clean-footer {
    text-align: center;
    margin-top: 1.9rem;
    font-size: 0.92rem;
    color: #666;
}

.auth-clean-footer a {
    color: #C2410C;
    font-weight: 700;
    text-decoration: none;
}

.auth-clean-footer a:hover {
    text-decoration: underline;
}

/* ===== Alerts ===== */
.auth-clean-alert {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 1.4rem;
    text-align: center;
    line-height: 1.6;
}

.auth-clean-alert-danger {
    background: #FBEDEC;
    color: #A3372A;
    border: 1px solid #F0CFC9;
}

.auth-clean-alert-success {
    background: #FDF2E9;
    color: #9A3412;
    border: 1px solid #F5C9B0;
}

/* ===== Divider ===== */
.auth-clean-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.4rem 0 1rem;
    color: #888;
    font-size: 0.85rem;
}

.auth-clean-divider::before,
.auth-clean-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e6e6e6;
}

/* ===== Google button ===== */
.auth-clean-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1.5px solid #e6e6e6;
    background: #fff;
    color: #14171F;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
    height: 48px;
}

.auth-clean-google:hover {
    background: #f7f7f7;
    border-color: #d5d5d5;
    transform: translateY(-1px);
}

.auth-clean-google svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 480px) {
    .auth-clean-page {
        padding: 4.5rem 1.25rem 1.5rem;
    }
    .auth-clean-back {
        top: 1rem;
        left: 1rem;
        width: 40px;
        height: 40px;
    }
    .auth-clean-logo img {
        height: 60px;
    }
    .auth-clean-wrap {
        max-width: 100%;
    }
}
/* ===== Empty State ===== */
.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--paper);
    border-radius: var(--radius-lg);
    border: 1.5px dashed var(--line);
}
.empty-state p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
.empty-state .btn { display: inline-flex; width: auto; }

/* ===== Auth Pages (Login / Register) ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper-soft);
    padding: 2rem;
}

.auth-card {
    background: var(--paper);
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: var(--gold-500);
}

.auth-card h2 { text-align: center; font-size: 1.7rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--ink-900); }
.auth-card .auth-subtitle { text-align: center; color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }
.auth-card form { display: flex; flex-direction: column; gap: 1.25rem; }
.auth-card .form-group { margin-bottom: 0; }
.auth-card .btn { width: 100%; padding: 0.85rem; font-size: 1rem; margin-top: 0.5rem; }

.auth-footer { text-align: center; margin-top: 1.5rem; color: var(--text-secondary); font-size: 0.9rem; }
.auth-footer a { color: var(--accent-500); font-weight: 700; }
.auth-footer a:hover { color: var(--accent-600); text-decoration: underline; }

/* ===== Welcome Modal (after login / register) ===== */
.welcome-overlay {
    position: fixed; inset: 0;
    background: rgba(20, 23, 31, 0.5);
    z-index: 20000;
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
    animation: welcomeFadeIn 0.25s ease;
}
.welcome-overlay.closing { animation: welcomeFadeOut 0.2s ease forwards; }
@keyframes welcomeFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes welcomeFadeOut { from { opacity: 1; } to { opacity: 0; } }

.welcome-modal {
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem 1.75rem;
    max-width: 340px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: welcomePop 0.3s ease;
}
@keyframes welcomePop {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.welcome-logo { width: 60px; height: 60px; border-radius: var(--radius-md); object-fit: cover; margin: 0 auto 1rem; display: block; }
.welcome-modal h3 { font-size: 1.15rem; font-weight: 700; color: var(--ink-900); margin: 0 0 0.5rem; }
.welcome-modal p { font-size: 0.9rem; color: var(--ink-500); margin: 0 0 1.25rem; line-height: 1.5; }

.welcome-btn {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: var(--radius-md);
    background: var(--ink-900);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: none;
    transition: var(--transition);
    font-family: inherit;
}
.welcome-btn:hover { background: var(--accent-600); }

/* ===== Mobile-Style Auth Screens (Login / Register / Verify / Forgot Password) ===== */
.mobile-auth-page {
    --auth-bg: #FAF9F6;
    --auth-card: #FFFFFF;
    --auth-border: #E7E4DC;
    --auth-text: #14171F;
    --auth-muted: #7C7F87;
    --auth-accent: #0E6B4C;
    --auth-accent-dark: #084832;
    --auth-accent-soft: rgba(14, 107, 76, 0.08);
    --auth-input-bg: #F6F5F1;

    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: var(--auth-bg);
    padding: 3.25rem 1.5rem 1.5rem;
    font-family: 'Tajawal', sans-serif;
}

.mobile-auth-card {
    background: var(--auth-card);
    width: 100%;
    max-width: 400px;
    max-height: 100%;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--auth-border);
    padding: 2.75rem 1.75rem 1.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    display: flex;
    flex-direction: column;
    font-family: inherit;
}

.mobile-auth-back-row { display: flex; margin-bottom: 1.5rem; }
.mobile-auth-back {
    position: fixed; top: 1.35rem; left: 1.35rem;
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--auth-text); text-decoration: none;
    transition: var(--transition); z-index: 50;
}
.mobile-auth-back:hover { background: var(--auth-accent-soft); border-color: var(--auth-accent); }
.mobile-auth-back svg { width: 17px; height: 17px; }

.mobile-auth-hero { display: flex; justify-content: center; margin-top: 0; margin-bottom: 1rem; flex-shrink: 0; }
.mobile-auth-hero img { width: 100%; max-width: 190px; max-height: 120px; object-fit: contain; }

.mobile-auth-title { font-size: 1.4rem; font-weight: 700; text-align: center; color: var(--auth-text); margin-bottom: 0.35rem; flex-shrink: 0; }
.mobile-auth-subtitle { text-align: center; color: var(--auth-muted); font-size: 0.85rem; margin-bottom: 0.85rem; line-height: 1.4; flex-shrink: 0; }

.mobile-auth-card form { display: flex; flex-direction: column; gap: 1.1rem; flex-shrink: 0; }
.mobile-form-group { margin-bottom: 0; }
.mobile-form-group label { display: block; font-weight: 700; font-size: 0.82rem; color: var(--auth-text); margin-bottom: 0.4rem; }

.mobile-input-wrap { position: relative; }
.mobile-input-icon { position: absolute; top: 50%; right: 0.95rem; transform: translateY(-50%); color: var(--auth-accent); font-size: 0.95rem; opacity: 0.8; pointer-events: none; z-index: 1; }
.mobile-form-control.has-icon { padding-right: 2.6rem; }

.mobile-form-control {
    width: 100%;
    padding: 0.6rem 0.95rem;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--radius-sm);
    background: var(--auth-input-bg);
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--auth-text);
    outline: none;
    transition: var(--transition);
}
.mobile-form-control::placeholder { color: var(--auth-muted); }
.mobile-form-control:focus { border-color: var(--auth-accent); background: #fff; box-shadow: 0 0 0 3px var(--auth-accent-soft); }
.mobile-input-wrap .mobile-form-control.has-toggle { padding-left: 3rem; }

.mobile-password-toggle {
    position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--auth-muted);
    display: flex; align-items: center; justify-content: center; padding: 2px;
    transition: var(--transition);
}
.mobile-password-toggle:hover { color: var(--auth-accent); }
.mobile-password-toggle svg { width: 18px; height: 18px; }
.mobile-password-toggle i { font-size: 1.05rem; line-height: 1; }

.mobile-form-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; }
.mobile-checkbox-label { display: flex; align-items: center; gap: 0.5rem; color: var(--auth-muted); cursor: pointer; }
.mobile-checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--auth-accent); cursor: pointer; }

.mobile-forgot-link { color: var(--auth-accent); font-weight: 700; text-decoration: none; }
.mobile-forgot-link:hover { text-decoration: underline; }

.mobile-btn-primary {
    width: 100%;
    padding: 0.65rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--auth-accent);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
    transition: var(--transition);
    flex-shrink: 0;
}
.mobile-btn-primary:hover { background: var(--auth-accent-dark); transform: translateY(-1px); }
.mobile-btn-primary:active { transform: translateY(0); }
.mobile-btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.mobile-auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.1rem 0; color: var(--auth-muted); font-size: 0.85rem; flex-shrink: 0; }
.mobile-auth-divider::before, .mobile-auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--auth-border); }

.mobile-btn-google {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    padding: 0.6rem; border-radius: var(--radius-sm); border: 1.5px solid var(--auth-border);
    background: #fff; color: var(--auth-text); font-weight: 700; font-size: 0.85rem;
    text-decoration: none; transition: var(--transition); flex-shrink: 0;
}
.mobile-btn-google:hover { background: var(--auth-input-bg); }

.mobile-auth-footer { text-align: center; margin-top: 1.6rem; padding-top: 0; color: var(--auth-muted); font-size: 0.9rem; flex-shrink: 0; }
.mobile-auth-footer a { color: var(--auth-accent); font-weight: 700; text-decoration: none; }
.mobile-auth-footer a:hover { text-decoration: underline; }

.mobile-otp-row { display: flex; justify-content: center; gap: 0.65rem; direction: ltr; }
.mobile-otp-box {
    width: 44px; height: 52px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--auth-border); background: var(--auth-input-bg);
    text-align: center; font-size: 1.35rem; font-weight: 700; color: var(--auth-text);
    outline: none; transition: var(--transition);
}
.mobile-otp-box:focus { border-color: var(--auth-accent); background: #fff; box-shadow: 0 0 0 3px var(--auth-accent-soft); }

.mobile-resend-row { text-align: center; font-size: 0.88rem; color: var(--auth-muted); }
.mobile-resend-row button { background: none; border: none; color: var(--auth-accent); font-weight: 700; cursor: pointer; font-size: 0.88rem; padding: 0; font-family: inherit; }
.mobile-resend-row button:hover { text-decoration: underline; }

.mobile-alert { padding: 0.9rem 1.1rem; border-radius: var(--radius-md); font-weight: 600; font-size: 0.85rem; margin-bottom: 1.25rem; text-align: center; flex-shrink: 0; }
.mobile-alert.mobile-alert-success { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.mobile-alert.mobile-alert-danger { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }

.mobile-auth-brand { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.mobile-auth-brand img { height: 34px; width: 34px; border-radius: var(--radius-sm); object-fit: cover; }
.mobile-auth-brand span { font-size: 1.35rem; font-weight: 700; color: var(--auth-accent); font-family: 'Tajawal', sans-serif; }

.auth-segment-wrap { position: relative; margin-bottom: 1.75rem; }
.auth-segment { position: relative; display: flex; background: var(--auth-input-bg); border: 1px solid var(--auth-border); border-radius: var(--radius-md); padding: 4px; gap: 4px; }
.auth-segment-indicator { position: absolute; bottom: -6px; height: 2px; background: var(--gold-500); transition: left 0.3s ease, width 0.3s ease; }
.auth-segment button { flex: 1; border: none; background: transparent; padding: 0.65rem 0; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.9rem; color: var(--auth-muted); cursor: pointer; transition: var(--transition); font-family: inherit; }
.auth-segment button.active { background: #fff; color: var(--accent-500); box-shadow: var(--shadow-sm); }

.auth-tab-panel { display: none; }
.auth-tab-panel.active { display: block; }

@media (max-width: 480px) {
    .mobile-auth-card { border-radius: 0; padding: 2.5rem 1.25rem 1.25rem; box-shadow: none; border: none; }
    .mobile-auth-page { padding-top: 1.5rem; background: #fff; }
}

/* ===== Form Styles ===== */
.form-card {
    background: var(--paper);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 680px;
    margin: 3rem auto;
    border: 1px solid var(--line);
}

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 700; color: var(--ink-700); font-size: 0.9rem; }

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-md);
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
    background: var(--paper-soft);
}
.form-control:focus { border-color: var(--accent-500); background: var(--paper); box-shadow: 0 0 0 3px var(--accent-50); }
.form-control::placeholder { color: var(--ink-300); }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%237C7F87' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 18px;
    padding-left: 3rem;
}
textarea.form-control { resize: vertical; min-height: 100px; }
input[type="file"].form-control { padding: 0.6rem; cursor: pointer; }

/* ===== Alert Messages ===== */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-md); font-weight: 600; font-size: 0.9rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.alert-success { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.alert-danger { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }

/* ===== Product Details Page ===== */
.product-detail-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    background: var(--paper);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
}

.product-gallery img { width: 100%; border-radius: var(--radius-md); box-shadow: none; height: 440px; object-fit: cover; border: 1px solid var(--line-soft); }
.product-info-detailed { display: flex; flex-direction: column; gap: 1.5rem; }

.city-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: var(--accent-50); color: var(--accent-600);
    padding: 0.4rem 1.2rem; border-radius: var(--radius-full);
    font-size: 0.85rem; font-weight: 700; width: fit-content;
}

.product-info-detailed h1 { font-size: 1.9rem; font-weight: 700; color: var(--ink-900); line-height: 1.4; }

.product-price-large { font-size: 2.1rem; font-weight: 700; color: var(--gold-600); }

.description-box { background: var(--paper-soft); padding: 1.5rem; border-radius: var(--radius-md); border: 1px solid var(--line-soft); }
.description-box h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--ink-700); }
.description-box p { color: var(--ink-700); white-space: pre-line; line-height: 1.85; }

.seller-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; background: var(--paper-soft); border-radius: var(--radius-md); border: 1px solid var(--line-soft); }
.seller-avatar {
    width: 48px; height: 48px; background: var(--ink-900);
    border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.15rem; color: #fff; font-family: 'Tajawal', sans-serif;
}
.seller-info { flex: 1; }
.seller-info .seller-name { font-weight: 700; color: var(--ink-900); }
.seller-info .seller-since { font-size: 0.82rem; color: var(--text-secondary); }

.action-buttons { display: flex; flex-direction: column; gap: 0.75rem; }
.action-buttons .btn { width: 100%; padding: 1rem; font-size: 1rem; }

/* ===== Form Card Header ===== */
.form-card h2 { text-align: center; margin-bottom: 2rem; font-weight: 700; font-size: 1.5rem; color: var(--ink-900); }
.form-card small { color: var(--text-secondary); font-size: 0.8rem; display: block; margin-top: 0.4rem; }

/* ===== Admin Dashboard ===== */
.admin-body { background: var(--paper-deep); min-height: 100vh; }
.admin-grid { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; margin-top: 2rem; padding-bottom: 3rem; }

/* Sidebar */
.sidebar-menu {
    background: var(--paper);
    border-radius: var(--radius-lg);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 96px;
    height: fit-content;
    border: 1px solid var(--line);
}
.sidebar-menu a {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.85rem 1.5rem; color: var(--ink-700); text-decoration: none;
    font-weight: 600; font-size: 0.9rem; border-right: 3px solid transparent; transition: var(--transition);
}
.sidebar-menu a:hover, .sidebar-menu a.active { background: var(--accent-50); color: var(--accent-600); border-right-color: var(--accent-500); }

/* Admin Cards */
.admin-card { background: var(--paper); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-sm); margin-bottom: 2rem; border: 1px solid var(--line); }
.admin-card h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; color: var(--ink-900); display: flex; align-items: center; gap: 0.75rem; }
.admin-card h2::before { content: ''; width: 3px; height: 24px; background: var(--gold-500); }

/* Admin Table */
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); border-radius: var(--radius-md); overflow: hidden; box-shadow: none; border: 1px solid var(--line); }
.admin-table thead th { background: var(--ink-900); color: #fff; padding: 1rem 1.25rem; text-align: right; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.3px; }
.admin-table tbody tr { transition: var(--transition); }
.admin-table tbody tr:hover { background: var(--accent-50); }
.admin-table td { padding: 1rem 1.25rem; border-top: 1px solid var(--line-soft); vertical-align: middle; font-size: 0.9rem; }
.admin-table .product-thumb { width: 50px; height: 50px; border-radius: var(--radius-sm); object-fit: cover; border: 2px solid var(--line-soft); }
.admin-table .product-cell { display: flex; align-items: center; gap: 1rem; font-weight: 600; color: var(--ink-900); }

/* Status Badges */
.status-badge { padding: 0.3rem 1rem; border-radius: var(--radius-full); font-size: 0.78rem; font-weight: 700; display: inline-block; }
.status-pending { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.status-approved { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }

/* ===== Footer ===== */
.main-footer { display: none; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
.footer-col h3 { color: var(--ink-900); margin-bottom: 1.25rem; font-size: 1.05rem; font-weight: 700; position: relative; padding-bottom: 0.75rem; }
.footer-col h3::after { content: ''; position: absolute; bottom: 0; right: 0; width: 32px; height: 2px; background: var(--gold-500); }
.footer-col p { display: none; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul li a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--accent-500); padding-right: 5px; }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--text-secondary); }

/* ===== Live Chat Widget ===== */
#live-chat-widget { position: fixed; bottom: 20px; left: 20px; z-index: 999; }

/* ===== Loading / Skeleton ===== */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton { background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 50%, var(--line-soft) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--paper-soft); }
::-webkit-scrollbar-thumb { background: var(--ink-100); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }

/* ===== Selection ===== */
::selection { background: var(--accent-100); color: var(--accent-700); }

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .admin-grid { grid-template-columns: 1fr; }
    .sidebar-menu { position: static; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 1rem; }
    .sidebar-menu a { border-right: none; border-bottom: 2px solid transparent; padding: 0.6rem 1rem; font-size: 0.85rem; }
    .sidebar-menu a.active { border-right-color: transparent; border-bottom-color: var(--accent-500); }
}

@media (max-width: 768px) {
    body { font-size: 14px; }
    .top-bar .container { height: 60px; flex-wrap: wrap; gap: 0.5rem; }
    .logo h1 { font-size: 1.25rem; }
    .nav-links { gap: 0.5rem; }
    .nav-links a:not(.btn) { font-size: 0.8rem; padding: 0.3rem 0.5rem; }
    .btn { padding: 0.5rem 1rem; font-size: 0.8rem; }
    .hero-section { padding: 3rem 0 2.5rem; }
    .hero-section h2 { font-size: 1.7rem; }
    .hero-section > .container > p { font-size: 1rem; }
    .search-container { flex-direction: column; border-radius: var(--radius-md); }
    .search-container input { border-radius: var(--radius-sm); margin-bottom: 0.5rem; }
    .search-container button { width: 100%; padding: 0.8rem; border-radius: var(--radius-sm); }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
    .product-detail-card { grid-template-columns: 1fr; gap: 2rem; padding: 1.5rem; }
    .product-gallery img { height: 300px; }
    .form-card { padding: 2rem; margin: 2rem auto; }
    .form-card h2 { font-size: 1.25rem; }
    .section-title { font-size: 1.05rem; }
    .admin-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .auth-card { padding: 2rem 1.5rem; }
    .auth-card h2 { font-size: 1.4rem; }
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
    .main-footer { padding: 3rem 0 1.5rem; margin-top: 3rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .product-grid { grid-template-columns: 1fr; }
    .hero-section h2 { font-size: 1.4rem; }
}

/* ===== Animations ===== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.product-card { animation: fadeInUp 0.4s ease-out; }
.admin-card { animation: fadeInUp 0.35s ease-out; }
.auth-card { animation: fadeInUp 0.45s ease-out; }

/* ===== User Profile Menu ===== */
.user-profile-menu { position: relative; display: flex; align-items: center; }
.profile-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); cursor: pointer; border: 2px solid var(--line); transition: var(--transition); object-fit: cover; }
.profile-avatar:hover { border-color: var(--accent-500); transform: scale(1.04); }

.profile-dropdown {
    position: absolute; top: 100%; left: 0;
    background: var(--paper); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    border: 1px solid var(--line); min-width: 220px; margin-top: 0.75rem;
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: var(--transition); z-index: 1001;
}
.user-profile-menu:hover .profile-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown-item { display: block; width: 100%; padding: 0.85rem 1.25rem; color: var(--text-primary); font-weight: 600; font-size: 0.9rem; text-align: right; border: none; background: transparent; cursor: pointer; transition: var(--transition); }
.dropdown-item:hover { background: var(--accent-50); color: var(--accent-600); padding-right: 1.5rem; }
.dropdown-item.danger { color: var(--danger-text); }
.dropdown-item.danger:hover { background: var(--danger-bg); color: var(--danger-text); }
.profile-dropdown hr { margin: 0.5rem 0; border: none; border-top: 1px solid var(--line); }

.product-seller{display:inline-flex;align-items:center;gap:5px;margin-top:7px;color:#334155;font-size:.76rem;font-weight:800;text-decoration:none}.product-seller:hover{color:#2563eb}.product-seller .verified-label{display:inline-block;color:#15803d;background:#dcfce7;border:1px solid #86efac;border-radius:99px;padding:2px 7px;font-size:.64rem;font-weight:800}
