:root {
  color-scheme: dark;
  --bg: #0e0e0e;
  --surface: #141414;
  --surface-2: #1f1f1f;
  --text: #f5f5f5;
  --muted: #c7c7c7;
  --accent: #e10f18;
  --accent-soft: #ff3f41;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, rgba(225, 15, 24, 0.16), transparent 34%), #0f0f0f;
  color: var(--text);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  background: #080808;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.28s ease;
}

@media (max-width: 640px) {
  .site-header.navbar-hidden {
    transform: translateY(-100%);
  }
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
}

.brand-hero {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #940000);
  position: relative;
}

.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: #111;
  border-radius: 999px;
}

.brand-mark::before {
  width: 16px;
  height: 8px;
  top: 12px;
  left: 8px;
}

.brand-mark::after {
  width: 8px;
  height: 18px;
  right: 8px;
  top: 14px;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
}

.top-contacts a {
  color: var(--text);
}

html {
  scroll-behavior: smooth;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding: 0.9rem 2rem 1rem;
  align-items: center;
}

.main-nav a,
.cart-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
  transition: background 0.22s ease, transform 0.18s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

button,
input[type="submit"],
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), #ff4d53);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease, filter 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.product-actions a.btn,
.product-actions button.btn {
  width: 100%;
}

button:hover,
input[type="submit"]:hover,
a.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.24);
}

button:focus-visible,
input[type="submit"]:focus-visible,
a.btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.22);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff4d53);
  border-color: transparent;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.product-actions button,
.floating-cart .floating-cart-actions button {
  width: 100%;
}

.floating-cart {
  position: fixed;
  top: 88px;
  right: 1.5rem;
  z-index: 120;
  min-width: 280px;
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.4rem;
  padding: 1.1rem 1.2rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
  display: grid;
  gap: 0.7rem;
}

.floating-cart.hidden {
  display: none !important;
}

.floating-cart strong {
  color: var(--accent);
  font-size: 0.98rem;
}

.floating-cart .floating-cart-actions {
  display: grid;
  gap: 0.65rem;
}

.floating-cart .floating-cart-actions a,
.floating-cart .floating-cart-actions button {
  width: 100%;
}

.main-nav a:hover,
.cart-info:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.cart-info {
  color: #fff;
}

.page-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.95fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.8rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.22);
}

.hero-copy {
  padding: 1rem 0;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent-soft);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.hero-panel h1 {
  margin: 0;
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 0.95;
}

.hero-panel p {
  margin: 1.5rem 0 2rem;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-aside {
  display: flex;
  justify-content: center;
}

.hero-card {
  background: linear-gradient(180deg, #191919, #111111);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  width: 100%;
  max-width: 360px;
  padding: 2rem;
  box-shadow: 0 24px 45px rgba(0, 0, 0, 0.28);
}

.hero-card-title {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 700;
}

.hero-card p {
  margin: 0.65rem 0;
  color: var(--text);
}

.summary-grid,
.card-grid,
.product-grid,
.category-grid,
.brand-grid,
.about-gallery {
  display: grid;
  gap: 1.5rem;
}

.summary-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  margin-bottom: 2rem;
}

.summary-card,
.card,
.product-card,
.category-card,
.brand-card,
.dashboard-panel,
.purchase-card,
.about-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.75rem;
  padding: 1.75rem;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, background 0.28s ease;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
}

.summary-card:hover,
.card:hover,
.product-card:hover,
.category-card:hover,
.brand-card:hover,
.purchase-card:hover,
.about-card:hover {
  transform: translateY(-4px);
  border-color: rgba(225, 15, 24, 0.35);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.22);
}

.summary-card h2,
.card h3,
.product-card h3,
.category-card h3,
.brand-card h3 {
  margin-top: 0;
}

.summary-card p,
.card p,
.product-card p,
.category-card p,
.brand-card p,
.purchase-card p,
.dashboard-panel p {
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.link-action {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--accent);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-title h2 {
  margin: 0;
  font-size: 2rem;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.category-grid,
.brand-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.product-card {
  display: grid;
  gap: 1rem;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-meta span {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.product-actions a,
.product-actions button {
  width: 100%;
}

.form-row {
  display: grid;
  gap: 1rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 10, 0.95);
  color: var(--text);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(225, 15, 24, 0.75);
  background: rgba(4, 4, 4, 1);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.42);
}

label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
}

input::placeholder {
  color: #666;
}

.hidden {
  display: none !important;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.dashboard-panel {
  min-height: 320px;
}

.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.95rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table th {
  color: var(--accent);
}

.cart-list,
.purchase-list {
  display: grid;
  gap: 1rem;
}

.cart-entry,
.purchase-card {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.1rem;
  background: #111;
}

.cart-entry h4,
.purchase-card h4 {
  margin: 0 0 0.5rem;
}

.cart-entry p,
.purchase-card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.alert {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(225, 15, 24, 0.12);
  color: #fff;
}

.alert.success {
  background: rgba(56, 183, 88, 0.18);
  color: #d7ffd9;
  border: 1px solid rgba(56, 183, 88, 0.35);
}

.alert.error {
  background: rgba(225, 15, 24, 0.18);
  color: #ffffff;
  border: 1px solid rgba(225, 15, 24, 0.35);
}

.about-story {
  margin-bottom: 1.5rem;
}

.about-gallery {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.about-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 1.2rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.about-card h3 {
  margin-bottom: 0.6rem;
}

.site-footer {
  padding: 2rem;
  background: #090909;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer h2 {
  margin: 0 0 0.75rem;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-drift {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-3px) rotate(0.2deg);
  }
}

@keyframes logo-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(225, 15, 24, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(225, 15, 24, 0.06);
  }
}

@keyframes hero-copy-enter {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hero-aside-enter {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes content-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typing-caret {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.site-header {
  animation: page-enter 1.6s both;
}

.brand-logo {
  animation: logo-glow 3.8s ease-in-out infinite;
}

.hero-panel {
  animation: page-enter 1.8s 0.12s both;
}

.hero-copy > h1 {
  animation: hero-copy-enter 1.6s 0.4s ease-out both;
}

.hero-copy > h1.is-typing::after {
  content: "|";
  color: var(--accent);
  font-weight: 400;
  margin-left: 0.08em;
  animation: typing-caret 0.7s ease-in-out infinite;
}

.hero-copy > p {
  animation: hero-copy-enter 1.6s 1s ease-out both;
}

.hero-copy > .hero-actions {
  animation: hero-copy-enter 1.6s 1.7s ease-out both;
}

.hero-card {
  animation: hero-aside-enter 1.7s 0.8s ease-out both;
}

.page-main > .summary-grid,
.page-main > .featured-products,
.site-footer {
  animation: content-enter 1.6s 2.2s ease-out both;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1.4s ease, transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.ecommerce-card.reveal {
  transition: opacity 1.4s ease, transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.summary-card:nth-child(2),
.card-grid > :nth-child(2),
.product-grid > :nth-child(2),
.category-grid > :nth-child(2),
.brand-grid > :nth-child(2),
.about-gallery > :nth-child(2) {
  transition-delay: 0.08s;
}

.summary-card:nth-child(3),
.card-grid > :nth-child(3),
.product-grid > :nth-child(3),
.category-grid > :nth-child(3),
.brand-grid > :nth-child(3),
.about-gallery > :nth-child(3) {
  transition-delay: 0.16s;
}

.link-action {
  transition: color 0.25s ease, transform 0.25s ease;
}

.link-action:hover {
  color: var(--accent-soft);
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .site-header,
  .hero-panel,
  .hero-copy > *,
  .hero-card,
  .page-main > .summary-grid,
  .page-main > .featured-products,
  .site-footer {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .hero-panel,
  .dashboard-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .top-bar,
  .main-nav,
  .page-main,
  .site-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .main-nav {
    gap: 0.5rem;
  }

  .product-actions {
    grid-template-columns: 1fr;
  }
}

/* Onboarding contextual */
body.onboarding-open { overflow: hidden; }
.onboarding-root { position: fixed; inset: 0; z-index: 1100; pointer-events: none; }
.onboarding-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.38); animation: onboarding-fade-in 0.22s ease both; }
.onboarding-spotlight-frame { position: fixed; z-index: 1101; border: 3px solid var(--accent); border-radius: 1rem; box-shadow: 0 0 0 6px rgba(225, 15, 24, 0.2), 0 0 24px rgba(225, 15, 24, 0.45); pointer-events: none; transition: top 0.22s ease, left 0.22s ease, width 0.22s ease, height 0.22s ease; }
.onboarding-card { position: fixed; z-index: 1002; width: min(390px, calc(100vw - 2rem)); max-height: min(420px, calc(100vh - 2rem)); overflow: auto; padding: 1.4rem; border: 1px solid rgba(225, 15, 24, 0.55); border-radius: 1.2rem; background: linear-gradient(145deg, #202020, #111111); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5); color: var(--text); pointer-events: auto; animation: onboarding-card-in 0.24s ease both; }
.onboarding-card h2 { margin: 0 0 0.55rem; color: var(--accent-soft); font-size: 1.25rem; }
.onboarding-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.onboarding-progress { display: block; margin-bottom: 0.65rem; color: var(--accent-soft); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.onboarding-actions { display: flex; justify-content: space-between; align-items: center; gap: 0.7rem; margin-top: 1.25rem; }
.onboarding-actions button { min-height: 42px; padding: 0.7rem 1rem; }
.onboarding-skip { border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--muted) !important; font-size: 0.85rem; }
.onboarding-skip:hover { color: var(--text) !important; transform: none !important; }
@keyframes onboarding-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes onboarding-card-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 640px) {
  .site-header {
    padding: 0 0.75rem;
  }

  .site-header.navbar-hidden {
    animation: none;
    transform: translateY(-100%);
  }

  .site-header .top-bar {
    flex-direction: row;
    justify-content: center;
    padding: 0.55rem 0;
  }

  .site-header .brand-hero {
    gap: 0.55rem;
  }

  .site-header .brand-logo {
    width: 42px;
    height: 42px;
  }

  .site-header .brand-title {
    font-size: 1.15rem;
  }

  .site-header .brand-subtitle,
  .site-header .top-contacts {
    display: none;
  }

  .site-header .main-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.45rem;
    margin: 0 -0.75rem;
    padding: 0.55rem 0.75rem 0.7rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-header .main-nav::-webkit-scrollbar {
    display: none;
  }

  .site-header .main-nav a,
  .site-header .main-nav .cart-info {
    min-width: max-content;
    padding: 0.55rem 0.85rem;
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .onboarding-card { padding: 1.2rem; border-radius: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .onboarding-backdrop, .onboarding-card { animation: none; } }
