:root {
  color-scheme: light;
  --ink: #10140f;
  --muted: #5b635c;
  --line: #d7ddd4;
  --paper: #f7f8f4;
  --panel: #ffffff;
  --copper: #d96f3d;
  --gold: #c9a227;
  --signal: #167f7a;
  --blue: #2d77a8;
  --danger: #a33a2b;
  --shadow: 0 14px 36px rgba(16, 20, 15, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(247, 248, 244, 0.70), rgba(247, 248, 244, 0.70)),
    url("/assets/electronics-wallpaper-tile.jpg");
  background-position: center top;
  background-repeat: repeat;
  background-size: auto, 680px 680px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

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

button,
.button-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  padding: 0 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  background: #273027;
}

button.secondary,
.button-link.secondary-link {
  background: #fff;
  color: var(--ink);
}

.button-link.secondary-link:hover {
  background: #f2f4ed;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 244, 0.94);
  padding: 14px clamp(18px, 5vw, 64px);
  backdrop-filter: blur(12px);
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 6px;
  background: var(--ink);
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 0;
}

.site-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  min-height: 36px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  border-color: var(--gold);
  color: var(--ink);
}
.country-selector {
  position: relative;
}

.country-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 4px 10px;
}

.country-button:hover,
.country-button:focus-visible,
.country-button[aria-expanded="true"] {
  border-color: var(--gold);
  background: #f2f7f4;
}

.country-flag {
  font-size: 22px;
  line-height: 1;
}

.country-currency {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.country-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(310px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: var(--shadow);
}

.country-menu[hidden] {
  display: none;
}

.country-menu label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.country-menu select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  font: inherit;
}

.country-menu p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.country-warning {
  margin-top: 10px;
  border: 1px solid #d7b46a;
  border-radius: 6px;
  background: #fff6dd;
  color: #4c3d15;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.count {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--copper);
  color: #fff;
  font-size: 13px;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.product-page-shell {
  width: min(1640px, calc(100% - 48px));
}

.shop-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 28px;
  align-items: stretch;
  min-height: 230px;
  margin-bottom: 24px;
}

.intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 6px solid var(--gold);
  padding: 18px 0 18px 24px;
}

.eyebrow,
.category {
  margin: 0 0 8px;
  color: var(--signal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro-copy h1,
.detail-copy h1,
.content-page h1,
.basket-view h1,
.admin-header h1,
.admin-panel h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro-copy p:last-child,
.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 19px;
}

.intro-panel {
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.intro-image-panel img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.filters button {
  min-height: 38px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.filters button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.product-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.product-image-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1.28;
  background: #e8ede7;
}

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

.frontier-demo-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #050805;
}

.frontier-accord-card .product-actions {
  justify-content: flex-end;
}

.frontier-accord-card .play-button {
  min-width: 78px;
}

.product-image-next {
  opacity: 0;
  transition: opacity 900ms ease;
}

.product-image-next.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .product-image-next {
    display: none;
  }
}

.product-copy {
  flex: 1;
  padding: 18px 18px 0;
}

.product-copy h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.2;
}

.product-copy h2 a {
  text-decoration: none;
}

.summary {
  margin: 0;
  color: var(--muted);
}

.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
}

.price {
  font-size: 18px;
}

.add-button {
  min-width: 78px;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.detail-media {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 14px;
}

.detail-main-gallery {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}

.detail-main-image {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
  background: #fff;
}

.detail-main-open {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.detail-main-image img,
.detail-main-image video {
  display: block;
  width: 100%;
  aspect-ratio: 1.04;
  border-radius: 6px;
  object-fit: contain;
}

.detail-main-image video {
  background: #10140f;
}

.gallery-nav {
  width: 44px;
  min-height: 58px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0;
  font-size: 32px;
  line-height: 1;
}

.gallery-nav:hover,
.gallery-nav:focus-visible {
  border-color: var(--signal);
  background: #f2f7f4;
}

.gallery-nav:disabled {
  opacity: 0.35;
}

.detail-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 8px;
  max-height: 154px;
  overflow-y: auto;
  padding-right: 2px;
}

.detail-thumbnail {
  width: 100%;
  min-height: 0;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: #fff;
  padding: 4px;
}

.detail-thumbnail.is-active {
  border-color: var(--signal);
  box-shadow: 0 0 0 2px rgba(22, 127, 122, 0.18);
}

.detail-thumbnail img,
.detail-thumbnail video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-copy {
  --detail-body-size: 16px;
  --detail-lead-size: 24px;
  --detail-title-size: 46px;
  display: flex;
  max-height: var(--detail-copy-height, none);
  min-height: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.91);
  padding: 20px;
}

.detail-copy h1 {
  font-size: var(--detail-title-size);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.detail-copy p {
  color: var(--ink);
}

.detail-copy .lead {
  margin-top: 0;
  margin-bottom: 12px;
  color: #202820;
  font-size: var(--detail-lead-size);
  line-height: 1.22;
}

.detail-description {
  min-height: 180px;
  flex: 1 1 auto;
  overflow-y: auto;
  border: 1px solid rgba(215, 221, 212, 0.9);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.detail-description p {
  margin: 0;
  color: #10140f;
  font-size: var(--detail-body-size);
  line-height: 1.45;
  white-space: pre-line;
}

.detail-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 14px;
  align-items: flex-end;
  margin-top: 16px;
}

.detail-actions strong {
  flex: 0 0 auto;
  padding-bottom: 6px;
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
}

.variant-select-wrap {
  display: grid;
  flex: 1 1 320px;
  min-width: 240px;
  max-width: none;
  gap: 4px;
}

.variant-select-wrap span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.variant-select-wrap select {
  width: 100%;
  min-height: 46px;
  border-color: var(--line);
  background: #fff;
  font-weight: 800;
}

.detail-quantity-wrap {
  display: grid;
  flex: 0 0 86px;
  gap: 4px;
}

.detail-quantity-wrap span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-quantity-wrap input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  text-align: center;
  font-weight: 900;
}

.detail-actions #detail-add {
  flex: 0 0 auto;
  align-self: flex-end;
  white-space: nowrap;
}

.variant-picker {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  border: 0;
  padding: 0;
}

.variant-picker legend {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.variant-picker label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
}

.variant-picker label.is-selected {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(22, 127, 122, 0.13);
}

.variant-picker span {
  font-weight: 800;
}

.stock,
.fine-print {
  color: var(--muted);
  font-size: 14px;
}


body.is-viewer-open {
  overflow: hidden;
}

.gallery-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(8, 12, 10, 0.86);
  padding: 22px;
}

.gallery-viewer-dialog {
  display: grid;
  width: min(96vw, 1180px);
  height: min(92vh, 900px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}

.viewer-close {
  justify-self: end;
  background: #fff;
  color: var(--ink);
}

.gallery-viewer-stage {
  display: grid;
  min-height: 0;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
}

.gallery-viewer-image-wrap {
  display: grid;
  height: 100%;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
  touch-action: none;
  user-select: none;
}

.gallery-viewer-image-wrap.is-zoomed {
  cursor: grab;
}

.gallery-viewer-image-wrap.is-dragging {
  cursor: grabbing;
}

.gallery-viewer-image-wrap img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 120ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-viewer-image-wrap.is-dragging img {
  transition: none;
}

.viewer-nav {
  width: 58px;
  min-height: 86px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 0;
  font-size: 42px;
}

.viewer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
}

.viewer-zoom {
  background: #fff;
  color: var(--ink);
}

.required-options-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  background: rgba(8, 12, 10, 0.72);
  padding: 18px;
}

.required-options-dialog {
  display: grid;
  width: min(94vw, 620px);
  max-height: min(88vh, 760px);
  gap: 16px;
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  padding: 22px;
  box-shadow: var(--shadow);
}

.required-options-dialog h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.backorder-dialog {
  width: min(94vw, 680px);
}

.backorder-notice {
  display: grid;
  gap: 10px;
  border: 1px solid #d5a53b;
  border-radius: 8px;
  background: #fff8e7;
  padding: 16px;
  color: var(--ink);
}

.backorder-notice p {
  margin: 0;
  line-height: 1.5;
}

.required-option-groups {
  display: grid;
  gap: 14px;
}

.required-option-group {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.required-option-group legend {
  padding: 0 6px;
  font-weight: 900;
}

.required-option-group p,
.required-options-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.required-options-status {
  min-height: 1.4em;
  color: var(--danger);
}

.required-option-group label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.required-option-group select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

.required-options-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.addon-reminder-dialog {
  display: grid;
  width: min(94vw, 820px);
  max-height: min(88vh, 780px);
  gap: 18px;
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  padding: 22px;
  box-shadow: var(--shadow);
}

.addon-reminder-header h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.1;
}

.addon-reminder-header p:last-child {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

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

.addon-reminder-card {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf7;
  padding: 12px;
}

.addon-reminder-image {
  display: block;
  overflow: hidden;
  border-radius: 6px;
  background: #e8ede7;
  aspect-ratio: 1.18;
}

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

.addon-reminder-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.addon-reminder-copy h3,
.addon-reminder-copy p {
  margin: 0;
}

.addon-reminder-copy h3 {
  font-size: 20px;
  line-height: 1.2;
}

.addon-reminder-copy > p:not(.category) {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.addon-reminder-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.addon-reminder-card-actions strong {
  margin-right: auto;
  font-size: 18px;
}

.addon-reminder-qty {
  display: grid;
  width: 76px;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.addon-reminder-qty input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 8px 9px;
  text-align: center;
  font-weight: 900;
}

.addon-reminder-card-actions .button-link {
  min-height: 42px;
  padding: 10px 14px;
}

.affiliate-recommendations-dialog {
  display: grid;
  width: min(94vw, 760px);
  max-height: min(88vh, 760px);
  gap: 18px;
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  padding: 22px;
  box-shadow: var(--shadow);
}

.affiliate-recommendations-header h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.15;
}

.affiliate-recommendations-header p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.affiliate-recommendations-list {
  display: grid;
  gap: 10px;
}

.affiliate-recommendation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf7;
  padding: 14px;
}

.affiliate-recommendation h3,
.affiliate-recommendation p {
  margin: 0;
}

.affiliate-recommendation h3 {
  font-size: 17px;
  line-height: 1.3;
}

.affiliate-recommendation p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.affiliate-recommendation .button-link {
  min-height: 42px;
  padding: 10px 14px;
  white-space: nowrap;
}

.basket-view {
  max-width: 1180px;
}

.content-page {
  max-width: 840px;
}


.contact-page {
  max-width: 1220px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.contact-form,
.contact-details {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 18px;
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.contact-form textarea {
  min-height: 180px;
  resize: vertical;
}

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

.contact-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

.contact-status.is-error {
  color: var(--danger);
}

.contact-details h2,
.legal-page h2 {
  margin: 10px 0 0;
  font-size: 22px;
}

.contact-details p,
.legal-page p {
  margin: 0;
}

.contact-details a {
  overflow-wrap: anywhere;
}

.legal-page {
  display: grid;
  gap: 14px;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.basket-list {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.basket-checkout-layout {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(300px, 1fr);
  gap: 18px;
  align-items: start;
  margin: 24px 0;
}

.basket-note {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 16px;
  box-shadow: var(--shadow);
}

.basket-note h2 {
  margin: 0;
  font-size: 20px;
}

.basket-note-content {
  display: grid;
  gap: 10px;
}

.basket-note-content p,
.basket-note-content ul,
.basket-note-content ol {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.basket-note-content h2,
.basket-note-content h3 {
  margin: 4px 0 0;
}

.basket-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.basket-row img {
  width: 96px;
  height: 74px;
  border-radius: 6px;
  object-fit: cover;
}

.basket-row h2 {
  margin: 0;
  font-size: 18px;
}

.basket-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.basket-backorder-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin-top: 9px;
  border-left: 4px solid #b47a00;
  background: #fff8e7;
  padding: 9px 10px;
  color: #684600;
  font-size: 13px;
}

.basket-backorder-status.is-confirmed {
  border-left-color: var(--green);
  background: #effaf1;
  color: var(--green);
}

.basket-backorder-status.is-blocked {
  border-left-color: var(--danger);
  background: #fff0ed;
  color: var(--danger);
}

.basket-backorder-status button {
  min-height: 34px;
  margin-left: auto;
  padding: 6px 10px;
  font-size: 13px;
}

.order-component-allocation {
  display: block;
  margin-top: 5px;
}

.quantity {
  display: grid;
  grid-template-columns: 38px 34px 38px;
  align-items: center;
  text-align: center;
}

.quantity button {
  min-width: 38px;
  min-height: 38px;
  padding: 0;
}

.basket-summary {
  display: grid;
  gap: 10px;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.basket-summary p {
  margin: 0;
}

.checkout-form {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 14px;
}

.checkout-form h2 {
  margin: 0;
  font-size: 18px;
}

.checkout-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
}

.checkout-form textarea {
  resize: vertical;
}

.checkout-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkout-status {
  min-height: 1.3em;
  color: var(--signal);
  font-size: 13px;
  font-weight: 800;
}

.checkout-status.is-error {
  color: var(--danger);
}

.checkout-result {
  display: grid;
  gap: 12px;
}


.promo-code-form {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 12px;
}

.promo-code-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.promo-code-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.promo-code-controls input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
}

.promo-code-status {
  min-height: 1.3em;
  color: var(--signal);
  font-size: 13px;
  font-weight: 800;
}

.promo-code-status.is-error {
  color: var(--danger);
}

.basket-summary-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.basket-summary-line span {
  color: var(--muted);
  font-weight: 800;
}

.basket-summary-line strong {
  font-size: 20px;
  text-align: right;
}

.basket-total-line {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 12px;
}

.basket-total-line strong {
  font-size: 28px;
}

.content-page {
  border-left: 6px solid var(--blue);
  padding-left: 24px;
}

.content-page p {
  color: var(--muted);
  font-size: 18px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 26px;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 24px clamp(18px, 5vw, 64px);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.footer-company {
  max-width: 720px;
}

.footer-company p + p {
  margin-top: 8px;
}

.site-footer a {
  margin-left: 12px;
  font-weight: 700;
}

.admin-login {
  width: min(520px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.admin-shell {
  width: min(1280px, calc(100% - 304px));
  margin: 0 24px 0 280px;
  padding: 36px 0;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.admin-header h1,
.admin-panel h1 {
  font-size: 42px;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  box-shadow: var(--shadow);
}

.admin-panel + .admin-panel {
  margin-top: 22px;
}

.admin-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form label,
.admin-form-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.admin-form-field > label {
  display: block;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.rich-text-editor {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.admin-form textarea {
  min-height: 104px;
  resize: vertical;
}

.rich-text-editor {
  min-height: 260px;
  max-height: 620px;
  overflow: auto;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
  white-space: pre-wrap;
}

.rich-text-editor:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(22, 127, 122, 0.13);
  outline: 0;
}

.rich-text-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  font-weight: 700;
}

.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rich-text-toolbar button {
  display: inline-grid;
  width: 42px;
  min-width: 42px;
  min-height: 38px;
  place-items: center;
  padding: 0;
}

.rich-text-toolbar button[aria-pressed="true"] {
  border-color: var(--signal);
  background: #e7f5f1;
  color: var(--signal);
}

.site-rich-text-toolbar button {
  width: auto;
  min-width: 42px;
  padding: 0 12px;
}

.site-rich-text-editor {
  min-height: 180px;
  white-space: normal;
}

.site-rich-text-field-large .site-rich-text-editor {
  min-height: 32rem;
}

.site-rich-text-editor p,
.site-rich-text-editor h2,
.site-rich-text-editor h3,
.site-rich-text-editor ul,
.site-rich-text-editor ol {
  margin: 0 0 0.85rem;
}

.site-rich-text-editor ul,
.site-rich-text-editor ol {
  padding-left: 1.4rem;
}

.underline-tool {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-gate-field {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf7;
  padding: 12px;
}

.product-gate-field .fine-print {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.image-admin {
  display: grid;
  gap: 10px;
}

.image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.image-dropzone {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 132px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f9fbf7;
  padding: 12px;
  outline: none;
}

.image-dropzone:focus,
.image-dropzone.is-dragging {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(22, 127, 122, 0.16);
}

.image-dropzone img {
  width: 132px;
  height: 104px;
  border-radius: 6px;
  background: #e8ede7;
  object-fit: cover;
}

.image-dropzone img[hidden] {
  display: none;
}

.image-dropzone p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.image-dropzone span {
  display: block;
  margin-top: 4px;
  color: var(--signal);
  font-size: 13px;
}

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

.check {
  align-content: end;
}

.check input {
  width: auto;
  min-height: 0;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: grid;
  align-content: start;
  gap: 16px;
  width: 248px;
  max-height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 12px 0 30px rgba(0, 0, 0, 0.08);
  padding: 18px 16px;
}

.admin-sidebar-brand {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.admin-sidebar-brand .brand-mark {
  width: 44px;
  height: 44px;
  font-size: 17px;
}

.admin-sidebar-brand span:last-child {
  display: grid;
  gap: 1px;
}

.admin-sidebar-brand strong {
  font-size: 16px;
}

.admin-sidebar-brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-nav-section {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.admin-nav-section h2 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-nav-section-links,
.admin-nav-account form {
  display: grid;
  gap: 8px;
}

.admin-sidebar .button-link,
.admin-sidebar button {
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.15;
  text-align: left;
}

.admin-sidebar .is-current {
  border-color: var(--gold);
  background: #f8f2dd;
  color: var(--ink);
}

.config-admin-page .admin-panel {
  max-width: 1180px;
  margin-inline: auto;
}

.config-form {
  gap: 18px;
}

.config-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.config-card {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 16px;
}

.config-card h3 {
  margin: 0;
  font-size: 20px;
}


.admin-tool-links,
.price-tools-grid,
.promotion-code-list {
  display: grid;
  gap: 14px;
}

.admin-tool-links {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.price-tools-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.price-csv-form textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  min-height: 220px;
}

.promotion-code-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 16px;
}

.promotion-code-card + .promotion-code-card {
  margin-top: 12px;
}

.promotion-code-form .sub-panel-header {
  margin-bottom: 12px;
}

.promotion-delete-form {
  margin-top: 10px;
}

.config-help,
.secret-status,
.config-test-form .fine-print {
  margin: -6px 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.secret-status.is-set {
  color: var(--green);
}

.secret-status.is-empty {
  color: var(--danger);
}

.config-actions,
.config-test-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.config-test-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.notice.success {
  background: #effaf1;
  color: var(--green);
}

.printify-stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.printify-stage {
  display: grid;
  min-height: 112px;
  align-content: start;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 14px;
}

.printify-stage strong {
  font-size: 16px;
}

.printify-stage small,
.printify-product-identity small,
.printify-product-table td > small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.printify-stage-state,
.printify-row-status {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef1e8;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.printify-stage-state.is-ready,
.printify-row-status.is-selected,
.printify-row-status.is-published {
  border-color: #7db88a;
  background: #effaf1;
  color: var(--green);
}

.printify-stage-state.is-configured,
.printify-row-status.is-publishing {
  border-color: #c9a227;
  background: #fff8dc;
  color: #6e5712;
}

.printify-stage-state.is-needed {
  border-color: #d38a82;
  background: #fff0ee;
  color: var(--danger);
}

.printify-product-table {
  min-width: 1180px;
}

.printify-product-identity {
  display: grid;
  grid-template-columns: 72px minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
}

.printify-product-identity img,
.printify-product-placeholder {
  width: 72px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f0f1ed;
}

.printify-product-identity img {
  object-fit: contain;
}

.printify-product-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.printify-product-identity span:last-child {
  min-width: 0;
}

.printify-product-identity strong {
  display: block;
  overflow-wrap: anywhere;
}

.printify-webhook-table code {
  overflow-wrap: anywhere;
}

.printify-category-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 250px;
}

.printify-category-form input {
  width: 100%;
  min-width: 0;
}

.printify-category-form .compact-button {
  min-height: 42px;
  padding: 8px 12px;
}

.printify-listing-link {
  display: inline-flex;
  color: var(--green);
  font-weight: 900;
  white-space: nowrap;
}

.printify-listing-link.is-hidden {
  color: var(--muted);
}

.printify-sync-form {
  align-items: flex-start;
}

.printify-sync-form .fine-print {
  max-width: 780px;
}

.server-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.server-stat-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 14px;
}

.server-stat-card span,
.server-stat-table dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.server-stat-card strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.server-stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.server-live-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.server-live-label::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2f9d57;
  content: "";
}

.server-operations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
}

.server-operations-grid .admin-panel {
  min-width: 0;
}

.server-operations-grid .admin-panel + .admin-panel {
  margin-top: 0;
}

.server-secondary-grid {
  align-items: start;
}

.network-data-table {
  min-width: 980px;
}

.network-data-table th,
.network-data-table td {
  vertical-align: top;
}

.network-data-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.network-interface-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
}

.network-address {
  max-width: 220px;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.network-rate {
  display: inline-flex;
  min-width: 90px;
  border-radius: 6px;
  padding: 6px 8px;
  color: #fff;
  font-size: 14px;
}

.network-rate-in {
  background: #176f68;
}

.network-rate-out {
  background: #9a5b17;
}

.visitor-type-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 170px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.visitor-type-human {
  border-color: #9ac7a2;
  background: #effaf1;
  color: var(--green);
}

.visitor-type-bot {
  border-color: #e1c783;
  background: #fff8e0;
  color: #6b4d00;
}

.visitor-type-unknown {
  background: #f1f3ef;
  color: var(--muted);
}

.visitor-filter-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px) auto;
  align-items: end;
  gap: 12px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f3;
  padding: 12px;
}

.visitor-filter-options,
.visitor-filter-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.visitor-filter-option {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  font-weight: 900;
}

.visitor-filter-option input {
  grid-row: span 2;
  width: auto;
  min-height: 0;
}

.visitor-filter-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.visitor-search-label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.visitor-search-label input {
  min-height: 42px;
  background: #fff;
  font-size: 14px;
  text-transform: none;
}

.visitor-heading-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0;
  color: var(--muted);
  font-weight: 800;
}

.visitor-profile-table {
  min-width: 1120px;
}

.visitor-profile-table th,
.visitor-profile-table td,
.visitor-timeline-table th,
.visitor-timeline-table td {
  vertical-align: top;
}

.visitor-profile-table td {
  max-width: 280px;
  font-size: 13px;
}

.visitor-profile-table td:first-child {
  display: grid;
  gap: 7px;
  min-width: 190px;
}

.visitor-profile-table td:nth-child(3),
.visitor-profile-table td:nth-child(4) {
  width: 145px;
  white-space: normal;
}

.visitor-profile-table td small,
.visitor-timeline-table td small,
.visitor-order-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.visitor-ip-link {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.visitor-outcomes,
.visitor-page-list {
  display: grid;
  gap: 6px;
}

.visitor-outcome {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  border-radius: 6px;
  background: #edf0eb;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.visitor-outcome-purchase {
  background: #e9f8ec;
  color: var(--green);
}

.visitor-outcome-affiliate {
  background: #e6f5f4;
  color: #176f68;
}

.visitor-page-list span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: baseline;
}

.visitor-page-list strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visitor-page-list small {
  color: var(--muted);
  font-size: 11px;
}

.visitor-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.visitor-pagination .is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.visitor-timeline-table {
  min-width: 980px;
}

.visitor-timeline-table td:first-child {
  width: 155px;
  white-space: normal;
}

.visitor-timeline-table td:nth-child(2) {
  min-width: 220px;
}

.visitor-timeline-table td:nth-child(3),
.visitor-user-agent {
  max-width: 360px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.visitor-order-table,
.visitor-click-table {
  min-width: 780px;
}

.visitor-click-table td:nth-child(3) {
  max-width: 460px;
  overflow-wrap: anywhere;
}

.visitor-detail-page .server-stat-card strong {
  font-size: 20px;
}

.visitor-detail-page .server-stat-table dd {
  white-space: pre-line;
}

.server-stat-table {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.server-stat-table div {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcf8;
  padding: 12px 14px;
}

.server-stat-table div:last-child {
  border-bottom: 0;
}

.server-stat-table dd {
  margin: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.server-table-wrap {
  overflow-x: auto;
}


.orders-admin-page .admin-panel {
  min-width: 0;
}

.orders-data-table td,
.order-items-table td {
  vertical-align: top;
}

.order-number-link {
  display: inline-block;
  color: var(--ink);
  font-weight: 900;
}

.order-status-badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef4f0;
  color: var(--ink);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-status-paid,
.order-status-shipped,
.order-status-delivered {
  background: #effaf1;
  color: var(--green);
}

.order-status-pending,
.order-status-pending-payment,
.order-status-unfulfilled,
.order-status-processing,
.order-status-in_production,
.order-status-packed {
  background: #fff7e8;
  color: #7b4b00;
}

.backorder-queue-panel {
  margin-bottom: 22px;
}

.order-status-cancelled,
.order-status-expired,
.order-status-refunded {
  background: #fff0ee;
  color: var(--danger);
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.order-info-panel h2 {
  margin-bottom: 12px;
}

.order-definition-list dd {
  white-space: pre-line;
}

.order-status-form textarea {
  min-height: 130px;
}

.order-email-action {
  margin-top: 14px;
}

.order-total-list {
  display: grid;
  justify-content: end;
  gap: 6px;
  margin: 18px 0 0;
}

.order-total-list div {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(120px, auto);
  gap: 18px;
  align-items: baseline;
}

.order-total-list dt {
  color: var(--muted);
  font-weight: 900;
}

.order-total-list dd {
  margin: 0;
  text-align: right;
  font-size: 18px;
  font-weight: 900;
}

.server-data-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

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

.server-data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.server-log-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.server-log-block {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.server-log-block h3 {
  margin: 0;
  font-size: 18px;
}

.server-log-block pre {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10140f;
  color: #edf4e8;
  padding: 12px;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}



.security-page .admin-panel {
  min-width: 0;
}

.security-data-table th,
.security-data-table td {
  vertical-align: top;
}

.security-data-table td {
  max-width: 360px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.security-data-table .mono,
.security-ip-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-weight: 900;
}

.security-ip-link {
  color: var(--ink);
}

.security-page .server-log-block pre {
  max-height: 300px;
}



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

.admin-product-card {
  display: grid;
  grid-template-columns: auto 84px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.admin-product-card img {
  width: 84px;
  height: 64px;
  border-radius: 6px;
  background: #e8ede7;
  object-fit: cover;
}

.admin-product-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.admin-product-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.admin-product-card.is-archived {
  opacity: 0.7;
}

.admin-product-card.is-dragging {
  opacity: 0.62;
  border-style: dashed;
}

.product-count {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.product-count [data-product-sort-status] {
  min-height: 1.2em;
  color: var(--signal);
  font-size: 13px;
}

.product-drag-handle {
  align-self: stretch;
  min-height: 48px;
  border-color: rgba(16, 20, 15, 0.22);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  cursor: grab;
  touch-action: none;
}

.product-drag-handle:hover,
.product-drag-handle:focus-visible {
  background: #f2f4ed;
}

.product-drag-handle:active {
  cursor: grabbing;
}

.admin-product-actions,
.danger-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.button-link.danger-link,
.danger-button {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.button-link.danger-link:hover,
.danger-button:hover {
  border-color: #7c281d;
  background: #7c281d;
}

.delete-panel p {
  margin-top: 0;
}

.product-managers {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.sub-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 14px;
}

.sub-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sub-panel-header h3 {
  margin: 0;
  font-size: 20px;
}

.sub-panel-header span {
  color: var(--muted);
  font-weight: 800;
}

.price-panel-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  text-align: right;
}

.compact-button {
  padding: 8px 12px;
  font-size: 13px;
}

.us-duty-refresh-status {
  min-width: 150px;
  font-size: 12px;
}

.us-duty-refresh-status.is-ok {
  color: var(--signal);
}

.us-duty-refresh-status.is-error {
  color: var(--danger);
}

.image-count {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.image-count [data-image-sort-status] {
  min-height: 1.2em;
  color: var(--signal);
  font-size: 13px;
}

.image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 136px));
  gap: 12px;
  justify-content: start;
}

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

.option-group-card,
.option-group-add-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.option-group-card {
  display: grid;
  gap: 10px;
}

.option-group-form textarea {
  min-height: 110px;
}

.option-group-delete-form {
  margin: 0;
}

.shared-component-panel > .sub-panel-header {
  align-items: flex-start;
}

.shared-component-panel > .sub-panel-header p {
  margin: 4px 0 0;
}

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

.shared-component-card,
.shared-component-create-form,
.shared-component-link-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.shared-component-create-form {
  background: #f9fbf7;
}

.shared-component-card.is-archived {
  opacity: 0.72;
}

.shared-component-form {
  display: grid;
  gap: 12px;
}

.shared-component-form-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.shared-component-form-heading h4,
.shared-component-form-heading p {
  margin: 0;
}

.shared-component-form-heading > span {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.shared-component-fields {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(120px, 0.45fr) minmax(150px, 0.5fr) auto auto;
  gap: 10px;
  align-items: end;
}

.shared-component-fields > label,
.shared-component-requirements label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.shared-component-fields > .check {
  display: flex;
  min-height: 44px;
  align-items: center;
}

.shared-component-requirements {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.shared-component-requirements legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.shared-component-variant-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.shared-component-variant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}

.shared-component-variant-row .check {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
}

.shared-component-variant-row .check span {
  overflow-wrap: anywhere;
}

.shared-component-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.shared-component-unlink-form {
  margin: 10px 0 0;
}

.shared-component-link-panel summary {
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.shared-component-link-panel[open] summary {
  margin-bottom: 12px;
}

.variant-component-summary {
  display: block;
  margin-top: 3px;
  color: var(--signal);
  font-size: 12px;
  line-height: 1.35;
}

.variant-image-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
}

.field-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.variant-image-selected {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 122px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f9fbf7;
  padding: 8px;
}

.variant-image-selected.is-drop-target,
.variant-image-selected:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.22);
  outline: none;
}

.variant-image-selected-thumb {
  align-self: stretch;
}

.variant-image-drop-note {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.variant-image-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.variant-image-choice {
  position: relative;
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  cursor: pointer;
}

.variant-image-choice:hover,
.variant-image-choice:focus-within,
.variant-image-choice.is-selected {
  border-color: var(--signal);
}

.variant-image-choice.is-selected {
  box-shadow: 0 0 0 3px rgba(22, 127, 122, 0.13);
}

.variant-image-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  pointer-events: none;
}

.variant-image-choice[draggable="true"] {
  cursor: grab;
}

.variant-image-choice[draggable="true"]:active {
  cursor: grabbing;
}

.variant-image-choice.is-dragging,
.gallery-tile.is-dragging {
  opacity: 0.55;
}

.variant-image-choice.is-drop-target {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.22);
}

.variant-image-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background: #e8ede7;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.variant-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.variant-image-name {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variant-image-status {
  min-height: 1.2em;
  color: var(--signal);
  font-size: 13px;
  font-weight: 800;
}

.variant-image-choice.is-drop-confirmed,
.variant-image-selected.is-drop-confirmed {
  animation: drop-confirm 700ms ease;
}

@keyframes drop-confirm {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(22, 127, 122, 0.13);
  }

  45% {
    box-shadow: 0 0 0 5px rgba(22, 127, 122, 0.28);
  }
}

.variant-count {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.variant-count [data-variant-sort-status] {
  min-height: 1.2em;
  color: var(--signal);
  font-size: 13px;
}

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

.variant-add-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf7;
  padding: 12px;
}

.product-tariff-form {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf7;
  padding: 14px;
}

.product-tariff-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.product-tariff-heading h4 {
  margin: 0;
  font-size: 18px;
}

.product-tariff-heading .fine-print {
  margin: 0;
}

.product-tariff-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 0.45fr);
  gap: 12px;
  align-items: start;
}

.product-tariff-form .destination-duty-fields {
  margin-top: 12px;
}

.product-tariff-form > button[type="submit"] {
  margin-top: 12px;
}

.variant-add-inline-form {
  grid-template-columns: minmax(170px, 1.1fr) 120px minmax(220px, 1fr) auto;
}

.variant-add-inline-form .variant-image-field-inline {
  min-width: 0;
}

.variant-list-compact {
  margin-top: 12px;
}

.variant-line {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) 120px minmax(190px, 0.9fr) auto;
  gap: 10px;
  align-items: center;
}

.variant-inline-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.variant-inline-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 120px minmax(220px, 1fr) minmax(180px, 0.85fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.variant-inline-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.variant-inline-form input {
  min-width: 0;
}

.tariff-field,
.duty-rate-field {
  min-width: 0;
}

.tariff-field {
  position: relative;
  z-index: 5;
}

.tariff-status {
  min-height: 1.2em;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.tariff-status.is-ok {
  color: var(--signal);
}

.tariff-status.is-error {
  color: var(--danger);
}

.tariff-choice-list {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  display: grid;
  width: min(640px, calc(100vw - 48px));
  max-height: 300px;
  overflow-y: auto;
  padding: 6px 0;
  border: 1px solid #1f211f;
  border-radius: 7px;
  background: #30312f;
  color: #f8f8f4;
  box-shadow: 0 16px 32px rgba(17, 24, 17, 0.28);
  z-index: 200;
}

.tariff-choice-list[hidden] {
  display: none;
}

.tariff-choice-list::before {
  content: "";
  position: absolute;
  left: 96px;
  top: -9px;
  width: 16px;
  height: 16px;
  background: #30312f;
  border-left: 1px solid #1f211f;
  border-top: 1px solid #1f211f;
  transform: rotate(45deg);
}

.tariff-choice-button {
  display: grid;
  grid-template-columns: 128px minmax(220px, 1fr) 150px;
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.tariff-choice-button:last-child {
  border-bottom: 0;
}

.tariff-choice-button:hover,
.tariff-choice-button:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: 0;
}

.tariff-choice-button strong {
  color: #fff;
  font-size: 14px;
  line-height: 1.25;
}

.tariff-choice-button span,
.tariff-choice-button em {
  color: #ddded8;
  font-size: 12px;
  line-height: 1.35;
}

.tariff-choice-button em {
  color: #c7c9c0;
  font-style: normal;
}

@media (max-width: 760px) {
  .tariff-choice-list {
    width: min(92vw, 640px);
  }

  .tariff-choice-button {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.variant-inline-form button[type="submit"] {
  align-self: center;
}

.variant-inline-status {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-height: 0;
  color: var(--signal);
  font-size: 12px;
  font-weight: 800;
}

.variant-inline-status.is-error {
  color: var(--danger);
}

.variant-line label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.variant-summary-line {
  min-height: 72px;
}

.variant-line-price {
  font-size: 18px;
  font-weight: 900;
}

.variant-line-image {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.variant-line-image-thumb {
  display: grid;
  place-items: center;
  width: 56px;
  height: 46px;
  overflow: hidden;
  border-radius: 6px;
  background: #e8ede7;
  color: var(--muted);
  font-size: 11px;
}

.variant-line-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.variant-line-image [data-variant-image-preview-name],
.variant-line-image [data-variant-image-slot-name] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variant-image-field-inline {
  position: relative;
  grid-column: auto;
  gap: 4px;
}

.variant-image-selected-inline {
  width: 100%;
  min-height: 46px;
  border-style: dashed;
  background: #f9fbf7;
  color: var(--ink);
  padding: 4px;
  text-align: left;
  cursor: pointer;
}

.variant-image-selected-inline:hover,
.variant-image-selected-inline[aria-expanded="true"] {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(22, 127, 122, 0.13);
}

.variant-image-selected-inline .variant-image-drop-note {
  display: none;
}

.variant-image-picker-inline {
  position: absolute;
  z-index: 12;
  right: 0;
  left: 0;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  box-shadow: var(--shadow);
}

.variant-image-picker-inline[hidden] {
  display: none;
}

.variant-image-field-inline .variant-image-status {
  min-height: 0;
}

.variant-line-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: center;
  align-content: center;
  align-items: center;
  justify-content: flex-end;
}

.variant-line-actions form {
  margin: 0;
}

@media (max-width: 1120px) {
  .shared-component-fields {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 680px) {
  .shared-component-form-heading,
  .shared-component-panel > .sub-panel-header {
    display: grid;
  }

  .shared-component-fields,
  .shared-component-variant-list,
  .shared-component-variant-row {
    grid-template-columns: 1fr;
  }

  .shared-component-fields > .check,
  .shared-component-variant-row .check {
    min-height: 0;
  }
}

.variant-editor-panel {
  max-width: 920px;
}

.variant-detail-form .variant-line-image {
  align-self: end;
}

.gallery-tile-wrap {
  position: relative;
  min-width: 0;
}

.gallery-tile {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0;
  aspect-ratio: 1;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  user-select: none;
}

.gallery-tile:hover,
.gallery-tile:focus-visible {
  border-color: var(--signal);
}

.gallery-tile img,
.gallery-tile video {
  display: block;
  width: 100%;
  height: 100%;
  padding: 7px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-tile video {
  background: #10140f;
}

.gallery-tile-wrap.is-dragging .gallery-tile {
  opacity: 0.48;
  border-style: dashed;
}

.gallery-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.gallery-badge[hidden] {
  display: none;
}

.media-video-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  border-radius: 999px;
  background: rgba(16, 20, 15, 0.82);
  padding: 4px 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.gallery-edit-label {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border-radius: 999px;
  background: rgba(16, 20, 15, 0.82);
  padding: 5px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.gallery-rotation-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  border-radius: 999px;
  background: rgba(16, 20, 15, 0.86);
  padding: 5px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.gallery-drag-handle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  min-height: 32px;
  border-color: rgba(16, 20, 15, 0.22);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  cursor: grab;
  touch-action: none;
}

.gallery-drag-handle:hover,
.gallery-drag-handle:focus-visible {
  background: #f2f4ed;
}

.gallery-drag-handle:active {
  cursor: grabbing;
}

.image-editor-panel {
  gap: 18px;
}

.image-editor-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.image-editor-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.image-editor-preview img,
.image-editor-preview video {
  display: block;
  width: 100%;
  max-height: 560px;
  padding: 12px;
  object-fit: contain;
}

.image-editor-preview video {
  background: #10140f;
}

.image-editor-forms {
  display: grid;
  gap: 12px;
}

.image-editor-forms textarea {
  min-height: 190px;
}

.image-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.image-editor-actions > * {
  flex: 1 1 220px;
}

.image-delete-form {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.variant-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.variant-row-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.variant-row.is-dragging {
  opacity: 0.62;
}

.variant-drag-handle {
  align-self: stretch;
  width: 44px;
  min-width: 44px;
  min-height: 48px;
  border-color: rgba(16, 20, 15, 0.22);
  background: #fff;
  color: var(--ink);
  padding: 0;
  cursor: grab;
  touch-action: none;
}

.variant-drag-symbol {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.variant-drag-handle:hover,
.variant-drag-handle:focus-visible {
  background: #f2f4ed;
}

.variant-drag-handle:active {
  cursor: grabbing;
}

.compact-grid {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.variant-row.is-archived {
  opacity: 0.72;
}

.notice {
  border-radius: 6px;
  padding: 12px;
}

.notice.error {
  background: #fff0ee;
  color: var(--danger);
}

@media (max-width: 980px) {
  .admin-sidebar {
    position: static;
    width: min(100% - 24px, 680px);
    max-height: none;
    margin: 12px auto 0;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .admin-shell {
    width: min(100% - 24px, 1120px);
    margin: 0 auto;
    padding-top: 18px;
  }
}

@media (max-width: 820px) {
  .server-operations-grid,
  .visitor-filter-form {
    grid-template-columns: 1fr;
  }

  .server-operations-grid .admin-panel + .admin-panel {
    margin-top: 0;
  }

  .visitor-filter-actions {
    justify-content: flex-start;
  }

  .site-header,
  .site-footer,
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-intro,
  .product-detail,
  .basket-row,
  .checkout-form-grid {
    grid-template-columns: 1fr;
  }

  .intro-copy h1,
  .detail-copy h1,
  .content-page h1,
  .basket-view h1 {
    font-size: 40px;
  }

  .basket-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 1.6;
  }

  .detail-copy {
    --detail-body-size: 15px;
    --detail-lead-size: 22px;
    --detail-title-size: 40px;
    max-height: none;
  }

  .required-options-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-copy h1 {
    font-size: var(--detail-title-size);
  }

  .detail-actions {
    flex-wrap: wrap;
  }

  .detail-description {
    max-height: 45vh;
  }

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

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

  .image-dropzone {
    grid-template-columns: 1fr;
  }

  .image-dropzone img {
    width: 100%;
    height: auto;
    aspect-ratio: 1.35;
  }

  .image-list {
    grid-template-columns: repeat(auto-fill, minmax(96px, 120px));
  }

  .image-editor-layout {
    grid-template-columns: 1fr;
  }

  .admin-product-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .product-drag-handle,
  .variant-drag-handle {
    grid-column: 1 / -1;
  }

  .product-tariff-grid,
  .variant-row,
  .variant-line,
  .variant-inline-row,
  .variant-inline-form {
    grid-template-columns: 1fr;
  }

  .variant-line-actions {
    justify-content: stretch;
  }

  .admin-product-card img {
    width: 72px;
    height: 58px;
  }

  .admin-product-card .admin-product-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .admin-product-actions .button-link {
    flex: 1 1 auto;
  }

  .server-stat-table div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 640px) {
  .basket-checkout-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .app-shell,
  .admin-login,
  .admin-shell,
  .admin-sidebar {
    width: min(100% - 20px, 1120px);
  }

  .site-header {
    padding-inline: 12px;
  }

  .product-actions,
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .addon-reminder-card {
    grid-template-columns: 1fr;
  }

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

  .addon-reminder-card-actions strong {
    margin-right: 0;
  }

  .addon-reminder-qty {
    width: 100%;
  }

  .affiliate-recommendation {
    grid-template-columns: 1fr;
  }

  .affiliate-recommendation .button-link {
    width: 100%;
  }

  button,
  .button-link {
    width: 100%;
  }

  .gallery-nav,
  .detail-thumbnail,
  .detail-main-image,
  .viewer-nav,
  .viewer-close,
  .viewer-zoom {
    width: auto;
  }

  .detail-main-gallery {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .detail-copy {
    --detail-body-size: 13px;
    --detail-lead-size: 19px;
    --detail-title-size: 34px;
  }

  .gallery-viewer {
    padding: 10px;
  }

  .gallery-viewer-stage {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }
}


.destination-duty-fields {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.destination-duty-fields legend {
  font-weight: 800;
  padding: 0 6px;
}

.destination-duty-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.destination-duty-code-grid {
  grid-template-columns: 1fr;
}

.destination-duty-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(130px, 0.6fr);
  gap: 12px;
  align-items: start;
}

.destination-duty-row:focus-within {
  z-index: 120;
}

.destination-tariff-field {
  min-width: 0;
}

.destination-tariff-field:focus-within {
  z-index: 130;
}

.destination-duty-rate-field {
  min-width: 120px;
}

@media (max-width: 760px) {
  .destination-duty-row {
    grid-template-columns: 1fr;
  }
}

.variant-duty-summary {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.variant-backorder-summary {
  display: block;
  margin: 5px 0 0;
  color: #7b4b00;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.variant-detail-duty-summary {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf7;
  padding: 10px 12px;
  color: var(--muted);
}

.variant-detail-duty-summary strong {
  color: var(--ink);
}

.variant-detail-duty-summary span {
  font-size: 13px;
  font-weight: 800;
}


.tax-settings-table input[type="text"],
.tax-settings-table input:not([type]) {
  min-width: 7rem;
}

.tax-settings-table td,
.tax-settings-table th {
  vertical-align: middle;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.site-text-form .config-help {
  margin-top: 0;
}

.customer-email-token-panel {
  max-width: 1180px;
  margin-inline: auto;
}

.customer-email-token-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 18px;
}

.customer-email-token {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.customer-email-token code {
  color: var(--signal);
  font-size: 13px;
  font-weight: 900;
}

.customer-email-token span {
  color: var(--muted);
  font-size: 13px;
}

.customer-email-template-grid {
  grid-template-columns: minmax(0, 1fr);
}

.customer-email-template-card {
  gap: 14px;
}

.customer-email-template-card .sub-panel-header {
  align-items: center;
}

.customer-email-template-card .site-rich-text-editor {
  min-height: 230px;
}

.order-customer-email-history {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.order-customer-email-history h3 {
  margin: 0;
  font-size: 16px;
}

.order-customer-email-log-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  font-size: 13px;
}

.order-customer-email-log-row span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.contact-intro p,
.contact-location p {
  margin: 0 0 1rem;
}

.legal-content h2,
.legal-content h3 {
  margin-top: 1.35rem;
}


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

.admin-content-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 16px;
}

.admin-content-card h3,
.detail-content-links h2,
.content-linked-products h2 {
  margin: 0;
}

.admin-content-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-content-card.is-archived {
  opacity: 0.66;
}

.content-form {
  gap: 18px;
}

.content-rich-text-toolbar button {
  width: auto;
  min-width: 42px;
  padding: 0 12px;
}

.content-rich-text-editor {
  min-height: 540px;
  white-space: normal;
}

.content-rich-text-editor p,
.content-rich-text-editor h2,
.content-rich-text-editor h3,
.content-rich-text-editor h4,
.content-rich-text-editor ul,
.content-rich-text-editor ol,
.content-rich-text-editor blockquote {
  margin: 0 0 0.95rem;
}

.content-rich-text-editor ul,
.content-rich-text-editor ol {
  padding-left: 1.4rem;
}

.content-rich-text-editor blockquote,
.content-body blockquote {
  border-left: 4px solid var(--gold);
  margin-left: 0;
  padding-left: 14px;
  color: var(--muted);
}

.content-rich-text-editor .content-image {
  position: relative;
  cursor: grab;
}

.content-rich-text-editor .content-image-resize-handle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 6px;
  background: var(--ink);
  cursor: nwse-resize;
  opacity: 0;
  box-shadow: var(--shadow);
}

.content-rich-text-editor .content-image-resize-handle::before {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 12px;
  height: 12px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
}

.content-rich-text-editor .content-image:hover .content-image-resize-handle,
.content-rich-text-editor .content-image.is-selected .content-image-resize-handle {
  opacity: 1;
}

.content-rich-text-editor .content-image.is-selected {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

.content-rich-text-editor .content-image.is-dragging {
  opacity: 0.55;
}

.content-rich-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--signal);
  font-weight: 800;
}

.content-rich-status.is-error {
  color: var(--danger);
}

.content-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.content-form-actions button {
  width: auto;
}

.content-form-actions .secondary {
  background: #fff;
  color: var(--ink);
}

.content-link-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf7;
  padding: 12px;
}

.content-product-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.content-product-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.content-product-choice input {
  width: auto;
  min-height: 0;
  margin-top: 4px;
}

.content-product-choice span {
  display: grid;
  gap: 4px;
}

.content-product-choice small {
  color: var(--muted);
  font-weight: 700;
}

.content-detail-page-shell {
  width: min(1280px, calc(100% - 40px));
}

.content-detail-page {
  display: grid;
  gap: 18px;
  max-width: none;
}

.content-article,
.content-linked-products,
.detail-content-links {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.content-article {
  padding: clamp(18px, 3vw, 34px);
}

.content-article h1 {
  max-width: 980px;
  font-size: clamp(34px, 5vw, 58px);
}

.content-article .lead {
  color: var(--muted);
}

.content-body {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.58;
}

.content-body::after,
.content-rich-text-editor::after {
  content: "";
  display: block;
  clear: both;
}

.content-body h2,
.content-body h3,
.content-body h4 {
  clear: both;
  margin: 1.35rem 0 0.65rem;
  line-height: 1.12;
}

.content-body p,
.content-body ul,
.content-body ol,
.content-body blockquote {
  margin: 0 0 1rem;
}

.content-body ul,
.content-body ol {
  padding-left: 1.35rem;
}

.content-image,
.content-hero-image {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2ec;
  box-shadow: var(--shadow);
}

.content-image img,
.content-hero-image img {
  display: block;
  width: 100%;
  height: auto;
}

.content-image figcaption {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.content-image-left {
  float: left;
  width: min(42%, 380px);
  margin: 4px 18px 12px 0;
}

.content-image-right {
  float: right;
  width: min(42%, 380px);
  margin: 4px 0 12px 18px;
}

.content-image-full,
.content-hero-image {
  clear: both;
  width: min(100%, 880px);
  margin: 18px auto;
}

.content-image-left.content-image-size-small,
.content-image-right.content-image-size-small {
  width: min(28%, 260px);
}

.content-image-left.content-image-size-medium,
.content-image-right.content-image-size-medium {
  width: min(42%, 380px);
}

.content-image-left.content-image-size-large,
.content-image-right.content-image-size-large {
  width: min(55%, 560px);
}

.content-image-left.content-image-size-full,
.content-image-right.content-image-size-full {
  width: min(66%, 680px);
}

.content-image-full.content-image-size-small {
  width: min(45%, 360px);
}

.content-image-full.content-image-size-medium {
  width: min(65%, 560px);
}

.content-image-full.content-image-size-large {
  width: min(85%, 760px);
}

.content-image-full.content-image-size-full {
  width: min(100%, 880px);
}

.content-linked-products {
  padding: 18px;
}

.content-linked-products .sub-panel-header {
  margin-bottom: 14px;
}

.detail-content-links {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 14px;
}

.detail-content-links h2 {
  font-size: 18px;
}

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

.detail-content-links li {
  display: grid;
  gap: 2px;
}

.detail-content-links a {
  font-weight: 900;
}

.detail-content-links span {
  color: var(--muted);
  font-size: 14px;
}

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

  .content-image-left,
  .content-image-right,
  .content-image-full {
    float: none;
    width: 100% !important;
    margin: 14px 0;
  }
}


/* 2026-07 TOTP and delivery-duty handling */
.totp-enrol-card {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(260px, 1fr);
  gap: 24px;
  align-items: start;
}

.totp-qr {
  display: block;
  width: min(280px, 100%);
  height: auto;
  margin: 12px 0;
  border: 1px solid var(--line);
  background: #fff;
}

.totp-recovery-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px 20px;
  margin-top: 16px;
}

.totp-recovery-codes code {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #f5f7f3;
  font-size: 16px;
  text-align: center;
}

.tax-delivery-status {
  display: inline-block;
  max-width: 180px;
  color: #8a2d21;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.checkout-import-acknowledgement {
  display: grid !important;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 2px solid #9a4d28;
  background: #fff7ed;
}

.checkout-import-acknowledgement input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.checkout-import-warning {
  margin-bottom: 16px;
  padding: 12px;
  border-left: 4px solid #9a4d28;
  background: #fff7ed;
  color: #401b0d;
}

.checkout-import-warning p {
  margin: 5px 0 0;
}

@media (max-width: 720px) {
  .totp-enrol-card,
  .totp-recovery-codes {
    grid-template-columns: 1fr;
  }
}

/* 2026-07 security and checkout usability hardening */
.quantity {
  gap: 4px;
}

.quantity .basket-remove {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 32px;
  border-color: transparent;
  background: transparent;
  color: #8a2d21;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.quantity .basket-remove:hover,
.quantity .basket-remove:focus-visible {
  border-color: #d7ddd4;
  background: #fff7f5;
}

button:disabled,
.button-link[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
}

@media (max-width: 820px) {
  .server-operations-grid,
  .visitor-filter-form {
    grid-template-columns: 1fr;
  }

  .server-operations-grid .admin-panel + .admin-panel {
    margin-top: 0;
  }

  .visitor-filter-actions {
    justify-content: flex-start;
  }

  .quantity {
    justify-content: start;
  }

  .quantity .basket-remove {
    width: auto;
  }
}
