@font-face {
  font-family: 'Vazirmatn';
  src: url('Vazirmatn-VariableFont_wght.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
:root {
  --bg: #111111;
  --bg-2: #171717;
  --card: rgba(28, 28, 28, 0.9);
  --soft: #602723;
  --soft-2: #7f342f;
  --text: #f4ede9;
  --muted: #cdb4ad;
  --line: rgba(255, 255, 255, 0.08);
  --success: #1fb980;
  --danger: #ff7b70;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow-dark: 14px 14px 28px rgba(0, 0, 0, 0.45);
  --shadow-light: -10px -10px 20px rgba(96, 39, 35, 0.12);
  --toolbar-h: 116px;
  --transition: 180ms ease;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      circle at top right,
      rgba(96, 39, 35, 0.22),
      transparent 28%
    ),
    radial-gradient(
      circle at top left,
      rgba(96, 39, 35, 0.14),
      transparent 22%
    ),
    linear-gradient(180deg, #171717 0%, #111111 100%);
  overflow-x: hidden;
  min-height: 100vh;
}
img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
button,
input,
select,
textarea {
  font-family: inherit;
}

.site-app,
.admin-app,
.admin-single-page,
.auth-shell {
  min-height: 100vh;
}

.page-container {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding-inline: 16px;
}

.glass-card {
  background: linear-gradient(
    145deg,
    rgba(30, 30, 30, 0.92),
    rgba(18, 18, 18, 0.96)
  );
  box-shadow: var(--shadow-dark), var(--shadow-light);
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
}

.hero-shell {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}
.hero-panel {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  padding-block: 18px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
  align-items: center;
}
.hero-copy,
.hero-visual {
  min-height: calc(50vh - 36px);
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px;
}
.hero-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.logo-img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.type-logo {
  width: min(160px, 46vw);
  object-fit: contain;
}
.hero-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(96, 39, 35, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #f0c4b8;
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1.15;
}
.hero-text {
  color: var(--muted);
  margin: 14px 0 0;
  max-width: 62ch;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.meta-chip,
.footer-links a,
.admin-nav a,
.back-link,
.mobile-actions a {
  padding: 11px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
}
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-frame {
  width: min(100%, 620px);
  aspect-ratio: 1 / 1;
  padding: 14px;
  border-radius: 34px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid var(--line);
}
.hero-banner {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.floating-toolbar-wrap {
  position: sticky;
  top: 50px;
  z-index: 50;
  margin-top: calc(var(--toolbar-h) * 0);
  padding-bottom: 8px;
  background: linear-gradient(
    180deg,
    rgba(17, 17, 17, 0.92),
    rgba(17, 17, 17, 0.68),
    transparent
  );
}
.floating-toolbar {
  min-height: var(--toolbar-h);
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 28px;
}
.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.floating-categories {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.floating-categories::-webkit-scrollbar {
  display: none;
}
.category-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--muted);
  transition: var(--transition);
  white-space: nowrap;
}
.category-chip:hover,
.category-chip.active {
  background: linear-gradient(135deg, var(--soft), var(--soft-2));
  color: #fff;
  box-shadow: 0 8px 20px rgba(96, 39, 35, 0.28);
}

.search-box input,
.search-box button,
.stack-form input,
.stack-form textarea,
.stack-form select,
.auth-form input,
.stack-form button,
.auth-form button {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  color: var(--text);
  background: #181818;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow:
    inset 6px 6px 14px rgba(0, 0, 0, 0.44),
    inset -6px -6px 14px rgba(96, 39, 35, 0.08);
}
.search-box button,
.stack-form button,
.auth-form button {
  cursor: pointer;
  background: linear-gradient(135deg, var(--soft), var(--soft-2));
  box-shadow: 0 14px 28px rgba(96, 39, 35, 0.26);
  transition:
    transform var(--transition),
    opacity var(--transition);
}
.search-box button:hover,
.stack-form button:hover,
.auth-form button:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.app-main {
  padding-top: 22px;
  padding-bottom: 24px;
}
.products-grid {
  display: grid;
  gap: 18px;
}
.product-card {
  overflow: hidden;
  padding: 14px;
}
.product-image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 26px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}
.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-badges {
  position: absolute;
  inset: 16px 16px auto 16px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}
.discount-badge,
.category-badge {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  backdrop-filter: blur(10px);
}
.discount-badge {
  background: rgba(255, 123, 112, 0.95);
  color: #fff;
}
.category-badge {
  background: rgba(17, 17, 17, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.product-content {
  padding-top: 14px;
  display: grid;
  gap: 12px;
}
.product-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.product-title-wrap h2 {
  margin: 0;
  font-size: 1.3rem;
}
.short-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}
.stock {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
}
.available {
  background: rgba(31, 185, 128, 0.12);
  color: #89f1c4;
}
.unavailable {
  background: rgba(255, 123, 112, 0.12);
  color: #ffb2aa;
}

.info-box,
.footer-card,
.admin-card,
.admin-sidebar,
.admin-hero,
.mobile-item-card,
.mobile-product-card,
.auth-card,
.hint-box,
.alert,
.empty-state {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.info-box {
  padding: 14px;
}
.info-box-title {
  font-size: 0.92rem;
  color: #f0c4b8;
  margin-bottom: 10px;
}
.variant-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}
.variant-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.price-stack,
.price-box {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 4px;
}
.old-price {
  text-decoration: line-through;
  color: #d59d94;
  font-size: 0.92rem;
}
.description {
  margin: 0;
  color: var(--muted);
}
.syrup-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.syrup-list span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(96, 39, 35, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
}

.footer-card {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  margin-bottom: 20px;
}
.footer-card h3 {
  margin: 0 0 8px;
}
.footer-card p {
  margin: 0;
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.empty-state h2 {
  margin: 0 0 8px;
}

.admin-body {
  min-height: 100vh;
  overflow-x: hidden;
}
.admin-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px;
}
.admin-sidebar {
  padding: 18px;
  position: sticky;
  top: 16px;
  min-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.admin-sidebar-head h2 {
  margin: 0 0 6px;
}
.admin-sidebar-head p {
  margin: 0;
  color: var(--muted);
}
.admin-nav {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.danger-soft {
  color: #ffb2aa !important;
}

.admin-main {
  min-height: calc(100vh - 32px);
  display: grid;
  gap: 16px;
}
.admin-hero,
.admin-card {
  padding: 18px;
}
.admin-hero {
  min-height: 180px;
  display: flex;
  align-items: center;
}
.admin-hero h1 {
  margin: 10px 0 8px;
}
.admin-hero p {
  margin: 0;
  color: var(--muted);
}
.admin-block-grid,
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h1,
.section-head h2,
.mobile-product-content h3 {
  margin: 0;
}
.stack-form {
  display: grid;
  gap: 12px;
}
.stack-form label,
.auth-form label {
  color: var(--muted);
  font-size: 0.92rem;
}
.table-wrap {
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
}
.desktop-table {
  display: none;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
th,
td {
  padding: 12px;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
}
.category-list-mobile,
.product-list-mobile {
  display: grid;
  gap: 12px;
}
.mobile-item-card,
.mobile-product-card {
  padding: 14px;
}
.mobile-item-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.mobile-item-card p,
.mobile-item-card span,
.mobile-product-content p,
.mobile-product-content span {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.mobile-product-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
}
.mobile-product-thumb {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  object-fit: cover;
}
.mobile-product-content {
  min-width: 0;
}
.mobile-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.action-links {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}
.status-ok {
  color: #89f1c4;
  display: inline-block;
  margin-top: 6px;
}
.status-bad {
  color: #ffb2aa;
  display: inline-block;
  margin-top: 6px;
}
.danger-link {
  color: #ffb2aa;
}

.admin-single-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.admin-single-page .admin-card {
  width: min(100%, 980px);
}

.admin-auth-body {
  min-height: 100vh;
  overflow: hidden;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}
.auth-card {
  width: min(100%, 460px);
  padding: 24px;
}
.auth-card h1 {
  margin: 8px 0;
}
.auth-card p {
  color: var(--muted);
  margin: 0 0 16px;
}
.auth-form {
  display: grid;
  gap: 12px;
}
.hint-box,
.alert {
  margin-top: 16px;
  padding: 14px;
}
.alert.error {
  background: rgba(255, 123, 112, 0.12);
  color: #ffc2bc;
}

@media (min-width: 768px) {
  .page-container {
    padding-inline: 22px;
  }
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
  }
  .hero-copy,
  .hero-visual {
    min-height: calc(100vh - 80px);
  }
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-app {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .admin-block-grid,
  .form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .desktop-table {
    display: block;
  }
  .category-list-mobile,
  .product-list-mobile {
    display: none;
  }
}
