:root {
  --font-display: "Unbounded", sans-serif;
  --font-body: "Manrope", sans-serif;
  --bg: #f7f5f2;
  --surface: #ffffff;
  --surface-dark: #121a22;
  --text: #121a22;
  --muted: #5b6673;
  --accent: #ff7a1a;
  --accent-2: #1fbea8;
  --accent-3: #f2b705;
  --border: rgba(18, 26, 34, 0.12);
  --shadow: 0 24px 60px rgba(18, 26, 34, 0.18);
  --shadow-soft: 0 12px 30px rgba(18, 26, 34, 0.1);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: min(1200px, 92vw);
  --transition: 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(180deg, rgba(18, 26, 34, 0.02), rgba(18, 26, 34, 0.04));
  opacity: 1;
  pointer-events: none;
  z-index: -2;
}

.ambient-orbit {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.ambient-orbit::before,
.ambient-orbit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(18, 26, 34, 0.05), transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(18, 26, 34, 0.03), transparent 55%),
    radial-gradient(circle at 60% 80%, rgba(18, 26, 34, 0.04), transparent 55%);
  opacity: 1;
}

.ambient-orbit::after {
  inset: 0;
  background: linear-gradient(120deg, rgba(18, 26, 34, 0.03), transparent 50%);
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .ambient-orbit::before,
  .ambient-orbit::after {
    animation: none;
  }
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding-bottom: 80px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

section {
  width: 100%;
}

ul {
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), #ff4d00);
  color: #fff;
  box-shadow: 0 18px 35px rgba(255, 122, 26, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-dark {
  background: var(--surface-dark);
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 122, 26, 0.12);
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.badge-light {
  background: rgba(18, 26, 34, 0.75);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.site-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 245, 242, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(18, 26, 34, 0.08);
}

.header-bar {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  width: 52px;
  height: 52px;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.brand-subtitle {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  max-width: 220px;
}

.header-contacts {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  box-shadow: var(--shadow-soft);
}

.contact-pill span {
  color: var(--muted);
  font-weight: 500;
}

.header-cta {
  padding: 12px 18px;
}

.cart-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface-dark);
  color: #fff;
  font-size: 13px;
}

.cart-indicator strong {
  font-weight: 700;
}

.header-nav {
  width: var(--container);
  margin: 0 auto 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.nav-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--surface-dark);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(18, 26, 34, 0.7);
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 20px;
  z-index: 20;
}

.mobile-panel {
  width: min(320px, 90vw);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-panel .cart-indicator {
  justify-content: space-between;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-weight: 600;
}

.mobile-panel a:last-of-type {
  margin-bottom: 8px;
}

.hero {
  width: 100%;
  background: linear-gradient(120deg, rgba(18, 26, 34, 0.94), rgba(18, 26, 34, 0.72)), url("/assets/hero-road.svg");
  background-size: cover;
  background-position: center;
  border-radius: 0 0 40px 40px;
  padding: 90px 0 80px;
  color: #fff;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
}

.hero p {
  margin-top: 18px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-panel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-panel h3 {
  font-size: 20px;
}

.hero-list {
  display: grid;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  color: var(--text);
}

.stat-card span {
  font-family: var(--font-display);
  font-size: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.section-title p {
  color: var(--muted);
  max-width: 420px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.category-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 210px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.category-card .tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.card-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--surface-dark);
  background: rgba(31, 190, 168, 0.16);
  padding: 4px 10px;
  border-radius: 999px;
}

.category-card h3 {
  font-size: 18px;
}

.category-card img {
  width: 56px;
  height: 56px;
}

.category-card p {
  color: var(--muted);
  font-size: 14px;
}

.category-card .btn {
  margin-top: auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
}

.feature-card img {
  width: 52px;
  height: 52px;
}

.hero-banner {
  background: linear-gradient(120deg, rgba(18, 26, 34, 0.92), rgba(18, 26, 34, 0.7)), url("/assets/cta-road.svg");
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  padding: 40px;
  color: #fff;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: center;
}

.hero-banner p {
  color: rgba(255, 255, 255, 0.8);
  margin-top: 12px;
}

.hero-banner .btn {
  justify-self: start;
}

.product-hero {
  width: 100%;
  padding: 60px 0 40px;
  background: linear-gradient(120deg, rgba(18, 26, 34, 0.94), rgba(18, 26, 34, 0.7)), url("/assets/hero-road.svg");
  background-size: cover;
  background-position: center;
  color: #fff;
}

.product-hero .container {
  display: grid;
  gap: 12px;
}

.product-hero .badge {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  display: grid;
  gap: 12px;
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.product-media {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(255, 122, 26, 0.12), rgba(31, 190, 168, 0.12));
  padding: 12px;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-media img {
  width: 100%;
  height: 160px;
  object-fit: contain;
}

.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 85%;
}

.product-badges .badge {
  background: rgba(18, 26, 34, 0.9);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.product-id {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: rgba(18, 26, 34, 0.85);
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
}

.product-meta {
  display: grid;
  gap: 6px;
}

.product-meta h4 {
  font-size: 15px;
}

.product-meta p {
  font-size: 12px;
  color: var(--muted);
  min-height: 34px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 700;
}

.product-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.price {
  font-weight: 700;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 24px;
}

.cart-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  display: grid;
  gap: 16px;
}

.cart-summary {
  font-size: 16px;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 16px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item img {
  width: 100px;
  height: 80px;
  object-fit: contain;
  border-radius: 12px;
  background: #f3f3f3;
}

.counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-dark);
  color: #fff;
}

.counter button {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid input,
.form-grid textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: var(--font-body);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 26, 34, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 30;
}

.modal-card {
  width: min(720px, 94vw);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  gap: 16px;
  max-height: 90vh;
  overflow: auto;
  position: relative;
}

.modal-product {
  padding: 0;
  background: #fff;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  z-index: 2;
}

.modal-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0;
}

.modal-media {
  background: linear-gradient(140deg, rgba(255, 122, 26, 0.14), rgba(31, 190, 168, 0.16));
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.modal-content {
  padding: 28px 28px 22px;
  display: grid;
  gap: 16px;
}

.modal-header {
  display: grid;
  gap: 10px;
}

.modal-header h3 {
  font-size: 22px;
}

.modal-price .price {
  flex-direction: row;
  gap: 10px;
}

.modal-scroll {
  display: grid;
  gap: 14px;
  max-height: 320px;
  overflow: auto;
  padding-right: 8px;
}

.modal-desc {
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.modal-desc p {
  margin-bottom: 10px;
}

.modal-specs {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  background: #f7f5f2;
  padding: 12px;
  border-radius: 12px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer {
  width: 100%;
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.muted {
  color: var(--muted);
}

.admin-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.admin-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.admin-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  display: grid;
  gap: 16px;
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-table {
  display: grid;
  gap: 12px;
}

.admin-table[data-sections-table] {
  max-height: 420px;
  overflow: auto;
  padding-right: 6px;
}

.admin-featured {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 6px;
}

.admin-search {
  width: 100%;
}

.admin-table-scroll {
  max-height: 520px;
  overflow: auto;
  padding-right: 6px;
}

.admin-search input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1.5fr 0.6fr 0.6fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fefefe;
}

.admin-row-grid {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.admin-row input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 13px;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-featured {
  display: grid;
  gap: 10px;
}

.featured-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
}

.price-old {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 12px;
}

.price-new {
  color: var(--accent);
  font-weight: 700;
}

.empty-state {
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero .container,
  .hero-banner {
    grid-template-columns: 1fr;
  }

  .header-contacts,
  .header-nav {
    display: none;
  }

  .burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .hero {
    padding: 70px 0 60px;
  }

  .header-bar {
    padding: 12px 0;
  }

  .brand {
    gap: 10px;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-subtitle {
    display: none;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .category-grid,
  .feature-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .category-card,
  .feature-card,
  .product-card {
    padding: 18px;
  }

  .product-media {
    min-height: 160px;
  }

  .product-media img {
    height: 140px;
  }

  .product-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-actions {
    width: 100%;
  }

  .product-actions .btn {
    width: 100%;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-media {
    padding: 20px;
  }

  .modal-content {
    padding: 20px;
  }

  .modal-scroll {
    max-height: 240px;
  }

  .cart-item {
    grid-template-columns: 1fr;
  }

  .admin-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .admin-row-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hero {
    border-radius: 0 0 28px 28px;
  }

  .hero-panel {
    padding: 18px;
  }

  .badge {
    font-size: 11px;
  }

  .section-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-panel {
    padding: 16px;
  }

  .contact-pill {
    width: 100%;
    justify-content: space-between;
  }
}
