/*
 * Public homepage styles.
 * Colours are in :root - change them there.
 * Uses logical properties (inline-start / inline-end) so Arabic (RTL) works too.
 */
:root {
    --bg: #070b14;
    --bg-2: #0c1322;
    --card: rgba(255, 255, 255, .045);
    --card-border: rgba(255, 255, 255, .09);
    --text: #e8edf6;
    --muted: #8b97ab;
    --accent: #f59e0b;
    --accent-2: #22d3ee;
    --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', 'Cairo', system-ui, sans-serif; line-height: 1.6; overflow-x: hidden; }
html[dir="rtl"] body { font-family: 'Cairo', 'Inter', sans-serif; }
h1, h2, h3, h4 { font-family: 'Rajdhani', 'Cairo', sans-serif; line-height: 1.1; letter-spacing: .3px; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4 { font-family: 'Cairo', sans-serif; line-height: 1.35; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ----- language switch (when both languages are on) ----- */
[data-mode="both"][data-lang="ar"] [data-l="en"],
[data-mode="both"][data-lang="en"] [data-l="ar"] { display: none !important; }

/* ----- buttons ----- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; font-size: 14px; border-radius: 50px; font-weight: 600; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, #fbbf24, var(--accent) 55%, #d97706); color: #0b0f19; box-shadow: 0 10px 30px -8px rgba(245, 158, 11, .65); }
.btn-primary:hover { box-shadow: 0 14px 38px -6px rgba(245, 158, 11, .9); }
.btn-glass { background: rgba(255, 255, 255, .07); border: 1px solid var(--card-border); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255, 255, 255, .14); }

/* ----- nav ----- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 20px; padding: 14px max(20px, calc((100vw - 1200px) / 2)); transition: background .3s, backdrop-filter .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(7, 11, 20, .82); backdrop-filter: blur(14px); border-color: var(--card-border); }
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 21px; margin-inline-end: auto; }
.logo-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(135deg, var(--accent), #d97706); color: #0b0f19; font-size: 20px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: #cbd5e1; font-weight: 500; position: relative; }
.nav-links a::after { content: ''; position: absolute; inset: auto 0 -6px 0; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .25s; }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn, .btn-login { height: 34px; padding-inline: 12px; font-size: 13px; gap: 6px; border-radius: 30px; border: 1px solid var(--card-border); background: rgba(255, 255, 255, .06); display: inline-flex; align-items: center; font-weight: 600; }
.btn-login { background: var(--accent); border-color: var(--accent); color: #0b0f19; }
.btn-login:hover { background: #fbbf24; color: #0b0f19; border-color: #fbbf24; }
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.dev-credit a { color: var(--accent); }
.burger { display: none; font-size: 28px; }

/* ----- hero ----- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; padding: 110px 0 70px; }
.hero-photo { position: absolute; inset: -4%; background-size: cover; background-position: center; filter: saturate(.8) brightness(.55); transform: scale(1.05); }
.hero-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 40%, rgba(245, 158, 11, .18), transparent 55%), linear-gradient(90deg, rgba(7, 11, 20, .96) 10%, rgba(7, 11, 20, .55) 60%, rgba(7, 11, 20, .75)), linear-gradient(0deg, var(--bg), transparent 30%); }
html[dir="rtl"] .hero-shade { background: radial-gradient(ellipse at 30% 40%, rgba(245, 158, 11, .18), transparent 55%), linear-gradient(270deg, rgba(7, 11, 20, .96) 10%, rgba(7, 11, 20, .55) 60%, rgba(7, 11, 20, .75)), linear-gradient(0deg, var(--bg), transparent 30%); }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(34, 211, 238, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(34, 211, 238, .06) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); }
#scene3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-content { position: relative; z-index: 2; width: min(1200px, 100% - 40px); margin-inline: auto; }
.hero-content > * { max-width: 640px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border: 1px solid rgba(245, 158, 11, .4); border-radius: 30px; background: rgba(245, 158, 11, .1); color: #fcd34d; font-size: 13.5px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 700; margin-bottom: 18px; background: linear-gradient(180deg, #fff 30%, #cbd5e1); -webkit-background-clip: text; background-clip: text; color: transparent; text-transform: uppercase; }
html[dir="rtl"] .hero h1 { text-transform: none; }
.hero p { font-size: 18px; color: #b6c2d6; margin-bottom: 30px; max-width: 540px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px 34px; margin-top: 44px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-family: 'Rajdhani', sans-serif; font-size: 34px; color: var(--accent); line-height: 1; }
.hero-stats b i { font-size: 20px; }
.hero-stats span { color: var(--muted); font-size: 13px; }
.scroll-hint { position: absolute; z-index: 2; bottom: 22px; left: 50%; translate: -50% 0; color: var(--muted); font-size: 22px; animation: bob 1.8s infinite; }
@keyframes bob { 50% { transform: translateY(7px); } }

/* ----- brand strip ----- */
.brand-strip { overflow: hidden; border-block: 1px solid var(--card-border); background: var(--bg-2); padding: 16px 0; }
.brand-track { display: flex; gap: 56px; width: max-content; animation: slide 32s linear infinite; }
.brand-track span { font-family: 'Rajdhani', sans-serif; font-size: 22px; font-weight: 600; color: #5d6b82; white-space: nowrap; text-transform: uppercase; letter-spacing: 2px; }
@keyframes slide { to { transform: translateX(-50%); } }
html[dir="rtl"] .brand-track { animation-direction: reverse; }

/* ----- sections ----- */
.section { padding: 96px 0; position: relative; }
.section.alt { background: var(--bg-2); }
.section-head { text-align: center; margin-bottom: 48px; }
.kicker { display: inline-block; color: var(--accent-2); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 8px; }
.section-head h2, .contact-info h2 { font-size: clamp(32px, 4.5vw, 50px); font-weight: 700; }

/* ----- reveal on scroll ----- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* hero text rises in with CSS only (does not wait for JavaScript / 3D) */
.rise { animation: rise .8s ease both; }
.hero-content > .rise:nth-child(2) { animation-delay: .1s; }
.hero-content > .rise:nth-child(3) { animation-delay: .2s; }
.hero-content > .rise:nth-child(4) { animation-delay: .3s; }
.hero-content > .rise:nth-child(5) { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ----- 3D tilt cards ----- */
.tilt { transform-style: preserve-3d; transition: transform .25s ease, box-shadow .25s ease, opacity .7s, border-color .25s; will-change: transform; }

/* ----- categories ----- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; perspective: 1000px; }
.cat-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 26px 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-border); overflow: hidden; min-height: 170px; justify-content: flex-end; }
.cat-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 0%, rgba(245, 158, 11, .2), transparent 60%); opacity: 0; transition: opacity .3s; }
.cat-card:hover { border-color: rgba(245, 158, 11, .5); box-shadow: 0 20px 50px -20px rgba(245, 158, 11, .5); }
.cat-card:hover::before { opacity: 1; }
.cat-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .25; }
.cat-icon { position: absolute; top: 20px; inset-inline-end: 20px; font-size: 34px; color: var(--accent); opacity: .85; }
.cat-name { position: relative; font-family: 'Rajdhani', 'Cairo', sans-serif; font-size: 23px; font-weight: 700; line-height: 1.2; }
.cat-count { position: relative; color: var(--muted); font-size: 13px; }

/* ----- products ----- */
.filters { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { padding: 6px 14px; border-radius: 30px; border: 1px solid var(--card-border); background: var(--card); color: #cbd5e1; font-size: 13px; transition: all .2s; }
.chip-btn:hover { border-color: var(--accent); }
.chip-btn.active { background: var(--accent); border-color: var(--accent); color: #0b0f19; font-weight: 600; }
.search { position: relative; }
.search i { position: absolute; inset-inline-start: 14px; top: 50%; translate: 0 -50%; color: var(--muted); }
.search input { background: var(--card); border: 1px solid var(--card-border); color: var(--text); border-radius: 30px; padding: 10px 18px; padding-inline-start: 40px; width: 280px; max-width: 100%; outline: none; font: inherit; }
.search input:focus { border-color: var(--accent); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 22px; perspective: 1200px; }
.product { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.product:hover { border-color: rgba(245, 158, 11, .45); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .9), 0 0 0 1px rgba(245, 158, 11, .15); }
.product[hidden] { display: none; }
.product-img { position: relative; aspect-ratio: 4 / 3; background: #101827 center / cover; cursor: pointer; display: grid; place-items: center; font-size: 44px; color: #2b3850; }
.ribbon { position: absolute; top: 12px; inset-inline-start: 12px; background: var(--accent); color: #0b0f19; font-size: 11.5px; font-weight: 700; padding: 3px 11px; border-radius: 20px; }
.stock { position: absolute; bottom: 10px; inset-inline-end: 10px; font-size: 11.5px; font-weight: 600; padding: 3px 11px; border-radius: 20px; backdrop-filter: blur(6px); background: rgba(0, 0, 0, .55); }
.s-in_stock { color: #4ade80; }
.s-out_of_stock { color: #f87171; }
.s-on_order { color: #fbbf24; }
.product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.product-body h3 { font-size: 21px; font-weight: 700; cursor: pointer; }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; }
.price { font-family: 'Rajdhani', sans-serif; font-size: 19px; font-weight: 700; color: var(--accent); }
.wa-btn { display: inline-flex; align-items: center; gap: 5px; background: #16a34a; color: #fff; font-weight: 600; font-size: 12.5px; padding: 5px 11px; border-radius: 30px; transition: background .2s, transform .2s; }
.wa-btn:hover { background: #22c55e; transform: scale(1.05); }
.empty, .no-result { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty > i { font-size: 54px; color: var(--accent); display: block; margin-bottom: 10px; }
.empty p { max-width: 520px; margin: 0 auto 22px; }

/* ----- gallery ----- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; grid-auto-flow: dense; perspective: 1200px; }
.g-card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--card-border); cursor: zoom-in; aspect-ratio: 16 / 10; background: #101827; }
.g-card.wide { grid-column: span 2; aspect-ratio: auto; }
.g-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.g-card:hover img { transform: scale(1.07); }
.g-card figcaption { position: absolute; inset: auto 0 0 0; padding: 30px 16px 12px; background: linear-gradient(0deg, rgba(0, 0, 0, .85), transparent); font-size: 14px; }

/* ----- why ----- */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; perspective: 1000px; }
.why { padding: 28px 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-border); }
.why i { font-size: 34px; color: var(--accent-2); }
.why h4 { font-size: 22px; margin: 12px 0 6px; }
.why p { color: var(--muted); font-size: 14.5px; }

/* ----- contact ----- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: stretch; }
.contact-info ul { list-style: none; margin: 24px 0; display: grid; gap: 16px; }
.contact-info li { display: flex; gap: 14px; align-items: flex-start; }
.contact-info li i { color: var(--accent); font-size: 20px; margin-top: 2px; }
.social { display: flex; gap: 12px; margin-top: 22px; font-size: 22px; }
.social a:hover { color: var(--accent); }
.map-box { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--card-border); min-height: 360px; }
.map-box iframe { width: 100%; height: 100%; min-height: 360px; border: 0; filter: grayscale(.35) invert(.92) hue-rotate(180deg) contrast(.9); }

.footer { border-top: 1px solid var(--card-border); padding: 24px 0; color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer a:hover { color: var(--accent); }

.wa-float { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 60; width: 44px; height: 44px; border-radius: 50%; background: #22c55e; color: #fff; display: grid; place-items: center; font-size: 22px; box-shadow: 0 10px 30px rgba(34, 197, 94, .55); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6), 0 10px 30px rgba(34, 197, 94, .45); } 70% { box-shadow: 0 0 0 20px rgba(34, 197, 94, 0), 0 10px 30px rgba(34, 197, 94, .45); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0), 0 10px 30px rgba(34, 197, 94, .45); } }

/* ----- popups ----- */
.modal, .lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(3, 6, 12, .88); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; }
.modal[hidden], .lightbox[hidden] { display: none; }
.modal-box { position: relative; width: min(980px, 100%); max-height: 92vh; overflow: auto; display: grid; grid-template-columns: 1.1fr 1fr; background: #0d1526; border: 1px solid var(--card-border); border-radius: 22px; }
.modal-box.noimg { grid-template-columns: 1fr; max-width: 520px; }
.modal-close { position: absolute; top: 12px; inset-inline-end: 14px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .55); font-size: 28px; line-height: 1; }
.modal-media { background: #070b14; padding: 14px; }
.modal-media > img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 12px; background: #101827; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs img { width: 64px; height: 50px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: .6; border: 2px solid transparent; }
.thumbs img.on { opacity: 1; border-color: var(--accent); }
.modal-info { padding: 34px 30px; display: flex; flex-direction: column; gap: 10px; }
.modal-info h3 { font-size: 32px; }
.modal-info .price { font-size: 28px; }
.modal-info p { color: #b6c2d6; white-space: pre-line; margin-bottom: 10px; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 12px; }

/* ----- responsive ----- */
@media (max-width: 900px) {
    .nav-links { position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0; background: rgba(7, 11, 20, .97); border-bottom: 1px solid var(--card-border); padding: 8px 20px 16px; transform: translateY(-130%); transition: transform .3s; }
    .nav-links.open { transform: none; }
    .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--card-border); }
    .burger { display: block; }
    .logo-text { font-size: 17px; }
    .contact-wrap { grid-template-columns: 1fr; }
    .modal-box { grid-template-columns: 1fr; }
    .g-card.wide { grid-column: auto; aspect-ratio: 16 / 10; }
    .section { padding: 70px 0; }
    .hero-content { text-align: start; }
    #scene3d { opacity: .6; }
    .hero { align-items: flex-end; padding-bottom: 90px; }
}
@media (max-width: 520px) {
    .hero p { font-size: 16px; }
    .search input { width: 100%; }
    .search { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}

@media (max-width: 520px) {
    .logo-text { display: none; }
    .nav { gap: 8px; }
    .btn-login span { display: inline; }
}
