/* RJ AUTO PARTS — additions on top of styles.css */

/* ---------- Logo ---------- */
.logo img { width: 44px; height: 44px; flex: none; }
.logo span { display: grid; font: inherit; letter-spacing: 0; }
.logo b { font: 700 24px/1 "Barlow Condensed", sans-serif; letter-spacing: .05em; white-space: nowrap; }
.logo small { font: 500 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
html[lang="ar"] .logo small { font: 600 12.5px/1.2 var(--body); letter-spacing: 0; }
html[dir="rtl"] .logo { direction: rtl; }
.site-footer .logo span { font-size: inherit; }

/* ---------- Language switch (links, one real page per language) ---------- */
.lang a { display: grid; place-items: center; min-width: 38px; height: 34px; font: 500 12.5px/1 var(--mono); color: #9aa5b6; transition: background .2s, color .2s; }
.lang a[lang="ar"] { font: 600 16px/1 "Alexandria", Tahoma, sans-serif; }
.lang a:hover { color: #fff; }
.lang a.active { background: #fff; color: var(--bg); }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.wa-icon { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn-wa { gap: 10px; }
.btn-sm .wa-icon { width: 17px; height: 17px; }
.header-cta { white-space: nowrap; }

/* WhatsApp, always in reach */
.wa-float {
  position: fixed; z-index: 40; inset-block-end: 18px; inset-inline-end: 18px; width: 58px; height: 58px;
  display: grid; place-items: center; border-radius: 50%; background: #25d366; color: #fff;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .7); transition: transform .3s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float .wa-icon { width: 30px; height: 30px; }
[data-page="contact"] .wa-float { display: none; }
@media (max-width: 900px) {
  body { padding-bottom: 0; }
  .cta-band .btn { display: inline-flex; }
}

/* ---------- Home: eight product lines ---------- */
.showcase-tabs button { padding: 13px 18px; }
.showcase-tabs b { font-size: 23px; }
html[lang="ar"] .showcase-tabs b { font-size: 19px; }
.showcase-tabs em { color: var(--muted); }
.showcase-tabs button.active em { color: var(--accent); }
.panel-body .btn-row { margin-top: 4px; }
.panel-body > .btn-ghost { margin-top: 0; }

/* ---------- Vehicle coverage ---------- */
.makes { border-block: 1px solid var(--line); }
.make-groups { display: grid; grid-template-columns: .8fr 1.6fr 1fr; gap: 20px; }
.make-groups > div { padding: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.make-groups h3 { font: 500 12.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
html[lang="ar"] .make-groups h3 { font: 600 15px/1.3 var(--body); letter-spacing: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 11px 18px; border: 1px solid var(--line-strong); border-radius: 999px; font: 600 21px/1 var(--display); letter-spacing: .03em; text-transform: uppercase; }
html[lang="ar"] .chips li { font-size: 17px; letter-spacing: 0; }
.makes .note { margin-top: 20px; max-width: 86ch; }

/* ---------- Product line cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; scroll-margin-top: 96px; transition: border-color .3s, transform .4s var(--ease); }
.cat-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.cat-card .studio { display: block; aspect-ratio: 4 / 3; border-radius: 0; }
.cat-card .studio img { padding: 9%; transition: transform .5s var(--ease); }
.cat-card:hover .studio img { transform: scale(1.05); }
.cat-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 22px; }
.cat-body .tag { margin-bottom: 2px; }
.cat-body h3 { font: 700 28px/1.1 var(--display); text-transform: uppercase; }
html[lang="ar"] .cat-body h3 { font-size: 22px; line-height: 1.4; }
.cat-body p:not(.tag) { flex: 1; font-size: 15.5px; color: var(--muted); }
.cat-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: 15px; font-weight: 600; }
.cat-links a { padding-bottom: 3px; border-bottom: 1px solid var(--line-strong); transition: border-color .2s, color .2s; }
.cat-links a:first-child { border-bottom-color: var(--accent); }
.cat-links a:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* ---------- Product line page ---------- */
.product-hero { padding-bottom: clamp(48px, 6vw, 88px); }
.product-hero .gallery, .product-hero .product-copy { min-width: 0; }
.page-hero.product-hero h1 { max-width: none; margin-bottom: 20px; }
.product-hero .lead { margin-top: 0; }
.product-hero .ticks { margin-block: 28px; }
.product-hero .note { margin-top: 20px; font-size: 15px; }
.product-hero .note b { color: var(--text); }

/* ---------- Quality & contact ---------- */
.kv.wide > div { grid-template-columns: minmax(150px, .9fr) 1.1fr; }
.quality .note { margin-top: 20px; max-width: 60ch; }
.contact-kv { margin-top: 36px; }
.contact-kv a { border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.contact-page h1 { max-width: 14ch; }

/* ---------- Footer ---------- */
.footer-grid.rj { grid-template-columns: 1.3fr 1fr 1fr; }
.footer-brand p { max-width: 44ch; }
.footer-col { display: grid; gap: 9px; align-content: start; }
.footer-col h3 { font: 500 12.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
html[lang="ar"] .footer-col h3 { font: 600 15px/1.3 var(--body); letter-spacing: 0; }
.footer-col a, .footer-col > span { color: #b9c2d0; width: fit-content; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 24px; }
.social { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; }
.social a { color: #fff; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.site-footer { padding-bottom: 96px; }

/* ---------- Light theme ---------- */
:root[data-theme="light"] .lang a { color: var(--muted); }
:root[data-theme="light"] .lang a:hover { color: var(--text); }
:root[data-theme="light"] .lang a.active { background: var(--text); color: #fff; }
:root[data-theme="light"] .footer-col a, :root[data-theme="light"] .footer-col > span { color: var(--muted); }
:root[data-theme="light"] .footer-col a:hover, :root[data-theme="light"] .social a { color: var(--text); }
:root[data-theme="light"] .cat-card, :root[data-theme="light"] .make-groups > div { box-shadow: 0 18px 40px -28px rgba(12, 20, 34, .35); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .make-groups { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .footer-grid.rj { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cat-grid { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; }
  .kv.wide > div { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .logo img { width: 36px; height: 36px; }
  .logo b { font-size: 19px; }
  .lang a { min-width: 32px; }
}

/* English hero headline runs to four lines; keep it inside the first screen */
html:not([lang="ar"]) .hero h1 { font-size: clamp(48px, 6.2vw, 96px); }

/* Phones: the eight product tabs sit two per row, so the photo is not pushed far down */
@media (max-width: 600px) {
  .showcase-tabs { grid-template-columns: 1fr 1fr; }
  .showcase-tabs button { padding: 11px 12px; gap: 2px 10px; }
  .showcase-tabs b, html[lang="ar"] .showcase-tabs b { font-size: 17px; }
}

/* ---------- RJ colours: graphite and amber ----------
   The accent is amber, so text that sits on it is dark, not white. Red is kept for form errors only. */
.btn-primary, .toggle3d, ::selection { color: #17120a; }
.btn-primary::before { background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%); }
.rfq .invalid { border-color: #ff5a4f; }
.rfq label:has([required]) > span::after { color: #ff7a70; }
.media3d.gl { background: radial-gradient(closest-side, rgba(255, 176, 32, .13), transparent), linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 28px 28px, #1d1e23; }
:root[data-theme="light"] { --accent: #b86e00; --accent-deep: #9a5b00; }
:root[data-theme="light"] .btn-primary, :root[data-theme="light"] .toggle3d { color: #fff; }

/* Real product photo with zoom (lines that have no 3D model file) */
[data-zoom] { cursor: zoom-in; }
[data-zoom] img { transition: transform .3s var(--ease); }
[data-zoom].zoomed img { transform: scale(2.3); }


/* ---------- Home stage: product lines take turns ---------- */
.stage::before { content: ""; position: absolute; inset: 6% 4%; background: radial-gradient(closest-side, rgba(255, 255, 255, .11), transparent 72%); pointer-events: none; }
#hero-photo {
  position: absolute; inset: 9% 5% 13%; width: 90%; height: 78%; object-fit: contain; z-index: 1;
  opacity: 0; transition: opacity .7s; pointer-events: none; filter: drop-shadow(0 34px 34px rgba(0, 0, 0, .65));
}
.stage.photo #hero-photo { opacity: 1; animation: sway 9s ease-in-out infinite alternate; }
.stage.photo { cursor: default; }
.stage.photo .drag-hint { opacity: 0; }
@keyframes sway {
  from { transform: perspective(1100px) rotateY(-16deg) rotateX(3deg) translateY(6px); }
  to { transform: perspective(1100px) rotateY(16deg) rotateX(-2deg) translateY(-10px); }
}
.hero-picks button[hidden], .explode[hidden] { display: none; }
.hero-picks button i { opacity: .35; transition: opacity .25s; }
.hero-picks button.active i { opacity: 1; }
.viewer-ui { min-height: 96px; align-content: flex-start; }
@media (prefers-reduced-motion: reduce) { .stage.photo #hero-photo { animation: none; } }
:root[data-theme="light"] .stage::before { background: radial-gradient(closest-side, rgba(12, 20, 34, .07), transparent 72%); }
:root[data-theme="light"] #hero-photo { filter: drop-shadow(0 30px 30px rgba(12, 20, 34, .28)); }

/* ---------- Supply section over the port photo ---------- */
.supply-band .mfg-bg {
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(12, 12, 14, .7) 28%, rgba(12, 12, 14, .78) 68%, var(--bg) 100%),
    url("../assets/photos/port.jpg") center 42% / cover no-repeat;
}
.cards.glass .card { background: rgba(21, 21, 24, .72); backdrop-filter: blur(14px); }
:root[data-theme="light"] .supply-band .mfg-bg {
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(243, 245, 248, .86) 28%, rgba(243, 245, 248, .9) 68%, var(--bg) 100%),
    url("../assets/photos/port.jpg") center 42% / cover no-repeat;
}
:root[data-theme="light"] .cards.glass .card { background: rgba(255, 255, 255, .88); }
