@font-face{
  font-family:'Dana';
  src:url('../fonts/Dana-Regular.woff') format('woff');
  font-weight:normal;
  font-style:normal;
}

/* =========================
   Theme
   ========================= */
:root{
  --blue:#1e64ff;
  --blue2:#1bb3ff;
  --purple:#7c3aed;

  --text:#0f172a;
  --muted:#64748b;

  --glass-bg: rgba(255,255,255,0.62);
  --glass-bg-strong: rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.45);

  --shadow: 0 18px 60px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.10);
  --shadow-blue: 0 18px 36px rgba(30,100,255,0.25);

  --radius: 18px;
}

/* =========================
   Reset
   ========================= */
*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family:'Dana', sans-serif;
  direction:rtl;
  color:var(--text);
  line-height:1.8;
  background:#ffffff;
  overflow-x:hidden;

  /* ✅ Sticky Footer (فوتر همیشه آخر صفحه) */
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* =========================
   Background (طبق JSX شما)
   Grid + 2 Radial Gradients
   ========================= */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;

  background-image:
    linear-gradient(to right, rgba(229,231,235,0.8) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(229,231,235,0.8) 1px, transparent 1px),
    radial-gradient(circle 500px at 20% 20%, rgba(139,92,246,0.30), transparent 65%),
    radial-gradient(circle 500px at 80% 80%, rgba(59,130,246,0.30), transparent 65%);
  background-size: 48px 48px, 48px 48px, 100% 100%, 100% 100%;
  background-position: 0 0, 0 0, 0 0, 0 0;
  background-repeat: repeat, repeat, no-repeat, no-repeat;
}

/* =========================
   Base elements
   ========================= */
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

.container{
  width:min(1150px, 92vw);
  margin:0 auto;
}

.glass{
  background:var(--glass-bg);
  border:1px solid var(--glass-border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.card{
  background:var(--glass-bg);
  border:1px solid var(--glass-border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow:hidden;
}

.card .card-body{padding:14px 16px}
.muted{color:var(--muted)}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,0.08);
  background:rgba(255,255,255,0.7);
  font-size:12px;
}

/* =========================
   Buttons
   ========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.35);
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color:#fff;
  font-family:'Dana', sans-serif;
  cursor:pointer;
  box-shadow: 0 12px 28px rgba(30,100,255,0.22);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
  user-select:none;
  white-space:nowrap;
}
.btn:hover{transform: translateY(-1px); filter:saturate(1.05); box-shadow: var(--shadow-blue)}
.btn:active{transform: translateY(0px) scale(.99)}

.btn.secondary{
  background: rgba(15,23,42,0.06);
  color: var(--text);
  box-shadow:none;
}
.btn.danger{background: linear-gradient(135deg, #ef4444, #f97316)}
.btn.small{padding:7px 10px; border-radius:12px; font-size:13px}

/* =========================
   Inputs
   ========================= */
.input, select, textarea{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.75);
  outline:none;
  font-family:'Dana', sans-serif;
  transition:border-color .15s ease, box-shadow .15s ease;
}
textarea{min-height:120px; resize:vertical}
.input:focus, select:focus, textarea:focus{
  border-color: rgba(30,100,255,0.5);
  box-shadow: 0 0 0 4px rgba(30,100,255,0.12);
}
label{font-size:13px; color:var(--muted)}

.row{display:flex; gap:14px; flex-wrap:wrap}
.col{flex:1 1 280px}

hr.sep{border:none; height:1px; background:rgba(15,23,42,0.08); margin:14px 0}

table{width:100%; border-collapse:collapse}
th,td{padding:10px 8px; border-bottom:1px solid rgba(15,23,42,0.08); font-size:14px}
th{text-align:right; color:var(--muted); font-weight:600}

/* =========================
   Header / Navbar
   ========================= */
.site-header{
  position:sticky;
  top:0;
  z-index:20;
  margin:14px auto;
}

.navbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  gap:12px;
  flex-wrap:wrap;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
}
.brand .logo{
  width:40px; height:40px;
  border-radius:16px;
  background: linear-gradient(135deg, rgba(124,58,237,0.9), rgba(30,100,255,0.9));
  box-shadow: 0 16px 36px rgba(124,58,237,0.18);
}

.navlinks{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.navlinks a{
  padding:8px 10px;
  border-radius:12px;
  transition: background .15s ease;
}
.navlinks a:hover{background: rgba(15,23,42,0.05)}

.nav-right{display:flex; gap:10px; align-items:center; flex-wrap:wrap}

.cart-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,0.1);
  background: rgba(255,255,255,0.72);
}
.cart-pill .count{
  min-width:22px; height:22px; border-radius:999px;
  display:inline-flex; align-items:center; justify-content:center;
  background: rgba(30,100,255,0.12);
  color: var(--blue);
  font-weight:700;
  font-size:12px;
}

/* =========================
   Hero banner
   ========================= */
.hero{
  margin: 18px auto 12px;
  overflow:hidden;
}
.hero img{
  width:100%;
  height: min(400px, 40vw);
  object-fit:cover;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.hero .hero-overlay{
  position:relative;
  margin-top:-86px;
  padding:14px;
}
.hero .hero-overlay .glass{
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.hero h1{margin:0; font-size:20px}
.hero p{margin:0; color:var(--muted)}

/* =========================
   Sections / Grid
   ========================= */
.section{margin:16px 0}
.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin: 0 0 10px;
  gap:10px;
  flex-wrap:wrap;
}
.section-title h2{margin:0; font-size:18px}

.grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:14px;
}

/* =========================
   Product card
   ========================= */
.product-card img{
  width:100%;
  height:190px;
  object-fit:cover;
  border-bottom: 1px solid rgba(15,23,42,0.08);
  border-radius: 18px 18px 0 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}
.product-card .title{font-weight:800; margin:0}
.product-card .price{font-weight:900; color:var(--blue)}
.product-card .actions{display:flex; gap:10px; margin-top:10px; flex-wrap:wrap}
.product-card .actions .btn{flex:1}

.pill{
  padding:6px 10px;
  border-radius:999px;
  background: rgba(124,58,237,0.10);
  color: rgba(124,58,237,1);
  font-size:12px;
}

/* =========================
   Carousel
   ========================= */
.carousel{position:relative}
.carousel-track{
  display:flex;
  gap:14px;
  overflow:hidden;
  scroll-behavior:smooth;
  padding-bottom:6px;
}
.carousel .product-card{min-width: 260px; max-width:260px}

.carousel-btn{
  position:absolute;
  top:40%;
  transform: translateY(-50%);
  width:44px; height:44px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  cursor:pointer;
}
.carousel-btn:hover{filter:saturate(1.04)}
.carousel-btn.prev{right:-10px}
.carousel-btn.next{left:-10px}

/* =========================
   Auth pages
   ========================= */
.auth-wrap{
  display:grid;
  place-items:center;
  min-height: calc(100vh - 120px);
  padding: 20px 0;
}
.auth-card{width: min(520px, 92vw); padding: 16px}
.flash{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.75);
  margin-bottom: 10px;
}

/* =========================
   Product details
   ========================= */
.product-page{
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap:14px;
}
.product-page .gallery img{
  border-radius:22px;
  box-shadow: var(--shadow);
}

/* =========================
   Dashboard layout
   ========================= */
.dashboard{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap:14px;
  margin: 14px 0;
}
.sidebar{padding: 14px}
.sidebar a{
  display:flex;
  justify-content:space-between;
  padding:10px 12px;
  border-radius:14px;
  margin: 6px 0;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(15,23,42,0.08);
}
.sidebar a.active{
  background: rgba(30,100,255,0.10);
  border-color: rgba(30,100,255,0.20);
}
.main-panel{padding:14px}

/* =========================
   Footer (وسط‌چین + هم‌راستا)
   ========================= */
.footer{
  padding: 14px 16px;
  text-align:center;
  color: var(--muted);
}

/* ✅ اگر footer روی تگ <footer class="container footer glass"> باشد */
footer.footer{
  width:min(1150px, 92vw);
  margin-left:auto;
  margin-right:auto;
  margin-bottom: 22px;

  /* ✅ Sticky footer */
  margin-top:auto;
}

/* Sticky footer helper */
main{flex:1}

/* =========================
   Responsive
   ========================= */
@media (max-width: 980px){
  .grid{grid-template-columns: repeat(2, minmax(0,1fr))}
  .product-page{grid-template-columns:1fr}
  .dashboard{grid-template-columns:1fr}
  .hero .hero-overlay{margin-top:-74px}
  .carousel-btn.prev{right:6px}
  .carousel-btn.next{left:6px}
}

@media (max-width: 520px){
  .grid{grid-template-columns: 1fr}
  .hero img{height: 260px}
  .hero .hero-overlay{margin-top:-66px; padding:12px}
  .navbar{gap:10px}
  .btn{padding:9px 12px}
}