/*
Theme Name: Rotterdam Theme
Version: 1.0.0
Text Domain: rotterdam-theme
*/

:root{
  --rtm-black:#0b0b0f;
  --rtm-white:#fff;

  --rtm-gold-1:#ffe08a;
  --rtm-gold-2:#f7b84b;
  --rtm-gold-3:#b77712;

  --rtm-orange:#ff7a1a;
  --rtm-red:#d62828;

  --rtm-border:rgba(255,255,255,.12);
  --rtm-muted:rgba(255,255,255,.72);
  --rtm-muted-2:rgba(255,255,255,.55);

  --rtm-shadow:0 18px 50px rgba(0,0,0,.35);
  --rtm-shadow-soft:0 10px 30px rgba(0,0,0,.28);

  --rtm-container:1200px;
  --rtm-radius:18px;
  --rtm-header-h:78px;

  --rtm-gold-grad:linear-gradient(135deg,var(--rtm-gold-1) 0%,var(--rtm-gold-2) 45%,var(--rtm-gold-3) 100%);
}

*{box-sizing:border-box}
html,body{height:100%}
html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--rtm-white);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,"Noto Sans Arabic","Tahoma",sans-serif;
  line-height:1.6;
  overflow-x:hidden;

  /* ✅ خلفية السيارة لكل الموقع */
  background-image: url("/wp-content/themes/rotterdam-theme/assets/img/hero-bg.png");
  background-size: cover;

  /* ✅ ركّز على أسفل الصورة (مكان السيارة) بدل السماء */
  background-position: center bottom;

  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* ✅ موبايل: أوقف fixed لأنه يسبب قص/مشاكل، ونزّل التركيز أكثر */
@media (max-width: 768px){
  body{
    background-attachment: scroll;
    background-position: 50% 92%;
  }
}

a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
.container{width:min(var(--rtm-container),calc(100% - 40px));margin-inline:auto}

.rtm-gold-text{
  background:var(--rtm-gold-grad);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}

/* Buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  padding:12px 16px;border-radius:999px;
  border:1px solid var(--rtm-border);
  background:rgba(0,0,0,.18);
  cursor:pointer; user-select:none; white-space:nowrap;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover{transform:translateY(-1px);box-shadow:var(--rtm-shadow-soft);background:rgba(0,0,0,.26);border-color:rgba(255,255,255,.22)}
.btn.primary{background:var(--rtm-gold-grad);border-color:rgba(255,224,138,.35);color:#1b1406;font-weight:900}
.btn.call{background:rgba(214,40,40,.16);border-color:rgba(214,40,40,.35)}
.btn.whatsapp{background:rgba(37,211,102,.14);border-color:rgba(37,211,102,.32)}

.lang-switch{
  display:inline-flex;align-items:center;gap:10px;
  padding:10px 14px;border-radius:999px;
  background:var(--rtm-gold-grad);
  border:1px solid rgba(255,224,138,.40);
  color:#1b1406;font-weight:900;cursor:pointer;
}

.rtm-wa-hero{
  width:26px;height:26px;border-radius:999px;
  object-fit:cover;
  box-shadow:0 10px 20px rgba(0,0,0,.35);
}

/* Header */
.rtm-header{
  position:fixed;top:0;left:0;right:0;
  height:var(--rtm-header-h);
  z-index:999;
  background:rgba(0,0,0,.28);
  border-bottom:1px solid rgba(255,255,255,.14);
  backdrop-filter:blur(14px);
}
.rtm-header .container{
  height:100%;
  display:flex;align-items:center;justify-content:space-between;gap:14px;
}
.rtm-brand{display:flex;align-items:center;gap:12px}
.rtm-brand .name{font-weight:1000;letter-spacing:.2px}
.rtm-brand .tag{font-size:12px;color:var(--rtm-muted-2)}
.rtm-nav{display:flex;align-items:center;gap:18px}
.rtm-nav a{
  position:relative;font-weight:800;color:rgba(255,255,255,.90);
  padding:10px 6px;transition:color .2s ease;
}
.rtm-nav a:hover{color:#fff}
.rtm-nav a::after{
  content:"";position:absolute;left:10%;right:10%;bottom:4px;height:2px;border-radius:999px;
  transform:scaleX(0);transition:transform .2s ease;background:var(--rtm-gold-grad);
}
.rtm-nav a:hover::after{transform:scaleX(1)}
.rtm-actions{display:flex;align-items:center;gap:10px}
@media (max-width: 980px){ .rtm-nav{display:none} }

.site-main{padding-top:var(--rtm-header-h)}

/* ✅ Hero بدون طبقات سوداء إضافية */
.hero{
  position:relative;
  min-height:calc(100vh - var(--rtm-header-h));
  display:flex;align-items:center;
  padding:48px 0 38px;
  overflow:hidden;isolation:isolate;
}
.hero::before,
.hero::after{display:none !important;}

.hero-inner{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:30px;align-items:center;
}
@media(max-width:980px){.hero-inner{grid-template-columns:1fr;gap:18px}}

.h1{font-size:clamp(30px,3.5vw,54px);line-height:1.05;margin:0 0 14px}
.p{color:var(--rtm-muted);margin:0}
.hero-cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}

/* Sections transparent فوق الخلفية */
.section{padding:64px 0; background:transparent !important;}
.section .head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px}
.section .desc{max-width:520px;color:var(--rtm-muted)}

/* ✅ Glass cards (بدون سواد ثقيل) */
.card,
.hero-card,
.reviews-wrap,
.compare-wrap,
.map-wrap,
.form,
.product-card{
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.14);
  backdrop-filter: blur(8px);
  border-radius:var(--rtm-radius);
  box-shadow:var(--rtm-shadow);
}

.hero-card{padding:18px}
.card{padding:18px}
.card .title{font-weight:1000;margin:0 0 6px}
.card .text{margin:0;color:var(--rtm-muted)}

.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media(max-width:980px){.grid{grid-template-columns:1fr}}

.map-wrap{overflow:hidden}
.map-wrap iframe{width:100%;height:380px;border:0;display:block}
@media(max-width:980px){.map-wrap iframe{height:320px}}

/* Products */
.products-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:14px;
}
@media(max-width:1100px){.products-grid{grid-template-columns: repeat(2, 1fr)}}
@media(max-width:560px){.products-grid{grid-template-columns: 1fr}}
.product-card{padding:14px;cursor:pointer;transition:transform .2s ease, background .2s ease, border-color .2s ease;}
.product-card:hover{transform:translateY(-2px);background:rgba(0,0,0,.18);border-color:rgba(255,224,138,.26)}
.product-card .name{font-weight:1000;margin:0 0 6px}
.product-card .mini{color:var(--rtm-muted);margin:0;font-size:14px}
.prod-thumb{width:100%;height:140px;overflow:hidden;border-radius:16px;margin:0 0 10px;border:1px solid rgba(255,255,255,.12);background:rgba(0,0,0,.12)}
.prod-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.prod-thumb--empty{display:flex;align-items:center;justify-content:center}
.prod-thumb-empty{color:var(--rtm-muted-2);font-weight:800;font-size:13px}
.prod-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;border:1px solid rgba(255,255,255,.16);background:rgba(0,0,0,.16)}
.badge--price{border-color:rgba(255,224,138,.28)}
.badge--warr{border-color:rgba(255,255,255,.18)}
.product-card .more{display:none;margin-top:12px;border-top:1px solid rgba(255,255,255,.12);padding-top:12px}
.product-card.is-open .more{display:block}
.product-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}

/* Reviews bubbles */
.reviews-wrap{padding:18px;overflow:hidden}
.bubble-row{display:flex;gap:14px;width:max-content;will-change:transform;padding:10px 0}
.bubble{
  width:320px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.12);
  backdrop-filter: blur(8px);
  border-radius:18px;
  padding:12px 14px;
  box-shadow:0 18px 50px rgba(0,0,0,.22);
}
.bubble .name{font-weight:1000;margin:0 0 4px;display:flex;align-items:center;gap:8px}
.bubble .stars{color:rgba(255,224,138,.95);font-size:12px}
.bubble .text{margin:0;color:var(--rtm-muted);font-size:14px}

.reviews-note{
  margin-top:12px;
  color:var(--rtm-muted-2);
  font-size:13px;
  border-top:1px solid rgba(255,255,255,.12);
  padding-top:12px;
}

/* Footer */
.rtm-footer{
  border-top:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  padding:30px 0;
}
.footer-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:16px}
@media(max-width:980px){.footer-grid{grid-template-columns:1fr}}
.foot-title{font-weight:1000;margin:0 0 10px}
.foot-muted{color:var(--rtm-muted);margin:0}

.social-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.social-pill{
  display:inline-flex;align-items:center;justify-content:center;
  padding:10px 12px;border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.14);
  font-weight:900;
}

.form{padding:14px}
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.field input,.field textarea{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.16);
  color:#fff;
  padding:12px 12px;
  outline:none;
}
.field textarea{min-height:110px;resize:vertical}
.copy{margin-top:14px;color:var(--rtm-muted-2);font-size:13px}

/* Modal */
.rtm-modal{
  position:fixed;inset:0;
  background:rgba(0,0,0,.60);
  display:none;
  align-items:center;justify-content:center;
  z-index:2000;padding:18px;
}
.rtm-modal.is-open{display:flex}
.rtm-modal .box{
  width:min(1200px,100%);
  border-radius:18px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.18);
  backdrop-filter:blur(12px);
  box-shadow:0 18px 60px rgba(0,0,0,.45);
  overflow:hidden;
}
.rtm-modal .top{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 14px;border-bottom:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.12);
}
.rtm-modal .close{
  width:42px;height:42px;border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.18);
  cursor:pointer;
}
.rtm-modal img{
  width:100%;
  max-width:min(1100px, 96vw);
  max-height:82vh;
  height:auto;
  display:block;
  margin:12px auto 16px;
  border-radius:12px;
  box-shadow:0 20px 50px rgba(0,0,0,.45);
  object-fit:contain;
}

/* Floating buttons (اختياري إذا كنت مستخدمهم) */
.rtm-float{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:1500;
  display:flex;
  flex-direction:column;
  gap:10px;
}
html[dir="rtl"] .rtm-float{ right:auto; left:18px; }
.rtm-float .btn{ box-shadow:0 18px 40px rgba(0,0,0,.35); }

/* Emergency Call Button */
.rtm-emergency-call{
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 9999;

  padding: 14px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;

  text-decoration: none;
  color: #111;
  background: #f4c542;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
  border: 1px solid rgba(0,0,0,.12);

  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* =========================
   Compare Prices Modal (FIXED)
   ========================= */

.rtm-compare-modal{
  display:none;
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.72);
  z-index: 999999;
  padding: 18px;
}

.rtm-compare-modal.is-open{
  display:flex;
  align-items:center;
  justify-content:center;
}

.rtm-compare-box{
  width: min(920px, 100%);
  border-radius: 22px;
  background: rgba(15,15,18,.92);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 20px 70px rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  color:#fff;
  padding: 22px;
  position:relative;

  max-height: 85vh;
  overflow-y: auto;
}

.rtm-compare-close{
  position:absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:#fff;
  font-size: 26px;
  cursor:pointer;
}

.rtm-compare-title{
  margin: 8px 0 6px;
  font-size: 26px;
  font-weight: 900;
  text-align:center;
}

.rtm-compare-sub{
  margin: 0 0 18px;
  opacity: .85;
  text-align:center;
  font-size:16px;
}

.rtm-compare-table{
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
}

.rtm-compare-table .row{
  display:grid;
  grid-template-columns: 1.2fr .9fr .9fr .7fr;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  align-items:center;
  font-size:16px;
}

.rtm-compare-table .row.head{
  border-top:0;
  background: rgba(255,255,255,.06);
  font-weight: 900;
}

.rtm-compare-table .swap{
  background:#f4c542;
  color:#111;
  font-weight: 900;
  text-align:center;
  padding: 10px 12px;
  border-radius: 14px;
}

.rtm-compare-actions{
  display:flex;
  gap: 12px;
  justify-content:center;
  margin-top: 18px;
}

@media (max-width: 720px){
  .rtm-compare-table .row{
    grid-template-columns: 1.2fr .9fr .9fr;
  }
  .rtm-compare-table .row > div:nth-child(4){ display:none; }
}

@media (max-width: 420px){
  .rtm-compare-table .row{
    grid-template-columns: 1.2fr .9fr;
  }
  .rtm-compare-table .row > div:nth-child(3){ display:none; }
}

/* =========================================
   CLEAN CTA: remove duplicates (Header + Product cards)
   Paste at END of style.css
   ========================================= */

/* 1) شيل أزرار الاتصال/واتساب من رأس الصفحة فقط (الهيدر) */
.rtm-header .btn.call,
.rtm-header .btn.whatsapp{
  display:none !important;
}

/* (اختياري) إذا كان عندك روابط <a> وليست أزرار <button> داخل الهيدر */
.rtm-header a.btn.call,
.rtm-header a.btn.whatsapp{
  display:none !important;
}

/* 2) شيل أزرار الاتصال/واتساب تحت كل منتج (حتى ما تتكرر 10+ مرات) */
.products-grid .product-card .product-actions{
  display:none !important;
}

/* (اختياري) إذا في أي زر/روابط CTA داخل كرت المنتج غير product-actions */
.products-grid .product-card .btn.call,
.products-grid .product-card .btn.whatsapp{
  display:none !important;
}

/* 3) حافظ على زر اللغة في الهيدر (لا يتأثر) */
.rtm-header .lang-switch{
  display:inline-flex !important;
}
/* =========================
   Mobile Fix Pack (Paste at END)
   ========================= */

/* 1) Prevent sideways scroll on mobile */
html, body{
  width:100%;
  overflow-x:hidden;
}

/* 2) Make container breathe on small screens */
.container{
  padding-left: 14px !important;
  padding-right: 14px !important;
}

/* 3) Hero layout: stack + clean spacing */
.hero .hero-inner{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-top: 18px;
  padding-bottom: 18px;
}

/* 4) Fix hero background image behavior (most common issue) */
.hero{
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

/* 5) Any "image on the right" in hero: make it responsive */
.hero img:not(.rtm-wa-hero),
.hero .hero-media img,
.hero .rtm-hero-img{
  width: 100% !important;
  max-width: 520px;
  height: auto !important;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* 6) Products/cards images: no stretching */
.card img,
.product-card img,
.rtm-card img,
.grid-3 img,
.grid-2 img{
  width: 100% !important;
  height: auto !important;
  display:block;
  object-fit: cover;
}

/* 7) Grid becomes 1 column on phones */
@media (max-width: 820px){
  .grid-3{ 
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .grid-2{
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* 8) Header/nav wrap + avoid squeezing */
@media (max-width: 820px){
  .rtm-header .container{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
    justify-content:space-between;
  }
  .rtm-nav{
    width:100%;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    justify-content:flex-start;
  }
}

/* 9) Typography scaling for mobile */
@media (max-width: 820px){
  .h1, h1{
    font-size: 28px !important;
    line-height: 1.15 !important;
  }
  .p, p{
    font-size: 15px !important;
    line-height: 1.6 !important;
  }
}

/* 10) Buttons full width on mobile */
@media (max-width: 820px){
  .btn, button, .hero-cta a{
    width: 100%;
    text-align: center;
  }
  .hero-cta{
    display:grid;
    grid-template-columns: 1fr;
    gap:10px;
  }
}
/* =========================
   Mobile Image Proportions Fix
   ========================= */

/* Hero image exact ratio control */
.hero img:not(.rtm-wa-hero),
.hero .hero-media img,
.hero .rtm-hero-img{
  width: 100% !important;
  max-width: 420px;      /* يمنع التضخيم */
  aspect-ratio: 4 / 3;  /* نسبة متوازنة للموبايل */
  height: auto !important;
  object-fit: contain;  /* بدون قص */
  margin: 0 auto;
}

/* If hero uses background image */
.hero{
  min-height: 72vh;     /* يعطي ارتفاع حلو للموبايل */
  display:flex;
  align-items:center;
}

/* Product images better proportion */
.product-card img,
.card img,
.grid-3 img{
  aspect-ratio: 1 / 1;  /* مربعة متناسقة */
  object-fit: contain;
  background:#0b0b0f;   /* يخفي الفراغ الأسود لو في */
  padding:8px;
}

/* Prevent image stretching on very small phones */
@media (max-width: 480px){
  .hero img:not(.rtm-wa-hero){
    max-width: 360px;
  }
}
/* =========================
   Hero Mascot Mobile Fix
   ========================= */

/* container اللي فيه صورة البطل */
.hero-mascot,
.rtm-hero-img-wrap,
.hero-image-wrap{
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 10px;
}

/* الدائرة */
.hero-mascot::before,
.rtm-hero-img-wrap::before,
.hero-image-wrap::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:50%;
  border:4px solid rgba(255,215,120,.45); /* إطار أنحف */
  box-shadow: 0 0 25px rgba(255,180,60,.25);
}

/* صورة البطل نفسها */
.hero-mascot img,
.rtm-hero-img,
.hero-image-wrap img{
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;     /* مربع متوازن */
  object-fit: contain;     /* بدون قص */
  display:block;
  margin:auto;
}

/* تكبير شوي على الموبايل */
@media (max-width: 768px){
  .hero-mascot,
  .rtm-hero-img-wrap,
  .hero-image-wrap{
    max-width: 420px;
  }
}

/* موبايلات صغيرة */
@media (max-width: 480px){
  .hero-mascot,
  .rtm-hero-img-wrap,
  .hero-image-wrap{
    max-width: 360px;
  }
}
/* =========================
/* =========================
   FIX: Mascot ring/wrapper size (SAFE)
   ========================= */

/* ملاحظة: هذا الجزء فقط للتأكد أن أي Wrapper للـ mascot ما ينتفخ أو يكسّر التصميم */
.hero-mascot,
.rtm-hero-img-wrap,
.hero-image-wrap,
.rtm-hero-avatar,
.rtm-hero-media{
  position: relative;
  display: block;
  margin-inline: auto;
}

/* على الشاشات الصغيرة: حجم منطقي */
@media (max-width: 980px){
  .hero-mascot,
  .rtm-hero-img-wrap,
  .hero-image-wrap,
  .rtm-hero-avatar,
  .rtm-hero-media{
    width: min(320px, 88vw);
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    border-radius: 22px;
  }
}

/* الإطار (إذا موجود) يكون خفيف */
.hero-mascot::before,
.rtm-hero-img-wrap::before,
.hero-image-wrap::before,
.rtm-hero-avatar::before,
.rtm-hero-media::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  border: 2px solid rgba(255,215,120,.28);
  box-shadow: 0 0 18px rgba(255,180,60,.18);
  pointer-events: none;
}

/* صورة الماسكوت */
.hero-mascot img,
.rtm-hero-img,
.hero-image-wrap img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* =========================
   FIX: WhatsApp hero icon must NEVER stretch
   ========================= */

/* أيقونة واتساب داخل الهيرو (كانت تتضخم بسبب .hero img rules) */
.hero .rtm-wa-hero{
  width: 26px !important;
  height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  flex: 0 0 26px;
  object-fit: cover !important;
  border-radius: 999px;
}

/* لو في أي CSS عام عم يمدد صور أزرار واتساب */
.hero .btn.whatsapp img{
  width: 26px !important;
  height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  object-fit: cover !important;
}
