/* سکه و طلا بخشی — luxury gold editorial theme */
:root {
  --bg-deep: #070708;
  --bg-header: rgba(12, 12, 14, 0.72);
  --bg-footer: rgba(8, 8, 10, 0.92);
  --gold: #c9a227;
  --gold-bright: #f0d56a;
  --gold-deep: #8a6b14;
  --gold-soft: #d4b84a;
  --silver: #d0d0d4;
  --ink: #1a1408;
  --text: #f7f4ea;
  --muted: #b9b4a6;
  --up: #22c55e;
  --down: #ef4444;
  --row-start: #b8922a;
  --row-mid: #d4af37;
  --radius: 999px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  --font: "Vazirmatn", Tahoma, sans-serif;
  --glass: rgba(18, 16, 12, 0.55);
  --glass-border: rgba(232, 197, 71, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ——— Atmospheric background ——— */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-image {
  position: absolute;
  inset: -4%;
  background:
    url("assets/bg-gold.jpg") center 35% / cover no-repeat;
  transform: scale(1.06);
  filter: saturate(1.15) contrast(1.05);
  animation: bgDrift 28s ease-in-out infinite alternate;
}

.bg-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(7, 7, 8, 0.55) 0%,
      rgba(7, 7, 8, 0.42) 28%,
      rgba(7, 7, 8, 0.62) 58%,
      rgba(7, 7, 8, 0.92) 100%
    ),
    radial-gradient(ellipse 90% 60% at 70% 15%, rgba(201, 162, 39, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 20% 80%, rgba(138, 107, 20, 0.18), transparent 50%);
}

.bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(240, 213, 106, 0.18), transparent 40%);
  animation: glowPulse 6s ease-in-out infinite;
}

.bg-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 240, 180, 0.06) 48%,
    transparent 62%
  );
  background-size: 220% 100%;
  animation: shineSweep 10s ease-in-out infinite;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ——— Header ——— */
.site-header {
  background: var(--bg-header);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.95rem 1rem 1.05rem;
  animation: fadeDown 0.7s ease both;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.header-inner {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-text {
  text-align: right;
  flex: 1;
}

.brand-eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
  opacity: 0.85;
  margin-bottom: 0.2rem;
}

.company-name {
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #fff6c8 0%, #f0d56a 28%, #c9a227 55%, #f5e7a0 78%, #a8841c 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.3;
  animation: goldShimmer 5s linear infinite;
  filter: drop-shadow(0 2px 10px rgba(201, 162, 39, 0.25));
}

.company-tagline {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.logo-wrap {
  position: relative;
  flex-shrink: 0;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #fff;
  padding: 5px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--gold-deep),
    var(--gold-bright),
    #fff3b0,
    var(--gold),
    var(--gold-deep)
  );
  z-index: -1;
  animation: spinSlow 8s linear infinite;
  filter: blur(0.2px);
  box-shadow: 0 0 24px rgba(201, 162, 39, 0.45);
}

.logo-wrap:hover {
  transform: scale(1.06) rotate(-2deg);
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
  background: #fff;
}

/* ——— Info bar ——— */
.info-bar {
  position: relative;
  background: linear-gradient(100deg, #6e5410 0%, var(--gold-deep) 20%, var(--gold) 50%, var(--gold-bright) 78%, #d4af37 100%);
  color: var(--ink);
  padding: 0.65rem 1rem 0.75rem;
  text-align: center;
  animation: fadeDown 0.75s ease 0.08s both;
  box-shadow: 0 6px 24px rgba(138, 107, 20, 0.35);
  overflow: hidden;
}

.info-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.28) 48%,
    transparent 66%
  );
  background-size: 200% 100%;
  animation: shineSweep 7s ease-in-out infinite;
  pointer-events: none;
}

.info-bar-inner {
  position: relative;
  max-width: 740px;
  margin: 0 auto;
}

.datetime {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.dt-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(26, 20, 8, 0.12);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
}

.dt-time {
  font-variant-numeric: tabular-nums;
  min-width: 6.5rem;
  justify-content: center;
}

.icon {
  width: 15px;
  height: 15px;
  opacity: 0.9;
}

.slogan {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ——— Talabeen partner banner slider ——— */
.partner-banner {
  max-width: 740px;
  margin: 0.85rem auto 0;
  width: calc(100% - 1.5rem);
  border-radius: 16px;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.06) 0%, transparent 42%),
    linear-gradient(160deg, #1a1712 0%, #0f0e0c 48%, #16120c 100%);
  border: 1px solid rgba(192, 140, 53, 0.38);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 230, 170, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  color: #f5f0e6;
  animation: fadeUp 0.7s ease 0.1s both;
  position: relative;
  overflow: hidden;
}

.partner-banner::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #e2c06a, #c08c35, #7a5a28);
  box-shadow: 0 0 16px rgba(192, 140, 53, 0.55);
  z-index: 1;
}

.partner-banner::after {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 70%;
  height: 200%;
  background:
    radial-gradient(circle at 30% 40%, rgba(192, 140, 53, 0.18), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(154, 114, 52, 0.1), transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: partnerGlow 7s ease-in-out infinite alternate;
}

.partner-track {
  position: relative;
  min-height: 68px;
}

.partner-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem 1.4rem;
  color: inherit;
  opacity: 0;
  visibility: hidden;
  transform: translateX(18px);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s;
  z-index: 2;
}

.partner-slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.partner-slide:hover .partner-banner-cta {
  background: linear-gradient(135deg, #e2c06a, #c08c35);
  color: #1a1408;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(192, 140, 53, 0.45);
}

.partner-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  min-width: 0;
  padding: 0.2rem 0.45rem 0.2rem 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(192, 140, 53, 0.22);
}

.partner-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #faf5e9;
  box-shadow:
    0 0 0 2px rgba(192, 140, 53, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.35);
}

.partner-name {
  font-size: 0.84rem;
  font-weight: 800;
  background: linear-gradient(120deg, #fff6c8, #e2c06a 45%, #c08c35);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.02em;
  direction: ltr;
  padding-left: 0.15rem;
  padding-right: 0.35rem;
}

.partner-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.partner-banner-text strong {
  font-size: 0.84rem;
  color: #fff8e8;
  line-height: 1.3;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.partner-banner-text span {
  font-size: 0.7rem;
  color: #b9b0a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.partner-banner-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #1a1408;
  direction: ltr;
  background: linear-gradient(135deg, #e2c06a, #9a7234);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 240, 180, 0.25);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(154, 114, 52, 0.35);
}

.partner-banner-cta svg {
  width: 13px;
  height: 13px;
}

@media (max-width: 420px) {
  .partner-banner-cta {
    font-size: 0.62rem;
    padding: 0.32rem 0.55rem;
  }

  .partner-logo {
    width: 34px;
    height: 34px;
  }

  .partner-name {
    font-size: 0.74rem;
  }

  .partner-banner-text strong {
    font-size: 0.78rem;
  }
}

.partner-dots {
  position: absolute;
  bottom: 0.45rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.38rem;
  z-index: 3;
}

.partner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 246, 200, 0.22);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.partner-dot.is-active {
  background: #e2c06a;
  transform: scale(1.25);
  box-shadow: 0 0 0 3px rgba(226, 192, 106, 0.2), 0 0 10px rgba(192, 140, 53, 0.45);
}

@keyframes partnerGlow {
  from { opacity: 0.7; transform: translate3d(0, 0, 0); }
  to { opacity: 1; transform: translate3d(-4%, 2%, 0); }
}

/* ——— Main / prices ——— */
.main {
  flex: 1;
  padding: 1.1rem 0.75rem 5.5rem;
  max-width: 740px;
  margin: 0 auto;
  width: 100%;
}

.price-board {
  animation: fadeUp 0.75s ease 0.12s both;
}

.board-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-bright);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

#price-source[data-status="error"] {
  color: #f0a8a8;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: livePulse 1.8s ease-out infinite;
}

.price-head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 0.95fr 0.95fr 42px;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, rgba(28, 24, 16, 0.92), rgba(14, 14, 16, 0.88));
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-bright);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 230, 150, 0.08);
}

.col-product {
  background: linear-gradient(135deg, var(--gold-deep), var(--gold-bright));
  color: var(--ink);
  padding: 0.22rem 0.8rem;
  border-radius: var(--radius);
  width: fit-content;
  justify-self: start;
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.35);
}

.col-buy,
.col-sell {
  text-align: center;
}

.price-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.price-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 0.95fr 0.95fr 42px;
  align-items: center;
  gap: 0.25rem;
  min-height: 52px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: linear-gradient(
    95deg,
    #fffdf6 0%,
    #f7efd4 32%,
    #e8c547 68%,
    #b8922a 100%
  );
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  animation: rowIn 0.5s ease both;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.price-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 40%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 60%
  );
  transform: translateX(120%);
  pointer-events: none;
}

.price-row:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    0 8px 24px rgba(201, 162, 39, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.price-row:hover::after {
  animation: rowShine 0.85s ease;
}

.price-row:nth-child(1) { animation-delay: 0.05s; }
.price-row:nth-child(2) { animation-delay: 0.09s; }
.price-row:nth-child(3) { animation-delay: 0.13s; }
.price-row:nth-child(4) { animation-delay: 0.17s; }
.price-row:nth-child(5) { animation-delay: 0.21s; }
.price-row:nth-child(6) { animation-delay: 0.25s; }
.price-row:nth-child(7) { animation-delay: 0.29s; }
.price-row:nth-child(8) { animation-delay: 0.33s; }
.price-row:nth-child(9) { animation-delay: 0.37s; }
.price-row:nth-child(10) { animation-delay: 0.41s; }

.product {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem 0.4rem 0.3rem;
  min-width: 0;
}

.thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 32% 28%, #fff4c0, #e8c547 42%, #9a7420 78%, #5c4410);
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 -3px 5px rgba(0, 0, 0, 0.28),
    0 2px 6px rgba(90, 60, 10, 0.35);
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: #3a2a08;
}

.thumb.bar {
  background: linear-gradient(145deg, #fff1b8, #d4af37 48%, #7a5a10);
  border-radius: 7px;
}

.product-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.price-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

.trend {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

.trend.up { color: var(--up); }
.trend.down { color: var(--down); }

.chart-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 240, 180, 0.35);
  cursor: pointer;
  background: linear-gradient(145deg, #1c1810, #0e0c08);
  color: var(--gold-bright);
  display: grid;
  place-items: center;
  margin: 0 auto;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.chart-btn:hover {
  transform: scale(1.1);
  color: #fff6c8;
  box-shadow: 0 0 16px rgba(240, 213, 106, 0.45);
}

.chart-btn svg {
  width: 16px;
  height: 16px;
}

/* ——— Footer ——— */
.site-footer {
  position: relative;
  background: var(--bg-footer);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
  overflow: hidden;
}

.footer-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), var(--gold), transparent);
}

.footer-inner {
  max-width: 740px;
  margin: 0 auto;
  padding: 1.35rem 1.1rem 1.15rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
}

.footer-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 0 0 2px var(--gold), 0 4px 14px rgba(201, 162, 39, 0.3);
}

.footer-brand strong {
  display: block;
  color: var(--gold-bright);
  font-size: 0.95rem;
}

.footer-brand p {
  font-size: 0.75rem;
  color: var(--muted);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--text);
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
  transition: background 0.2s ease;
  animation: fadeUp 0.5s ease both;
}

.contact-list li:hover {
  background: rgba(201, 162, 39, 0.08);
}

.contact-list li:nth-child(1) { animation-delay: 0.05s; }
.contact-list li:nth-child(2) { animation-delay: 0.1s; }
.contact-list li:nth-child(3) { animation-delay: 0.15s; }
.contact-list li:nth-child(4) { animation-delay: 0.2s; }
.contact-list li:nth-child(5) { animation-delay: 0.25s; }
.contact-list li:nth-child(6) { animation-delay: 0.3s; }

.contact-list .pin {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 0.15rem;
  filter: drop-shadow(0 0 6px rgba(201, 162, 39, 0.45));
}

.contact-list .phone {
  width: 18px;
  height: 18px;
  color: var(--silver);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.contact-list a:hover {
  color: var(--gold-bright);
}

.copyright {
  background: linear-gradient(90deg, #6e5410, var(--gold), var(--gold-bright), var(--gold), #6e5410);
  background-size: 200% 100%;
  animation: goldShimmer 8s linear infinite;
  color: var(--ink);
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.designed-by {
  background: #0a0a0b;
  text-align: center;
  padding: 0.55rem 1rem 0.7rem;
  font-size: 0.74rem;
  color: var(--muted);
  border-top: 1px solid rgba(201, 162, 39, 0.15);
}

.designed-by a {
  color: var(--gold-bright);
  font-weight: 800;
  border-bottom: 1px solid rgba(240, 213, 106, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.designed-by a:hover {
  color: #fff6c8;
  border-bottom-color: #fff6c8;
}

/* ——— FAB ——— */
.fab {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 40;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 240, 180, 0.35);
  cursor: pointer;
  background: linear-gradient(145deg, var(--gold-bright), var(--gold-deep));
  box-shadow:
    0 8px 28px rgba(201, 162, 39, 0.5),
    0 0 0 0 rgba(240, 213, 106, 0.4);
  display: grid;
  place-items: center;
  transition: transform 0.25s ease;
  animation: fabPulse 3s ease-in-out infinite;
}

.fab:hover {
  transform: scale(1.08);
  animation: none;
}

.fab-lines,
.fab-lines::before,
.fab-lines::after {
  display: block;
  width: 20px;
  height: 2.5px;
  background: #1a1408;
  border-radius: 2px;
  position: relative;
  transition: transform 0.25s ease, top 0.25s ease, background 0.25s ease;
}

.fab-lines::before,
.fab-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.fab-lines::before { top: -6px; }
.fab-lines::after { top: 6px; }

.fab[aria-expanded="true"] .fab-lines {
  background: transparent;
}

.fab[aria-expanded="true"] .fab-lines::before {
  top: 0;
  transform: rotate(45deg);
}

.fab[aria-expanded="true"] .fab-lines::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ——— Side menu ——— */
.side-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: flex-start;
  animation: fadeIn 0.2s ease;
}

.side-menu[hidden] {
  display: none;
}

.side-menu-panel {
  width: min(290px, 86vw);
  height: 100%;
  background:
    linear-gradient(180deg, rgba(28, 24, 16, 0.97), rgba(10, 10, 12, 0.98)),
    url("assets/bg-gold.jpg") center / cover;
  border-left: 1px solid var(--glass-border);
  padding: 1.1rem;
  animation: slideIn 0.3s ease;
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45);
}

.side-menu-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.28);
}

.side-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}

.side-menu-head strong {
  flex: 1;
  font-size: 0.95rem;
  color: var(--gold-bright);
}

.side-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}

.side-menu ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.side-menu a {
  display: block;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.side-menu a:hover {
  background: rgba(201, 162, 39, 0.14);
  border-color: rgba(201, 162, 39, 0.28);
  color: var(--gold-bright);
}

/* ——— Modal ——— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
}

.modal-panel {
  position: relative;
  width: min(380px, 100%);
  background: linear-gradient(180deg, #1c1810, #101012);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 1.1rem 1.1rem 1.2rem;
  box-shadow: var(--shadow), 0 0 40px rgba(201, 162, 39, 0.15);
  animation: fadeUp 0.28s ease;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.modal-head h2 {
  font-size: 1rem;
  color: var(--gold-bright);
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

#chart-canvas {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #0a0908;
  border: 1px solid rgba(201, 162, 39, 0.15);
}

.modal-note {
  margin-top: 0.6rem;
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
}

/* ——— Animations ——— */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rowIn {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes goldShimmer {
  to { background-position: 200% center; }
}

@keyframes shineSweep {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}

@keyframes bgDrift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-1.5%, 1%, 0); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes fabPulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(201, 162, 39, 0.5), 0 0 0 0 rgba(240, 213, 106, 0.35); }
  50% { box-shadow: 0 8px 28px rgba(201, 162, 39, 0.55), 0 0 0 12px rgba(240, 213, 106, 0); }
}

@keyframes rowShine {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .bg-image {
    transform: none;
  }
}

/* ——— Desktop ——— */
@media (min-width: 640px) {
  .logo-wrap {
    width: 92px;
    height: 92px;
  }

  .product-name {
    font-size: 0.9rem;
  }

  .price-cell {
    font-size: 0.9rem;
  }

  .price-head {
    font-size: 0.88rem;
  }

  .main {
    padding: 1.35rem 1rem 5.5rem;
  }

  .price-row {
    min-height: 56px;
  }
}
