:root {
  --bg: #f7f2e8;
  --bg-strong: #eadcc6;
  --panel: rgba(255, 252, 247, 0.92);
  --ink: #221a13;
  --muted: #6f6258;
  --line: rgba(34, 26, 19, 0.12);
  --accent: #a04a2b;
  --accent-soft: #f2d6c4;
  --success: #1f6c52;
  --shadow: 0 24px 60px rgba(48, 30, 12, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(160, 74, 43, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(110, 81, 52, 0.14), transparent 25%),
    linear-gradient(180deg, #fbf7f1 0%, var(--bg) 48%, #efe5d8 100%);
}

.page-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px;
}

.hero,
.section,
.order-card,
.workflow-card {
  backdrop-filter: blur(18px);
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 24px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 250, 244, 0.96), rgba(243, 231, 217, 0.92));
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 0.95;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.6rem);
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

h3 {
  font-size: 1.6rem;
}

.hero-text,
.section-note,
.workflow-card p,
.hero-panel li,
.cart-empty,
.order-output {
  color: var(--muted);
  line-height: 1.6;
}

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

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

.lang-switch {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 5px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-btn.active {
  background: var(--ink);
  color: white;
}

.flag {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 18px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

.flag-hu {
  background: linear-gradient(180deg, #ef4444 0 33.33%, #ffffff 33.33% 66.66%, #16a34a 66.66% 100%);
}

.flag-pl {
  background: linear-gradient(180deg, #ffffff 0 50%, #dc2626 50% 100%);
}

.flag-de {
  background: linear-gradient(180deg, #111111 0 33.33%, #dc2626 33.33% 66.66%, #f2c94c 66.66% 100%);
}

.flag-cs {
  background: linear-gradient(180deg, #ffffff 0 50%, #ef4444 50% 100%);
}

.flag-cs::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  background: #2563eb;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.flag-en {
  background-color: #1d4ed8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3Crect width='60' height='36' fill='%23012169'/%3E%3Cpath d='M0 0 60 36M60 0 0 36' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M0 0 60 36M60 0 0 36' stroke='%23C8102E' stroke-width='6'/%3E%3Cpath d='M30 0v36M0 18h60' stroke='%23fff' stroke-width='14'/%3E%3Cpath d='M30 0v36M0 18h60' stroke='%23C8102E' stroke-width='8'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

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

.button-primary {
  color: white;
  background: linear-gradient(135deg, #1b1b18, var(--accent));
  box-shadow: 0 14px 28px rgba(160, 74, 43, 0.25);
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
}

.button-block {
  width: 100%;
}

.hero-panel,
.section,
.order-card,
.workflow-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 28px;
}

.hero-panel-image {
  margin-bottom: 18px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
}

.hero-panel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-panel ul {
  margin: 18px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 12px;
}

.section {
  margin-top: 24px;
  padding: 28px;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.editorial-card {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.82);
  min-height: 0;
}

.editorial-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editorial-card-compact {
  min-height: 210px;
}

.family-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.family-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(242, 230, 214, 0.92));
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: stretch;
}

.family-card img {
  width: 100%;
  height: 100%;
  min-height: 92px;
  object-fit: cover;
  display: block;
}

.family-copy {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
}

.family-copy span {
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.82rem;
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.catalog-main {
  min-width: 0;
}

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

.section-heading.compact {
  margin-bottom: 10px;
}

.reference-note {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.reference-note strong {
  font-size: 0.95rem;
}

.reference-note span {
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.browse-modes {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.browse-mode {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.78);
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.browse-mode.active {
  background: var(--ink);
  color: white;
}

.shade-library {
  margin-bottom: 18px;
}

.shade-library.hidden {
  display: none;
}

.shade-swatches {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.shade-swatch {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.78);
  cursor: pointer;
  padding: 0;
}

.shade-swatch.active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.shade-swatch img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.shade-swatch span {
  display: block;
  padding: 10px 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.collection-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tab {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.tab.active {
  background: var(--ink);
  color: white;
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.hidden {
  display: none !important;
}

.filters label,
.order-form label {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.filters input,
.filters select,
.order-form input,
.order-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: rgba(255,255,255,0.86);
}

.inventory-table-wrap {
  overflow: auto;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.72);
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 940px;
}

.inventory-table th,
.inventory-table td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.shade-cell {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: start;
}

.shade-chip {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.9);
  width: 72px;
  padding: 0;
}

.shade-chip img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.shade-chip-code {
  display: block;
  text-align: center;
  padding: 6px 4px 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.shade-chip.static {
  cursor: default;
}

.inventory-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

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

.product-meta strong {
  font-size: 0.98rem;
}

.mini {
  font-size: 0.82rem;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
}

.cards {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hair-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(241, 232, 220, 0.92));
  overflow: hidden;
}

.hair-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
}

.hair-gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.hair-card-copy {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.hair-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hair-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.qty-picker {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.qty-picker select {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  font: inherit;
  background: rgba(255,255,255,0.88);
  color: var(--ink);
}

.qty-picker.inline {
  min-width: 92px;
}

.hair-empty {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,0.75);
}

.product-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(241, 232, 220, 0.88));
  overflow: hidden;
}

.card-visual {
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.35), transparent),
    linear-gradient(135deg, #d9c4a6, #8d6a4f);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.92);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-card .content {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.price-row,
.cart-line,
.cart-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.price-row strong,
.cart-total strong {
  font-size: 1rem;
}

.product-card .button {
  padding: 10px 14px;
}

.order-card {
  position: sticky;
  top: 20px;
  padding: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.checkout-form-wrap {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.checkout-divider {
  height: 1px;
  background: var(--line);
}

.checkout-heading {
  gap: 4px;
}

.cart-items {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.cart-line {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
}

.cart-line button,
.table-action {
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.table-action {
  white-space: nowrap;
}

.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cart-empty {
  padding: 14px 0 4px;
}

.order-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.order-output {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  white-space: pre-wrap;
}

.order-output.success {
  background: rgba(31, 108, 82, 0.10);
  border-color: rgba(31, 108, 82, 0.28);
  color: var(--success);
  font-weight: 700;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.workflow-card {
  padding: 20px;
}

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

.ok {
  color: var(--success);
  font-weight: 800;
}

.shade-modal.hidden {
  display: none;
}

.shade-modal,
.media-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.shade-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 22, 18, 0.54);
}

.shade-modal-card {
  position: relative;
  width: min(980px, calc(100vw - 32px));
  margin: 48px auto;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 251, 246, 0.98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.media-modal-card {
  width: min(1200px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.media-modal-copy {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding-right: 40px;
}

.media-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.media-modal-grid img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  display: block;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.84);
}

.media-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-bottom: 4px;
}

.shade-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 2rem;
  cursor: pointer;
  color: var(--ink);
}

.shade-modal-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 20px;
  align-items: start;
}

.shade-modal-image {
  min-height: 260px;
  border-radius: 22px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
}

.shade-lengths {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.shade-length-block {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--line);
}

.shade-length-block strong {
  display: block;
  margin-bottom: 4px;
}

@media (max-width: 1180px) {
  .catalog-layout,
  .hero,
  .workflow-grid,
  .family-grid,
  .editorial-grid {
    grid-template-columns: 1fr;
  }

  .shade-swatches,
  .shade-modal-grid,
  .media-modal-grid,
  .cards {
    grid-template-columns: 1fr;
  }

  .family-card {
    grid-template-columns: 88px 1fr;
  }

  .order-card {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 820px) {
  .page-shell {
    padding: 16px;
  }

  .section,
  .hero,
  .order-card {
    padding: 20px;
    border-radius: 22px;
  }

  .filters,
  .cards {
    grid-template-columns: 1fr;
  }

  .inventory-table {
    min-width: 860px;
  }

  .hair-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .editorial-card-compact {
    min-height: 180px;
  }

  h1 {
    font-size: 3rem;
  }
}
