:root,
[data-theme="masar-light"] {
  --theme-primary: #176ff2;
  --theme-primary-dark: #102a8c;
  --theme-cyan: #08c8e8;
  --theme-purple: #7137d6;
  --theme-coral: #ff6257;
  --theme-ink: #11152d;
  --theme-muted: #697087;
  --theme-line: #e7eaf3;
  --theme-soft: #f6f8ff;
  --theme-card: #fff;
  --theme-gradient: linear-gradient(135deg,#087cf4 0%,#6e3adb 56%,#ff6257 100%);
  --theme-shadow: 0 22px 70px rgba(30,45,95,.11);
}
[data-theme="masar-air"] {
  --theme-primary: #057df1;
  --theme-primary-dark: #073a92;
  --theme-purple: #4e46d8;
  --theme-coral: #ff7068;
  --theme-soft: #f2fbff;
  --theme-gradient: linear-gradient(135deg,#04c7eb 0%,#1478ff 52%,#5b37d6 100%);
}
[data-theme="masar-vibrant"] {
  --theme-primary: #315bf2;
  --theme-primary-dark: #23167c;
  --theme-purple: #9c2bce;
  --theme-coral: #ff5e58;
  --theme-soft: #fbf6ff;
  --theme-gradient: linear-gradient(135deg,#176ff2 0%,#982bce 55%,#ff6257 100%);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body,button,input,select,textarea { font-family: "Alexandria",Tahoma,"Segoe UI",sans-serif; }
body { background:#fff; color:var(--theme-ink); line-height:1.75; }
a { color:inherit; }
.container { width:min(1180px,calc(100% - 32px)); }
.site-header { background:rgba(255,255,255,.95); border-bottom:1px solid rgba(17,21,45,.07); box-shadow:0 8px 30px rgba(22,36,82,.04); backdrop-filter:blur(18px); }
.header-inner { min-height:82px; gap:24px; }
.brand img { width:116px; height:64px; object-fit:contain; }
.main-nav { gap:23px; }
.main-nav a { font-size:13px; font-weight:600; color:#31364d; position:relative; }
.main-nav a:after { content:""; position:absolute; inset-inline:0; bottom:-12px; height:2px; background:var(--theme-gradient); transform:scaleX(0); transition:.2s; }
.main-nav a:hover:after { transform:scaleX(1); }
.btn { border:0; background:var(--theme-gradient); color:#fff; border-radius:12px; padding:12px 22px; font-weight:700; box-shadow:0 10px 25px rgba(78,68,210,.18); transition:transform .2s,box-shadow .2s; }
.btn:hover { transform:translateY(-2px); box-shadow:0 15px 32px rgba(78,68,210,.25); }
.btn-outline { color:var(--theme-primary); background:#fff; border:1px solid #dbe2f5; box-shadow:none; }
.eyebrow { color:var(--theme-primary); letter-spacing:1.8px; font-size:10px; font-weight:800; }
.section { padding:88px 0; }
.section-head { margin-bottom:30px; align-items:end; }
.section-head h2 { font-size:clamp(25px,3vw,38px); margin:5px 0 0; line-height:1.3; }
.section-head>a { color:var(--theme-primary); font-weight:700; }
.soft-bg { background:var(--theme-soft); }

/* Premium home */
.masar-hero { position:relative; overflow:hidden; padding:42px 0 52px; background:linear-gradient(180deg,#fff 0%,#f7f9ff 100%); }
.masar-hero:before,.masar-hero:after { content:""; position:absolute; border-radius:50%; filter:blur(2px); opacity:.14; pointer-events:none; }
.masar-hero:before { width:420px; height:420px; background:var(--theme-cyan); top:-250px; inset-inline-start:-140px; }
.masar-hero:after { width:390px; height:390px; background:var(--theme-coral); bottom:-290px; inset-inline-end:-100px; }
.luxury-hero-grid { min-height:590px; display:grid; grid-template-columns:minmax(0,1.02fr) minmax(420px,.98fr); gap:42px; align-items:center; position:relative; z-index:1; }
.hero-copy h1 { margin:12px 0 16px; font-size:clamp(38px,5.4vw,70px); line-height:1.16; letter-spacing:-2px; max-width:670px; }
.hero-copy h1 span { background:var(--theme-gradient); -webkit-background-clip:text; color:transparent; }
.hero-copy>p { max-width:650px; color:var(--theme-muted); font-size:16px; }
.hero-photo { position:relative; min-height:510px; border-radius:32px; overflow:hidden; box-shadow:var(--theme-shadow); isolation:isolate; }
.hero-photo>img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.hero-photo:after { content:""; position:absolute; inset:0; background:linear-gradient(180deg,transparent 40%,rgba(11,16,42,.68)); z-index:1; }
.hero-photo-copy { position:absolute; z-index:2; bottom:28px; inset-inline:28px; color:#fff; display:flex; align-items:end; justify-content:space-between; gap:20px; }
.hero-photo-copy strong { font-size:23px; display:block; }
.hero-photo-copy small { opacity:.85; }
.hero-counter { padding:10px 15px; border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.14); border-radius:14px; backdrop-filter:blur(10px); white-space:nowrap; }
.hero-search-v2 { margin-top:28px; padding:14px; background:#fff; border:1px solid #e7eaf4; border-radius:20px; box-shadow:0 20px 55px rgba(31,50,112,.12); }
.hero-search-v2 .segmented { margin-bottom:12px; }
.search-grid-v2 { display:grid; grid-template-columns:1.05fr 1.25fr .82fr auto; gap:9px; align-items:stretch; }
.search-grid-v2 select,.search-grid-v2 input { width:100%; min-width:0; height:52px; border:1px solid #e2e6f0; border-radius:12px; background:#fff; padding:0 14px; color:var(--theme-ink); }
.search-grid-v2 .year-field { min-width:150px; }
.other-input { display:none; margin-top:8px; }
.other-input.is-visible { display:block; }
.trust-row { gap:20px; color:#4d556c; font-size:12px; margin-top:18px; }
.trust-row span:before { color:var(--theme-primary); }
.experience-strip { position:relative; z-index:3; margin-top:-8px; }
.experience-grid { display:grid; grid-template-columns:repeat(4,1fr); background:#fff; border:1px solid var(--theme-line); border-radius:18px; box-shadow:var(--theme-shadow); overflow:hidden; }
.experience-grid a { padding:20px 24px; display:flex; align-items:center; gap:13px; border-inline-end:1px solid var(--theme-line); text-decoration:none; }
.experience-grid a:last-child { border:0; }
.experience-grid i { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; background:var(--theme-soft); color:var(--theme-primary); font-style:normal; font-size:20px; }
.experience-grid strong,.experience-grid small { display:block; }
.experience-grid small { color:var(--theme-muted); font-size:10px; }
.cars-grid { gap:22px; }
.car-card { border:1px solid var(--theme-line); border-radius:20px; overflow:hidden; background:#fff; box-shadow:0 8px 30px rgba(27,43,90,.05); transition:.25s; }
.car-card:hover { transform:translateY(-7px); box-shadow:var(--theme-shadow); border-color:#d6ddf1; }
.car-media { height:215px; background:#eef2fa; }
.car-media img { width:100%; height:100%; object-fit:cover; transition:transform .45s; }
.car-card:hover .car-media img { transform:scale(1.045); }
.car-body { padding:18px; }
.car-body h3 { min-height:48px; font-size:15px; line-height:1.6; }
.car-meta { color:var(--theme-muted); font-size:10px; }
.price-row strong { font-size:19px; color:var(--theme-primary-dark); }
.badge { top:12px; inset-inline-start:12px; border-radius:8px; }
.demo-badge { position:absolute; bottom:12px; inset-inline-start:12px; z-index:2; background:rgba(17,21,45,.78); color:#fff; border-radius:7px; padding:4px 8px; font-size:9px; backdrop-filter:blur(6px); }
.browse-tabs { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.browse-panel { border:1px solid var(--theme-line); border-radius:20px; padding:24px; background:#fff; }
.browse-panel h3 { margin:0 0 18px; font-size:18px; }
.chip-list { display:flex; flex-wrap:wrap; gap:9px; }
.chip-list a { border:1px solid #dfe5f4; border-radius:999px; padding:9px 13px; font-size:11px; font-weight:600; text-decoration:none; background:#fff; }
.chip-list a:hover { color:#fff; border-color:transparent; background:var(--theme-gradient); }
.body-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:14px; }
.body-grid a { padding:22px 14px; text-align:center; background:#fff; border:1px solid var(--theme-line); border-radius:16px; text-decoration:none; }
.body-grid span { display:block; font-size:25px; margin-bottom:7px; color:var(--theme-primary); }
.body-grid small { display:block; color:var(--theme-muted); }
.campaign-grid { display:grid; grid-template-columns:1.2fr .8fr; gap:20px; }
.campaign-card { min-height:310px; position:relative; overflow:hidden; border-radius:24px; color:#fff; text-decoration:none; box-shadow:var(--theme-shadow); }
.campaign-card img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.campaign-card:after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(12,17,42,.86),rgba(12,17,42,.15)); }
[dir="rtl"] .campaign-card:after { background:linear-gradient(-90deg,rgba(12,17,42,.86),rgba(12,17,42,.15)); }
.campaign-copy { position:absolute; z-index:1; inset-inline-start:28px; bottom:28px; max-width:360px; }
.campaign-copy h3 { font-size:25px; margin:5px 0 6px; }
.article-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.article-card { border:1px solid var(--theme-line); border-radius:18px; padding:24px; background:#fff; text-decoration:none; }
.article-card h3 { margin:10px 0; font-size:17px; }
.article-card p { color:var(--theme-muted); font-size:12px; }
.site-footer { background:#101744; }
.footer-grid { grid-template-columns:1.5fr repeat(3,1fr); }
.footer-logo { width:150px; height:98px; object-fit:contain; background:#fff; border-radius:14px; padding:8px; }
.whatsapp-float { position:fixed; z-index:50; bottom:20px; inset-inline-start:20px; background:#19a860; color:#fff; text-decoration:none; border-radius:999px; padding:12px 18px; font-size:12px; font-weight:700; box-shadow:0 12px 35px rgba(25,168,96,.28); }

/* Filters and forms */
.filters,.request-form,.calculator-card,.process-card,.panel { border-color:var(--theme-line); border-radius:20px; box-shadow:0 10px 35px rgba(27,43,90,.06); }
.vehicle-choice-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:16px; }
.vehicle-choice-grid .vehicle-year-wide { grid-column:1/-1; }
.vehicle-choice-grid .vehicle-year-wide select,.vehicle-choice-grid .vehicle-year-wide input { min-height:52px; font-size:15px; }
input,select,textarea { border-color:#dfe4f0; border-radius:11px; }
input:focus,select:focus,textarea:focus { outline:3px solid rgba(23,111,242,.12); border-color:var(--theme-primary); }
.catalog-layout { gap:28px; }
.catalog-results .cars-grid { grid-template-columns:repeat(3,1fr); }
.page-hero { background:linear-gradient(135deg,#f4f8ff,#fff5fb); }

/* Appearance admin */
.appearance-link { color:#fff!important; background:linear-gradient(135deg,rgba(23,111,242,.35),rgba(255,98,87,.25)); border:1px solid rgba(255,255,255,.13); }
.admin-sidebar>a:first-child { display:block; margin:8px 10px 18px; padding:10px; border-radius:14px; background:#fff; }
.admin-sidebar>a:first-child img { display:block; width:100%; height:92px; object-fit:contain; }
.theme-options { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-bottom:24px; }
.theme-option { display:block; border:2px solid var(--theme-line); border-radius:18px; padding:14px; cursor:pointer; }
.theme-option:has(input:checked) { border-color:var(--theme-primary); box-shadow:0 0 0 4px rgba(23,111,242,.1); }
.theme-option input { position:absolute; opacity:0; }
.theme-option strong,.theme-option small { display:block; margin-top:9px; }
.theme-option small { color:var(--theme-muted); }
.theme-preview { height:145px; display:grid; grid-template-columns:1.2fr .8fr; gap:10px; padding:12px; border-radius:13px; background:#fff; box-shadow:inset 0 0 0 1px #e8ebf2; }
.theme-preview i { border-radius:9px; background:var(--preview-gradient); }
.theme-preview i:first-child { grid-row:span 2; }

@media (max-width:1050px) {
  .main-nav { gap:14px; }
  .main-nav a { font-size:11px; }
  .luxury-hero-grid { grid-template-columns:1fr 410px; }
  .catalog-results .cars-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:860px) {
  .header-inner { min-height:70px; }
  .brand img { width:94px; height:52px; }
  .luxury-hero-grid { grid-template-columns:1fr; min-height:0; }
  .hero-photo { min-height:420px; }
  .search-grid-v2 { grid-template-columns:1fr 1fr; }
  .search-grid-v2 .btn { width:100%; }
  .experience-grid { grid-template-columns:1fr 1fr; }
  .experience-grid a:nth-child(2) { border-inline-end:0; }
  .experience-grid a:nth-child(-n+2) { border-bottom:1px solid var(--theme-line); }
  .browse-tabs,.article-grid,.theme-options { grid-template-columns:1fr; }
  .body-grid { grid-template-columns:repeat(3,1fr); }
  .campaign-grid { grid-template-columns:1fr; }
  .campaign-card { min-height:280px; }
  .footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:580px) {
  .container { width:min(100% - 22px,1180px); }
  .section { padding:58px 0; }
  .masar-hero { padding-top:24px; }
  .hero-copy h1 { font-size:39px; letter-spacing:-1px; }
  .hero-copy>p { font-size:13px; }
  .hero-photo { min-height:310px; border-radius:22px; }
  .hero-photo-copy { inset-inline:18px; bottom:18px; }
  .hero-photo-copy strong { font-size:17px; }
  .search-grid-v2 { grid-template-columns:1fr; }
  .search-grid-v2 .year-field { min-width:0; }
  .trust-row { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
  .experience-grid { grid-template-columns:1fr; }
  .experience-grid a { border-inline-end:0; border-bottom:1px solid var(--theme-line)!important; }
  .experience-grid a:last-child { border-bottom:0!important; }
  .body-grid { grid-template-columns:1fr 1fr; }
  .cars-grid,.catalog-results .cars-grid { grid-template-columns:1fr; }
  .car-media { height:230px; }
  .campaign-card { min-height:250px; }
  .campaign-copy h3 { font-size:20px; }
  .article-grid,.footer-grid { grid-template-columns:1fr; }
  .vehicle-choice-grid { grid-template-columns:1fr; }
  .vehicle-choice-grid .vehicle-year-wide { grid-column:auto; }
  .whatsapp-float { bottom:12px; inset-inline-start:12px; }
}
