:root {
  --ink: #13233a;
  --muted: #627084;
  --line: #e6ebf2;
  --paper: #f7f9fc;
  --card: #ffffff;
  --brand: #1d5fa8;
  --brand-2: #f28c28;
  --brand-soft: #eaf2fb;
  --ok: #0f6e56;
  --ok-soft: #e7f6f1;
  --danger: #9f2d2d;
  --shadow: 0 1px 2px rgba(19, 35, 58, 0.04), 0 12px 32px rgba(19, 35, 58, 0.06);
  --accent: var(--brand);
  --accent-2: var(--brand-2);
  --accent-soft: var(--brand-soft);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Outfit, "Segoe UI", sans-serif;
  background: var(--paper);
  min-height: 100vh;
}

.wrap {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-logo {
  height: 58px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-text { display: none; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.header-meta,
.header-back {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.header-back:hover { color: var(--ink); }

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.5rem;
  align-items: end;
  padding: 2.4rem 0 0.75rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--ink);
}

.lede,
.hero-address,
.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.lede { max-width: 36rem; }

.hero-address {
  text-align: right;
  font-weight: 500;
  padding: 1rem 1.15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.28rem;
  min-width: min(100%, 280px);
  padding: 1.15rem 1.35rem;
  border-radius: 18px;
  text-decoration: none;
  color: #fff;
  background:
    linear-gradient(135deg, #1d5fa8 0%, #2a7fd4 48%, #f28c28 100%);
  box-shadow: 0 10px 28px rgba(29, 95, 168, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(29, 95, 168, 0.34);
  filter: saturate(1.05);
}

.hero-cta:active {
  transform: translateY(0);
}

.hero-cta-label {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-cta-meta {
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.9;
}

h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

section { margin: 1.75rem 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.section-head h2 { margin: 0; }

.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

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

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.product-card[hidden] {
  display: none !important;
}

.product-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #e8eef0;
  overflow: hidden;
}

.product-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.product-photo-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.product-body { padding: 1rem 1.05rem 1.1rem; }

.product-body h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.product-price {
  margin: 0.4rem 0 0.9rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.product-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 0.85rem;
  margin: 0;
}

.product-facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.product-facts dd {
  margin: 0.12rem 0 0;
  font-size: 0.9rem;
}

.product-tier {
  margin-top: 0.8rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.15rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.product-tier strong {
  color: var(--ink);
  font-size: 1.02rem;
}

.wa-order {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.72rem 0.9rem;
  border-radius: 12px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  transition: background 0.15s ease, transform 0.15s ease;
}

.wa-order:hover {
  background: #1ebe57;
}

.wa-order:active {
  transform: translateY(1px);
}

.wa-order .wa-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.product-search {
  margin: 0 0 1.1rem;
}

.product-search input[type="search"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  box-shadow: var(--shadow);
}

.product-search input[type="search"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.search-meta {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.gallery-section {
  margin-top: 0.5rem;
}

.gallery-status {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.gallery-sentinel {
  height: 1px;
  margin-top: 0.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.gallery-item {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #e8eef0;
  border: 1px solid var(--line);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 16, 20, 0.88);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.gallery-lightbox[hidden] {
  display: none !important;
}

.gallery-lightbox img {
  max-width: min(96vw, 1100px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
}

.gallery-close,
.gallery-nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
}

.gallery-close { top: 1rem; right: 1rem; }
.gallery-nav.prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.gallery-nav.next { right: 1rem; top: 50%; transform: translateY(-50%); }

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (max-width: 980px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.7rem 0 0.55rem;
    min-height: 0;
    gap: 0.55rem;
  }
  .brand { justify-content: center; }
  .brand-logo { height: 52px; }
  .site-nav {
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.1rem;
  }
  .site-nav a { flex: 0 0 auto; font-size: 0.88rem; padding: 0.45rem 0.75rem; }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-address,
  .hero-cta { text-align: left; width: 100%; }
}

.price-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem 1.05rem 0.85rem;
}

.price-card h3 {
  margin: 0;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.card-meta {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.85rem 0 0.7rem;
}

.card-prices span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.card-prices strong {
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.card-prices b {
  font-weight: 600;
  font-size: 1rem;
}

.card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  margin: 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.card-facts div { min-width: 8rem; }
.card-facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}
.card-facts dd { margin: 0.1rem 0 0; font-size: 0.88rem; }

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

.brand-note {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.brand-note a {
  color: var(--ink);
  font-weight: 700;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  font-size: 0.92rem;
}

.price-table th,
.price-table td {
  padding: 0.78rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.price-table th {
  background: #f8fafb;
  color: #3d4450;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: normal;
  vertical-align: bottom;
}

.price-table tr:last-child td { border-bottom: 0; }
.price-table tbody tr:hover td { background: #f7fbf9; }

.sheet td.name { min-width: 11rem; font-weight: 600; }
.sheet td.code, .sheet td.num, .files-table td { white-space: nowrap; }

@media (max-width: 1060px) {
  .sheet thead { display: none; }
  .sheet, .sheet tbody, .sheet tr, .sheet td { display: block; width: auto; }
  .sheet tr {
    margin: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
  }
  .sheet td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    white-space: normal;
    min-width: 0;
  }
  .sheet td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    flex: 0 0 42%;
  }
  .sheet td.name { font-size: 1rem; background: #f8fafb; }
  .table-wrap { overflow: visible; }
}

@media (max-width: 720px) {
  .files-table thead { display: none; }
  .files-table, .files-table tbody, .files-table tr, .files-table td { display: block; width: auto; }
  .files-table tr {
    margin: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
  }
  .files-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    white-space: normal;
  }
  .files-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
  }
}

.price-table .num { font-variant-numeric: tabular-nums; }
.price-now { font-weight: 700; }
.price-anchor { color: #3d4450; }

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

.status.is-off {
  background: #f4f4f5;
  color: var(--muted);
}

.archives {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 3.75rem;
}

.archives h2 { margin: 0 0 0.9rem; }

.legal-note,
.fineprint {
  margin-top: 2.75rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.fineprint h2 {
  margin: 0 0 0.7rem;
  color: var(--ink);
  font-size: 1.05rem;
}

.fineprint ul {
  margin: 0;
  padding-left: 1.15rem;
}

.fineprint li + li { margin-top: 0.45rem; }

.fineprint p { margin: 0.9rem 0 0; font-size: 0.84rem; }

.archives .price-table,
.files-table { min-width: 0; }

.files-table tr.is-current td { background: #f3faf7; }

.file-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.file-link:hover { background: #2a2e36; }

.tag {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 0.75rem;
  font-weight: 700;
}

.price-table .empty {
  text-align: center;
  color: var(--muted);
  padding: 1.4rem;
}

.site-footer {
  margin-top: 2.5rem;
  padding: 1.4rem 0 2.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  background: #fff;
}

.site-footer p { margin: 0.2rem 0; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-weight: 700; }

.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-lead { margin-top: -0.2rem; }

.meta-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.meta-panel > div,
.card-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.grid-form label,
.card-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.grid-form .full { grid-column: 1 / -1; }

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.35rem;
}

@media (max-width: 720px) {
  .tier-grid { grid-template-columns: 1fr; }
}

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

input, select, textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: #fff;
}

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.danger-form { margin-top: 1rem; }
.danger-form button { background: var(--danger); }
.price-table tr.inactive td { opacity: 0.45; }

code {
  background: #eef1f4;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  font-size: 0.88em;
}

@media (min-width: 860px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  .hero,
  .section-head,
  .archives { display: block; }
  .hero-address { text-align: left; margin-top: 0.8rem; }
  .section-head p { margin-top: 0.35rem; }
  .archives > div + div { margin-top: 3rem; }
}
