:root {
  /* Colour defaults; base.html overrides these from /admin/settings */
  --bg: #04070d;
  --bg-rgb: 4, 7, 13;
  --surface-rgb: 10, 20, 40;
  --surface-alt-rgb: 16, 32, 64;
  --accent-rgb: 0, 212, 255;
  --accent2-rgb: 0, 102, 255;
  --surface: #0a1428;
  --surface-alt: #102040;
  --accent: #00d4ff;
  --accent2: #0066ff;
  --accent-dim: rgba(var(--accent-rgb), 0.14);
  --text: #e6f1ff;
  --muted: #7a92b8;
  --border: rgba(var(--accent-rgb), 0.12);
  --danger: #ff5c5c;
  --danger-dim: rgba(255, 92, 92, 0.14);
  --success-bg: rgba(var(--accent-rgb), 0.12);
  --surface-glass: rgba(var(--surface-rgb), 0.72);
  --surface-alt-glass: rgba(var(--surface-alt-rgb), 0.72);
  --radius: 5px;
  --font-ka: "Noto Sans Georgian", "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 44px;
  --bottom-nav-h: 64px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-ka);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background:
    radial-gradient(640px circle at 12% 8%, rgba(var(--accent-rgb), 0.10), transparent 60%),
    radial-gradient(720px circle at 88% 22%, rgba(var(--accent2-rgb), 0.10), transparent 60%),
    radial-gradient(680px circle at 18% 78%, rgba(var(--accent-rgb), 0.08), transparent 60%),
    radial-gradient(720px circle at 92% 92%, rgba(var(--accent2-rgb), 0.08), transparent 60%),
    rgba(var(--bg-rgb), 0.86);
  background-attachment: fixed;
  /* Keep the footer at the bottom on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body > main {
  flex: 1 0 auto;
  width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

::selection {
  background: var(--accent-dim);
  color: var(--text);
}

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
  padding: 0 1.75rem 0 1.25rem;
  background: rgba(var(--surface-rgb), 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  height: 24px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand-word {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  line-height: 1;
}

@media (min-width: 640px) {
  .brand-mark {
    height: 28px;
  }
  .brand-word {
    font-size: 1.05rem;
  }
}

.site-header nav.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header nav.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.site-header nav.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.site-header nav.site-nav a {
  white-space: nowrap;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .site-header nav.site-nav {
    gap: 0.9rem;
  }

  .site-header nav.site-nav a {
    font-size: 0.85rem;
  }

  .header-right {
    gap: 0.9rem;
  }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-clock {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.clock-flag {
  display: block;
  flex: none;
  width: 21px;
  height: 14px;
  border-radius: 2px;
}

.clock-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.clock-time {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.clock-date {
  font-size: 0.68rem;
  color: var(--muted);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

main {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.5rem 1rem 0.85rem;
}

h1, h2, h3, h4 {
  margin: 0 0 0.28rem;
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: 1rem; }
h2 { font-size: 0.85rem; }
h3 { font-size: 0.8rem; }
h4 { font-size: 0.76rem; }

@media (min-width: 640px) {
  h1 { font-size: 1.15rem; }
  h2 { font-size: 0.92rem; }
}

.error {
  color: var(--danger);
  background: var(--danger-dim);
  border: 1px solid rgba(255, 92, 92, 0.3);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.75rem;
}

form label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

form input,
form select,
form textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

button {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #06130c;
  cursor: pointer;
  box-shadow: 0 0 0 rgba(var(--accent-rgb), 0);
  transition: box-shadow 0.2s ease, transform 0.1s ease;
}

button:hover {
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.45);
}

button:active {
  transform: translateY(1px);
}

button.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255, 92, 92, 0.4);
  padding: 0.3rem 0.6rem;
  font-size: 0.76rem;
  box-shadow: none;
}

button.btn-danger:hover {
  box-shadow: 0 0 10px rgba(255, 92, 92, 0.3);
}

/* Admin layout */
.admin-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.admin-nav a {
  color: var(--muted);
}

.admin-nav a:hover {
  color: var(--text);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.stat-card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.65rem;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 640px;
}

.admin-table th,
.admin-table td {
  padding: 0.48rem 0.65rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: rgba(var(--accent-rgb), 0.035);
}

.admin-table td > form {
  display: inline-block;
  margin: 0.1rem 0.15rem 0.1rem 0;
}

.admin-table td button,
.admin-table td .btn-small-link {
  padding: 0.28rem 0.5rem;
  font-size: 0.76rem;
}

.admin-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.admin-table .thumb {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 4px;
}

.admin-edit-trigger {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
}

.admin-edit-trigger:hover,
.admin-edit-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.admin-edit-dialog {
  width: min(620px, calc(100vw - 2rem));
  max-width: 100%;
  max-height: min(88vh, 820px);
  padding: 1.1rem;
  overflow-y: auto;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.admin-edit-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
}

.admin-edit-head,
.admin-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.admin-edit-head { margin-bottom: 0.9rem; }
.admin-edit-head h2 { margin: 0; font-size: 1.08rem; }
.admin-edit-head p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.82rem; }

.admin-edit-close {
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  font-size: 1.2rem;
}

.admin-edit-form { display: grid; gap: 0.75rem; }
.admin-edit-form label { min-width: 0; margin: 0; }
.admin-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.admin-edit-current-image { width: 100%; max-height: 170px; object-fit: cover; border-radius: 7px; }
.admin-edit-current-image.admin-edit-logo { width: 130px; height: 90px; object-fit: contain; background: var(--surface-alt); }
.admin-edit-actions { justify-content: flex-end; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.admin-edit-delete { margin-top: 0.65rem; }

@media (max-width: 520px) {
  .admin-edit-grid { grid-template-columns: 1fr; }
}

.admin-table input[type="number"] {
  width: 90px;
  padding: 0.4rem;
  margin-top: 0;
}

.admin-table input[type="text"].name-input {
  width: 100%;
  min-width: 140px;
  padding: 0.4rem;
  margin-top: 0;
}

.admin-table th:first-child,
.admin-table td:first-child {
  width: 2rem;
  text-align: center;
}

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.55rem;
}

.bulk-bar [id$="BulkCount"],
.bulk-bar #bulkCount {
  color: var(--muted);
  font-size: 0.9rem;
  margin-right: auto;
}

.bulk-bar select {
  width: auto;
  min-width: 8rem;
  margin: 0;
  padding: 0.35rem 0.5rem;
}

.inline-image-form {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.inline-image-form input[type="file"] {
  max-width: 120px;
  font-size: 0.75rem;
}

button.btn-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.73rem;
}

.banner-edit-preview-wrap {
  margin-bottom: 1rem;
}

.banner-edit-preview-wrap h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.banner-edit-preview {
  position: relative;
  width: min(100%, 760px);
  aspect-ratio: 3 / 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.banner-edit-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-edit-preview-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0.55rem 0.75rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  font-weight: 600;
}

.banner-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Base style for the line-art service icons (inline SVG). Without it the browser fills
   the paths black at full size, e.g. on the service detail page and the admin list. */
svg.service-icon {
  display: block;
  width: 32px;
  height: 32px;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-hero svg.service-icon {
  width: 56px;
  height: 56px;
}

.admin-table svg.service-icon {
  width: 28px;
  height: 28px;
}

.service-icon-image {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 4px;
}

.service-hero .service-icon-image {
  width: 72px;
  height: 72px;
}

.save-status {
  min-height: 1.2rem;
  font-size: 0.85rem;
  color: var(--accent);
  margin: 0.5rem 0;
}

.order-status-current {
  font-size: 1.05rem;
  color: var(--muted);
}

.order-status-current strong {
  color: var(--text);
}

.status-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
}

.status-timeline li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.status-timeline li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0.6rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.status-timeline li.done {
  border-color: var(--accent);
  color: var(--text);
}

.status-timeline li.done::before {
  background: var(--accent);
}

.status-timeline li.current {
  border-color: var(--accent);
  color: var(--text);
  font-weight: 700;
}

.status-timeline li.current::before {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.7);
}

.order-details {
  margin-top: 0.75rem;
}

.order-details dt {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.85rem;
}

.order-details dd {
  margin: 0.2rem 0 0;
  font-size: 1rem;
}

.order-photo {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

@media (min-width: 640px) {
  .status-timeline {
    flex-direction: row;
  }

  .status-timeline li {
    flex: 1;
    padding: 1.5rem 0.5rem 0.4rem;
    border-left: none;
    border-top: 3px solid var(--border);
    text-align: center;
  }

  .status-timeline li::before {
    left: 50%;
    top: -8px;
    margin-left: -6px;
  }
}

.role-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.role-filter select {
  width: auto;
  display: inline-block;
}

.role-filter input[type="search"] {
  min-width: min(18rem, 70vw);
}

.user-role-form,
.reward-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.user-role-form select,
.reward-form select {
  width: auto;
  min-width: 6.5rem;
  margin: 0;
  padding: 0.3rem;
  font-size: 0.75rem;
}

.reward-form input[type="number"] {
  width: 4.5rem;
  margin: 0;
  padding: 0.3rem;
}

.reward-form input[type="text"] {
  width: 10rem;
  margin: 0;
  padding: 0.3rem;
  font-size: 0.75rem;
}

.user-admin-table td {
  min-width: 8rem;
}

.user-admin-table td:first-child {
  min-width: 11rem;
}

.user-name-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 10rem;
}

.user-perms-summary {
  color: var(--muted);
  font-size: 0.75rem;
}

button.user-perms-trigger,
button.user-perms-close {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-alt);
}

button.user-perms-trigger:hover,
button.user-perms-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.user-perms-trigger svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-perms-dialog {
  width: min(560px, calc(100vw - 2rem));
  max-width: 100%;
  max-height: min(80vh, 620px);
  padding: 1.1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.user-perms-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(3px);
}

.user-perms-dialog-head,
.user-perms-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.user-manage-section {
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
}

.user-manage-section h3 {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
}

.user-manage-section > label {
  display: block;
  margin-bottom: 0.45rem;
}

.user-manage-section > label select {
  width: 100%;
  margin-top: 0.25rem;
}

.user-manage-reward input[type="text"] {
  flex: 1 1 9rem;
  width: auto;
  min-width: 7rem;
}

.user-perms-dialog-head {
  margin-bottom: 0.9rem;
}

.user-perms-dialog-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.user-perms-dialog-head p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.user-perms-dialog-form {
  margin: 0;
}

.user-perms-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 0.9rem;
  max-height: min(52vh, 390px);
  overflow-y: auto;
  padding: 0.15rem 0.1rem 0.8rem;
}

.user-perms-dialog .perm-check {
  white-space: normal;
  color: var(--text);
}

.user-perms-dialog-actions {
  justify-content: flex-end;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 420px) {
  .user-perms-options {
    grid-template-columns: 1fr;
  }
}

.user-admin-table td:last-child form {
  margin: 0;
}

.perms-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  min-width: 320px;
  align-items: center;
}

.perm-check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  white-space: nowrap;
  margin: 0;
  color: var(--muted);
}

.perm-check input {
  width: auto;
  margin: 0;
}

.user-form fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1rem 0;
  padding: 1rem;
}

.user-form fieldset legend {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0 0.4rem;
}

.user-form fieldset .perm-check {
  margin-bottom: 0.6rem;
  margin-right: 1rem;
}

.user-form .staff-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.8rem;
}

.user-form .staff-permissions legend {
  width: 100%;
}

.product-admin-table th,
.product-admin-table td {
  padding: 0.45rem 0.6rem;
}

.product-admin-thumb {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: cover;
}

.product-admin-no-image {
  display: block;
  width: 42px;
  color: var(--muted);
  text-align: center;
}

.product-admin-table td:nth-child(3) {
  min-width: 12rem;
  max-width: 22rem;
}

button.product-edit-trigger,
button.product-edit-close {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 7px;
}

button.product-edit-trigger:hover,
button.product-edit-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.product-edit-trigger svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-row-delete {
  display: inline-block;
  margin-left: 0.25rem;
}

.product-edit-dialog {
  width: min(760px, calc(100vw - 2rem));
  max-width: 100%;
  max-height: min(90vh, 900px);
  padding: 1.2rem;
  overflow-y: auto;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.product-edit-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}

.product-edit-dialog-head,
.product-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-edit-dialog-head {
  margin-bottom: 1rem;
}

.product-edit-dialog-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.product-edit-dialog-head p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.product-edit-form {
  display: grid;
  gap: 0.85rem;
}

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

.product-edit-form label {
  min-width: 0;
}

.product-edit-form .i18n-field {
  margin: 0;
}

.product-edit-actions {
  justify-content: flex-end;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.service-admin-table th,
.service-admin-table td {
  padding: 0.45rem 0.6rem;
}

.service-admin-thumb,
.service-admin-svg-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--surface-alt-glass);
}

.service-admin-svg-icon svg.service-icon {
  width: 30px;
  height: 30px;
}

.service-admin-table td:nth-child(3) {
  min-width: 12rem;
}

button.service-edit-trigger,
button.service-edit-close {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 7px;
}

button.service-edit-trigger:hover,
button.service-edit-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.service-edit-trigger svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-edit-dialog {
  width: min(760px, calc(100vw - 2rem));
  max-width: 100%;
  max-height: min(90vh, 900px);
  padding: 1.2rem;
  overflow-y: auto;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.service-edit-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}

.service-edit-dialog-head,
.service-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.service-edit-dialog-head {
  margin-bottom: 1rem;
}

.service-edit-dialog-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.service-edit-dialog-head p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.service-edit-form {
  display: grid;
  gap: 0.85rem;
}

.service-edit-form .i18n-field {
  margin: 0;
}

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

.service-current-image {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.service-current-image img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 5px;
}

.service-edit-actions {
  justify-content: flex-end;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
  .product-edit-grid,
  .service-edit-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 640px) {
  .admin-layout {
    flex-direction: row;
  }

  .admin-nav {
    flex-direction: column;
    width: 170px;
    border-bottom: none;
    border-right: 1px solid var(--border);
    padding-right: 1.25rem;
  }

  .admin-content {
    flex: 1;
  }
}

/* Shop */
.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.shop-filters label {
  margin-bottom: 0;
  flex: 1;
  min-width: 140px;
}

.shop-filters select,
.shop-filters input {
  margin-top: 0.25rem;
}

.shop-filters button {
  align-self: flex-end;
}

@media (max-width: 599px) {
  .shop-filters label {
    flex: 1 1 100%;
  }

  .shop-filters button {
    flex: 1 1 100%;
  }
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

@media (min-width: 480px) {
  .shop-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 720px) {
  .shop-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .shop-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1300px) {
  .shop-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

.product-card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.12);
}

.product-card a {
  text-decoration: none;
  color: inherit;
}

.product-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface-alt-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.product-thumb-placeholder {
  display: block;
}

.product-name {
  font-size: 0.78rem;
  margin: 0.1rem 0 0;
}

.product-price {
  font-weight: 700;
  margin: 0;
  color: var(--accent);
}

.product-price-lg {
  font-size: 1.4rem;
}

.stock-badge {
  display: inline-block;
  font-size: 0.66rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  width: fit-content;
}

.stock-in {
  background: var(--success-bg);
  color: var(--accent);
}

.stock-out {
  background: var(--danger-dim);
  color: var(--danger);
}

.product-card form,
.add-to-cart-form {
  margin-top: 0.25rem;
}

.shop-category-section {
  margin: 1.5rem 0 2rem;
}

.shop-category-section > h2 {
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.2rem;
}

.product-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.8rem 0;
}

.product-social-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.product-detail {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.product-detail-photo {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
}

.product-category {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.product-description {
  white-space: pre-line;
}

.add-to-cart-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.add-to-cart-form label {
  margin-bottom: 0;
  width: 100px;
}

@media (min-width: 640px) {
  .product-detail {
    flex-direction: row;
  }

  .product-detail-photo {
    width: 45%;
  }

  .product-detail-info {
    flex: 1;
  }
}

.cart-table .thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}

.cart-qty-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.cart-qty-form input {
  width: 70px;
  margin: 0;
}

.cart-total {
  font-size: 1.1rem;
  text-align: right;
  margin-top: 0.75rem;
}

/* Phones: each cart row becomes a card, so nothing needs horizontal scrolling */
@media (max-width: 639px) {
  .cart-table {
    min-width: 0;
    border: none;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .cart-table thead {
    display: none;
  }

  .cart-table,
  .cart-table tbody {
    display: block;
  }

  .cart-table tr {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--surface-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  .cart-table td {
    display: block;
    padding: 0;
    border: none;
  }

  .cart-table .cart-cell-name {
    align-self: center;
    font-weight: 600;
    overflow-wrap: anywhere;
  }

  .cart-table td[data-label] {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.6rem;
    margin-top: 0.6rem;
    border-top: 1px solid var(--border);
    text-align: right;
  }

  .cart-table td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.85rem;
    text-align: left;
  }

  .cart-table .cart-cell-remove {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    margin-top: 0.6rem;
  }

  .cart-table .cart-cell-remove .btn-danger {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
  }
}

/* Home: hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 90px;
  padding: 0.6rem 0.9rem;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.55rem;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  width: 100%;
}

.hero-text {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
}

.hero h1 {
  flex-shrink: 0;
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.35);
}

.hero-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

@media (max-width: 480px) {
  .hero-tagline {
    display: none;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.hero-actions a.btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.74rem;
}

a.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  box-shadow: none;
}

a.btn-outline:hover {
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.3);
  text-decoration: none;
}

/* Home: banner slider */
.banner-slider {
  position: relative;
  margin-bottom: 0.55rem;
}

.banner-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.banner-track::-webkit-scrollbar {
  display: none;
}

.banner-slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: block;
}

.banner-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(to top, rgba(3, 7, 17, 0.85), rgba(3, 7, 17, 0));
  color: #fff;
  font-size: 0.9rem;
  text-align: left;
  border-radius: 0 0 var(--radius) var(--radius);
}

.banner-slide img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  max-height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

@media (min-width: 640px) {
  .banner-slide img {
    aspect-ratio: 16 / 9;
    max-height: 260px;
  }
}

.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.banner-arrow svg {
  width: 16px;
  height: 16px;
}

/* The global button:active rule sets its own transform, which would otherwise replace
   (not add to) the translateY(-50%) that vertically centers this button, snapping it
   to the top of the slider on press. */
.banner-arrow:active {
  transform: translateY(-50%) translateY(1px);
}

.banner-arrow:hover,
.banner-arrow:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.4);
}

.banner-arrow-prev {
  left: 0.5rem;
}

.banner-arrow-next {
  right: 0.5rem;
}

@media (min-width: 640px) {
  .banner-arrow {
    width: 38px;
    height: 38px;
  }

  .banner-arrow svg {
    width: 18px;
    height: 18px;
  }

  .banner-arrow-prev {
    left: 0.75rem;
  }

  .banner-arrow-next {
    right: 0.75rem;
  }
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.banner-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  box-shadow: none;
  cursor: pointer;
}

.banner-dot:hover {
  box-shadow: none;
}

.banner-dot.active {
  background: var(--accent);
}

/* Home: sidebar + banner row */
.home-hero-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.home-sidebar {
  display: none;
}

.home-sidebar-title {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.home-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.home-sidebar-link:hover {
  background: var(--accent-dim);
  text-decoration: none;
}

.home-sidebar .service-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
}

.home-sidebar .service-icon-image {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 4px;
}

.home-sidebar-backdrop {
  display: none;
}

@media (min-width: 900px) {
  .home-hero-row {
    flex-direction: row;
    align-items: flex-start;
  }

  .home-sidebar {
    display: flex;
    flex-direction: column;
    flex: 0 0 240px;
    align-self: flex-start;
    position: sticky;
    top: calc(var(--header-h) + 0.5rem);
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
  }

  .home-hero-row .banner-slider {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
  }

  .home-hero-row .banner-track {
    height: clamp(320px, 34vw, 480px);
  }

  .home-hero-row .banner-slide {
    height: 100%;
  }

  .home-hero-row .banner-slide img {
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-fit: cover;
  }
}

@media (max-width: 899px) {
  .home-sidebar.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    z-index: 39;
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--border);
    padding: 1rem;
    overflow-y: auto;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.45);
  }

  .home-sidebar-backdrop.open {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 38;
  }
}

/* Home: services */
.services,
.home-products,
.home-news,
.home-reviews {
  margin-bottom: 0.35rem;
}

.services h2,
.partners h2,
.contact h2 {
  margin-bottom: 0.35rem;
}

.services h2,
.partners h2,
.home-products h2,
.home-news h2,
.home-reviews h2,
.contact h2 {
  position: relative;
  padding-left: 0.55rem;
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.35);
}

.services h2::before,
.partners h2::before,
.home-products h2::before,
.home-news h2::before,
.home-reviews h2::before,
.contact h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 18px rgba(var(--accent-rgb), 0.55);
}

.services .services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(95px, auto);
  gap: 0.35rem;
  align-items: stretch;
}

@media (min-width: 900px) {
  .services .services-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(115px, auto);
    grid-auto-flow: dense;
  }
}

.services .service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.35rem;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.services .service-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  transform: translateY(-2px);
}

.services .service-card.bento-lg {
  grid-column: span 2;
  grid-row: span 2;
}

.services .service-card.bento-md {
  grid-column: span 2;
}

.services .service-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  margin-bottom: 0.5rem;
}

.services .service-card .service-icon-image {
  width: 32px;
  height: 32px;
  margin-bottom: 0.5rem;
}

.services .service-card.bento-lg .service-icon {
  width: 48px;
  height: 48px;
}

.services .service-card.bento-lg .service-icon-image {
  width: 56px;
  height: 56px;
}

.services .service-card.bento-md .service-icon {
  width: 36px;
  height: 36px;
}

.services .service-card.bento-md .service-icon-image {
  width: 42px;
  height: 42px;
}

.services .service-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  line-height: 1.35;
}

.services .service-card.bento-lg h3 {
  font-size: 1.2rem;
}

.services .service-card.bento-md h3 {
  font-size: 0.98rem;
}

.services .service-desc {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.services .service-card.bento-lg .service-desc {
  font-size: 0.9rem;
  -webkit-line-clamp: 4;
}

.services .service-card.bento-md .service-desc {
  -webkit-line-clamp: 3;
}

/* Home: partners */
.partners {
  margin-bottom: 0.35rem;
}

.partners-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.7rem;
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 84px;
  padding: 0.75rem 1rem;
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  opacity: 0.85;
  filter: grayscale(1);
  transition: opacity 0.15s ease, filter 0.15s ease, transform 0.15s ease;
}

.partner-logo:hover {
  opacity: 1;
  filter: grayscale(0);
  text-decoration: none;
  transform: scale(1.06);
}

.partner-logo img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.partner-logo span {
  color: var(--muted);
  font-weight: 600;
}

/* Home: contact + map */
.contact-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-info p {
  margin: 0 0 0.6rem;
}

.contact-info strong {
  color: var(--muted);
  font-weight: 600;
  display: inline-block;
  min-width: 7.5rem;
}

.map-embed {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 10;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

@media (min-width: 768px) {
  .contact-layout {
    flex-direction: row;
    align-items: stretch;
  }

  .contact-info,
  .map-embed {
    flex: 1;
  }

  .contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem 1.5rem;
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  .map-embed {
    aspect-ratio: auto;
    min-height: 260px;
  }

  /* Keep content clear of the fixed contact rail and chat button */
  main {
    padding-right: calc(1.25rem + 52px + 0.75rem);
  }
}

/* Contact page (reuses the home contact layout) */
.contact-page h1 {
  margin-bottom: 0.35rem;
}

.contact-page h2 {
  margin: 1.25rem 0 0.6rem;
}

.contact-lead {
  color: var(--muted);
  margin: 0 0 1rem;
  max-width: 60ch;
}

.contact-hours-off {
  color: var(--muted);
}

.contact-form {
  padding: 1rem;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-form textarea {
  resize: vertical;
}

.contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-sent {
  color: var(--accent);
  background: var(--success-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .contact-form-row {
    display: flex;
    gap: 1rem;
  }

  .contact-form-row label {
    flex: 1;
  }
}

a.btn {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius);
  background: var(--accent);
  color: #06130c;
  text-decoration: none;
  transition: box-shadow 0.2s ease;
}

a.btn:hover {
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.45);
  text-decoration: none;
}

.checkout-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.payment-methods {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
  margin-bottom: 0.9rem;
}

.payment-methods legend {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0 0.4rem;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.payment-option input {
  width: auto;
  margin-top: 0;
}

.checkout-summary {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
}

.checkout-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checkout-items li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.bank-details {
  margin-top: 1rem;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: var(--radius);
  padding: 1.25rem;
}

@media (min-width: 900px) {
  .checkout-layout {
    flex-direction: row-reverse;
  }

  .checkout-form {
    flex: 1;
  }

  .checkout-summary {
    width: 320px;
  }
}

/* Right floating contact rail */
.contact-rail {
  position: fixed;
  top: 50%;
  right: calc(1.25rem + 7px); /* centered over the 52px chat button */
  transform: translateY(-50%);
  z-index: 44;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-rail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--accent);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.contact-rail-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-rail-whatsapp svg {
  fill: currentColor;
  stroke: none;
}

.contact-rail-btn:hover {
  transform: scale(1.08);
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-dim), 0 0 4px var(--accent);
  text-decoration: none;
}

/* Mobile: horizontal row stacked right above the chat button, off the card edges */
@media (max-width: 767px) {
  .contact-rail {
    top: auto;
    right: 1.25rem;
    bottom: calc(var(--bottom-nav-h) + 1rem + 52px + 0.5rem);
    transform: none;
    flex-direction: row;
  }
}

@media (max-width: 480px) {
  .contact-rail {
    gap: 0.4rem;
  }

  .contact-rail-btn {
    width: 34px;
    height: 34px;
  }

  .contact-rail-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* Bottom mobile nav */
.bottom-nav {
  display: none;
}

@media (max-width: 380px) {
  .header-clock {
    display: none;
  }
}

@media (max-width: 767px) {
  body {
    padding-bottom: var(--bottom-nav-h);
  }

  .header-right {
    gap: 0.75rem;
  }

  .hamburger {
    display: flex;
  }

  .site-header nav.site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 0 solid var(--border);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease, padding 0.2s ease;
    z-index: 39;
  }

  /* Padding/border only when open, otherwise the closed menu leaves a strip over the page */
  .site-header nav.site-nav.open {
    max-height: calc(100vh - var(--header-h) - var(--bottom-nav-h));
    overflow-y: auto;
    padding: 0.5rem 0;
    border-bottom-width: 1px;
  }

  .site-header nav.site-nav a {
    width: 100%;
    padding: 0.75rem 1.25rem;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: var(--bottom-nav-h);
    background: rgba(var(--surface-rgb), 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
    font-size: 0.68rem;
    color: var(--muted);
    text-decoration: none;
  }

  .bottom-nav a svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
  }

  .bottom-nav a.active {
    color: var(--accent);
  }
}

@media (max-width: 360px) {
  .clock-date {
    display: none;
  }
}

/* News */
.news-page h1,
.news-detail h1 {
  margin-bottom: 0.55rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.35rem;
}

@media (min-width: 768px) {
  .news-page .news-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.6rem;
  }
}

/* Home previews hold only a few items, so let them fill the row */
.home-products .shop-grid,
.home-news .news-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}

.home-products .product-thumb,
.home-products .product-thumb-placeholder {
  aspect-ratio: 16 / 10;
}

.home-news .news-cover,
.home-news .news-cover-placeholder {
  height: 160px;
}

.news-card {
  display: block;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.news-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.12);
}

.news-cover {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  background: var(--surface-alt-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.news-cover-placeholder {
  height: 110px;
}

.news-card-body {
  padding: 0.4rem;
}

.news-title {
  margin: 0.2rem 0;
  font-size: 0.82rem;
}

.news-meta {
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

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

.status-badge {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.status-badge.status-done {
  background: var(--success-bg);
  color: var(--accent);
}

.status-badge.status-ongoing {
  background: rgba(255, 176, 32, 0.14);
  color: #ffb020;
}

.status-badge.status-planned {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

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

.news-detail-cover {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 0.55rem;
}

.news-detail h1 {
  margin-top: 0.5rem;
}

.news-body {
  white-space: pre-line;
  color: var(--text);
  margin: 1rem 0;
}

.news-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}

.news-gallery img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.news-actions {
  margin: 1.25rem 0;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.like-btn.liked {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.4);
}

.like-btn .like-icon {
  font-size: 1.1rem;
}

.comments {
  margin-top: 0.75rem;
}

.comment-form {
  margin-bottom: 0.75rem;
}

.comment-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.4rem 0 0;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-item {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.comment-item p {
  margin: 0.3rem 0 0;
  color: var(--text);
}

.news-form .thumb,
.gallery-thumb img {
  width: 110px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  margin: 0.4rem 0 1rem;
}

.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1rem 0;
}

.gallery-thumb {
  width: 110px;
  text-align: center;
}

.gallery-thumb img {
  margin: 0 0 0.4rem;
}

/* --- public gallery / lightbox --- */

.masonry-grid {
  columns: 2;
  column-gap: 0.6rem;
  margin-top: 0.75rem;
}

@media (min-width: 640px) {
  .masonry-grid {
    columns: 3;
  }
}

.masonry-item {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 0.55rem;
  padding: 0;
  border: none;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.masonry-item img {
  display: block;
  width: 100%;
  height: auto;
}

.masonry-caption {
  display: block;
  padding: 0.5rem 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: left;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-inner {
  max-width: 100%;
  max-height: 100%;
  text-align: center;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius);
}

.lightbox-caption {
  color: var(--text);
  margin-top: 0.75rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

/* --- reviews --- */

.reviews-summary {
  text-align: center;
  margin: 0.75rem 0;
}

.reviews-stars-big {
  font-size: 2rem;
  color: #ffb020;
  letter-spacing: 0.1em;
}

.reviews-avg-label {
  color: var(--muted);
  margin-top: 0.3rem;
}

.review-form {
  margin: 1.5rem 0;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.review-item {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.65rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.review-item:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  transform: translateY(-2px);
}

.review-item p {
  margin: 0.3rem 0 0;
  color: var(--text);
}

.review-stars {
  color: #ffb020;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}

.comment-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

/* --- about --- */

.about-address {
  color: var(--muted);
  margin-top: -0.5rem;
}

.about-hours {
  margin: 0.5rem 0 0.75rem;
}

.about-hours h2 {
  margin-bottom: 0.4rem;
}

.about-hours p {
  margin: 0.2rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.about-services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin: 0.75rem 0 1rem;
}

@media (min-width: 640px) {
  .about-services {
    grid-template-columns: 1fr 1fr;
  }
}

.about-service-card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}

.about-service-card h3 {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 1rem;
}

.about-service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.about-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.about-project-card {
  min-width: 0;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text);
}

.about-project-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.about-project-card span {
  display: block;
  padding: 0.4rem 0.5rem;
}

/* --- admin checkbox / toggle --- */

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-label input[type="checkbox"] {
  display: inline-block;
  width: auto;
  margin-top: 0;
}

/* --- services --- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
  margin-top: 0.3rem;
}

@media (min-width: 420px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 700px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1000px) {
  .services-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1300px) {
  .services-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.services-page .service-icon {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0.35rem 0 0.5rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card {
  display: block;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.45rem;
  color: var(--text);
  text-decoration: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.2);
  transform: translateY(-3px);
}

.service-card h2 {
  margin: 0 0 0.22rem;
  font-size: 0.84rem;
  color: var(--accent);
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.service-card-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--accent);
}

.service-cover {
  width: min(100%, 640px);
  margin: 0 auto 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

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

.service-hero {
  margin: 0.75rem 0 1rem;
}

.service-hero p {
  color: var(--muted);
  margin-top: 0.5rem;
  line-height: 1.6;
}

.service-included {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
  color: var(--text);
  line-height: 1.6;
}

.service-price-note {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 0.55rem;
}

.service-cta {
  display: block;
  text-align: center;
}

@media (min-width: 640px) {
  .service-cta {
    display: inline-block;
  }
}

/* AI chat widget */
.chat-fab {
  position: fixed;
  right: 1.25rem;
  bottom: calc(var(--bottom-nav-h) + 1.25rem);
  z-index: 46;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #06110b;
  box-shadow: 0 4px 18px rgba(var(--accent-rgb), 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 22px rgba(var(--accent-rgb), 0.55);
}

.chat-fab svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 767px) {
  .chat-fab {
    bottom: calc(var(--bottom-nav-h) + 1rem);
  }
}

.chat-panel {
  position: fixed;
  right: 1.25rem;
  bottom: calc(var(--bottom-nav-h) + 1.25rem + 128px);
  z-index: 50;
  width: min(340px, calc(100vw - 2.5rem));
  height: min(480px, calc(100vh - 8rem));
  display: flex;
  flex-direction: column;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.chat-panel[hidden] {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--surface-alt-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
}

.chat-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
}

.chat-close:hover {
  color: var(--text);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.chat-msg {
  max-width: 85%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.9rem;
  line-height: 1.5;
  font-size: 0.92rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: #06110b;
  border-bottom-right-radius: 0.25rem;
}

.chat-msg.assistant {
  align-self: flex-start;
  background: var(--surface-alt-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 0.25rem;
}

/* Checkout cards in the chat: order summary, then bank details + receipt upload */
.chat-card {
  align-self: stretch;
  padding: 0.75rem;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 0.75rem;
  background: var(--surface-alt-glass);
  font-size: 0.88rem;
  color: var(--text);
}

.chat-card p {
  margin: 0.5rem 0 0;
}

.chat-card .chat-card-title {
  margin-top: 0;
  font-weight: 600;
}

.chat-card-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chat-card-items li,
.chat-card-total {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.chat-card-items li + li {
  margin-top: 0.3rem;
}

.chat-card .chat-card-total {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.chat-card-dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 0.75rem;
  margin: 0.5rem 0 0;
}

.chat-card-dl dt {
  color: var(--muted);
}

.chat-card-dl dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.chat-card .chat-card-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.chat-card-actions,
.chat-card-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.chat-card-upload input[type="file"] {
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
  font-size: 0.82rem;
}

.chat-card button {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.chat-card .chat-card-cancel {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  box-shadow: none;
}

.chat-card button:disabled {
  opacity: 0.55;
  cursor: default;
}

.chat-card-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
}

.receipt-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.receipt-form small {
  color: var(--muted);
}

.pay-confirmed {
  color: var(--accent);
}

.pay-rejected {
  color: var(--danger);
}

.success-msg {
  color: var(--accent);
  background: var(--success-bg);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
}

.chat-typing {
  display: flex;
  gap: 0.3rem;
  padding: 0 0.85rem 0.6rem;
}

.chat-typing[hidden] {
  display: none;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: chat-typing-bounce 1.2s infinite ease-in-out;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chat-typing-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.chat-input {
  flex: 1;
  background: var(--surface-alt-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}

.chat-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Scoped to its parent (not just .chat-send) so this beats the later, more specific
   button[type="submit"] rule below — this button IS type="submit" (Enter-to-send)
   and was otherwise having its padding/border-radius overridden by that rule,
   squashing the send icon sideways inside a now-oval button. */
.chat-input-row .chat-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #06110b;
  cursor: pointer;
  flex-shrink: 0;
}

.chat-send svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 480px) {
  .chat-panel {
    right: 0;
    left: 0;
    top: 0;
    /* No explicit height: top+bottom let the box track the real visible
       viewport (unlike 100vh, which on mobile is the *layout* viewport and
       can be taller than what's actually on screen once browser chrome or
       the keyboard is accounted for). --chat-kb-inset is pushed by main.js
       from the VisualViewport API so the input row clears the keyboard too. */
    bottom: calc(var(--bottom-nav-h) + 0.75rem + env(safe-area-inset-bottom) + var(--chat-kb-inset, 0px));
    width: 100%;
    height: auto;
    border-radius: 0;
  }
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer-grid {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.7rem 1rem 0.6rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1rem;
}

.footer-brand .footer-logo {
  height: 26px;
  width: auto;
  margin-bottom: 0.55rem;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-contact h3,
.footer-links h3 {
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

.footer-contact p {
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
}

.footer-contact a,
.footer-links a {
  color: var(--muted);
  font-size: 0.88rem;
  transition: color 0.15s ease;
}

.footer-contact a:hover,
.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-direction: column;
}

.footer-links a {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 0.45rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.85rem 1rem 0.75rem;
  }

  .site-footer {
    margin-bottom: var(--bottom-nav-h);
  }

  /* Let the last line scroll clear of the contact row + chat button */
  .footer-bottom {
    padding-bottom: calc(1rem + 52px + 0.5rem + 38px + 0.5rem);
  }
}

/* Matrix rain background */
#matrixCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.25;
}

/* Card tilt-on-hover (desktop only, class added by matrix.js) */
.tilt-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .tilt-card {
    transition: none;
  }
}

/* Admin AI assistant */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ai-intro {
  color: var(--muted);
  margin: 0 0 0.75rem;
  max-width: 70ch;
}

.ai-chat {
  display: flex;
  flex-direction: column;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 820px;
}

.ai-log {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem;
  min-height: 280px;
  max-height: min(64vh, 680px);
  overflow-y: auto;
}

.ai-msg {
  max-width: 85%;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ai-msg p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-msg-assistant {
  align-self: flex-start;
  background: var(--surface-alt-glass);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.ai-msg-user {
  align-self: flex-end;
  background: var(--accent-dim);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-bottom-right-radius: 4px;
}

.ai-msg-error {
  color: var(--danger);
  background: var(--danger-dim);
  border-color: rgba(255, 92, 92, 0.3);
}

.ai-msg-failed {
  opacity: 0.55;
}

.ai-msg-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.ai-msg-img {
  display: block;
  max-width: 200px;
  max-height: 160px;
  border-radius: 8px;
  margin-bottom: 0.35rem;
  object-fit: cover;
}

.ai-suggestions,
.ai-card-candidates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

button.ai-suggestion {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 999px;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
}

/* Preview card */
.ai-card {
  align-self: flex-start;
  width: min(100%, 560px);
  padding: 0.8rem 0.9rem;
  background: rgba(var(--bg-rgb), 0.6);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.88rem;
}

.ai-card[data-status="applied"] {
  border-color: rgba(var(--accent-rgb), 0.2);
  border-left-color: #3ddc97;
}

.ai-card[data-status="cancelled"],
.ai-card[data-status="revised"] {
  opacity: 0.55;
  border-left-color: var(--muted);
}

.ai-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.ai-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.ai-card-state {
  font-size: 0.75rem;
  color: var(--muted);
}

.ai-card[data-status="applied"] .ai-card-state {
  color: #3ddc97;
}

.ai-card-summary {
  margin: 0.3rem 0 0.6rem;
  font-weight: 600;
}

.ai-card-img {
  display: block;
  max-width: 180px;
  max-height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 0.6rem;
}

.ai-card-swatches {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.ai-swatch {
  width: 2rem;
  height: 1.25rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.ai-swatch-arrow {
  color: var(--muted);
}

.ai-card-fields {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 0.8rem;
  margin: 0;
}

.ai-card-fields dt {
  color: var(--muted);
}

.ai-card-fields dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-card-warnings {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: #ffb020;
}

.ai-card-error,
.ai-card-blocked {
  margin: 0.6rem 0 0;
  color: var(--danger);
}

.ai-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.ai-card-actions button:disabled {
  opacity: 0.5;
  cursor: wait;
}

button.ai-btn-revise {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  box-shadow: none;
}

button.ai-btn-cancel {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255, 92, 92, 0.4);
  box-shadow: none;
}

.ai-card-link {
  display: inline-block;
  margin-top: 0.6rem;
}

.ai-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 0.6rem 0.8rem;
}

.ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: ai-typing 1s infinite ease-in-out;
}

.ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ai-typing {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* Composer */
.ai-composer {
  border-top: 1px solid var(--border);
  padding: 0.6rem;
}

.ai-composer-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.ai-composer textarea {
  flex: 1;
  margin: 0;
  resize: none;
  min-height: 42px;
  max-height: 160px;
  line-height: 1.4;
}

.ai-composer label.ai-attach {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  height: 42px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
  cursor: pointer;
}

.ai-composer label.ai-attach:hover {
  border-color: var(--accent);
}

.ai-composer .ai-attach input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ai-attach svg,
.ai-send svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button.ai-send {
  flex: 0 0 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

button.ai-send:disabled {
  opacity: 0.5;
  cursor: wait;
}

.ai-revise,
.ai-attachment {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius);
  background: var(--accent-dim);
  font-size: 0.82rem;
}

.ai-revise[hidden],
.ai-attachment[hidden] {
  display: none;
}

.ai-revise span,
.ai-attachment span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-attachment img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
}

button.ai-chip-close {
  background: transparent;
  color: var(--muted);
  padding: 0 0.4rem;
  font-size: 1.1rem;
  line-height: 1;
  box-shadow: none;
}

/* The public contact rail / chat button would cover admin forms */
body:has(.ai-chat) .contact-rail,
body:has(.ai-chat) .chat-fab,
body:has(.settings-form) .contact-rail,
body:has(.settings-form) .chat-fab,
body:has(.admin-layout) .contact-rail,
body:has(.admin-layout) .chat-fab {
  display: none;
}

/* Mobile: the page scrolls (no nested scroll area) and the composer stays pinned above the bottom nav */
@media (max-width: 767px) {
  .ai-log {
    max-height: none;
    min-height: 200px;
    padding: 0.6rem;
  }

  .ai-msg {
    max-width: 92%;
  }

  .ai-composer {
    position: sticky;
    bottom: var(--bottom-nav-h);
    z-index: 5;
    background: rgba(var(--surface-rgb), 0.96);
    border-radius: 0 0 var(--radius) var(--radius);
  }
}

@media (max-width: 480px) {
  .ai-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ai-card-actions .ai-btn-confirm {
    grid-column: 1 / -1;
    padding: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-typing span {
    animation: none;
  }
}

/* Admin: site settings */
.settings-intro {
  color: var(--muted);
  margin: 0 0 0.75rem;
  max-width: 70ch;
}

.settings-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.settings-tab {
  padding: 0.5rem 0.9rem;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
}

.settings-tab:hover {
  color: var(--text);
  text-decoration: none;
}

.settings-tab[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.settings-panel[hidden] {
  display: none;
}

.settings-form {
  display: grid;
  gap: 0.2rem;
  max-width: 760px;
  padding: 1rem;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.settings-field {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.06);
}

.settings-field:last-of-type {
  border-bottom: none;
}

.settings-field > label,
.settings-label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.settings-field input[type="text"],
.settings-field input[type="number"],
.settings-field textarea {
  margin-top: 0;
}

.settings-field input[type="number"] {
  max-width: 8rem;
}

.settings-field.has-error input,
.settings-field.has-error textarea {
  border-color: var(--danger);
}

.field-error {
  color: var(--danger);
  font-size: 0.82rem;
  margin: 0.3rem 0 0;
}

.color-row,
.image-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.settings-field input[type="color"] {
  width: 3rem;
  height: 2.2rem;
  padding: 0.15rem;
  margin: 0;
  cursor: pointer;
}

.color-hex {
  font-size: 0.85rem;
  color: var(--text);
  min-width: 5.5rem;
}

.settings-image-preview {
  width: 72px;
  height: 72px;
  object-fit: contain;
  padding: 0.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(var(--bg-rgb), 0.6);
}

.image-controls {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.image-controls input[type="file"] {
  margin: 0;
  font-size: 0.85rem;
}

/* On/off switch */
.switch-row {
  display: flex !important;
  align-items: center;
  gap: 0.7rem;
  color: var(--text) !important;
  cursor: pointer;
  margin: 0 !important;
}

.settings-field input.switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 2.5rem;
  height: 1.4rem;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(var(--bg-rgb), 0.8);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.settings-field input.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.4rem - 6px);
  height: calc(1.4rem - 6px);
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s ease, background 0.15s ease;
}

.settings-field input.switch:checked {
  background: rgba(var(--accent-rgb), 0.25);
  border-color: var(--accent);
}

.settings-field input.switch:checked::after {
  transform: translateX(1.1rem);
  background: var(--accent);
}

.settings-field input.switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.settings-actions {
  padding-top: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .settings-field input.switch,
  .settings-field input.switch::after {
    transition: none;
  }
}

/* Promotions: prices, sale banner, cart promo code */
.price-sale {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15rem 0.4rem;
}

.price-old {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85em;
  text-decoration: line-through;
}

.discount-badge {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7em;
  font-weight: 700;
  line-height: 1.5;
}

.product-card {
  position: relative;
}

.product-sale-flag {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 1;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
}

.product-promo-note {
  color: var(--accent);
  font-size: 0.85rem;
  margin: 0.35rem 0 0.5rem;
}

.sale-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 92, 92, 0.45);
  background:
    linear-gradient(100deg, rgba(255, 92, 92, 0.22), rgba(var(--accent-rgb), 0.10) 60%, rgba(var(--surface-rgb), 0.72));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  text-decoration: none;
  transition: box-shadow 0.2s ease;
}

.sale-banner:hover {
  text-decoration: none;
  box-shadow: 0 0 18px rgba(255, 92, 92, 0.3);
}

.sale-badge {
  flex: none;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  background: var(--danger);
  border-radius: var(--radius);
  padding: 0.15rem 0.55rem;
}

.sale-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 12rem;
}

.sale-text span {
  color: var(--muted);
  font-size: 0.85rem;
}

.sale-text b {
  color: var(--text);
  letter-spacing: 0.04em;
}

.sale-countdown {
  display: flex;
  gap: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.6rem;
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
  background: rgba(var(--bg-rgb), 0.7);
  border: 1px solid var(--border);
}

.cd-unit b {
  font-size: 1.05rem;
}

.cd-unit small {
  color: var(--muted);
  font-size: 0.62rem;
}

.sale-cta {
  flex: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.sale-banner.sale-ended {
  display: none;
}

@media (max-width: 599px) {
  .sale-banner {
    gap: 0.6rem;
  }

  .sale-countdown {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .cd-unit {
    flex: 1;
  }

  .sale-cta {
    display: none;
  }
}

.cart-promo {
  margin: 0.9rem 0 0.4rem;
  max-width: 460px;
}

.cart-promo-form {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.cart-promo-form label {
  flex: 1;
  margin: 0;
}

.cart-promo-form button {
  height: 2.6rem;
}

.cart-promo-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  background: var(--success-bg);
  border: 1px solid var(--border);
}

.cart-savings {
  color: #3ddc97;
  margin: 0.3rem 0 0;
}

/* Admin: promos */
.promo-form h2,
.promo-list-title {
  margin: 0 0 0.6rem;
}

.promo-list-title {
  margin-top: 1.4rem;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0 1rem;
}

.promo-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}

.promo-cancel {
  margin-left: 0.8rem;
  color: var(--muted);
}

.promo-table td {
  white-space: nowrap;
}

.promo-table td:nth-child(2) {
  white-space: normal;
  min-width: 10rem;
}

.promo-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.promo-actions form {
  margin: 0;
}

.btn-small-link {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.promo-status {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.promo-active { background: rgba(61, 220, 151, 0.15); color: #3ddc97; }
.promo-scheduled { background: var(--accent-dim); color: var(--accent); }
.promo-expired,
.promo-off { background: rgba(122, 146, 184, 0.15); color: var(--muted); }

/* Admin: contact messages */
.nav-badge {
  display: inline-block;
  min-width: 1.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2rem;
  text-align: center;
}

.msg-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.msg-toolbar .settings-tabs {
  margin-bottom: 0;
  flex: 1;
}

.msg-toolbar form {
  margin: 0 0 0.4rem;
}

.msg-list {
  display: grid;
  gap: 0.6rem;
  max-width: 820px;
}

.msg-card {
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.msg-unread {
  border-left: 3px solid var(--accent);
}

.msg-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
}

.msg-tag {
  font-size: 0.72rem;
  color: var(--muted);
}

.msg-new {
  color: var(--accent);
  font-weight: 700;
}

.msg-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8rem;
}

.msg-body {
  margin: 0.5rem 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.msg-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  font-size: 0.85rem;
}

.msg-actions form {
  margin: 0;
}

.msg-spacer {
  flex: 1;
}

/* 404 page */
.not-found {
  max-width: 560px;
  margin: 3rem auto;
  text-align: center;
}

.not-found-code {
  margin: 0;
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.45);
}

.not-found-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

/* Admin menu on phones: one scrollable row instead of five wrapped rows */
@media (max-width: 767px) {
  .admin-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1.1rem;
    padding-bottom: 0.6rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .admin-nav a {
    flex: none;
    white-space: nowrap;
  }
}

/* Language switcher (header): GE / EN / RU pill */
.lang-switch {
  display: flex;
  align-items: center;
  flex: none;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(var(--surface-alt-rgb), 0.55);
}

.lang-switch a {
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.lang-switch a:hover {
  color: var(--text);
  text-decoration: none;
}

.lang-switch a[aria-current="true"] {
  background: var(--accent);
  color: var(--bg);
}

.lang-switch a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@media (max-width: 767px) {
  .lang-switch a {
    padding: 0.3rem 0.45rem; /* bigger touch target */
  }
}

@media (max-width: 420px) {
  .header-right {
    gap: 0.5rem;
  }
  .site-header {
    padding: 0 0.75rem 0 1rem;
  }
}

/* Admin: GE / EN / RU tabs on a translatable field (templates/admin/_i18n.html) */
.i18n-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0 0 0.75rem;
}

.i18n-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.i18n-label {
  font-weight: 500;
}

.i18n-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(var(--surface-alt-rgb), 0.5);
}

.i18n-tab {
  position: relative;
  min-width: 2.4rem;
  margin: 0;
  padding: 0.15rem 0.5rem;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.i18n-tab[aria-selected="true"] {
  background: var(--accent);
  color: var(--bg);
}

/* Empty EN/RU: the site falls back to Georgian there */
.i18n-tab.is-empty:not([data-lang="ka"])::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f5a524;
}

.i18n-pane {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
}

/* display:flex above would otherwise override the hidden attribute */
.i18n-pane[hidden] {
  display: none;
}

.i18n-pane > input,
.i18n-pane > textarea {
  flex: 1;
  min-width: 0;
  width: 100%;
  margin: 0;
}

.i18n-code {
  flex: none;
  width: 1.9rem;
  padding-top: 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}

/* With JS only one language is visible at a time; the tab shows which */
.i18n-js .i18n-code {
  display: none;
}

.i18n-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Admin: categories */
.category-list {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.category-item {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-glass);
}

.category-form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 6rem auto;
  align-items: end;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.category-form .i18n-field {
  margin: 0;
}

.category-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.category-count {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.category-new {
  max-width: 900px;
}

@media (max-width: 899px) {
  .category-item {
    flex-direction: column;
    align-items: stretch;
  }
  .category-form {
    grid-template-columns: 1fr 1fr;
  }
  .category-form .i18n-field {
    grid-column: 1 / -1;
  }
}

/* Desktop header that doesn't fit (long Georgian/Russian labels, staff links, language pill):
   main.js adds .nav-collapsed and the menu becomes the same drop-down as on phones */
.site-header.nav-collapsed .hamburger {
  display: flex;
}

.site-header.nav-collapsed nav.site-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0 solid var(--border);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, padding 0.2s ease;
  z-index: 39;
}

.site-header.nav-collapsed nav.site-nav.open {
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 0.5rem 0;
  border-bottom-width: 1px;
}

.site-header.nav-collapsed nav.site-nav a {
  width: 100%;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
}

/* The header's own backdrop-filter makes it the backdrop root, so the drop-down menu's blur has
   nothing to blur and the page showed through its 72% glass: give it a near-solid background */
.site-header nav.site-nav.open {
  background: rgba(var(--surface-rgb), 0.97);
}
@media (min-width: 768px) {
  .site-header:not(.nav-collapsed) nav.site-nav.open {
    background: none;
  }
}

/* ==========================================================================
   Warmer, clearer layer (2026-09)
   The blue Matrix identity stays: cyan/blue accents and the rain come from
   /admin/settings. Warmth comes from one amber "workbench lamp" accent (focus
   rings and prices only), text tinted a little warmer, softer glows, rounder
   shapes and a calmer spacing rhythm. Navigation: solid menu button, active
   page marked, breadcrumbs on inner pages (a back button on phones).
   ========================================================================== */

:root {
  --warm: #ffb86b;
  --warm-rgb: 255, 184, 107;
  /* Whatever text colours the admin picked, pull them slightly away from icy blue */
  --text-soft: color-mix(in srgb, var(--text) 90%, #fff0dc);
  --muted-soft: color-mix(in srgb, var(--muted) 80%, #d6c2aa);
  --line: rgba(var(--accent-rgb), 0.16);
  --line-strong: rgba(var(--accent-rgb), 0.42);
  --radius: 8px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --header-h: 58px;
}

@media (max-width: 767px) {
  :root {
    --header-h: 54px;
  }
}

body {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.6;
  background:
    radial-gradient(640px circle at 12% 8%, rgba(var(--accent-rgb), 0.08), transparent 60%),
    radial-gradient(720px circle at 88% 22%, rgba(var(--accent2-rgb), 0.09), transparent 60%),
    radial-gradient(760px circle at 8% 96%, rgba(var(--warm-rgb), 0.06), transparent 60%),
    radial-gradient(720px circle at 92% 92%, rgba(var(--accent2-rgb), 0.07), transparent 60%),
    rgba(var(--bg-rgb), 0.88);
  background-attachment: fixed;
}

/* The rain stays, a little further back */
#matrixCanvas {
  opacity: 0.16;
}

a {
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

/* ---- Focus: one amber ring for every keyboard stop ---------------------- */

:where(a, button, summary, [tabindex], select, input[type="checkbox"], input[type="radio"]):focus-visible {
  outline: 2px solid var(--warm);
  outline-offset: 3px;
}

form input:focus,
form select:focus,
form textarea:focus,
.chat-input:focus {
  outline: none;
  border-color: rgba(var(--warm-rgb), 0.85);
  box-shadow: 0 0 0 3px rgba(var(--warm-rgb), 0.18);
}

form input,
form select,
form textarea {
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

form input:hover:not(:focus),
form select:hover:not(:focus),
form textarea:hover:not(:focus) {
  border-color: var(--line-strong);
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--warm);
  color: #1a1206;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: none;
  text-decoration: none;
}

/* ---- Header ------------------------------------------------------------- */

.site-header {
  padding: 0 clamp(1rem, 2.5vw, 2rem);
  background: rgba(var(--surface-rgb), 0.95);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
}

.site-header .brand {
  padding: 0.3rem 0.4rem;
  margin-left: -0.4rem;
  border-radius: var(--radius-sm);
}

.site-header .brand:hover {
  background: rgba(var(--accent-rgb), 0.07);
}

.header-right {
  gap: 0.9rem;
}

/* The clock gives way to the menu on narrower desktops */
@media (min-width: 768px) and (max-width: 1279px) {
  .header-clock {
    display: none;
  }
}

/* Menu bar links: a pill on hover, a cyan bar under the current page */
.site-header nav.site-nav {
  gap: 0.15rem;
}

.site-header nav.site-nav a {
  position: relative;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--muted-soft);
  font-size: 0.93rem;
  font-weight: 500;
}

.site-header nav.site-nav a:hover {
  color: var(--text-soft);
  background: rgba(var(--accent-rgb), 0.08);
}

.site-header nav.site-nav a[aria-current="page"] {
  color: var(--text-soft);
  font-weight: 600;
}

.site-header nav.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: -0.35rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
}

@media (min-width: 768px) and (max-width: 1199px) {
  .site-header nav.site-nav {
    gap: 0;
  }

  .site-header nav.site-nav a {
    padding: 0.45rem 0.55rem;
    font-size: 0.88rem;
  }
}

/* Cart / account links live in the drop-down; in the bar the icon buttons stand in for them */
.nav-divider {
  display: none;
}

@media (min-width: 768px) {
  .site-header:not(.nav-collapsed) nav.site-nav .nav-account {
    display: none;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.header-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted-soft);
}

.header-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-icon:hover {
  color: var(--text-soft);
  background: rgba(var(--accent-rgb), 0.08);
  border-color: var(--line);
  text-decoration: none;
}

.header-icon[aria-current="page"] {
  color: var(--accent);
  border-color: var(--line-strong);
  background: rgba(var(--accent-rgb), 0.08);
}

/* Phones have the bottom bar for cart and account */
@media (max-width: 767px) {
  .header-actions {
    display: none;
  }
}

/* Menu button: solid, bordered, easy to find */
.hamburger {
  align-items: center;
  width: 42px;
  height: 42px;
  background: var(--surface-alt);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.hamburger span {
  width: 20px;
  background: var(--text-soft);
}

.hamburger:hover,
.hamburger[aria-expanded="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface-alt) 84%, var(--accent));
  box-shadow: 0 2px 14px rgba(var(--accent-rgb), 0.25);
}

/* Drop-down menu (phones, and desktops where the bar doesn't fit): solid panel, clear rows */
@media (max-width: 767px) {
  .site-header nav.site-nav {
    background: var(--surface);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.85);
  }

  .site-header nav.site-nav a {
    padding: 0.8rem 1.25rem;
    border-radius: 0;
    font-size: 1rem;
  }

  .site-header nav.site-nav a[aria-current="page"] {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
    box-shadow: inset 3px 0 0 var(--accent);
  }

  .site-header nav.site-nav a[aria-current="page"]::after {
    content: none;
  }

  .nav-divider {
    display: block;
    align-self: stretch;
    height: 1px;
    margin: 0.4rem 1.25rem;
    background: var(--line);
  }
}

.site-header.nav-collapsed nav.site-nav {
  background: var(--surface);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.85);
}

.site-header.nav-collapsed nav.site-nav a {
  padding: 0.8rem 1.5rem;
  border-radius: 0;
  font-size: 1rem;
}

.site-header.nav-collapsed nav.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: inset 3px 0 0 var(--accent);
}

.site-header.nav-collapsed nav.site-nav a[aria-current="page"]::after {
  content: none;
}

.site-header.nav-collapsed .nav-divider {
  display: block;
  align-self: stretch;
  height: 1px;
  margin: 0.4rem 1.5rem;
  background: var(--line);
}

.site-header nav.site-nav.open {
  background: var(--surface);
}

/* Language pill and bottom bar: same hover/active language as the menu */
.lang-switch a {
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

@media (max-width: 767px) {
  .bottom-nav {
    background: rgba(var(--surface-rgb), 0.97);
  }

  .bottom-nav a {
    position: relative;
    padding: 0.35rem 0;
    transition: color 0.18s var(--ease);
  }

  .bottom-nav a.active::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 30%;
    right: 30%;
    height: 2px;
    border-radius: 0 0 2px 2px;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
  }

  .bottom-nav a:hover {
    color: var(--text-soft);
    text-decoration: none;
  }
}

/* ---- Breadcrumbs -------------------------------------------------------- */

.crumbs {
  margin: 0.15rem 0 1.1rem;
  font-size: 0.86rem;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted-soft);
}

.crumbs li {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.crumbs li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 0.25rem 0 0.1rem;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.5;
}

.crumbs a {
  padding: 0.15rem 0.35rem;
  margin: 0 -0.05rem;
  border-radius: 6px;
  color: var(--muted-soft);
}

.crumbs a:hover {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  text-decoration: none;
}

.crumbs [aria-current="page"] {
  max-width: 48ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-soft);
  font-weight: 600;
}

.crumbs-back {
  display: none;
}

/* Phones: one clear way back instead of a trail */
@media (max-width: 767px) {
  .crumbs {
    margin-bottom: 0.9rem;
  }

  .crumbs ol {
    display: none;
  }

  .crumbs-back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
    padding: 0.45rem 0.9rem 0.45rem 0.55rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 600;
  }

  .crumbs-back span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .crumbs-back svg {
    flex: none;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .crumbs-back:hover,
  .crumbs-back:active {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--surface) 88%, var(--accent));
    text-decoration: none;
  }
}

/* ---- Rhythm and type (public site; the admin keeps its compact layout) --- */

body.site:not(.is-admin) main {
  padding: 1.1rem clamp(1rem, 3vw, 2rem) 3rem;
}

body.site:not(.is-admin) main h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.4rem, 1.05rem + 1.1vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
}

/* The home hero title sits in a slim bar next to its buttons */
body.site:not(.is-admin) main .hero h1 {
  margin-bottom: 0;
  font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.3rem);
}

body.site:not(.is-admin) main > section > h2,
body.site:not(.is-admin) main > h2,
body.site:not(.is-admin) .about-page h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

body.site:not(.is-admin) main > section + section {
  margin-top: 1.5rem;
}

.service-detail p,
.service-detail li,
.news-body p,
.about-intro,
.contact-lead {
  max-width: 72ch;
  line-height: 1.7;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

body.site:not(.is-admin) main .page-head h1 {
  margin-bottom: 0;
}

/* ---- Buttons: softer glow, a small lift ----------------------------------- */

button[type="submit"],
a.btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.18s var(--ease), box-shadow 0.2s var(--ease), transform 0.15s var(--ease), color 0.18s var(--ease);
}

button[type="submit"]:hover,
a.btn:hover {
  box-shadow: 0 8px 20px -8px rgba(var(--accent-rgb), 0.65);
  transform: translateY(-1px);
}

button[type="submit"]:active,
a.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

a.btn-outline {
  border-color: var(--line-strong);
}

a.btn-outline:hover {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: var(--accent);
}

.hero-actions a.btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}

/* ---- Cards: rounder, a soft lift on hover --------------------------------- */

.service-card,
.product-card,
.news-card,
.review-card {
  border-radius: var(--radius-lg);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}

a.service-card:hover,
.product-card:hover,
a.news-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -18px rgba(var(--accent-rgb), 0.45);
  text-decoration: none;
}

a.service-card:focus-visible,
a.news-card:focus-visible {
  outline-offset: 4px;
}

/* Prices in the warm accent: the one place colour says "this is what it costs" */
.product-price,
.price-now {
  color: var(--warm);
}

/* ---- Motion: only what answers the visitor; none if they ask for none ---- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  #matrixCanvas {
    display: none;
  }
}

/* The floating contact buttons and chat bubble would sit on top of the open menu */
.contact-rail,
.chat-fab {
  transition: opacity 0.18s var(--ease);
}

body:has(.site-nav.open) .contact-rail,
body:has(.site-nav.open) .chat-fab {
  opacity: 0;
  pointer-events: none;
}

/* ---- Contact buttons on phones: docked in the bottom bar ------------------
   Desktop keeps the floating rail and chat bubble. On phones they covered page
   content, so they move into a panel opened from the bar's "contact" item. */

.contact-rail-chat,
.contact-rail-label,
.bnav-contact {
  display: none;
}

@media (max-width: 767px) {
  .chat-fab {
    display: none;
  }

  .bottom-nav .bnav-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
    padding: 0.35rem 0;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--muted);
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transition: color 0.18s var(--ease);
  }

  .bottom-nav .bnav-contact svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .bottom-nav .bnav-contact:hover,
  .bottom-nav .bnav-contact[aria-expanded="true"] {
    color: var(--accent);
    box-shadow: none;
  }

  /* Six items on a narrow phone: keep the labels on one line */
  .bottom-nav a span,
  .bottom-nav .bnav-contact span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* The panel: rows with icon and label, just above the bar */
  .contact-rail {
    display: none;
    top: auto;
    right: 0.75rem;
    left: auto;
    bottom: calc(var(--bottom-nav-h) + 0.6rem + env(safe-area-inset-bottom));
    transform: none;
    z-index: 46;
    flex-direction: column;
    gap: 0.15rem;
    width: min(280px, calc(100vw - 1.5rem));
    padding: 0.4rem;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.85);
  }

  .contact-rail.open {
    display: flex;
    animation: contact-panel-in 0.18s var(--ease);
  }

  .contact-rail .contact-rail-btn,
  .contact-rail .contact-rail-chat {
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem;
    width: 100%;
    height: auto;
    padding: 0.7rem 0.8rem;
    border: none;
    border-radius: var(--radius-sm);
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    color: var(--text-soft);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
  }

  .contact-rail .contact-rail-btn svg {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--accent);
  }

  .contact-rail .contact-rail-btn:hover,
  .contact-rail .contact-rail-btn:active {
    transform: none;
    background: rgba(var(--accent-rgb), 0.1);
    box-shadow: none;
    text-decoration: none;
  }

  .contact-rail-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

}

/* Chat window: without the bubble it sits right above the bar (up to 480px it is full-screen, see .chat-panel above) */
@media (min-width: 481px) and (max-width: 767px) {
  .chat-panel {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    bottom: calc(var(--bottom-nav-h) + 0.6rem + env(safe-area-inset-bottom) + var(--chat-kb-inset, 0px));
  }
}

@keyframes contact-panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ==========================================================================
   Home page (2026-09): hero → slim banner → services → products → news.
   Lighter: open hero text instead of a boxed bar, one crisp banner strip,
   service cards with real hierarchy on soft layered surfaces, few borders.
   ========================================================================== */

/* ---- Hero: open text, the first thing the eye lands on ------------------- */

.home .hero {
  display: block;
  min-height: 0;
  margin: 0;
  padding: clamp(1rem, 2.5vw, 2rem) 0 clamp(1.1rem, 2.2vw, 1.75rem);
  background: none;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.home .hero-content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.home .hero-text {
  display: block;
  flex: 1 1 32rem;
  min-width: 0;
}

body.site.home main .hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-shadow: 0 0 28px rgba(var(--accent-rgb), 0.28);
}

.home .hero-tagline {
  display: block;
  max-width: 78ch;
  margin: 0;
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  line-height: 1.6;
  color: var(--muted-soft);
  white-space: normal;
  overflow: visible;
}

.home .hero-actions {
  flex-wrap: wrap;
  gap: 0.6rem;
}

body.site.home .hero-actions a.btn {
  padding: 0.65rem 1.25rem;
  font-size: 0.92rem;
}

/* ---- Banner: one slim strip; each image whole, never enlarged ------------ */

.home-banner {
  margin: 0 0 0.5rem;
}

.home-banner .banner-track {
  height: 220px;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.07), 0 18px 40px -26px rgba(0, 0, 0, 0.9);
}

.home-banner .banner-slide {
  display: grid;
  place-items: center;
  height: 100%;
  overflow: hidden;
  background: var(--surface);
}

/* The space around a portrait or small image: a dim, blurred copy of the same picture */
.home-banner .banner-slide::before {
  content: "";
  position: absolute;
  inset: -30px;
  background: var(--slide-img) center / cover no-repeat;
  filter: blur(26px) brightness(0.42) saturate(1.15);
}

/* Absolute and centred so max-height resolves against the slide: as a grid item the
   percentage never capped the image, which showed at full size with only its middle visible */
.home-banner .banner-slide img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  border: none;
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.home-banner .banner-caption {
  border-radius: 0;
}

.home-banner .banner-arrow {
  width: 34px;
  height: 34px;
  background: rgba(var(--surface-rgb), 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  opacity: 0;
  transition: opacity 0.2s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.home-banner:hover .banner-arrow,
.home-banner .banner-arrow:focus-visible {
  opacity: 1;
}

.home-banner .banner-arrow:hover {
  background: rgba(var(--surface-rgb), 0.95);
  border-color: var(--accent);
  box-shadow: none;
}

@media (hover: none) {
  .home-banner .banner-arrow {
    opacity: 0.85;
  }
}

.home-banner .banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  margin: 0;
  z-index: 2;
}

.home-banner .banner-dot {
  background: rgba(255, 255, 255, 0.35);
}

.home-banner .banner-dot.active {
  background: var(--accent);
}

@media (max-width: 639px) {
  .home-banner .banner-track {
    height: 140px;
    border-radius: 14px;
  }

  .home-banner .banner-arrow {
    width: 30px;
    height: 30px;
  }

  .home-banner .banner-dots {
    bottom: 6px;
  }
}

/* ---- Sections: quiet headings with a way to the full page ---------------- */

.home .home-section {
  margin-top: clamp(2.25rem, 1.5rem + 2.5vw, 3.5rem);
}

.home .home-banner + .home-section,
.home .sale-banner + .home-section {
  margin-top: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
}

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

body.site.home main .section-head h2,
body.site.home main .home-section > h2 {
  margin: 0;
  padding: 0;
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
  font-weight: 700;
  line-height: 1.3;
  text-shadow: none;
}

.home .home-section h2::before {
  content: none;
}

.home .home-section > h2 {
  margin-bottom: 1rem;
}

.section-more {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.15rem;
  padding: 0.3rem 0.4rem 0.3rem 0.65rem;
  border-radius: 999px;
  color: var(--muted-soft);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}

.section-more svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease);
}

.section-more:hover {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  text-decoration: none;
}

.section-more:hover svg {
  transform: translateX(2px);
}

/* ---- Service cards --------------------------------------------------------
   Equal height (one shared row height), aligned to one grid. Each card sits on
   a half-column grid so an incomplete last row is centred, not left-hanging. */

.svc-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 1rem;
}

.svc-card {
  grid-column: span 2;
}

/* 4 per row: centre a last row of 3, 2 or 1 */
.svc-card:nth-child(4n + 1):nth-last-child(3) { grid-column: 2 / span 2; }
.svc-card:nth-child(4n + 1):nth-last-child(2) { grid-column: 3 / span 2; }
.svc-card:nth-child(4n + 1):last-child { grid-column: 4 / span 2; }

@media (max-width: 1099px) {
  .svc-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .svc-card:nth-child(4n + 1):nth-last-child(3),
  .svc-card:nth-child(4n + 1):nth-last-child(2),
  .svc-card:nth-child(4n + 1):last-child {
    grid-column: span 2;
  }

  .svc-card:nth-child(3n + 1):nth-last-child(2) { grid-column: 2 / span 2; }
  .svc-card:nth-child(3n + 1):last-child { grid-column: 3 / span 2; }
}

@media (max-width: 859px) {
  .svc-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .svc-card:nth-child(3n + 1):nth-last-child(2),
  .svc-card:nth-child(3n + 1):last-child {
    grid-column: span 2;
  }

  .svc-card:nth-child(2n + 1):last-child { grid-column: 2 / span 2; }
}

.svc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  padding: 1.25rem 1.25rem 1.3rem;
  border-radius: 16px;
  color: var(--text-soft);
  background:
    linear-gradient(165deg, rgba(var(--surface-alt-rgb), 0.62), rgba(var(--surface-rgb), 0.5) 55%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(var(--accent-rgb), 0.07),
    0 14px 30px -22px rgba(0, 0, 0, 0.95);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background-color 0.22s var(--ease);
}

.svc-card:hover {
  transform: translateY(-4px);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 1px rgba(var(--accent-rgb), 0.3),
    0 24px 44px -24px rgba(var(--accent-rgb), 0.5);
}

.svc-card:active {
  transform: translateY(-1px);
}

.svc-card:focus-visible {
  outline-offset: 4px;
}

.svc-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.18);
  transition: background-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.svc-icon .service-icon {
  width: 24px;
  height: 24px;
  margin: 0;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
}

.svc-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.svc-card:hover .svc-icon {
  background: rgba(var(--accent-rgb), 0.18);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.4), 0 0 18px rgba(var(--accent-rgb), 0.25);
}

.svc-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

body.site main .svc-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-soft);
  /* Service names are short enough to show whole; three lines covers the longest Georgian one */
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.svc-desc {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted-soft);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.svc-go {
  position: absolute;
  top: 1.35rem;
  right: 1.1rem;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted-soft);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease), stroke 0.22s var(--ease);
}

.svc-card:hover .svc-go {
  transform: translateX(3px);
  opacity: 1;
  stroke: var(--accent);
}

/* Phones: a calm list, one row per service, the whole row is the tap target */
@media (max-width: 639px) {
  .svc-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
  }

  .svc-card,
  .svc-card:nth-child(2n + 1):last-child {
    grid-column: 1;
  }

  .svc-card {
    flex-direction: row;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 2.6rem 0.85rem 0.9rem;
    border-radius: 14px;
  }

  .svc-card:hover {
    transform: none;
  }

  .svc-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  body.site main .svc-title {
    font-size: 0.95rem;
  }

  .svc-desc {
    font-size: 0.82rem;
    -webkit-line-clamp: 1;
  }

  .svc-go {
    top: 50%;
    right: 0.9rem;
    margin-top: -9px;
    opacity: 0.8;
  }
}

/* ---- Products and news: the same soft surface, fewer lines --------------- */

/* auto-fit: a home preview of 3 or 4 items fills the row instead of leaving a gap on the right */
.home .home-products .shop-grid,
.home .home-news .news-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  grid-auto-rows: 1fr;
  gap: 1rem;
}

.home .home-products .product-card,
.home .home-news .news-card {
  border: none;
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(var(--surface-alt-rgb), 0.55), rgba(var(--surface-rgb), 0.45) 60%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(var(--accent-rgb), 0.06),
    0 14px 30px -22px rgba(0, 0, 0, 0.95);
  color: var(--text-soft);
}

.home .home-products .product-card {
  gap: 0.35rem;
  padding: 0.6rem 0.6rem 0.9rem;
}

.home .home-products .product-card:hover,
.home .home-news .news-card:hover {
  transform: translateY(-4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 1px rgba(var(--accent-rgb), 0.28),
    0 24px 44px -24px rgba(var(--accent-rgb), 0.45);
}

.home .home-products .product-thumb,
.home .home-products .product-thumb-placeholder {
  border-radius: 11px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.home .home-products .product-name {
  margin: 0.35rem 0.25rem 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.home .home-products .product-price {
  margin: 0 0.25rem;
  font-size: 1rem;
}

.home .home-news .news-cover,
.home .home-news .news-cover-placeholder {
  height: 150px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.home .home-news .news-card-body {
  padding: 0.85rem 1rem 1rem;
}

.home .home-news .news-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

@media (max-width: 639px) {
  .home .home-products .shop-grid,
  .home .home-news .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .home .home-news .news-cover,
  .home .home-news .news-cover-placeholder {
    height: 110px;
  }

  .home .home-news .news-card-body {
    padding: 0.65rem 0.75rem 0.8rem;
  }

  .home .home-news .news-title {
    font-size: 0.86rem;
  }
}

.home .home-reviews .review-item {
  border: none;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(var(--surface-alt-rgb), 0.5), rgba(var(--surface-rgb), 0.4) 60%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 1px rgba(var(--accent-rgb), 0.05);
}

/* Desktop: keep page content clear of the floating contact buttons on the right edge */
@media (min-width: 768px) {
  body.site:not(.is-admin) main {
    padding-right: max(clamp(1rem, 3vw, 2rem), calc(1.25rem + 7px + 38px + 0.9rem));
  }
}

/* Phones: hero and banner both on the first screen; tighter service rows */
@media (max-width: 639px) {
  .home .hero {
    padding: 0.5rem 0 1rem;
  }

  body.site.home main .hero h1 {
    margin-bottom: 0.3rem;
    font-size: 1.75rem;
  }

  .home .hero-tagline {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .home .hero-content {
    gap: 0.9rem;
  }

  /* Two buttons on one line, each as wide as its label needs, together the full width */
  .home .hero-actions {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
  }

  body.site.home .hero-actions a.btn {
    flex: 1 1 auto;
    padding: 0.65rem 0.8rem;
    font-size: 0.86rem;
    text-align: center;
    white-space: nowrap;
  }

  .svc-card {
    gap: 0.8rem;
    padding: 0.7rem 2.5rem 0.7rem 0.8rem;
  }

  body.site main .svc-title {
    font-size: 0.92rem;
    line-height: 1.3;
  }

  .svc-body {
    gap: 0.2rem;
  }
}

/* ---- Desktop (1024px+) only: phones and tablets keep the rules above ------ */
@media (min-width: 1024px) {
  /* Title and tagline on the left, buttons on the right, one row at every desktop width */
  .home .hero-content {
    flex-wrap: nowrap;
  }

  /* A taller strip so a whole picture is big enough to read */
  .home-banner .banner-track {
    height: clamp(280px, 22vw, 400px);
  }

  /* The banner frame is a fixed box: whatever size an uploaded image has, it cannot make the
     frame taller. Only the sideways overflow stays scrollable (the slides). */
  .home-hero-row .banner-track {
    max-height: 480px; /* = the top of its clamp() height */
    overflow-y: hidden;
  }

  .home-banner .banner-track {
    max-height: 400px; /* = the top of its clamp() height */
    overflow-y: hidden;
  }

  .home-hero-row .banner-slide {
    max-height: 100%;
    overflow: hidden;
  }
}
