:root {
  --bg: #050505;
  --ink: #f4efe4;
  --muted: #b2aa9a;
  --line: rgba(201, 168, 92, 0.24);
  --paper: #12110f;
  --panel: #17140f;
  --brand: #c9a85c;
  --brand-dark: #f1d58e;
  --accent: #d8b865;
  --teal: #64b6ac;
  --wine: #8a3c55;
  --danger: #d95c4f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  background:
    linear-gradient(135deg, rgba(100, 182, 172, 0.09), transparent 28%),
    linear-gradient(220deg, rgba(138, 60, 85, 0.12), transparent 34%),
    linear-gradient(180deg, #080807, #050505 42%, #0e0b08);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 82%);
}

#ambientCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.36;
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 6, 0.72);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  position: static;
}

.brand {
  color: var(--brand-dark);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-with-avatar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-with-avatar img {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
}

nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  position: relative;
  padding: 6px 0;
  transition: color 180ms ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-dark), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 220ms ease;
}

nav a:hover {
  color: var(--ink);
}

nav a:hover::after {
  transform: scaleX(1);
}

.hero {
  min-height: 76vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: clamp(74px, 10vw, 126px) clamp(18px, 5vw, 64px);
  background:
    radial-gradient(circle at 72% 34%, rgba(201, 168, 92, 0.18), transparent 23%),
    radial-gradient(circle at 86% 62%, rgba(100, 182, 172, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.2), rgba(5, 5, 5, 0.86));
  color: white;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: auto -12% 0 -12%;
  height: 44%;
  pointer-events: none;
}

.hero::before {
  top: 0;
  height: 100%;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(201, 168, 92, 0.07) 43%, transparent 45% 100%),
    linear-gradient(122deg, transparent 0 56%, rgba(100, 182, 172, 0.055) 57%, transparent 59% 100%);
  transform: translate3d(0, 0, 0);
  animation: heroSweep 18s ease-in-out infinite alternate;
}

.hero::after {
  background: linear-gradient(180deg, transparent 18%, rgba(5, 5, 5, 0.54) 72%, rgba(5, 5, 5, 0.9));
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
  animation: heroEnter 720ms ease-out both;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f7d28c;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 86px);
  text-shadow: 0 0 34px rgba(241, 213, 142, 0.18);
}

.hero p:not(.eyebrow) {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions,
.row-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.button.primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f0d78b, #b98b35 46%, #64b6ac);
  color: #090806;
  box-shadow: 0 10px 24px rgba(201, 168, 92, 0.18);
}

.button.primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: translateX(-120%);
}

.button.primary:hover::before {
  animation: buttonShine 780ms ease;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--ink);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.button.danger {
  background: var(--danger);
  color: white;
}

.section {
  padding: clamp(58px, 8vw, 96px) clamp(18px, 5vw, 64px);
}

.section.reveal-section {
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(0.992);
  transition:
    opacity 920ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 920ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.section.reveal-section.reveal-now {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.muted-band {
  background:
    linear-gradient(90deg, rgba(100, 182, 172, 0.035), transparent 36%),
    rgba(255, 255, 255, 0.025);
  border-block: 1px solid rgba(201, 168, 92, 0.11);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section h2 {
  font-size: clamp(28px, 4vw, 44px);
  text-wrap: balance;
}

.section-copy {
  max-width: 760px;
  margin: -8px 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

.settings-subpanel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.settings-subpanel h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 18px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input {
  width: auto;
  min-height: auto;
}

select,
input,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e0d0b;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: 16px;
}

.review-grid,
.stats-grid,
.location-grid,
.payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.product-card,
.review-card,
.metric-card,
.panel-card,
.location-card,
.payment-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(100, 182, 172, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(23, 21, 16, 0.9), rgba(15, 14, 12, 0.92));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.product-card::before,
.review-card::before,
.metric-card::before,
.panel-card::before,
.location-card::before,
.payment-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(130deg, rgba(241, 213, 142, 0.13), transparent 28%, rgba(100, 182, 172, 0.08));
  opacity: 0;
  transition: opacity 220ms ease;
}

.product-card:hover,
.review-card:hover,
.location-card:hover,
.payment-card:hover {
  transform: translateY(-3px);
  border-color: rgba(241, 213, 142, 0.44);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.product-card:hover::before,
.review-card:hover::before,
.location-card:hover::before,
.payment-card:hover::before {
  opacity: 1;
}

.product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  background: #18140d;
  transition: transform 320ms ease, filter 320ms ease;
}

.product-card:hover .product-image {
  transform: scale(1.035);
  filter: saturate(1.1) contrast(1.05);
}

.product-body,
.review-card,
.metric-card,
.panel-card,
.location-card,
.payment-card {
  padding: 16px;
}

.location-button {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.review-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.review-card .badge {
  min-height: 28px;
  padding: 5px 10px;
  line-height: 1;
  letter-spacing: 1px;
}

.review-card h3 {
  width: 100%;
  margin-top: 2px;
  font-size: 19px;
  line-height: 1.25;
}

.review-card p {
  margin: 0;
  line-height: 1.6;
}

.product-meta,
.muted,
.table-meta {
  color: var(--muted);
  font-size: 13px;
}

.price {
  color: var(--brand-dark);
  font-size: 22px;
  font-weight: 900;
}

.weight-select {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.weight-select select {
  min-height: 42px;
  border: 1px solid rgba(201, 168, 92, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 0 12px;
}

.payment-card code {
  display: block;
  max-width: 100%;
  margin-top: 10px;
  padding: 10px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--brand-dark);
}

.settings-note {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.settings-note h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.settings-note p {
  margin: 0;
}

.price.discount-price {
  color: #ff5a52;
}

.old-price {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 13px;
  margin-left: 8px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.check-item {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.check-item input {
  width: 16px;
  min-height: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(201, 168, 92, 0.14);
  color: var(--brand-dark);
  border: 1px solid rgba(201, 168, 92, 0.22);
  font-size: 12px;
  font-weight: 800;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition:
    opacity 760ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 760ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-stagger.reveal-now > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.reveal-stagger.reveal-now > *:nth-child(2) {
  transition-delay: 90ms;
}

.reveal-stagger.reveal-now > *:nth-child(3) {
  transition-delay: 180ms;
}

.reveal-stagger.reveal-now > *:nth-child(4) {
  transition-delay: 270ms;
}

@keyframes heroEnter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroSweep {
  from {
    transform: translate3d(-1.5%, 0, 0);
    opacity: 0.35;
  }

  to {
    transform: translate3d(1.5%, 0, 0);
    opacity: 0.55;
  }
}

@keyframes buttonShine {
  to {
    transform: translateX(120%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  #ambientCanvas {
    display: none;
  }

  .section.reveal-section {
    transition:
      opacity 920ms cubic-bezier(0.16, 1, 0.3, 1) !important,
      transform 920ms cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .reveal-stagger > * {
    transition:
      opacity 760ms cubic-bezier(0.16, 1, 0.3, 1) !important,
      transform 760ms cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
}

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top, rgba(201, 168, 92, 0.18), transparent 34%),
    linear-gradient(135deg, #060606, #15120c);
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin-bottom: 18px;
  font-size: 26px;
}

.form-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.admin-sidebar {
  background: #090806;
  color: white;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-sidebar .brand {
  color: white;
  margin-bottom: 12px;
}

.tab-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.84);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}

.tab-button.active {
  background: linear-gradient(135deg, rgba(240, 215, 139, 0.28), rgba(164, 125, 45, 0.18));
  color: var(--brand-dark);
  border-color: rgba(201, 168, 92, 0.35);
}

.tab-button.danger {
  margin-top: auto;
  color: #ffd0ca;
}

.admin-main {
  min-width: 0;
  padding: 24px;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-topbar h1 {
  font-size: 30px;
}

.admin-tab {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.admin-product-thumb {
  width: 64px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: #18140d;
}

.chart-bars {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 110px 190px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6d5420, #f0d78b);
}

@media (max-width: 860px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .admin-topbar,
  .site-header {
    align-items: stretch;
    flex-direction: column;
  }
}
