@import url('https://db.onlinewebfonts.com/c/30fa25c99fe33691d39c95bf780bf7c1?family=Peyda');

:root {
  --bg: #121012;
  --paper: #221d1b;
  --paper-2: #1a1614;
  --paper-light: #f7f0e6;
  --line: rgba(233, 208, 167, 0.18);
  --text: #f5eee4;
  --muted: #c2b8aa;
  --accent: #d89a54;
  --accent-2: #7ea18a;
  --shadow: 0 22px 44px rgba(0,0,0,.34);
  --shell: min(1180px, calc(100vw - 28px));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Peyda', 'PeydaWeb', Tahoma, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(16,13,13,0.96), rgba(10,10,12,0.99)),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
  min-height: 100vh;
}
body.theme-day {
  --bg: #ede2d4;
  --paper: rgba(255,251,246,0.94);
  --paper-2: rgba(244,236,225,0.96);
  --text: #241d18;
  --muted: #655a52;
  --line: rgba(93,68,44,.15);
  background:
    linear-gradient(180deg, #f5efe5 0%, #eadfcc 100%),
    linear-gradient(90deg, rgba(89,71,49,0.04) 1px, transparent 1px),
    linear-gradient(rgba(89,71,49,0.04) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

body.cms-loading .site-header,
body.cms-loading main,
body.cms-loading footer { opacity: 0; pointer-events: none; }
body.cms-loading::after {
  content: 'در حال بارگذاری...';
  position: fixed; inset: 0; display: grid; place-items: center;
  background: var(--bg); color: var(--text); z-index: 300;
}

.shell { width: var(--shell); margin: 0 auto; }
.page { padding-bottom: 42px; }

.card,
.section-card,
.nav-shell,
.feature-card,
.product-card,
.preview-card,
.form-card,
.mini-card,
.info-card,
.chat-panel {
  position: relative;
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
body.theme-day .card,
body.theme-day .section-card,
body.theme-day .nav-shell,
body.theme-day .feature-card,
body.theme-day .product-card,
body.theme-day .preview-card,
body.theme-day .form-card,
body.theme-day .mini-card,
body.theme-day .info-card,
body.theme-day .chat-panel {
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
}
.card::after,
.section-card::after,
.feature-card::after,
.product-card::after,
.preview-card::after,
.form-card::after,
.mini-card::after,
.info-card::after,
.nav-shell::after {
  content: '';
  position: absolute;
  top: -11px;
  left: 24px;
  width: 86px;
  height: 22px;
  border-radius: 7px;
  background: rgba(222,204,176,.22);
  border: 1px solid rgba(255,255,255,.05);
  transform: rotate(-4deg);
  pointer-events: none;
}
.nav-shell::before {
  content: '';
  position: absolute;
  top: -9px;
  right: 36px;
  width: 78px;
  height: 20px;
  border-radius: 7px;
  background: rgba(222,204,176,.18);
  transform: rotate(5deg);
  pointer-events: none;
}

.site-header { position: sticky; top: 0; z-index: 80; padding-top: 14px; }
.nav-shell {
  width: var(--shell);
  margin: 0 auto;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #f4ca8d); color: #241d18; font-weight: 800;
}
.brand-copy { display: grid; gap: 2px; }
.brand-name { font-size: 1rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.brand-sub { font-size: .82rem; color: var(--muted); }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.nav-links a,
.theme-toggle,
.lang-toggle,
.account-link,
.button,
.soft-button,
.filter-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(224, 189, 136, 0.08); color: var(--text);
}
.nav-links a.active,
.nav-links a:hover,
.theme-toggle:hover,
.lang-toggle:hover,
.account-link:hover,
.soft-button:hover,
.filter-chip.active,
.filter-chip:hover {
  background: rgba(224, 189, 136, 0.18);
}
.button {
  background: linear-gradient(135deg, var(--accent), #f1c88b);
  color: #2b2118;
  font-weight: 800;
}
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; border: 1px solid var(--line); background: rgba(224, 189, 136, 0.08); color: var(--text); border-radius: 50%; width: 44px; height: 44px; }

.section { padding: 42px 0; }
.hero-grid, .grid-3, .grid-2, .contact-grid, .account-grid, .admin-grid { display: grid; gap: 18px; }
.hero-grid { grid-template-columns: 1.08fr 0.92fr; align-items: stretch; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contact-grid { grid-template-columns: 1fr .92fr; }
.account-grid { grid-template-columns: .85fr 1.15fr; }
.admin-grid { grid-template-columns: 340px minmax(0,1fr); align-items: start; }
.section-card, .feature-card, .form-card, .info-card, .preview-card, .mini-card, .product-card { padding: 22px; }
.feature-card, .mini-card, .product-card { overflow: hidden; }
.eyebrow { color: var(--accent); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.hero-title, .page-title, .section-title, .big-quote { margin: 10px 0 14px; line-height: .95; font-weight: 800; }
.hero-title { font-size: clamp(2.8rem, 6vw, 5.4rem); }
.page-title { font-size: clamp(2rem, 4vw, 3.5rem); }
.section-title { font-size: clamp(1.5rem, 3vw, 2.4rem); }
.big-quote { font-size: clamp(1.6rem, 4vw, 3rem); }
.copy, .muted, .list { color: var(--muted); line-height: 1.9; }
.hero-actions, .tag-row, .card-actions, .toolbar, .admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stat-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 24px; }
.stat-box { padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.02); }
.stat-box strong { display: block; font-size: 1.8rem; }
.hero-media img, .feature-thumb, .contact-thumb, .product-cover { width: 100%; object-fit: cover; border-radius: 20px; }
.hero-media img { aspect-ratio: 4/5; }
.feature-thumb, .contact-thumb, .product-cover { aspect-ratio: 4/3; }
.audio-card { width: 100%; }
.audio-card audio, .track-player audio { width: 100%; }
.album-grid, .track-list, .product-grid, .education-grid, .sound-grid { display: grid; gap: 18px; }
.album-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.track-list, .product-grid, .education-grid, .sound-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.track-card, .lesson-card, .sound-card, .product-card { padding: 16px; }
.cover-card { position: relative; overflow: hidden; border-radius: 20px; }
.cover-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-title {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  padding: 10px 12px; border-radius: 14px;
  background: rgba(9,10,12,.72); color: white; text-align: center; font-weight: 800; letter-spacing: .08em;
}
.tag { display: inline-flex; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.social-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.form-grid .full { grid-column: 1/-1; }
label { display: grid; gap: 8px; }
input, textarea, select {
  width: 100%; padding: 13px 14px; border-radius: 16px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
select option { background: #1c1715; color: #fff; }
body.theme-day select option { background: #f6eee2; color: #251d18; }
.admin-shell > .admin-block + .admin-block { margin-top: 22px; }
select option { color: #fff; background: #1b1716; }
body.theme-day select option { color: #1b1716; background: #f7efe4; }
.preview-live { border: 0; width: 100%; min-height: 920px; border-radius: 20px; background: transparent; }
.admin-sidebar { display: grid; gap: 12px; }
.sidebar-btn, .media-tab {
  width: 100%; text-align: right; padding: 15px 16px; border-radius: 18px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text);
}
.sidebar-btn.active, .media-tab.active { background: rgba(224,189,136,.15); }
.admin-shell { display: grid; gap: 18px; }
.status-box { padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.album-manager, .music-form-extra { display: grid; gap: 14px; }
.album-list { display: grid; gap: 10px; }
.order-card { padding: 18px; }
.order-links { display: flex; flex-wrap: wrap; gap: 10px; }
.chat-widget { position: fixed; left: 20px; bottom: 20px; z-index: 120; }
body[dir='ltr'] .chat-widget { left: auto; right: 20px; }
.chat-toggle { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); background: linear-gradient(135deg, var(--accent), #f1c88b); color: #221c17; }
.chat-panel { width: min(360px, calc(100vw - 30px)); padding: 16px; margin-top: 12px; }
.chat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.chat-body { display: grid; gap: 10px; }
.site-footer { padding: 20px 0 38px; }

@media (max-width: 980px) {
  .hero-grid, .grid-3, .grid-2, .contact-grid, .account-grid, .admin-grid, .album-grid, .track-list, .product-grid, .education-grid, .sound-grid, .form-grid, .stat-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .nav-shell { grid-template-columns: auto auto 1fr auto; }
  .nav-shell::before, .nav-shell::after, .card::after, .section-card::after, .feature-card::after, .product-card::after, .preview-card::after, .form-card::after, .mini-card::after, .info-card::after { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav-links { display: none; order: 5; grid-column: 1/-1; flex-direction: column; align-items: stretch; padding-top: 12px; }
  .nav-links.open { display: flex; }
  .hide-mobile { display: none; }
}
