@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  --ink: #14141f;
  --muted: #6b7280;
  --line: #e8e8f0;
  --paper: #ffffff;
  --soft: #f7f7fb;
  --primary: #6d5bff;
  --primary-dark: #5a48e0;
  --accent: #ff5d8f;
  --teal: #12b8ab;
  --amber: #f5a524;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 4px 16px rgba(20, 20, 31, .06);
  --shadow: 0 20px 48px rgba(20, 20, 31, .10);
  --shadow-lg: 0 28px 70px rgba(20, 20, 31, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  background: linear-gradient(180deg, #fbfbff 0%, var(--soft) 420px, #fff 420px);
  color: var(--ink);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; }

button, .btn {
  border: 0;
  background: var(--ink);
  color: #fff;
  padding: 13px 22px;
  border-radius: 100px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
button:hover, .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
button:active, .btn:active { transform: translateY(0); }
.btn.light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.accent { background: linear-gradient(135deg, var(--accent), var(--primary)); color: #fff; box-shadow: 0 10px 26px rgba(109, 91, 255, .28); }

input, select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font: inherit;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(109, 91, 255, .12);
}
textarea { min-height: 120px; resize: vertical; }
label { font-size: 13.5px; font-weight: 600; color: var(--muted); display: block; }
label input, label select, label textarea { margin-top: 6px; font-weight: 400; color: var(--ink); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.search { display: flex; gap: 8px; }
.search input { background: var(--soft); border-color: transparent; }
.search button { background: var(--ink); border-radius: var(--radius-sm); padding: 12px 20px; }
nav { display: flex; gap: 18px; align-items: center; white-space: nowrap; font-weight: 600; }
nav a { position: relative; padding: 6px 2px; opacity: .85; }
nav a:hover { opacity: 1; }
nav span { background: var(--accent); color: #fff; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; margin-right: 4px; font-weight: 800; }

main { min-height: 70vh; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 42px;
  align-items: center;
  padding: 64px clamp(18px, 5vw, 72px) 44px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -140px; left: -120px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(109,91,255,.16), transparent 70%);
  border-radius: 50%;
  z-index: -1;
}
.hero .badge { background: rgba(109,91,255,.1); color: var(--primary-dark); }
.hero h1 { font-size: clamp(34px, 5vw, 64px); line-height: 1.15; margin: 16px 0 18px; }
.hero p { color: var(--muted); max-width: 620px; font-size: 18px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-media {
  min-height: 440px;
  border-radius: 28px;
  background:
    linear-gradient(rgba(20,20,31,0), rgba(20,20,31,.35)),
    url('../uploads/products/boutique-dress.jpg') center/cover;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.hero-media::after {
  content: "New Season";
  position: absolute;
  left: 24px;
  bottom: 24px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 14px;
}

.section { padding: 44px clamp(18px, 5vw, 72px); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; }
.section h2 { margin: 0; font-size: 26px; }
.muted { color: var(--muted); }
.badge { background: #e9faf8; color: #08746f; border-radius: 999px; padding: 5px 14px; font-size: 12.5px; font-weight: 700; display: inline-block; }

.category-showcase { background: transparent; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.category-tile {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, transform .25s ease;
}
.category-tile:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(10,10,20,.78));
}
.category-tile:hover img { transform: scale(1.08); }
.category-tile span { position: relative; z-index: 1; color: #fff; padding: 20px; }
.category-tile strong { display: block; font-size: 22px; font-weight: 800; }
.category-tile small { display: block; color: rgba(255,255,255,.82); font-size: 13px; line-height: 1.7; margin-top: 4px; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.product-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #eef0f5; }
.product-card .body { padding: 16px; }
.product-card h3 { margin: 0 0 10px; font-size: 16.5px; font-weight: 700; }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.price { font-weight: 900; color: var(--primary-dark); }
.price-row a { font-size: 13px; font-weight: 700; color: var(--accent); }

.layout { display: grid; grid-template-columns: 260px 1fr; gap: 26px; padding: 36px clamp(18px, 5vw, 72px); }
.panel, .auth-box, .table-wrap {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.filters a { display: block; padding: 11px 4px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); transition: color .15s ease, padding-right .15s ease; }
.filters a:hover { color: var(--primary); padding-right: 6px; }

.product-detail { display: grid; grid-template-columns: .9fr 1fr; gap: 40px; padding: 42px clamp(18px, 5vw, 72px); }
.gallery img { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; box-shadow: var(--shadow); }
.detail h1 { font-size: 36px; margin: 10px 0 8px; }
.detail form { display: grid; gap: 14px; max-width: 440px; margin-top: 24px; }
.sizes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sizes label { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px; text-align: center; cursor: pointer; font-weight: 700; transition: border-color .15s ease, background .15s ease; }
.sizes label:has(input:checked) { border-color: var(--primary); background: rgba(109,91,255,.06); color: var(--primary-dark); }
.sizes input { width: auto; margin-left: 6px; }

.flash { margin: 16px clamp(18px, 5vw, 72px); padding: 14px 18px; border-radius: var(--radius-sm); background: #ecfdf5; border: 1px solid #a7f3d0; font-weight: 600; }
.flash.warning { background: #fff7ed; border-color: #fed7aa; }
.flash.error { background: #fef2f2; border-color: #fecaca; }

.auth-page { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 48px clamp(18px, 5vw, 72px); }
.auth-box h2 { margin-top: 0; }
.form-grid { display: grid; gap: 14px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: right; padding: 12px; color: var(--muted); font-size: 13px; font-weight: 700; border-bottom: 2px solid var(--line); }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
tr:hover td { background: rgba(109,91,255,.03); }
.cart-img { width: 72px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); }

.checkout { display: grid; grid-template-columns: 1fr 360px; gap: 26px; padding: 40px clamp(18px, 5vw, 72px); }
.pay-choice { display: block; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 10px; cursor: pointer; font-weight: 600; transition: border-color .15s ease, background .15s ease; }
.pay-choice.active, .pay-choice:has(input:checked) { border-color: var(--primary); background: rgba(109,91,255,.05); }
.pay-choice.disabled { opacity: .5; cursor: not-allowed; }

.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; background: var(--soft); }
.admin-sidebar {
  background: linear-gradient(180deg, #16162a, #0f0f1f);
  color: #fff;
  padding: 28px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.admin-sidebar h2 { background: linear-gradient(135deg, #a89cff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0 0 4px; }
.admin-sidebar > span.muted { display: block; margin-bottom: 20px; font-size: 12.5px; color: #9d9db3; }
.admin-sidebar a { display: block; padding: 11px 12px; color: #cfcfe6; border-radius: var(--radius-sm); font-weight: 600; font-size: 14.5px; margin-bottom: 2px; transition: background .15s ease, color .15s ease; }
.admin-sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-content { padding: 32px clamp(20px,3vw,40px); }
.admin-content h1 { margin-top: 0; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.stat { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.stat h2 { margin: 6px 0 0; font-size: 26px; }

.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 44px clamp(18px, 5vw, 72px);
  background: var(--ink);
  color: #fff;
  border-radius: 32px 32px 0 0;
  margin-top: 20px;
}
.site-footer strong { font-size: 20px; }
.site-footer a { display: block; color: #c9c9dc; margin: 6px 0; font-weight: 600; transition: color .15s ease; }
.site-footer a:hover { color: #fff; }

@media (max-width: 900px) {
  .site-header, .hero, .layout, .product-detail, .checkout, .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; height: auto; }
  nav, .search { flex-wrap: wrap; }
  .product-grid, .category-grid, .stats, .auth-page { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-media { min-height: 320px; }
}
@media (max-width: 560px) {
  .product-grid, .category-grid, .auth-page, .stats { grid-template-columns: 1fr; }
  .site-header { padding: 14px; }
  table { font-size: 13px; }
}
