/* ============================================
   Anchors — Design Tokens & Base
   ============================================ */

:root {
  /* White-led palette with a clinical blue header (redesign 2026-06). */
  --paper: #FFFFFF;
  --paper-2: #EEF3F8;
  --paper-warm: #F6F9FC;   /* card tint — name kept for compatibility, value is now cool */
  --ink: #13202C;
  --ink-soft: #2B3D4E;
  --muted: #5E6E7E;
  --line: #D5DFE8;
  --line-soft: #E6EDF3;

  /* Brand blue — header + primary accent */
  --blue: #1C4E80;
  --blue-deep: #153D66;
  --blue-soft: #E1ECF7;

  /* True green is reserved for success semantics (statuses, paid, uploads) */
  --green: #177A4C;
  --green-soft: #DEF0E5;
  --terra: #B8472D;
  --terra-soft: #F6E1D9;
  --ochre: #A8801F;
  --ochre-soft: #F3E7C9;
  --slate: #3D5A75;
  --slate-soft: #DAE4ED;

  --serif: "Noto Serif Georgian", Georgia, serif;
  --sans: "Noto Sans Georgian", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.45;
  mix-blend-mode: multiply;
}

main { flex: 1; position: relative; z-index: 2; }

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}

a { color: inherit; }

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  color: inherit;
}

.btn-primary { background: var(--blue); color: #FFFFFF; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-danger { background: var(--terra); color: var(--paper); }
.btn-danger:hover { background: var(--ink); }
.btn-sm { padding: 7px 14px; font-size: 12px; }

/* ===== Tags / Pills ===== */
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tag.green { color: var(--green); background: var(--green-soft); }
.tag.terra { color: var(--terra); background: var(--terra-soft); }
.tag.ochre { color: var(--ochre); background: var(--ochre-soft); }
.tag.slate { color: var(--slate); background: var(--slate-soft); }
.tag.muted { color: var(--muted); background: var(--paper-2); }

/* ===== Nav — solid blue header, white type ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--blue);
  border-bottom: 1px solid var(--blue-deep);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  max-width: 1320px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #FFFFFF;
}

.brand-mark { width: 26px; height: 26px; display: block; }

/* The logo PNG is dark — render it white on the blue bar */
.nav-inner img.brand-mark { filter: brightness(0) invert(1); }

.brand-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.02em;
}

.nav-inner .brand-name { color: #FFFFFF; }
.nav-inner .brand-tagline { color: rgba(255, 255, 255, 0.65); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.nav-links a:hover { color: #FFFFFF; }
.nav-links a.active { color: #FFFFFF; font-weight: 500; }
.nav-links a .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); }
.nav-links a:hover .dot, .nav-links a.active .dot { background: #FFFFFF; }

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  color: #FFFFFF;
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: all 0.2s;
}

.nav-cart:hover { border-color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }

.nav-cart-count {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  background: #FFFFFF;
  color: var(--blue);
  border-radius: 100px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}

/* Buttons inside the blue bar (account / admin / login / logout) */
.nav-inner .btn-ghost { border-color: rgba(255, 255, 255, 0.5); color: #FFFFFF; }
.nav-inner .btn-ghost:hover { background: #FFFFFF; color: var(--blue); border-color: #FFFFFF; }
.nav-inner .btn-primary { background: #FFFFFF; color: var(--blue); }
.nav-inner .btn-primary:hover { background: var(--blue-soft); color: var(--blue-deep); }

/* Language dropdown button colors on blue live in typography.css (.nav-inner .lang-dd-btn) */

/* ===== Mobile nav toggle / drawer ===== */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  padding: 8px;
  cursor: pointer;
  width: 38px;
  height: 38px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: #FFFFFF;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 16px 24px 24px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.open { display: block; }

.mobile-menu-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mobile-menu-links li { margin: 0; }
.mobile-menu-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu-links a .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }

.mobile-menu-sep { height: 8px; }

.mobile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.mobile-menu-actions .btn {
  width: 100%;
  justify-content: center;
}
.mobile-menu-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  justify-content: center;
}
.mobile-menu-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 6px;
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  position: relative;
  z-index: 2;
  margin-top: auto;
}

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

.footer-inner .dots { display: flex; gap: 6px; align-items: center; }
.footer-inner .dots span { width: 6px; height: 6px; border-radius: 50%; }
.footer-inner .dots span:nth-child(1) { background: var(--terra); }
.footer-inner .dots span:nth-child(2) { background: var(--green); }
.footer-inner .dots span:nth-child(3) { background: var(--ochre); }
.footer-inner .dots span:nth-child(4) { background: var(--slate); }

/* ===== Form elements ===== */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  transition: border-color 0.2s, background 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--paper-warm);
}

.field textarea { resize: vertical; min-height: 80px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

/* ===== Cards / containers ===== */
.card {
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
}

/* ===== Alerts ===== */
.alert {
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-error {
  background: var(--terra-soft);
  color: var(--terra);
  border-left: 3px solid var(--terra);
}

.alert-success {
  background: var(--green-soft);
  color: var(--green);
  border-left: 3px solid var(--green);
}

/* ===== Tables ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.table tbody tr:hover { background: var(--paper-warm); }

/* ===== Status badges ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pending      { color: var(--ochre); background: var(--ochre-soft); }
.status-reviewing    { color: var(--slate); background: var(--slate-soft); }
.status-in_production{ color: var(--terra); background: var(--terra-soft); }
.status-ready        { color: var(--green); background: var(--green-soft); }
.status-delivered    { color: var(--green); background: var(--green-soft); }
.status-cancelled    { color: var(--muted); background: var(--paper-2); }

/* ===== Section heads ===== */
.section { padding: 96px 0; border-top: 1px solid var(--line); }

/* Alternating darker paper for visual rhythm */
.section.section-alt {
  background: var(--paper-2);
}
.section.section-alt + .section { border-top-color: var(--line-soft); }

.section-head {
  margin-bottom: 44px;
}

.section-head .left { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }

.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.section-head h2 em { font-style: italic; font-weight: 400; }

.sec-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sec-num::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .container { padding: 0 24px; }
  .nav-inner { padding: 12px 24px; }
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-toggle { display: inline-flex; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 40px; }
  .field-row { grid-template-columns: 1fr; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 0.7s ease-out both; }

/* ============================================
   Lightbox — fullscreen image viewer
   ============================================ */
.zoomable {
  cursor: zoom-in;
  position: relative;
}

.zoom-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: transform 0.25s ease, background 0.25s ease;
  pointer-events: none;
  z-index: 2;
}
.zoomable:hover .zoom-hint {
  transform: scale(1.08);
  background: var(--paper);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 10, 8, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.lightbox.is-open {
  display: flex;
  opacity: 1;
}

.lightbox-stage {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox-img {
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
  background: var(--paper-warm);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
  transform-origin: center center;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-img.is-zoomed {
  cursor: grab;
}
.lightbox-img.is-zoomed:active { cursor: grabbing; }

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 100px;
  background: var(--paper);
  color: var(--ink);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  z-index: 2;
  transition: transform 0.2s ease;
}
.lightbox-close:hover { transform: scale(1.08); }

.lightbox-caption {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--paper);
  background: rgba(10, 10, 8, 0.55);
  padding: 6px 14px;
  border-radius: 100px;
  pointer-events: none;
  white-space: nowrap;
  max-width: 80vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.lightbox-open { overflow: hidden; }
