/* =========================
   AUTO JEM - FULL CSS
   LUXURY SHOWROOM VERSION
   ========================= */

*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:'Vazirmatn',sans-serif;
}

html{
scroll-behavior:smooth;
}

:root{

--gold:#d4af37;
--silver:#c0c0c0;

--bg:#ffffff;
--card:#f7f7f7;
--text:#222;
--border:#e5e5e5;

--shadow:0 10px 25px rgba(0,0,0,.08);
}

body.dark{
--bg:#0f0f0f;
--card:#1a1a1a;
--text:#ffffff;
--border:#333;
}

body{
background:var(--bg);
color:var(--text);
transition:.3s;
}

/* =========================
   HEADER + NAV
   ========================= */

.header{
display:flex;
justify-content:space-between;
align-items:center;
padding:18px 8%;
background:rgba(10,10,10,0.9);
backdrop-filter:blur(10px);
position:sticky;
top:0;
z-index:1000;
border-bottom:1px solid rgba(212,175,55,0.3);
}

.logo{
font-size:26px;
font-weight:700;
color:var(--gold);
letter-spacing:2px;
}

nav{
display:flex;
gap:20px;
}

nav a{
text-decoration:none;
color:#fff;
transition:.3s;
position:relative;
}

nav a:hover{
color:var(--gold);
}

nav a::after{
content:"";
position:absolute;
bottom:-5px;
right:0;
width:0;
height:2px;
background:var(--gold);
transition:.3s;
}

nav a:hover::after{
width:100%;
}

#themeToggle{
width:40px;
height:40px;
border:none;
border-radius:50%;
background:var(--gold);
cursor:pointer;
}

/* =========================
   MENU MOBILE
   ========================= */

.menu-toggle{
display:none;
font-size:28px;
color:var(--gold);
cursor:pointer;
}

@media(max-width:768px){

.menu-toggle{
display:block;
}

nav{
position:fixed;
top:70px;
right:-100%;
width:70%;
height:100vh;
background:#111;
flex-direction:column;
padding:30px;
transition:.4s;
}

nav.active{
right:0;
}
}
/* =========================
   HERO
   ========================= */

.hero{
min-height:88vh;
display:flex;
align-items:center;
justify-content:center;
text-align:center;
position:relative;
overflow:hidden;
background:
linear-gradient(135deg, rgba(0,0,0,.72), rgba(0,0,0,.48)),
url('https://images.unsplash.com/photo-1494976388531-d1058494cdd8');
background-size:cover;
background-position:center;
background-attachment:fixed;
}

.hero::before{
content:"";
position:absolute;
inset:0;
background:
radial-gradient(circle at top right, rgba(212,175,55,.22), transparent 30%),
radial-gradient(circle at bottom left, rgba(255,255,255,.08), transparent 25%);
animation:heroFloat 7s ease-in-out infinite alternate;
}

.hero-overlay{
position:absolute;
inset:0;
background:linear-gradient(to top, rgba(0,0,0,.35), rgba(0,0,0,.05));
}

.hero-content{
position:relative;
z-index:2;
max-width:780px;
padding:20px;
animation:fadeUpHero 1s ease;
}

.hero-badge{
display:inline-block;
padding:8px 16px;
margin-bottom:18px;
background:rgba(212,175,55,.14);
border:1px solid rgba(212,175,55,.35);
color:#fff;
border-radius:999px;
font-size:14px;
backdrop-filter:blur(8px);
}

.hero-content h1{
font-size:68px;
line-height:1.1;
color:var(--gold);
margin-bottom:14px;
text-shadow:0 8px 24px rgba(0,0,0,.35);
}

.hero-content p{
color:#f5f5f5;
font-size:20px;
line-height:1.9;
margin:0 auto 24px;
max-width:620px;
}

.hero-actions{
display:flex;
justify-content:center;
gap:14px;
flex-wrap:wrap;
}

.btn{
display:inline-flex;
align-items:center;
justify-content:center;
padding:13px 30px;
background:linear-gradient(135deg, var(--gold), #f0cf67);
color:#111;
text-decoration:none;
border-radius:12px;
font-weight:800;
box-shadow:0 10px 25px rgba(212,175,55,.25);
transition:.3s ease;
}

.btn:hover{
transform:translateY(-3px);
box-shadow:0 14px 28px rgba(212,175,55,.32);
}

.btn-outline{
background:transparent;
color:#fff;
border:1px solid rgba(255,255,255,.35);
box-shadow:none;
}

.btn-outline:hover{
background:rgba(255,255,255,.08);
border-color:var(--gold);
color:var(--gold);
}

/* =========================
   SECTIONS
   ========================= */

section{
padding:80px 8%;
position:relative;
}

section h2{
text-align:center;
font-size:34px;
color:var(--gold);
margin-bottom:14px;
position:relative;
}

section h2::after{
content:"";
display:block;
width:80px;
height:3px;
background:linear-gradient(90deg, transparent, var(--gold), transparent);
margin:12px auto 0;
border-radius:10px;
}

.section-title-wrap{
text-align:center;
margin-bottom:35px;
}

.section-title-wrap p{
max-width:650px;
margin:0 auto;
opacity:.8;
line-height:1.9;
font-size:16px;
}

/* =========================
   CARDS
   ========================= */

.cars-grid,
.featured-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
gap:25px;
}

.car-card{
background:var(--card);
border-radius:18px;
overflow:hidden;
box-shadow:var(--shadow);
transition:.3s;
border:1px solid var(--border);
}

.car-card:hover{
transform:translateY(-8px);
}

.car-card img{
width:100%;
height:200px;
object-fit:cover;
transition:.4s;
}

.car-card:hover img{
transform:scale(1.1);
}

.car-card h3{
padding:10px 15px;
color:var(--gold);
}

.car-card p{
padding:0 15px 10px;
}

.price{
color:var(--gold);
font-weight:bold;
}

.card-btn{
display:block;
text-align:center;
padding:10px;
background:var(--gold);
color:#000;
text-decoration:none;
}

/* =========================
   FORM
   ========================= */

.form-container{
max-width:700px;
margin:40px auto;
background:var(--card);
padding:25px;
border-radius:15px;
box-shadow:var(--shadow);
}

.form-group{
margin-bottom:15px;
}

input,textarea,select{
width:100%;
padding:12px;
border-radius:10px;
border:1px solid var(--border);
background:var(--bg);
color:var(--text);
}

/* =========================
   GALLERY
   ========================= */

.car-detail{
display:grid;
grid-template-columns:1fr 1fr;
gap:30px;
padding:60px 8%;
}

.main-image{
width:100%;
border-radius:15px;
height:420px;
object-fit:cover;
}

.thumbs{
display:flex;
gap:10px;
margin-top:10px;
}

.thumbs img{
width:70px;
height:60px;
object-fit:cover;
border-radius:8px;
cursor:pointer;
opacity:.6;
}

.thumbs img:hover{
opacity:1;
border:2px solid var(--gold);
}

/* =========================
   DASHBOARD
   ========================= */

.dashboard{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
gap:20px;
padding:40px 8%;
}

.dash-card{
background:var(--card);
padding:20px;
border-radius:15px;
text-align:center;
border:1px solid var(--border);
}

.dash-card h3{
color:var(--gold);
font-size:30px;
}

/* TABLE */

table{
width:100%;
border-collapse:collapse;
background:var(--card);
}

th,td{
padding:12px;
text-align:center;
border-bottom:1px solid var(--border);
}

th{
color:var(--gold);
background:rgba(212,175,55,0.1);
}

/* =========================
   RESPONSIVE
   ========================= */

@media(max-width:768px){

.hero-content h1{
font-size:38px;
}

.car-detail{
grid-template-columns:1fr;
}

nav{
flex-direction:column;
}

}
.thumbs img.active{
border:2px solid var(--gold);
opacity:1;
transform:scale(1.05);
}



/* --- Admin Add Car (responsive card form) --- */
.admin-card{
  max-width: 980px;
  margin: 28px auto;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

.form-header{ margin-bottom: 16px; }
.muted{ opacity: .75; }
.hint{ margin-top: 10px; font-size: .92rem; }

.grid-form{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.form-group.full{ grid-column: 1 / -1; }

.image-picker-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.mini-label{ font-size: .9rem; opacity: .85; margin-bottom: 6px; display: block; }

.preview-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.preview-box{
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.08);
}

.preview-box img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.form-actions{
  display:flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 6px;
}

@media (max-width: 860px){
  .grid-form{ grid-template-columns: 1fr; }
  .image-picker-grid, .preview-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px){
  .image-picker-grid, .preview-grid{ grid-template-columns: 1fr; }
}

.preview-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:10px;
  margin-top:12px;
}

.preview-box{
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.08);
}

.preview-box img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

@media (max-width: 860px){
  .preview-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px){
  .preview-grid{ grid-template-columns: 1fr; }
}
/* =========================
   ADMIN IMPROVEMENTS
   ========================= */

.form-container.admin-card{
  max-width: 980px;
  margin: 10px auto 40px;
  border: 1px solid var(--border);
  background: var(--card);
}

.form-header{
  margin-bottom: 18px;
}

.form-header h2{
  margin-bottom: 10px;
}

.grid-form{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-group{
  display: flex;
  flex-direction: column;
}

.form-group.full{
  grid-column: 1 / -1;
}

.mini-label{
  font-size: .95rem;
  margin-bottom: 8px;
  color: var(--text);
  opacity: .88;
}

input, textarea, select{
  outline: none;
  transition: border-color .25s, box-shadow .25s, transform .2s;
}

input:focus, textarea:focus, select:focus{
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212,175,55,.12);
}

textarea{
  resize: vertical;
  min-height: 130px;
}

.submit-btn{
  border: none;
  background: linear-gradient(135deg, var(--gold), #f0cf67);
  color: #111;
  padding: 12px 22px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(212,175,55,.22);
  transition: .25s ease;
}

.submit-btn:hover{
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.submit-btn:active{
  transform: translateY(0);
}

.table-wrapper{
  overflow-x: auto;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

table{
  min-width: 680px;
  border-radius: 14px;
  overflow: hidden;
}

td .action-btn,
td button,
td a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.preview-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.preview-box{
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.04);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.preview-box img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hint{
  margin-top: 10px;
  font-size: .92rem;
}

.muted{
  opacity: .75;
}

@media (max-width: 860px){
  .grid-form{
    grid-template-columns: 1fr;
  }

  .preview-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header{
    padding: 16px 5%;
  }

  nav{
    gap: 14px;
  }
}

@media (max-width: 520px){
  section{
    padding: 40px 5%;
  }

  .form-container{
    padding: 18px;
  }

  .dashboard{
    padding: 24px 5%;
  }

  .preview-grid{
    grid-template-columns: 1fr;
  }

  .logo{
    font-size: 18px;
    letter-spacing: 1px;
  }

  nav a{
    font-size: 14px;
  }
}
.action.delete{
  border: none;
  background: #d9534f;
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: .25s;
}

.action.delete:hover{
  background: #c9302c;
  transform: translateY(-1px);
}
   

/* =========================
   INDEX PAGE IMPROVEMENTS
   ========================= */

/* برندها */
.brands-section{
padding-top:55px;
}

.brands-grid{
display:grid;
grid-template-columns:repeat(auto-fit, minmax(105px, 1fr));
gap:18px;
margin-top:28px;
}

.brand-circle{
width:100px;
height:100px;
margin:auto;
border-radius:50%;
display:flex;
align-items:center;
justify-content:center;
text-align:center;
padding:10px;
font-size:14px;
font-weight:700;
background:
linear-gradient(145deg, rgba(212,175,55,.18), rgba(212,175,55,.05));
border:1px solid rgba(212,175,55,.35);
color:var(--text);
box-shadow:0 10px 22px rgba(0,0,0,.07);
transition:.35s ease;
cursor:default;
}

.brand-circle:hover{
transform:translateY(-8px) scale(1.05);
box-shadow:0 16px 30px rgba(212,175,55,.18);
border-color:var(--gold);
color:var(--gold);
}

/* جدیدترین خودروها */
.featured-section{
position:relative;
}

.featured-section::before{
content:"";
position:absolute;
top:30px;
left:0;
width:220px;
height:220px;
background:radial-gradient(circle, rgba(212,175,55,.10), transparent 70%);
pointer-events:none;
}

.car-card{
position:relative;
background:var(--card);
border-radius:20px;
overflow:hidden;
box-shadow:var(--shadow);
transition:.35s ease;
border:1px solid var(--border);
}

.car-card:hover{
transform:translateY(-10px);
box-shadow:0 18px 35px rgba(0,0,0,.12);
}

.car-card h3{
padding:14px 15px 8px;
color:var(--gold);
font-size:20px;
}

.car-card p{
padding:0 15px 12px;
line-height:1.8;
}

.card-btn{
display:block;
text-align:center;
padding:12px;
background:linear-gradient(135deg, var(--gold), #f0cf67);
color:#111;
text-decoration:none;
font-weight:800;
transition:.25s ease;
}

.card-btn:hover{
filter:brightness(1.04);
}

/* خدمات */
.services-section{
background:linear-gradient(180deg, transparent, rgba(212,175,55,.04), transparent);
}

.services-grid{
display:grid;
grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
gap:22px;
margin-top:30px;
}

.service-card{
background:var(--card);
border:1px solid var(--border);
border-radius:20px;
padding:26px 20px;
box-shadow:var(--shadow);
transition:.35s ease;
text-align:center;
position:relative;
overflow:hidden;
}

.service-card::before{
content:"";
position:absolute;
top:-40px;
left:-40px;
width:120px;
height:120px;
background:radial-gradient(circle, rgba(212,175,55,.12), transparent 70%);
transition:.35s ease;
}

.service-card:hover{
transform:translateY(-8px);
border-color:rgba(212,175,55,.35);
box-shadow:0 16px 35px rgba(0,0,0,.12);
}

.service-card:hover::before{
transform:scale(1.2);
}

.service-card span{
display:inline-flex;
align-items:center;
justify-content:center;
width:62px;
height:62px;
border-radius:50%;
background:rgba(212,175,55,.12);
font-size:28px;
margin-bottom:16px;
}

.service-card h3{
font-size:20px;
margin-bottom:10px;
color:var(--gold);
}

.service-card p{
line-height:1.9;
opacity:.85;
font-size:15px;
}

/* درباره ما */
.about-section{
padding-top:65px;
}

.about-box{
max-width:900px;
margin:0 auto;
padding:28px;
background:linear-gradient(145deg, var(--card), rgba(212,175,55,.04));
border:1px solid var(--border);
border-radius:22px;
box-shadow:var(--shadow);
text-align:center;
line-height:2.1;
font-size:17px;
}

/* فوتر */
footer{
padding:24px 8%;
text-align:center;
border-top:1px solid var(--border);
background:rgba(0,0,0,.03);
}

body.dark footer{
background:rgba(255,255,255,.02);
}

/* انیمیشن اسکرول */
.fade-up{
opacity:0;
transform:translateY(35px);
transition:all .8s ease;
}

.fade-up.show{
opacity:1;
transform:translateY(0);
}

/* انیمیشن‌ها */
@keyframes fadeUpHero{
from{
opacity:0;
transform:translateY(30px);
}
to{
opacity:1;
transform:translateY(0);
}
}

@keyframes heroFloat{
from{
transform:translateY(0) scale(1);
}
to{
transform:translateY(-12px) scale(1.03);
}
}


/* =========================
   INDEX RESPONSIVE
   ========================= */

@media(max-width:992px){
.hero-content h1{
font-size:54px;
}

.hero-content p{
font-size:18px;
}

.brand-circle{
width:92px;
height:92px;
font-size:13px;
}
}

@media(max-width:768px){

.hero{
min-height:78vh;
background-attachment:scroll;
}

.hero-content h1{
font-size:40px;
}

.hero-content p{
font-size:16px;
line-height:1.8;
}

.hero-actions{
flex-direction:column;
align-items:center;
}

.btn{
width:220px;
}

.section-title-wrap p{
font-size:14px;
}

.brands-grid{
grid-template-columns:repeat(3, 1fr);
gap:14px;
}

.brand-circle{
width:86px;
height:86px;
font-size:12px;
}

.services-grid{
grid-template-columns:1fr;
}

.about-box{
padding:20px;
font-size:15px;
line-height:1.95;
}
}

@media(max-width:520px){
.brands-grid{
grid-template-columns:repeat(2, 1fr);
}

.hero-badge{
font-size:12px;
padding:7px 12px;
}

.hero-content h1{
font-size:34px;
}

.hero-content p{
font-size:14px;
}
}

/* تماس با ما */
.contact-section{
background:linear-gradient(180deg, transparent, rgba(212,175,55,.04), transparent);
}

.contact-grid{
display:grid;
grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
gap:22px;
margin-top:30px;
}

.contact-card{
background:var(--card);
border:1px solid var(--border);
border-radius:20px;
padding:26px 20px;
box-shadow:var(--shadow);
text-align:center;
transition:.35s ease;
}

.contact-card:hover{
transform:translateY(-8px);
border-color:rgba(212,175,55,.35);
box-shadow:0 16px 35px rgba(0,0,0,.12);
}

.contact-card span{
display:inline-flex;
align-items:center;
justify-content:center;
width:62px;
height:62px;
border-radius:50%;
background:rgba(212,175,55,.12);
font-size:28px;
margin-bottom:16px;
}

.contact-card h3{
font-size:20px;
margin-bottom:10px;
color:var(--gold);
}

.contact-card p{
line-height:1.9;
opacity:.85;
font-size:15px;
margin-bottom:14px;
}

.contact-btn{
display:inline-flex;
align-items:center;
justify-content:center;
padding:12px 18px;
border-radius:12px;
text-decoration:none;
font-weight:800;
background:linear-gradient(135deg, var(--gold), #f0cf67);
color:#111;
transition:.3s ease;
}

.contact-btn:hover{
transform:translateY(-2px);
}

.contact-btn.secondary-btn{
background:transparent;
border:1px solid rgba(212,175,55,.35);
color:var(--gold);
}
.card-actions{
display:grid;
grid-template-columns:1fr 1fr;
gap:10px;
padding:0 15px 15px;
}

.card-btn{
display:block;
text-align:center;
padding:12px;
border-radius:12px;
background:linear-gradient(135deg, var(--gold), #f0cf67);
color:#111;
text-decoration:none;
font-weight:800;
transition:.25s ease;
}

.card-btn:hover{
transform:translateY(-2px);
filter:brightness(1.04);
}

.secondary-btn{
background:transparent;
border:1px solid rgba(212,175,55,.35);
color:var(--gold);
}

.secondary-btn:hover{
background:rgba(212,175,55,.08);
}

.buy-btn{
background:linear-gradient(135deg, #25d366, #1faa52);
color:#fff;
box-shadow:0 10px 22px rgba(37, 211, 102, 0.22);
}

.buy-btn:hover{
box-shadow:0 14px 28px rgba(37, 211, 102, 0.3);
}
  