:root {
  --bg: #050505;
  --bg-soft: #0d0d0e;
  --panel: #111214;
  --panel-2: #161719;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f8f8f8;
  --muted: #b8b8ba;
  --black: #000000;
  --white: #ffffff;
  --danger: #ffcece;
  --success: #ecffef;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #020202 0%, #090909 100%);
  color: var(--text);
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

#authActions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.topbar {
  background: var(--white);
  color: var(--black);
  border-bottom: 1px solid #dfdfdf;
}

.topbar-inner {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.95rem;
}

.topbar-link {
  font-weight: 800;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #fff;
}

.brand-title {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.brand-subtitle {
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.main-nav,
.header-actions,
.hero-actions,
.form-actions,
.inventory-actions,
.detail-actions,
.chip-row,
.hero-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.main-nav {
  gap: 24px;
}

.main-nav a {
  position: relative;
  color: #e7e7e7;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.currency-switcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.currency-switcher span {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.currency-switcher select {
  min-width: 88px;
  width: auto;
  padding: 8px 28px 8px 10px;
  border-radius: 999px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.currency-switcher select:focus {
  box-shadow: none;
}

.btn,
.link-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn:hover,
.link-button:hover {
  transform: translateY(-1px);
}

.btn-solid {
  background: var(--white);
  border-color: var(--white);
  color: var(--black);
}

.btn-outline,
.link-button {
  background: transparent;
  color: var(--white);
}

.btn-full {
  width: 100%;
}

.link-button.danger {
  color: var(--danger);
}

.hero {
  padding: 64px 0 38px;
}

.hero-grid,
.product-detail-grid,
.contact-layout,
.admin-layout {
  display: grid;
  gap: 24px;
}

.hero-grid {
  grid-template-columns: 1.3fr 0.9fr;
}

.hero-copy,
.hero-panel,
.filter-card,
.category-card,
.product-card,
.product-gallery-card,
.product-detail-card,
.contact-copy,
.form-shell,
.auth-card,
.admin-panel,
.inventory-section,
.empty-state {
  padding: 24px;
}

.hero-copy {
  padding: 40px;
}

.hero-copy h1,
.contact-copy h1,
.auth-card h1,
.product-detail-card h1,
.admin-head h1,
.section-head h2 {
  margin: 12px 0 14px;
  line-height: 1.08;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 4vw, 4.6rem);
  max-width: 11ch;
}

.hero-copy p,
.contact-copy p,
.product-description,
.product-meta,
.detail-description,
.muted,
.footer-grid p,
.category-card p,
.empty-state p,
.dark-panel p,
.banner,
label,
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

.eyebrow,
.label,
.mini-label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: #d4d4d4;
}

.hero-side,
.admin-side {
  display: grid;
  gap: 18px;
}

.hero-panel {
  display: grid;
  gap: 16px;
}

.mini-products {
  display: grid;
  gap: 12px;
}

.mini-product {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-product img,
.preview-image,
.gallery-thumb,
.inventory-image,
.detail-main-image {
  background: #111;
}

.mini-product img {
  width: 84px;
  height: 62px;
  object-fit: cover;
  border-radius: 14px;
}

.quick-chip,
.stat-pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
}

.badge-light {
  background: var(--white);
  color: var(--black);
}

.section {
  padding: 34px 0 72px;
}

.section-inner {
  padding-top: 34px;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-head.compact {
  align-items: start;
}

.category-grid,
.product-grid,
.inventory-grid,
.footer-grid,
.info-list,
.detail-meta-grid {
  display: grid;
  gap: 18px;
}

.category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card h3,
.product-card h3,
.inventory-card h3 {
  margin: 10px 0 8px;
}

.category-button {
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.filter-card,
.form-shell,
.auth-card,
.admin-panel,
.inventory-section {
  border-radius: var(--radius);
}

.filter-grid,
.two-col {
  display: grid;
  gap: 16px;
}

.filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.two-col.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field,
.stack-form {
  display: grid;
  gap: 8px;
}

.stack-form {
  gap: 16px;
}

input,
select,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
  color-scheme: dark;
}

select option,
select optgroup {
  background: #0f0f10;
  color: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.checkbox-wrap {
  display: flex;
  align-items: end;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label input {
  width: auto;
}

.toolbar,
.product-topline,
.product-footline,
.inventory-top,
.list-top,
.footer-bottom,
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-card {
  overflow: hidden;
  padding: 0;
}

.product-image-wrap {
  display: block;
  aspect-ratio: 16 / 10;
  background: #0f0f10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.product-image,
.detail-main-image,
.inventory-image,
.preview-image,
.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  padding: 18px;
}

.product-price {
  font-size: 1.24rem;
  font-weight: 800;
}

.product-sku,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.empty-state {
  text-align: center;
}

.product-detail-grid,
.contact-layout,
.admin-layout {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.product-gallery-card,
.product-detail-card {
  overflow: hidden;
}

.detail-main-image {
  aspect-ratio: 16 / 11;
  border-radius: 18px;
}

.detail-thumbs,
.gallery-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.thumb-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}

.thumb-button.active {
  border-color: #ffffff;
}

.thumb-button img,
.gallery-thumb {
  width: 88px;
  height: 70px;
  object-fit: cover;
}

.detail-meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
}

.detail-meta-grid strong,
.info-item strong {
  display: block;
  margin-top: 6px;
}

.dark-panel {
  margin-top: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-copy,
.form-shell,
.auth-card,
.admin-panel,
.inventory-section {
  height: 100%;
}

.info-list {
  margin-top: 24px;
}

.info-item,
.list-card,
.inventory-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.banner {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}

.banner.success {
  background: rgba(236, 255, 239, 0.08);
  color: var(--success);
}

.banner.error {
  background: rgba(255, 206, 206, 0.08);
  color: var(--danger);
}

.banner.note {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.helper-text {
  font-size: 0.9rem;
}

.auth-shell {
  min-height: calc(100vh - 132px);
  display: grid;
  place-items: center;
  padding: 38px 16px 72px;
}

.auth-card {
  width: min(520px, 100%);
}

.demo-card {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-head {
  margin-bottom: 20px;
}

.admin-layout {
  margin-bottom: 24px;
}

.current-images {
  display: grid;
  gap: 16px;
}

.current-image-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-image {
  width: 180px;
  height: 140px;
  border-radius: 18px;
  margin-top: 10px;
}

.compact-check {
  justify-self: start;
}

.editable-gallery-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.gallery-edit-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-edit-card .gallery-thumb {
  width: 100%;
  height: 110px;
  border-radius: 14px;
}

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

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

.list-card.vertical {
  display: grid;
}

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

.inventory-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
}

.inventory-image {
  width: 140px;
  height: 108px;
  border-radius: 16px;
}

.inventory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  margin: 12px 0;
}

.footer-grid {
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  padding: 30px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-bottom {
  color: var(--muted);
  padding: 18px 0 34px;
}

@media (max-width: 1080px) {
  .hero-grid,
  .product-detail-grid,
  .contact-layout,
  .admin-layout,
  .footer-grid,
  .category-grid,
  .product-grid,
  .filter-grid,
  .two-col.three {
    grid-template-columns: 1fr 1fr;
  }

  .main-nav {
    display: none;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .toolbar,
  .section-head,
  .topbar-inner,
  .breadcrumb,
  .inventory-top,
  .footer-bottom,
  .list-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-grid,
  .product-detail-grid,
  .contact-layout,
  .admin-layout,
  .footer-grid,
  .category-grid,
  .product-grid,
  .filter-grid,
  .two-col,
  .two-col.three,
  .detail-meta-grid,
  .inventory-card {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 28px;
  }

  .inventory-image {
    width: 100%;
    height: 200px;
  }
}
