﻿/* =========================================================
   PC Price Hunter — site.css (RTL)
   Theme: Light (default) + optional Dark variant
   ---------------------------------------------------------
   HOW TO SWITCH THEMES:
   - Default light colors live under :root
   - Dark theme lives under .theme-dark
   - To enable dark theme: <html class="theme-dark">
   WHERE TO CHANGE COLORS:
   - Edit CSS variables in the "COLOR PALETTES" section below.
   ========================================================= */

/* === COLOR PALETTES (edit here) ================================== */
/* Default LIGHT palette (white / light blue) */
:root {
    --bg: #e9f3fb; /* page background (top) */
    --bg-2: #ffffff; /* page background (bottom) */
    --card: #ffffff; /* card background */
    --text: #0d2b3a; /* primary text color */
    --muted: #5e7a8a; /* secondary text color */
    --line: #d9e7f0; /* borders/dividers */
    --primary: #1ea7fd; /* primary accent (light blue) */
    --primary-2: #6bd5ff; /* secondary accent (sky blue) */
    --accent: #e6f7ff; /* badges/soft accents */
    --ring: rgba(30,167,253,.35); /* focus outline color */
    --radius: 18px; /* default border radius */
    --shadow: 0 8px 18px rgba(13,43,58,.08), 0 2px 6px rgba(13,43,58,.06); /* card shadow */
}

/* Optional DARK palette (Deep Teal Mist). Enable via <html class="theme-dark"> */
.theme-dark {
    --bg: #356382;
    --bg-2: #447A98;
    --card: rgba(255,255,255,.20);
    --text: #F3F9FF;
    --muted: #CFE8F4;
    --line: #2a5673;
    --primary: #00D1B2;
    --primary-2: #37C7E3;
    --accent: #A0E7E5;
    --ring: rgba(0,209,178,.35);
    --radius: 18px;
    --shadow: 0 10px 24px rgba(0,0,0,.16), 0 2px 6px rgba(0,0,0,.10);
}
/* ================================================================== */

/* Base / reset */
* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
    max-width: 100%;
}

body {
    margin: 0;
    font-family: "Cairo", system-ui, Segoe UI, Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

    body::before {
        /* soft glare overlay */
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background: radial-gradient(110% 80% at 50% 40%, rgba(255,255,255,.35), transparent 60%);
    }

/* Layout containers */
.container {
    width: 100%;
    max-width: 1080px;
    margin-inline: auto;
    padding-inline: clamp(10px,2.5vw,18px);
}

.page {
    padding: 16px 0 42px;
}

.footer {
    padding: 22px 0;
    text-align: center;
    color: var(--muted);
}

/* ================= HEADER / NAV ================= */
.header {
    position: sticky;
    top: 0;
    z-index: 200;
}

.navbar {
    margin: 14px auto;
    background: #ffffffcc; /* semi-transparent white in light theme */
    border: 1px solid var(--line);
    backdrop-filter: saturate(160%) blur(10px);
    border-radius: 22px;
    box-shadow: var(--shadow);
    position: relative;
}

    .navbar::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 22px;
        pointer-events: none;
        background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,0) 40%, rgba(255,255,255,.22));
        opacity: .5;
    }

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

    .brand .logo {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        display: grid;
        place-items: center;
        color: #0b3;
        background: #fff;
        box-shadow: inset 0 0 0 2px rgba(0,0,0,.06);
    }

.brand-title {
    line-height: 1;
}

    .brand-title .sub {
        color: var(--muted);
        font-size: .92rem;
    }

.nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-inline-start: auto;
    flex-wrap: wrap;
    transition: transform .25s ease, opacity .25s ease;
}

    .nav .pill {
        position: relative;
        text-decoration: none;
        padding: 10px 16px;
        border-radius: 999px;
        border: 1px solid var(--line);
        background: #f4fbff;
        color: var(--text);
        font-weight: 800;
        overflow: hidden;
    }

        .nav .pill::before {
            content: "";
            position: absolute;
            inset-inline: 0;
            inset-block-end: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--primary), var(--primary-2));
            transform: translateY(6px);
            opacity: 0;
            transition: .25s;
        }

        .nav .pill:hover::before {
            transform: translateY(0);
            opacity: 1;
        }

        .nav .pill.active {
            background: linear-gradient(135deg, var(--primary), var(--primary-2));
            border-color: transparent;
            color: #053044;
        }

.nav-toggle {
    display: none;
    margin-inline-start: auto;
    background: #f1f7fb;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
}

    .nav-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--text);
        margin: 4px 0;
        border-radius: 2px;
    }

/* ================= CARDS & FORMS ================= */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    color: var(--text);
}

.form-wrap {
    width: min(720px,100%);
    padding: 26px;
    margin: 18px auto;
}

.form-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

    .form-title h2 {
        margin: 0;
        font-size: clamp(1.05rem,2.6vw,1.3rem);
    }

.badge {
    background: var(--accent);
    color: #064b63;
    padding: .32rem .7rem;
    border-radius: 999px;
    font-weight: 800;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width:700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

label {
    font-weight: 700;
    color: var(--text);
}

.input, .select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #f7fbfe;
    color: var(--text);
    outline: 2px solid transparent;
    transition: .2s;
}

    .input::placeholder {
        color: #9bb3c2;
    }

    .input:focus, .select:focus {
        outline: 2px solid var(--ring);
    }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #062824; /*062824*/
    box-shadow: 0 8px 18px rgba(30,167,253,.25);
}

    .btn-primary:hover {
        filter: brightness(1.06);
        transform: translateY(-1px);
    }

.btn-ghost {
    background: #f4fbff;
    color: var(--text);
    border: 1px solid var(--line);
}

.helper {
    color: var(--muted);
    font-size: .95rem;
}

/* ================= HERO / BANNER ================= */
.hero {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 18px;
    padding: 22px;
}

@media (max-width:900px) {
    .hero {
        grid-template-columns: 1fr;
    }
}

.banner {
    aspect-ratio: 16/6;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: radial-gradient(90% 120% at 12% 10%, #bfe8ff 0%, #7fd2ff 50%, #3aa9e6 100%);
    display: grid;
    place-items: center;
    color: #08324a;
    text-align: center;
    padding: 22px;
    position: relative;
}

    .banner::after {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(90% 60% at 80% 0%, rgba(255,255,255,.30), transparent 60%);
        pointer-events: none;
    }

    .banner h1 {
        margin: 0 0 6px;
        font-size: clamp(22px,5.4vw,30px);
    }

    .banner p {
        margin: 0;
        opacity: .96;
        font-size: clamp(.95rem,2.8vw,1.05rem);
    }

img, svg, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ================= PRODUCT GRID HELPERS ================= */
.card.prod {
    background: #ffffff;
    border: 1px solid var(--line);
}

.prod .imgbox {
    aspect-ratio: 1/1;
    background: #f2f8fc;
    display: grid;
    place-items: center;
}

.prod img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.prod .body {
    padding: 10px 12px;
}

.prod .t {
    font-weight: 800;
    line-height: 1.35;
    min-height: 2.6em;
    color: var(--text);
}

.prod .meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    font-weight: 800;
}

.price {
    font-size: 1.05rem;
    color: #0c6b9a;
}

.ret {
    color: #557a8a;
    font-size: .92rem;
}

.act {
    display: flex;
    gap: 8px;
    margin: 10px 0 12px;
}

.btn-mini {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #f4fbff;
    font-weight: 800;
}

/* =============== Responsive tweaks =============== */
@media (max-width:768px) {
    .btn {
        width: 100%;
        margin-bottom: 8px;
    }

    .form-wrap {
        padding: 16px;
    }

    .brand .logo {
        width: 40px;
        height: 40px;
    }

    .brand-title div {
        font-size: .98rem;
    }
}

@media (max-width:700px) {
    .nav {
        position: absolute;
        inset-inline: 10px;
        top: 66px;
        background: #ffffffee;
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 10px;
        flex-direction: column;
        align-items: stretch;
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
    }

        .nav .pill {
            width: 100%;
            text-align: center;
        }

    .nav-toggle {
        display: inline-flex;
    }

    .navbar {
        margin: 8px auto;
        border-radius: 18px;
    }

    .topbar {
        padding: 10px 12px;
    }

    .hero {
        padding: 14px;
        gap: 12px;
    }

    .banner {
        aspect-ratio: 16/9;
        padding: 18px;
    }

    .page {
        padding: 18px 0 32px;
    }

    .links {
        justify-content: center;
    }
}

@media (max-width:380px) {
    .container {
        padding-inline: 10px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .brand-title .sub {
        font-size: .85rem;
    }
}

html.nav-open .nav {
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

.links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ========== Dark-theme specific refinements ========== */
.theme-dark body {
    color: var(--text);
    background: radial-gradient(1200px 520px at 85% -10%, rgba(0,209,178,.14), transparent 55%), radial-gradient(1000px 460px at 12% -18%, rgba(160,231,229,.12), transparent 60%), linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04)), conic-gradient(from 180deg at 50% 0%, rgba(255,255,255,.06), transparent 30%, rgba(255,255,255,.06) 60%, transparent 100%), linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

.theme-dark .navbar {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.24);
}

.theme-dark .nav .pill {
    background: rgba(255,255,255,.20);
    color: #f0fbff;
    border-color: rgba(255,255,255,.26);
}

.theme-dark .card {
    background: rgba(18,50,66,.58);
    border: 1px solid rgba(255,255,255,.22);
    color: #E9F6FB;
    box-shadow: 0 12px 28px rgba(6,28,36,.38), 0 2px 6px rgba(6,28,36,.18);
}

.theme-dark .input, .theme-dark .select {
    background: rgba(10,32,42,.70);
    border: 1px solid rgba(255,255,255,.24);
    color: #F5FDFF;
}

.theme-dark .banner {
    background: radial-gradient(90% 120% at 12% 10%, #0FB89F 0%, #0C6F86 48%, #0A3F4C 100%) !important;
    border: 1px solid rgba(255,255,255,.18);
    color: #F5FCFF;
}

/* غلاف السلة */
.cart-wrap {
    position: relative !important;
    padding: 12px 14px !important;
}

/* أيقونة السلة */
.cart-icon {
    font-size: 1.3rem;
}

/* العداد */
.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff5252;
    color: white;
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 9999;
}
.main-footer {
    background: #032b50;
    padding: 40px 0;
    color: #e7f4ff;
    margin-top: 40px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: auto;
}

.footer-section {
    flex: 1 1 250px;
}

.footer-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-links li {
    list-style: none;
    margin: 6px 0;
}

.footer-links a {
    color: #e7f4ff;
    text-decoration: none;
    font-size: .95rem;
}

    .footer-links a:hover {
        text-decoration: underline;
    }

.footer-social {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.social-icon {
    font-size: 1.4rem;
    color: white;
    background: #083863;
    padding: 12px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: .3s;
}

    .social-icon:hover {
        background: #11a0ef;
        transform: translateY(-3px);
    }

.footer-copy {
    margin-top: 12px;
    color: #cde7ff;
}
