/*
 * Knightfall final design layer.
 * This file intentionally loads after the legacy storefront and admin styles.
 * Keep shared dimensions and responsive behaviour here so old page-specific
 * rules cannot reintroduce overflow, mismatched controls, or oversized cards.
 */
:root {
  --kf-control-height: 48px;
  --kf-radius: 7px;
  --kf-section-gap: clamp(30px, 4vw, 60px);
  --kf-line: #dedede;
  --kf-paper: #fff;
  --kf-soft: #f5f5f3;
  --kf-ink: #101317;
  --kf-muted: #687078;
}

/* Unified store settings: one workspace for store, checkout, delivery and taxes. */
html[data-admin="true"] .settings-console--unified {
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
}
html[data-admin="true"] .settings-console--unified .settings-unified-panel {
  display: grid !important;
  gap: 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
html[data-admin="true"] .settings-group {
  overflow: hidden;
  border: 1px solid #ddddda;
  border-radius: 8px;
  background: #fff;
}
html[data-admin="true"] .settings-group-heading {
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e5e5e2;
}
html[data-admin="true"] .settings-group-heading h2,
html[data-admin="true"] .settings-form-card h3,
html[data-admin="true"] .settings-subheading h3 {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: #11161b;
  font-weight: 600 !important;
}
html[data-admin="true"] .settings-group-heading h2 { font-size: 1.2rem !important; }
html[data-admin="true"] .settings-form-card h3,
html[data-admin="true"] .settings-subheading h3 { font-size: .95rem !important; }
html[data-admin="true"] .settings-group-heading p,
html[data-admin="true"] .settings-help {
  margin: 5px 0 0;
  color: #6f7475;
  font-size: .76rem;
  line-height: 1.5;
}
html[data-admin="true"] .settings-column-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
html[data-admin="true"] .settings-form-card {
  padding: 22px 24px;
  border-bottom: 1px solid #e5e5e2;
}
html[data-admin="true"] .settings-column-grid > .settings-form-card:first-child {
  border-right: 1px solid #e5e5e2;
}
html[data-admin="true"] .settings-account-stack {
  display: grid;
  gap: 24px;
  align-content: start;
}
html[data-admin="true"] .settings-password-form {
  padding-top: 22px;
  border-top: 1px solid #e5e5e2;
}
html[data-admin="true"] .settings-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
html[data-admin="true"] .settings-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
html[data-admin="true"] .settings-actions button,
html[data-admin="true"] .settings-subheading .button {
  width: auto !important;
  min-height: 42px !important;
  padding: 10px 16px !important;
}
html[data-admin="true"] .checkout-preferences {
  display: grid !important;
  grid-template-columns: minmax(210px, 1.1fr) repeat(2, minmax(170px, .8fr)) minmax(240px, 1fr) auto;
  gap: 16px;
  align-items: center;
}
html[data-admin="true"] .checkout-preferences > p[role="status"] { grid-column: 1 / -1; }
html[data-admin="true"] .compact-number-field {
  display: grid !important;
  grid-template-columns: auto 78px auto;
  gap: 8px;
  align-items: center;
  margin: 0 !important;
  color: #3e4344;
  font-size: .77rem;
}
html[data-admin="true"] .compact-number-field input { min-width: 0; }
html[data-admin="true"] .settings-delivery-block { padding-bottom: 28px; }
html[data-admin="true"] .settings-subheading {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
html[data-admin="true"] .settings-subheading--methods {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid #e5e5e2;
}
html[data-admin="true"] .settings-resource-panel {
  overflow-x: auto;
  border: 1px solid #e1e1de !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}
html[data-admin="true"] .settings-resource-panel .resource-table { margin: 0 !important; }
html[data-admin="true"] .tax-settings-form { border-bottom: 0; }
html[data-admin="true"] .tax-rate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dededb;
  border-radius: 6px;
}
html[data-admin="true"] .tax-rate-row {
  display: flex !important;
  min-width: 0;
  min-height: 62px;
  margin: 0 !important;
  padding: 10px 12px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e5e5e2;
}
html[data-admin="true"] .tax-rate-row:nth-child(odd) { border-right: 1px solid #e5e5e2; }
html[data-admin="true"] .tax-rate-row:nth-last-child(-n + 2) { border-bottom: 0; }
html[data-admin="true"] .tax-province { display: flex; min-width: 0; align-items: center; gap: 8px; }
html[data-admin="true"] .tax-province strong {
  overflow: hidden;
  color: #2b3031;
  font-size: .78rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-admin="true"] .tax-province small {
  color: #7b8081;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
}
html[data-admin="true"] .tax-rate-input {
  display: grid;
  grid-template-columns: 76px 20px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d4d4d0;
  border-radius: 5px;
  background: #fff;
}
html[data-admin="true"] .tax-rate-input input {
  width: 76px !important;
  min-height: 38px !important;
  padding: 7px 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
html[data-admin="true"] .tax-rate-input b { color: #6f7475; font-size: .72rem; font-weight: 600; }

@media (max-width: 1050px) {
  html[data-admin="true"] .checkout-preferences { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-admin="true"] .checkout-preferences > div:first-child,
  html[data-admin="true"] .checkout-preferences > p[role="status"] { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  html[data-admin="true"] .settings-column-grid,
  html[data-admin="true"] .settings-field-grid,
  html[data-admin="true"] .checkout-preferences,
  html[data-admin="true"] .tax-rate-list { grid-template-columns: 1fr !important; }
  html[data-admin="true"] .settings-column-grid > .settings-form-card:first-child { border-right: 0; }
  html[data-admin="true"] .settings-group-heading,
  html[data-admin="true"] .settings-form-card { padding: 18px !important; }
  html[data-admin="true"] .settings-subheading { align-items: flex-start; flex-direction: column; }
  html[data-admin="true"] .settings-subheading .button { width: 100% !important; }
  html[data-admin="true"] .tax-rate-row { border-right: 0 !important; border-bottom: 1px solid #e5e5e2 !important; }
  html[data-admin="true"] .tax-rate-row:last-child { border-bottom: 0 !important; }
}

/* Product editor cascade lock — intentionally last. */
html[data-admin="true"] .admin-main,
html[data-admin="true"] .admin-content { min-width: 0 !important; max-width: 100% !important; }
html[data-admin="true"] #product-editor,
html[data-admin="true"] .product-editor-form {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 1320px !important;
  margin-inline: auto !important;
}
html[data-admin="true"] .product-editor-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
}
html[data-admin="true"] .product-editor-form > * {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-column: 1 / -1 !important;
}
html[data-admin="true"] .product-editor-form .editor-grid,
html[data-admin="true"] .product-editor-essentials .editor-grid {
  width: 100% !important;
  max-width: none !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
html[data-admin="true"] .product-editor-form .editor-actions {
  position: static !important;
  bottom: auto !important;
  z-index: auto !important;
  margin: 0 !important;
  padding: 14px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
@media (max-width: 760px) {
  html[data-admin="true"] .product-editor-form .editor-grid,
  html[data-admin="true"] .product-editor-essentials .editor-grid { grid-template-columns: minmax(0, 1fr) !important; }
  html[data-admin="true"] .product-editor-form .editor-grid > *,
  html[data-admin="true"] .product-editor-form .editor-span-2 { grid-column: 1 !important; }
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

*,
*::before,
*::after { box-sizing: border-box; }

img { max-width: 100%; }

button,
.button,
.site-button,
input,
select,
textarea { border-radius: var(--kf-radius) !important; }

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
button,
.button { min-height: var(--kf-control-height); }

input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { margin: 0; appearance: none; -webkit-appearance: none; }

/* Storefront typography and layout */
body:not(:has(.admin-layout)) h1,
body:not(:has(.admin-layout)) h2,
body:not(:has(.admin-layout)) h3 {
  text-wrap: balance;
}

.shop-hero h1,
.auth-intro h1,
.account-dashboard h1,
.checkout-heading h1,
.cart-page-heading h1 {
  max-width: 900px;
  font-size: clamp(2rem, 4vw, 3.5rem) !important;
  line-height: .98 !important;
  letter-spacing: -.055em !important;
  font-weight: 500 !important;
}

.shop-hero,
.page-heading,
.checkout-heading,
.cart-page-heading { min-width: 0; }

.catalog-grid,
.product-related-grid,
#featured-product-grid,
.catalog-product-row {
  min-width: 0;
}

.product-card {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100%;
  border: 0 !important;
  background: var(--kf-paper);
  box-shadow: none !important;
}

.product-media {
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 4 / 5 !important;
  overflow: hidden;
  border: 1px solid #e7e7e4 !important;
  border-radius: 0 !important;
  background: #f0f0ed !important;
}

.product-media img {
  width: 100%;
  height: 100%;
  padding: 0 !important;
  object-fit: contain !important;
  filter: none !important;
}

.product-details {
  min-width: 0;
  padding: 12px 2px 4px !important;
  gap: 5px !important;
}

.product-copy,
.product-details h3,
.product-details p,
.product-price { min-width: 0; }

.product-details h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(.82rem, 1.2vw, 1rem) !important;
  line-height: 1.2 !important;
  letter-spacing: -.015em !important;
  font-weight: 650 !important;
}

.product-details p {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--kf-muted);
  font-size: .76rem !important;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-brand {
  margin-bottom: 5px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-price {
  margin-top: 7px !important;
  overflow-wrap: anywhere;
  font-size: .82rem !important;
  font-weight: 700;
}

.product-quick {
  right: 8px !important;
  bottom: 8px !important;
  left: 8px !important;
  width: calc(100% - 16px) !important;
  min-height: 42px !important;
  padding: 9px 8px !important;
  border-radius: 4px !important;
  font-size: .61rem !important;
}

.product-badge {
  top: 9px !important;
  left: 9px !important;
  max-width: calc(100% - 18px);
  overflow: hidden;
  border-radius: 4px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Homepage brand and product shelves */
body[data-home-page="true"] .brand-section,
body[data-home-page="true"] .product-shelves-section {
  width: min(100%, 1504px) !important;
  max-width: 1504px !important;
  overflow: visible !important;
}

body[data-home-page="true"] .brand-section {
  padding: clamp(48px, 6vw, 82px) clamp(20px, 4vw, 48px) !important;
}

body[data-home-page="true"] .brand-section h2 {
  font-size: clamp(2rem, 4vw, 3.6rem) !important;
  line-height: 1 !important;
  font-weight: 500 !important;
}

body[data-home-page="true"] .brand-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 20px 28px !important;
  margin-top: 34px !important;
}

body[data-home-page="true"] .brand-tile,
body[data-home-page="true"] .brand-tile--knightfall {
  width: 100%;
  min-width: 0;
  min-height: 78px !important;
  padding: 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-home-page="true"] .brand-tile img,
body[data-home-page="true"] .brand-tile--knightfall img {
  width: 100% !important;
  height: 68px !important;
  object-fit: contain !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}

body[data-home-page="true"] .product-shelves-section {
  padding: 0 clamp(20px, 4vw, 48px) clamp(52px, 6vw, 84px) !important;
}

body[data-home-page="true"] .product-shelf {
  min-width: 0;
  padding-top: 40px !important;
}

body[data-home-page="true"] .product-shelf + .product-shelf {
  margin-top: 36px !important;
  border-top: 1px solid #ecece9 !important;
}

body[data-home-page="true"] .product-shelf-heading {
  min-width: 0;
  margin-bottom: 20px !important;
}

body[data-home-page="true"] .product-shelf-heading .product-shelf-brand-logo {
  min-width: 0 !important;
  min-height: 54px !important;
  flex: 0 1 230px !important;
}

body[data-home-page="true"] .product-shelf-brand-logo img,
body[data-home-page="true"] .product-shelf-brand-logo--knightfall img {
  width: auto !important;
  max-width: 100% !important;
  height: 58px !important;
  object-fit: contain !important;
}

body[data-home-page="true"] .catalog-product-row {
  display: grid !important;
  width: 100% !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: clamp(10px, 1.4vw, 18px) !important;
  padding: 0 !important;
  overflow: visible !important;
  scroll-snap-type: none !important;
}

/* Product page */
.product-page { min-width: 0; }
.product-gallery,
.product-copy-panel,
.product-information { min-width: 0; }
.product-copy-panel h1 {
  max-width: 780px;
  font-size: clamp(1.8rem, 4vw, 3.7rem) !important;
  line-height: 1 !important;
  font-weight: 550 !important;
}

/* Administration: one predictable workspace */
html[data-admin="true"],
html[data-admin="true"] body { overflow-x: clip !important; }

html[data-admin="true"] .admin-layout,
html[data-admin="true"] .admin-main,
html[data-admin="true"] .admin-content,
html[data-admin="true"] .dashboard,
html[data-admin="true"] .admin-editor,
html[data-admin="true"] .editor-card,
html[data-admin="true"] .editor-grid,
html[data-admin="true"] .settings-workspace,
html[data-admin="true"] .dashboard-panel {
  min-width: 0 !important;
  max-width: 100%;
}

html[data-admin="true"] .admin-content {
  width: 100% !important;
  max-width: 1680px !important;
  padding: clamp(24px, 3vw, 48px) clamp(18px, 3vw, 48px) 72px !important;
}

html[data-admin="true"] .page-heading {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 28px;
}

html[data-admin="true"] .page-heading > div { min-width: 0; }
html[data-admin="true"] .page-heading > div > p:last-child {
  max-width: 680px;
  margin-bottom: 0;
}

html[data-admin="true"] .admin-editor,
html[data-admin="true"] .product-editor-form {
  display: grid !important;
  width: 100% !important;
  max-width: 1280px !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px !important;
  margin: 0 auto !important;
}

html[data-admin="true"] .editor-span-2 { grid-column: 1 !important; }

html[data-admin="true"] .editor-card,
html[data-admin="true"] details.editor-card {
  width: 100%;
  min-width: 0;
  padding: clamp(20px, 2.5vw, 30px) !important;
  overflow: hidden;
  border: 1px solid #e2e2df !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
}

html[data-admin="true"] details.editor-card { padding: 0 !important; }

html[data-admin="true"] details.editor-card > summary {
  min-width: 0;
  padding: 20px 24px !important;
}

html[data-admin="true"] .product-editor-details-body { padding: 24px !important; }

html[data-admin="true"] .editor-card-heading {
  display: flex !important;
  min-width: 0;
  align-items: flex-start !important;
  justify-content: space-between;
  gap: 16px 28px;
  margin-bottom: 24px !important;
  padding-bottom: 18px;
  border-bottom: 1px solid #ecece9;
}

html[data-admin="true"] .editor-card-heading p {
  max-width: 520px !important;
  margin: 0 !important;
  text-align: right !important;
}

html[data-admin="true"] .editor-grid {
  display: grid !important;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: start;
  gap: 20px !important;
}

html[data-admin="true"] .editor-grid > label,
html[data-admin="true"] .modal-form > label,
html[data-admin="true"] .form > label {
  min-width: 0;
}

html[data-admin="true"] input:not([type="checkbox"]):not([type="radio"]),
html[data-admin="true"] select,
html[data-admin="true"] textarea {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 12px 14px !important;
  border: 1px solid #d5d5d1 !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: .95rem !important;
}

html[data-admin="true"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html[data-admin="true"] select { height: 48px !important; }

html[data-admin="true"] input:focus,
html[data-admin="true"] select:focus,
html[data-admin="true"] textarea:focus {
  border-color: #101317 !important;
  outline: 2px solid rgba(16, 19, 23, .12) !important;
  outline-offset: 0;
}

html[data-admin="true"] .checkbox-field {
  min-width: 0;
  border-radius: 7px !important;
}

html[data-admin="true"] .product-upload-zone {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px !important;
}

html[data-admin="true"] .product-upload-zone input[type="file"] {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  opacity: 0;
  cursor: pointer;
}

html[data-admin="true"] .editor-actions {
  position: static !important;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  border-radius: 8px !important;
}

html[data-admin="true"] .table-shell,
html[data-admin="true"] .resource-table-shell {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  border: 1px solid #e2e2df;
  border-radius: 10px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

html[data-admin="true"] table {
  width: 100%;
  min-width: 860px;
  table-layout: auto;
}

html[data-admin="true"] th,
html[data-admin="true"] td {
  min-width: 0;
  padding: 14px 16px !important;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

html[data-admin="true"] .admin-modal-backdrop {
  padding: 12px !important;
  overflow: hidden;
}

html[data-admin="true"] .admin-modal {
  width: min(720px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100dvh - 24px) !important;
  border-radius: 10px !important;
}

html[data-admin="true"] .admin-modal-body {
  max-height: calc(100dvh - 92px) !important;
  padding: 22px !important;
  overflow: auto !important;
}

html[data-admin="true"] .modal-form {
  display: grid !important;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

html[data-admin="true"] .settings-workspace {
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr) !important;
}

html[data-admin="true"] .settings-panel,
html[data-admin="true"] .dashboard-panel,
html[data-admin="true"] .metric-card {
  border-radius: 10px !important;
  box-shadow: none !important;
}

html[data-admin="true"] .admin-topbar { width: 100%; min-width: 0; }
html[data-admin="true"] .admin-topbar-title { min-width: 0; }

/* Small authoritative overrides kept separate from the legacy stylesheet. */
html[data-admin="true"] main h1,
html[data-admin="true"] .page-heading h1 {
  font-size: clamp(1.65rem, 2.7vw, 2.05rem) !important;
  line-height: 1.08 !important;
  font-weight: 400 !important;
}

.account-entry-intro h1 {
  max-width: 680px !important;
  margin-bottom: 18px !important;
  font-size: clamp(1.8rem, 4vw, 2.8rem) !important;
  line-height: 1.04 !important;
  letter-spacing: -.035em !important;
  font-weight: 400 !important;
}

/* Final visual consistency pass. */
html[data-admin="true"] .metric-card::after { display: none !important; }

.site-footer-legal,
.footer-legal { border-top: 0 !important; }

.product-review-preview.is-empty {
  gap: 8px !important;
  padding-block: 18px !important;
}
.product-review-preview.is-empty .product-review-stage { margin: 0 !important; }
.product-review-preview.is-empty .product-review-stage p { margin: 0 !important; }

@media (max-width: 700px) {
  .site-footer { padding-top: 36px !important; }
  .site-footer-legal { margin-top: 24px !important; padding-top: 8px !important; }
  .checkout-heading { margin-bottom: 24px !important; }
  .checkout-layout { gap: 18px !important; }
}

/*
 * Admin workspace foundation.
 * This final layer deliberately replaces the accumulated page-by-page fixes
 * with one compact spacing, control and data-display system.
 */
html[data-admin="true"] { --sidebar-width: 236px; }

html[data-admin="true"] body {
  background: #f6f6f4 !important;
  color: #121416;
}

html[data-admin="true"] .admin-sidebar {
  width: var(--sidebar-width) !important;
  padding: 20px 14px 16px !important;
}

html[data-admin="true"] .admin-brand-row { padding: 0 6px 18px !important; }
html[data-admin="true"] .admin-navigation { gap: 14px !important; }
html[data-admin="true"] .admin-nav-group { gap: 2px !important; }
html[data-admin="true"] .admin-nav-group > p { margin: 0 10px 5px !important; }
html[data-admin="true"] .admin-nav-group a {
  min-height: 38px !important;
  gap: 10px !important;
  padding: 7px 10px !important;
  border-radius: 6px !important;
  font-size: .78rem !important;
}
html[data-admin="true"] .admin-nav-icon { width: 19px !important; height: 19px !important; }

html[data-admin="true"] .admin-topbar {
  min-height: 60px !important;
  padding: 0 clamp(18px, 2.5vw, 34px) !important;
  background: rgba(250, 250, 248, .96) !important;
}

html[data-admin="true"] .admin-content {
  width: min(1500px, 100%) !important;
  padding: 26px clamp(18px, 2.4vw, 36px) 48px !important;
}

html[data-admin="true"] .page-heading,
html[data-admin="true"] .dashboard-heading {
  align-items: center !important;
  gap: 14px 24px !important;
  margin-bottom: 20px !important;
}

html[data-admin="true"] .page-heading h1,
html[data-admin="true"] .dashboard-heading h1,
html[data-admin="true"] main h1 {
  margin: 0 !important;
  font-size: clamp(1.55rem, 2vw, 1.9rem) !important;
  font-weight: 500 !important;
  letter-spacing: -.025em !important;
  line-height: 1.12 !important;
}

html[data-admin="true"] .page-heading p:last-child,
html[data-admin="true"] .dashboard-subtitle {
  margin: 5px 0 0 !important;
  font-size: .78rem !important;
  line-height: 1.45 !important;
}

html[data-admin="true"] .eyebrow { display: none !important; }

html[data-admin="true"] .button,
html[data-admin="true"] button:not(.admin-nav-close):not(.modal-close) {
  min-height: 40px !important;
  padding: 9px 14px !important;
  border-radius: 6px !important;
  font-size: .75rem !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

html[data-admin="true"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html[data-admin="true"] select {
  height: 44px !important;
  min-height: 44px !important;
  padding: 9px 12px !important;
  border-radius: 6px !important;
  font-size: .84rem !important;
}

html[data-admin="true"] textarea {
  min-height: 104px !important;
  padding: 11px 12px !important;
  border-radius: 6px !important;
  font-size: .84rem !important;
  resize: vertical;
}

html[data-admin="true"] label,
html[data-admin="true"] .modal-form label {
  gap: 6px !important;
  font-size: .75rem !important;
  line-height: 1.35;
}

html[data-admin="true"] .resource-toolbar {
  align-items: center;
  gap: 8px !important;
  margin-bottom: 12px !important;
}
html[data-admin="true"] .resource-toolbar input,
html[data-admin="true"] .resource-toolbar select { min-height: 40px !important; height: 40px !important; }

html[data-admin="true"] .resource-panel,
html[data-admin="true"] .dashboard-panel,
html[data-admin="true"] .metric-card,
html[data-admin="true"] .editor-card,
html[data-admin="true"] details.editor-card,
html[data-admin="true"] .settings-panels > section,
html[data-admin="true"] .catalog-import-panel {
  border: 1px solid #ddddda !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: none !important;
}

html[data-admin="true"] .resource-panel { margin-bottom: 20px !important; overflow: hidden !important; }
html[data-admin="true"] .resource-table-shell,
html[data-admin="true"] .table-shell {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  -webkit-overflow-scrolling: touch;
}

html[data-admin="true"] .resource-table {
  width: 100% !important;
  min-width: 980px !important;
  table-layout: auto !important;
}

html[data-admin="true"] .resource-table th,
html[data-admin="true"] .resource-table td,
html[data-admin="true"] .dashboard-table th,
html[data-admin="true"] .dashboard-table td {
  padding: 12px 14px !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  line-height: 1.3 !important;
}

html[data-admin="true"] .resource-table th,
html[data-admin="true"] .dashboard-table th {
  font-size: .6rem !important;
  white-space: nowrap !important;
}

html[data-admin="true"] .resource-table td {
  min-width: 82px !important;
  max-width: 280px;
  font-size: .76rem !important;
}

html[data-admin="true"] .resource-table td:not(:last-child) {
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-admin="true"] .resource-table td:last-child { min-width: 1px !important; white-space: nowrap; }
html[data-admin="true"] .table-actions { flex-wrap: nowrap !important; gap: 5px !important; }
html[data-admin="true"] .table-action {
  min-width: 0 !important;
  min-height: 31px !important;
  padding: 6px 9px !important;
  border-radius: 5px !important;
  font-size: .64rem !important;
}

html[data-admin="true"] .loading-state,
html[data-admin="true"] .resource-empty,
html[data-admin="true"] .resource-error {
  min-height: 112px !important;
  padding: 24px !important;
}

html[data-admin="true"] .product-status-ribbon {
  margin-bottom: 12px !important;
  border-radius: 6px;
}
html[data-admin="true"] .product-status-ribbon button {
  min-width: 128px !important;
  min-height: 40px !important;
  padding: 9px 12px !important;
  font-size: .71rem !important;
}

/* Dashboard: dense information without empty decorative space. */
html[data-admin="true"] .dashboard { gap: 16px !important; }
html[data-admin="true"] .metric-grid { gap: 10px !important; }
html[data-admin="true"] .metric-card {
  align-items: center;
  gap: 11px !important;
  padding: 15px !important;
}
html[data-admin="true"] .metric-icon { width: 34px !important; height: 34px !important; border-radius: 6px !important; }
html[data-admin="true"] .metric-value { font-size: 1.35rem !important; }
html[data-admin="true"] .metric-copy span { margin-top: 3px !important; }
html[data-admin="true"] .dashboard-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, .7fr) !important;
  gap: 12px !important;
}
html[data-admin="true"] .panel-header { padding: 15px 17px 12px !important; }
html[data-admin="true"] .panel-header h2,
html[data-admin="true"] .quick-actions h2 { font-size: .94rem !important; font-weight: 600 !important; }
html[data-admin="true"] .sales-chart { min-height: 220px !important; padding: 8px 17px 18px !important; }
html[data-admin="true"] .pulse-list { padding: 0 10px 10px !important; }
html[data-admin="true"] .pulse-item { padding: 13px 7px !important; }
html[data-admin="true"] .inventory-list { padding: 0 12px 12px !important; }
html[data-admin="true"] .inventory-clear { min-height: 140px !important; }
html[data-admin="true"] .empty-state { padding: 25px 18px 28px !important; }
html[data-admin="true"] .quick-actions {
  gap: 16px !important;
  padding: 16px 18px !important;
  border-radius: 7px !important;
}
html[data-admin="true"] .quick-actions nav a { padding: 8px 10px !important; border-radius: 5px !important; }

/* Forms and editors: equal controls, compact cards and readable grouping. */
html[data-admin="true"] .admin-editor,
html[data-admin="true"] .product-editor-form {
  width: 100% !important;
  max-width: 1180px !important;
  gap: 12px !important;
}
html[data-admin="true"] .product-editor-form .editor-card:not(details),
html[data-admin="true"] .editor-card:not(details) { padding: 20px !important; }
html[data-admin="true"] .editor-card-heading {
  margin-bottom: 16px !important;
  padding-bottom: 13px !important;
}
html[data-admin="true"] .editor-card-heading h2 { font-size: .96rem !important; font-weight: 600 !important; }
html[data-admin="true"] .editor-grid { gap: 14px !important; }
html[data-admin="true"] .editor-card-heading p { font-size: .68rem !important; }
html[data-admin="true"] details.editor-card > summary { padding: 16px 20px !important; }
html[data-admin="true"] .product-editor-details-body { padding: 18px 20px !important; }

/* Settings are a workspace, not a collection of floating boxes. */
html[data-admin="true"] .settings-console { border: 1px solid #ddddda; border-radius: 7px; background: #fff; overflow: hidden; }
html[data-admin="true"] .settings-nav {
  gap: 0 !important;
  margin: 0 !important;
  padding: 5px !important;
  border-bottom: 1px solid #e4e4e1 !important;
}
html[data-admin="true"] .settings-nav button { min-height: 36px !important; padding: 7px 12px !important; }
html[data-admin="true"] .settings-panels > section {
  padding: 24px !important;
  border: 0 !important;
  border-radius: 0 !important;
}

/* Modals stay centred, compact and scroll internally. */
html[data-admin="true"] .admin-modal {
  width: min(680px, calc(100vw - 24px)) !important;
  border-radius: 8px !important;
}
html[data-admin="true"] .admin-modal > header { padding: 15px 18px !important; }
html[data-admin="true"] .admin-modal header h2 { font-size: 1.02rem !important; }
html[data-admin="true"] .admin-modal-body { padding: 18px !important; }
html[data-admin="true"] .modal-form { gap: 14px !important; }
html[data-admin="true"] .modal-close { width: 34px !important; height: 34px !important; border-radius: 5px !important; }

@media (max-width: 1080px) {
  html[data-admin="true"] .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html[data-admin="true"] .dashboard-grid { grid-template-columns: 1fr !important; }
  html[data-admin="true"] .orders-panel,
  html[data-admin="true"] .inventory-panel { grid-column: 1 !important; }
}

/* Brand storefront polish */
body[data-home-page="true"] .brand-tile--knightfall img {
  width: 74% !important;
  height: 46px !important;
}

@media (max-width: 700px) {
  body[data-home-page="true"] .brand-tile--knightfall img {
    width: 70% !important;
    height: 40px !important;
  }
  .brand-breadcrumb { padding: 16px 2px 12px; font-size: .57rem; }
  .brand-page-hero { min-height: 390px; }
  .brand-page-shade { background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.8)); }
  .brand-page-identity { width: 100%; min-height: 390px; justify-content: flex-end; padding: 28px 22px; }
  .brand-page-logo-frame { width: min(250px, 82%); min-height: 86px; padding: 14px 20px; }
  .brand-page-logo-frame img { height: 58px; }
  .brand-page-identity p { margin-top: 16px; font-size: .82rem; line-height: 1.5; }
  .brand-page-catalog { padding: 38px 0 70px; }
  .brand-page-catalog-heading { align-items: flex-start; flex-direction: column; gap: 9px; margin-bottom: 22px; }
  .brand-page-catalog-heading h2 { font-size: clamp(1.6rem, 8vw, 2.2rem); }
}

@media (max-width: 860px) {
  html[data-admin="true"] .admin-content { padding: 20px 14px 38px !important; }
  html[data-admin="true"] .page-heading,
  html[data-admin="true"] .dashboard-heading { align-items: flex-start !important; }
  html[data-admin="true"] .resource-table-shell { overflow-x: auto !important; }
  html[data-admin="true"] .resource-table,
  html[data-admin="true"] .resource-panel[data-admin-resource] .resource-table {
    display: table !important;
    width: 100% !important;
    min-width: 760px !important;
  }
  html[data-admin="true"] .resource-table thead { display: table-header-group !important; }
  html[data-admin="true"] .resource-table tbody { display: table-row-group !important; }
  html[data-admin="true"] .resource-table tr { display: table-row !important; }
  html[data-admin="true"] .resource-table td { display: table-cell !important; padding: 11px 12px !important; }
  html[data-admin="true"] .resource-table td::before { content: none !important; }
  html[data-admin="true"] .resource-table td:first-child,
  html[data-admin="true"] .resource-table td:last-child { width: auto !important; }
  html[data-admin="true"] .settings-console { overflow: visible; border: 0; background: transparent; }
  html[data-admin="true"] .settings-nav { overflow-x: auto !important; border: 1px solid #ddddda !important; border-radius: 7px; background: #fff; }
  html[data-admin="true"] .settings-panels > section { margin-top: 10px; border: 1px solid #ddddda !important; border-radius: 7px !important; }
}

@media (max-width: 620px) {
  html[data-admin="true"] .admin-topbar { min-height: 56px !important; padding: 0 12px !important; }
  html[data-admin="true"] .admin-content { padding: 18px 12px 32px !important; }
  html[data-admin="true"] .page-heading-actions,
  html[data-admin="true"] .dashboard-heading-actions { width: 100%; }
  html[data-admin="true"] .page-heading-actions > *,
  html[data-admin="true"] .dashboard-heading-actions > * { flex: 1; }
  html[data-admin="true"] .metric-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  html[data-admin="true"] .metric-card { display: flex !important; padding: 12px !important; }
  html[data-admin="true"] .metric-copy span { display: none !important; }
  html[data-admin="true"] .quick-actions { align-items: stretch !important; flex-direction: column !important; }
  html[data-admin="true"] .quick-actions nav { display: grid !important; grid-template-columns: 1fr 1fr; }
  html[data-admin="true"] .quick-actions nav a { justify-content: center; }
  html[data-admin="true"] .product-editor-form .editor-card:not(details),
  html[data-admin="true"] .editor-card:not(details),
  html[data-admin="true"] .settings-panels > section { padding: 16px !important; }
}

/* 2026-08-13: collection tools and compact brand administration */

.collection-filter-bar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) minmax(160px, .8fr) minmax(160px, .8fr) auto auto auto;
  align-items: end;
  gap: 12px;
  margin: 0;
  padding: 18px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid #dededb;
  background: #fff;
}

.collection-filter-bar > label,
.collection-filter-bar > details {
  min-width: 0;
}

.collection-filter-bar label > span,
.collection-filter-bar summary {
  display: block;
  margin-bottom: 7px;
  color: #4d535a;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.collection-filter-bar input,
.collection-filter-bar select,
.collection-filter-bar summary,
.collection-filter-bar button,
.collection-filter-bar .collection-filter-clear {
  min-height: 44px;
  border: 1px solid #cfcfcb;
  border-radius: 0;
  background: #fff;
}

.collection-filter-bar input,
.collection-filter-bar select {
  width: 100%;
  padding: 0 12px;
}

.collection-filter-bar details {
  position: relative;
}

.collection-filter-bar details > summary {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 13px;
  color: #11161b;
  cursor: pointer;
  list-style: none;
}

.collection-filter-bar details > summary::-webkit-details-marker { display: none; }

.collection-filter-bar .collection-price-filter > div {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 290px;
  padding: 14px;
  border: 1px solid #cfcfcb;
  background: #fff;
  box-shadow: 0 14px 32px rgba(0,0,0,.12);
}

.collection-filter-bar .collection-sale-check { grid-column: 1 / -1; }
.collection-filter-bar button { padding: 0 18px; background: #11161b; color: #fff; font-weight: 700; cursor: pointer; }
.collection-filter-bar > a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border: 1px solid #cfcfcb; color: #11161b; text-decoration: none; }
.collection-result-row { display: flex; justify-content: flex-end; padding: 12px clamp(18px, 4vw, 64px) 0; color: #70757a; font-size: .8rem; }

html[data-admin="true"] .admin-brand-manager {
  display: grid;
  gap: 10px;
}

html[data-admin="true"] .admin-brand-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 10px;
  border: 1px solid #dededb;
  border-radius: 6px;
  background: #fff;
}

html[data-admin="true"] .admin-brand-thumb {
  display: block;
  width: 150px;
  height: 70px;
  object-fit: cover;
  border: 1px solid #e2e2df;
  background: #f3f3f1;
}

html[data-admin="true"] .admin-brand-summary { min-width: 0; }
html[data-admin="true"] .admin-brand-summary h2 { margin: 0 0 4px; font-size: .92rem !important; font-weight: 600 !important; }
html[data-admin="true"] .admin-brand-summary p { display: -webkit-box; margin: 0; overflow: hidden; color: #70757a; font-size: .76rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
html[data-admin="true"] .admin-brand-row-actions { display: flex; gap: 7px; }
html[data-admin="true"] .modal-form--brand { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
html[data-admin="true"] .modal-form--brand .admin-brand-modal-preview,
html[data-admin="true"] .modal-form--brand .modal-actions,
html[data-admin="true"] .modal-form--brand .form-feedback { grid-column: 1 / -1; }
html[data-admin="true"] .admin-brand-modal-preview { width: 100%; height: 160px; object-fit: cover; border: 1px solid #dededb; background: #f3f3f1; }

@media (max-width: 900px) {
  .collection-filter-bar { grid-template-columns: 1fr 1fr; }
  .collection-filter-bar > label:first-child { grid-column: 1 / -1; }
  .collection-filter-bar .collection-price-filter > div { left: 0; right: auto; }
}

@media (max-width: 620px) {
  .collection-filter-bar { grid-template-columns: 1fr 1fr; padding: 14px 16px; }
  .collection-filter-bar > label:first-child,
  .collection-filter-bar > button,
  .collection-filter-bar > a { grid-column: 1 / -1; }
  .collection-filter-bar .collection-price-filter > div { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
  .collection-result-row { padding: 10px 16px 0; }
  html[data-admin="true"] .admin-brand-item { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
  html[data-admin="true"] .admin-brand-thumb { width: 88px; height: 54px; }
  html[data-admin="true"] .admin-brand-row-actions { grid-column: 1 / -1; justify-content: flex-end; }
  html[data-admin="true"] .modal-form--brand { grid-template-columns: 1fr; }
  html[data-admin="true"] .modal-form--brand > * { grid-column: 1 !important; }
}

/* Knightfall's handwritten mark is visually wider than the compact
   manufacturer logos, so it intentionally occupies less of its tile. */
body[data-home-page="true"] .brand-grid .brand-tile--knightfall img {
  width: min(70%, 142px) !important;
  height: 42px !important;
  object-fit: contain !important;
}

@media (max-width: 700px) {
  body[data-home-page="true"] .brand-grid .brand-tile--knightfall img {
    width: min(62%, 118px) !important;
    height: 34px !important;
  }
}

/* Must remain last: product editor layout authority. */
html[data-admin="true"] .admin-main,
html[data-admin="true"] .admin-content { min-width: 0 !important; max-width: 100% !important; }
html[data-admin="true"] #product-editor,
html[data-admin="true"] .product-editor-form {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 1320px !important;
  margin-inline: auto !important;
}
html[data-admin="true"] .product-editor-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
}
html[data-admin="true"] .product-editor-form > * {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-column: 1 / -1 !important;
}
html[data-admin="true"] .product-editor-form .editor-grid,
html[data-admin="true"] .product-editor-essentials .editor-grid {
  width: 100% !important;
  max-width: none !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
html[data-admin="true"] .product-editor-form .editor-actions {
  position: static !important;
  bottom: auto !important;
  z-index: auto !important;
  margin: 0 !important;
  padding: 14px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
@media (max-width: 760px) {
  html[data-admin="true"] .product-editor-form .editor-grid,
  html[data-admin="true"] .product-editor-essentials .editor-grid { grid-template-columns: minmax(0, 1fr) !important; }
  html[data-admin="true"] .product-editor-form .editor-grid > *,
  html[data-admin="true"] .product-editor-form .editor-span-2 { grid-column: 1 !important; }
}

/* Product editor final layout authority. Keep every section in one document flow. */
html[data-admin="true"] .admin-main,
html[data-admin="true"] .admin-content {
  min-width: 0 !important;
  max-width: 100% !important;
}

html[data-admin="true"] #product-editor,
html[data-admin="true"] .product-editor-form {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 1320px !important;
  margin-inline: auto !important;
}

html[data-admin="true"] .product-editor-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
}

html[data-admin="true"] .product-editor-form > * {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-column: 1 / -1 !important;
}

html[data-admin="true"] .product-editor-form .editor-grid,
html[data-admin="true"] .product-editor-essentials .editor-grid {
  width: 100% !important;
  max-width: none !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html[data-admin="true"] .product-editor-form .editor-actions {
  position: static !important;
  bottom: auto !important;
  z-index: auto !important;
  margin: 0 !important;
  padding: 14px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

@media (max-width: 760px) {
  html[data-admin="true"] .product-editor-form .editor-grid,
  html[data-admin="true"] .product-editor-essentials .editor-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html[data-admin="true"] .product-editor-form .editor-grid > *,
  html[data-admin="true"] .product-editor-form .editor-span-2 {
    grid-column: 1 !important;
  }
}

/* Product editor structure: one bounded document flow with balanced inner fields. */
html[data-admin="true"] #product-editor {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 1320px !important;
  margin-inline: auto !important;
}

html[data-admin="true"] .product-editor-form {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
  margin: 0 !important;
}

html[data-admin="true"] .product-editor-form > * {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-column: 1 / -1 !important;
  box-sizing: border-box !important;
}

html[data-admin="true"] .product-editor-form .editor-grid,
html[data-admin="true"] .product-editor-essentials .editor-grid {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html[data-admin="true"] .product-editor-form .editor-grid > *,
html[data-admin="true"] .product-editor-form input,
html[data-admin="true"] .product-editor-form select,
html[data-admin="true"] .product-editor-form textarea {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

html[data-admin="true"] .product-editor-form .editor-span-2 {
  grid-column: 1 / -1 !important;
}

html[data-admin="true"] .product-editor-variants {
  display: block !important;
  overflow: hidden !important;
}

html[data-admin="true"] .product-editor-variants .resource-inline-heading {
  align-items: center !important;
  margin-bottom: 16px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid #e4e4e1 !important;
}

html[data-admin="true"] .product-editor-variants .resource-inline-heading h2 {
  margin: 0 !important;
  font-size: .96rem !important;
  font-weight: 600 !important;
}

html[data-admin="true"] .product-editor-variants .resource-inline-heading p {
  margin: 4px 0 0 !important;
  color: var(--muted) !important;
  font-size: .75rem !important;
}

html[data-admin="true"] .product-editor-form .editor-actions {
  position: static !important;
  bottom: auto !important;
  z-index: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 14px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

@media (max-width: 760px) {
  html[data-admin="true"] .product-editor-form .editor-grid,
  html[data-admin="true"] .product-editor-essentials .editor-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html[data-admin="true"] .product-editor-form .editor-grid > *,
  html[data-admin="true"] .product-editor-form .editor-span-2 {
    grid-column: 1 !important;
  }

  html[data-admin="true"] .product-editor-variants .resource-inline-heading {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  html[data-admin="true"] .product-editor-variants .resource-inline-heading .button {
    width: 100% !important;
  }
}

/* 2026 admin workspace redesign: task-first, compact and responsive. */
html[data-admin="true"] .admin-content {
  width: min(1560px, 100%) !important;
  padding: 30px clamp(18px, 3vw, 44px) 64px !important;
}

html[data-admin="true"] .page-heading {
  margin-bottom: 24px !important;
  align-items: end !important;
}

html[data-admin="true"] .page-heading h1 {
  margin-bottom: 7px !important;
  font-size: clamp(1.65rem, 2.2vw, 2rem) !important;
  letter-spacing: -.025em !important;
}

html[data-admin="true"] .page-heading p,
html[data-admin="true"] .resource-inline-heading p { max-width: 640px; }

html[data-admin="true"] .resource-panel {
  overflow: hidden;
  border: 1px solid #dededb !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

html[data-admin="true"] .resource-table-shell {
  overflow-x: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
}

html[data-admin="true"] .resource-table {
  min-width: 780px !important;
  table-layout: auto !important;
}

html[data-admin="true"] .resource-table th,
html[data-admin="true"] .resource-table td {
  padding: 15px 18px !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

html[data-admin="true"] .resource-table th {
  white-space: nowrap !important;
  font-size: .64rem !important;
  line-height: 1.2 !important;
}

html[data-admin="true"] .resource-table td {
  min-width: 90px;
  font-size: .82rem !important;
  line-height: 1.35 !important;
}

html[data-admin="true"] .resource-table th:last-child,
html[data-admin="true"] .resource-table td:last-child { width: 1%; white-space: nowrap; }

html[data-admin="true"] .resource-primary-cell {
  display: grid;
  min-width: 150px;
  max-width: 360px;
  gap: 4px;
}

html[data-admin="true"] .resource-primary-cell strong {
  overflow: hidden;
  color: #101317;
  font-size: .84rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-admin="true"] .resource-primary-cell small {
  overflow: hidden;
  color: #73736f;
  font-size: .69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-admin="true"] .table-actions { gap: 5px !important; }
html[data-admin="true"] .table-action {
  min-width: 0 !important;
  min-height: 32px !important;
  padding: 6px 10px !important;
  border-radius: 5px !important;
  font-size: .66rem !important;
  white-space: nowrap;
}

html[data-admin="true"] .status-badge {
  padding: 4px 7px !important;
  border-radius: 999px !important;
  font-size: .61rem !important;
  white-space: nowrap;
}

html[data-admin="true"] .promotion-preview-cell {
  display: flex;
  min-width: 260px;
  align-items: center;
  gap: 12px;
}

html[data-admin="true"] .promotion-preview-cell > img {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border: 1px solid #dededb;
  border-radius: 5px;
  background: #f4f4f2;
  object-fit: contain;
}

html[data-admin="true"] .resource-panel[data-admin-resource="popups"] .resource-table { min-width: 850px !important; }
html[data-admin="true"] .resource-panel[data-admin-resource="inventory"] .resource-table { min-width: 720px !important; }
html[data-admin="true"] .resource-panel[data-admin-resource="shippingZones"] .resource-table { min-width: 620px !important; }
html[data-admin="true"] .resource-panel[data-admin-resource="shippingMethods"] .resource-table { min-width: 800px !important; }

html[data-admin="true"] .resource-empty {
  min-height: 150px !important;
  padding: 34px 20px !important;
  background: #fff;
}

html[data-admin="true"] .resource-empty strong { font-size: .92rem; font-weight: 650; }
html[data-admin="true"] .resource-empty span { font-size: .76rem; }

html[data-admin="true"] .product-editor-form {
  max-width: 1040px !important;
  gap: 16px !important;
}

html[data-admin="true"] .product-editor-form .editor-card,
html[data-admin="true"] .product-editor-form details.editor-card {
  border: 1px solid #dededb !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

html[data-admin="true"] .product-editor-form .editor-card:not(details) { padding: 24px !important; }
html[data-admin="true"] .product-editor-form .editor-card-heading { margin-bottom: 20px !important; }
html[data-admin="true"] .product-editor-form .editor-card-heading h2 { font-size: 1.02rem !important; font-weight: 650 !important; }
html[data-admin="true"] .product-editor-form .editor-card-heading p { font-size: .72rem !important; }

html[data-admin="true"] .media-link-options {
  margin-top: 14px;
  border-top: 1px solid #e5e5e2;
}

html[data-admin="true"] .media-link-options > summary,
html[data-admin="true"] .modal-advanced-fields > summary {
  padding: 14px 0;
  color: #555651;
  cursor: pointer;
  font-size: .73rem;
  font-weight: 650;
}

html[data-admin="true"] .media-link-options .editor-grid { padding-top: 4px; }

html[data-admin="true"] label:has(> input[type="hidden"]) { display: none !important; }

html[data-admin="true"] .modal-advanced-fields {
  grid-column: 1 / -1;
  border-top: 1px solid #e5e5e2;
}

html[data-admin="true"] .modal-advanced-fields > label { margin-bottom: 14px; }

html[data-admin="true"] .admin-modal header h2 {
  font-size: 1.18rem !important;
  font-weight: 600 !important;
}

html[data-admin="true"] .broadcast-summary { display: none !important; }
html[data-admin="true"] .compact-heading { margin-top: 34px !important; }

@media (max-width: 860px) {
  html[data-admin="true"] .admin-content { padding: 22px 14px 48px !important; }
  html[data-admin="true"] .page-heading { align-items: start !important; }
  html[data-admin="true"] .page-heading-actions { width: 100%; }
  html[data-admin="true"] .page-heading-actions .button { flex: 1; }

  html[data-admin="true"] .resource-table-shell { overflow: visible !important; }
  html[data-admin="true"] .resource-table,
  html[data-admin="true"] .resource-panel[data-admin-resource] .resource-table {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
  }
  html[data-admin="true"] .resource-table thead { display: none; }
  html[data-admin="true"] .resource-table tbody { display: grid; }
  html[data-admin="true"] .resource-table tr {
    display: grid;
    padding: 16px;
    border-bottom: 1px solid #e4e4e1;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 18px;
  }
  html[data-admin="true"] .resource-table tr:last-child { border-bottom: 0; }
  html[data-admin="true"] .resource-table td {
    display: grid;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    gap: 4px;
  }
  html[data-admin="true"] .resource-table td::before {
    content: attr(data-label);
    color: #74746f;
    font-size: .58rem;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
  }
  html[data-admin="true"] .resource-table td:first-child { grid-column: 1 / -1; }
  html[data-admin="true"] .resource-table td:last-child { grid-column: 1 / -1; width: auto; }
  html[data-admin="true"] .resource-primary-cell { max-width: none; }
  html[data-admin="true"] .resource-primary-cell strong { white-space: normal; }
  html[data-admin="true"] .table-actions { flex-wrap: wrap !important; }
  html[data-admin="true"] .promotion-preview-cell { min-width: 0; }
}

@media (max-width: 620px) {
  html[data-admin="true"] .editor-grid,
  html[data-admin="true"] .modal-form { grid-template-columns: 1fr !important; }
  html[data-admin="true"] .editor-grid > *,
  html[data-admin="true"] .modal-form > * { grid-column: 1 !important; }
  html[data-admin="true"] .product-editor-form .editor-card:not(details) { padding: 18px !important; }
  html[data-admin="true"] .product-editor-form .editor-card-heading { display: block !important; }
}

@media (max-width: 900px) {
  body[data-home-page="true"] .brand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body[data-home-page="true"] .catalog-product-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html[data-admin="true"] .settings-workspace { grid-template-columns: 1fr !important; }
}

@media (max-width: 700px) {
  :root { --kf-control-height: 46px; }

  .category-chips {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  .category-chips a {
    width: 100%;
    min-width: 0;
    padding-inline: 8px !important;
    text-align: center;
    white-space: normal !important;
  }

  .site-header .shell,
  body[data-home-page="true"] #header-pill {
    width: 100% !important;
    min-height: 64px !important;
    padding: 0 14px !important;
    border-right: 0 !important;
    border-left: 0 !important;
    border-radius: 0 !important;
  }

  body[data-home-page="true"] .header-frame { padding: 0 !important; }

  .shop-hero h1,
  .auth-intro h1,
  .account-dashboard h1,
  .checkout-heading h1,
  .cart-page-heading h1 {
    font-size: clamp(1.95rem, 10vw, 2.8rem) !important;
    line-height: 1 !important;
  }

  .catalog-grid,
  .catalog-grid:not(.product-related-grid),
  #featured-product-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 28px 10px !important;
  }

  .catalog-grid:not(.product-related-grid) .product-media,
  #featured-product-grid .product-media,
  body[data-home-page="true"] .catalog-product-row .product-media {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
  }

  .product-card { width: 100% !important; }
  .product-details { display: block !important; padding: 10px 1px 0 !important; }
  .product-details h3 {
    min-height: 2.4em !important;
    font-size: .78rem !important;
    line-height: 1.18 !important;
  }
  .product-details p { display: none !important; }
  .product-brand { font-size: .5rem !important; }
  .product-price { font-size: .78rem !important; }
  .product-quick { min-height: 38px !important; font-size: .56rem !important; }

  body[data-home-page="true"] .brand-section { padding: 44px 16px 36px !important; }
  body[data-home-page="true"] .brand-section h2 { font-size: clamp(1.8rem, 9vw, 2.55rem) !important; }
  body[data-home-page="true"] .brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-top: 24px !important;
  }
  body[data-home-page="true"] .brand-tile,
  body[data-home-page="true"] .brand-tile--knightfall { min-height: 66px !important; padding: 4px 10px !important; }
  body[data-home-page="true"] .brand-tile img,
  body[data-home-page="true"] .brand-tile--knightfall img { height: 56px !important; }
  body[data-home-page="true"] .product-shelves-section { padding: 0 14px 48px !important; }
  body[data-home-page="true"] .product-shelf { padding-top: 28px !important; }
  body[data-home-page="true"] .product-shelf + .product-shelf { margin-top: 26px !important; }
  body[data-home-page="true"] .product-shelf-heading { gap: 12px !important; margin-bottom: 14px !important; }
  body[data-home-page="true"] .product-shelf-heading .product-shelf-brand-logo {
    min-width: 0 !important;
    min-height: 42px !important;
    flex-basis: 130px !important;
  }
  body[data-home-page="true"] .product-shelf-brand-logo img,
  body[data-home-page="true"] .product-shelf-brand-logo--knightfall img { height: 42px !important; }
  body[data-home-page="true"] .product-shelf-heading a { font-size: .56rem !important; }
  body[data-home-page="true"] .catalog-product-row {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 26px 10px !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .product-page { grid-template-columns: 1fr !important; }
  .product-gallery { width: 100% !important; max-width: 420px !important; margin-inline: auto; }
  .product-copy-panel h1 { font-size: clamp(1.65rem, 8vw, 2.35rem) !important; }

  html[data-admin="true"] .admin-content { padding: 22px 12px 48px !important; }
  html[data-admin="true"] .admin-topbar { padding: 0 12px !important; }
  html[data-admin="true"] .admin-topbar-title strong { font-size: .72rem; }
  html[data-admin="true"] .admin-storefront-link { min-width: 42px; padding: 0 11px; font-size: 0; }
  html[data-admin="true"] .admin-storefront-link svg { width: 17px; height: 17px; }
  html[data-admin="true"] .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  html[data-admin="true"] .page-heading .button { width: 100%; }
  html[data-admin="true"] .editor-card,
  html[data-admin="true"] details.editor-card { border-radius: 8px !important; }
  html[data-admin="true"] .editor-card:not(details) { padding: 18px !important; }
  html[data-admin="true"] .editor-card-heading {
    display: block !important;
    margin-bottom: 18px !important;
    padding-bottom: 14px;
  }
  html[data-admin="true"] .editor-card-heading p { margin-top: 7px !important; text-align: left !important; }
  html[data-admin="true"] .editor-grid,
  html[data-admin="true"] .modal-form { grid-template-columns: 1fr !important; gap: 15px !important; }
  html[data-admin="true"] .editor-grid > *,
  html[data-admin="true"] .modal-form > * { grid-column: 1 !important; }
  html[data-admin="true"] details.editor-card > summary { padding: 17px 18px !important; }
  html[data-admin="true"] .product-editor-details-body { padding: 18px !important; }
  html[data-admin="true"] .editor-actions {
    position: static !important;
    display: grid !important;
    gap: 12px;
    padding: 14px !important;
  }
  html[data-admin="true"] .editor-actions > div:last-child { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  html[data-admin="true"] .editor-actions .button,
  html[data-admin="true"] .editor-actions button { width: 100%; }
  html[data-admin="true"] .admin-modal-body { padding: 16px !important; }
  html[data-admin="true"] .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html[data-admin="true"] .metric-card { padding: 14px !important; }
  html[data-admin="true"] .settings-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    height: auto !important;
    padding: 6px !important;
    overflow: visible !important;
  }
  html[data-admin="true"] .settings-nav button {
    width: 100%;
    min-width: 0;
    padding: 9px 8px !important;
    font-size: .7rem;
    line-height: 1.2;
    white-space: normal;
  }
}

/* Keep the redesigned admin rules authoritative over legacy responsive CSS. */
html[data-admin="true"] .resource-table { min-width: 780px !important; }
html[data-admin="true"] .resource-table th,
html[data-admin="true"] .resource-table td {
  overflow-wrap: normal !important;
  word-break: normal !important;
}
html[data-admin="true"] .resource-table th { white-space: nowrap !important; }

@media (max-width: 860px) {
  html[data-admin="true"] .resource-table,
  html[data-admin="true"] .resource-panel[data-admin-resource] .resource-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  html[data-admin="true"] .resource-table thead { display: none !important; }
  html[data-admin="true"] .resource-table tbody { display: grid !important; }
  html[data-admin="true"] .resource-table tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
  }
  html[data-admin="true"] .resource-table td {
    display: grid !important;
    min-width: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
  }
  html[data-admin="true"] .resource-table td:first-child,
  html[data-admin="true"] .resource-table td:last-child { grid-column: 1 / -1 !important; }
}

/* Square catalog cards with actions in the information area. */
.product-card .product-media {
  aspect-ratio: 1 / 1 !important;
}

.product-card .product-details,
.product-card:has(.product-card-action--login) .product-details {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  gap: 8px !important;
}

.product-card .product-quick { display: none !important; }

.product-card-action {
  position: relative;
  z-index: 4;
  display: inline-flex;
  width: 100%;
  min-height: 42px;
  margin-top: 2px;
  padding: 9px 12px;
  align-items: center;
  justify-content: center;
  border: 1px solid #101317;
  border-radius: 4px;
  background: #101317;
  color: #fff;
  font: inherit;
  font-size: .67rem;
  font-weight: 750;
  letter-spacing: .045em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.product-card-action:hover,
.product-card-action:focus-visible {
  background: #fff;
  color: #101317;
}

.product-card-action--login {
  background: #fff;
  color: #101317;
}

.product-card-action--login:hover,
.product-card-action--login:focus-visible {
  background: #101317;
  color: #fff;
}

.product-description-block {
  max-width: 560px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e1e1de;
}

.product-description-block .product-description { margin: 0; }

.product-description-block .product-description-toggle { margin-top: 8px; }

@media (max-width: 700px) {
  .product-card-action {
    min-height: 38px;
    padding: 8px 5px;
    font-size: .55rem;
    letter-spacing: .025em;
  }
}

/* Purpose-built catalog actions for gated products. */
.product-card:has(.product-price-login) .product-details {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
}

.product-card:has(.product-price-login) .product-quick--login { display: none !important; }

.product-card .product-price-login {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  margin: 0 !important;
  padding: 8px 12px;
  align-items: center;
  justify-content: center;
  border: 1px solid #101317;
  border-radius: 5px;
  color: #101317;
  font-size: .68rem !important;
  font-weight: 750;
  letter-spacing: .035em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.product-card .product-price-login:hover {
  background: #101317;
  color: #fff;
}

.product-copy-panel > .product-price-login {
  display: inline-flex;
  width: min(100%, 520px);
  min-height: 48px;
  margin: 20px 0 22px !important;
  padding: 10px 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid #101317;
  border-radius: 5px;
  color: #101317;
  font-size: .75rem !important;
  font-weight: 750;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.product-copy-panel > .product-price-login:hover {
  background: #101317;
  color: #fff;
}

/* Compact image-led colour variants, with the selected name in the legend. */
.product-color-options {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px !important;
}

.product-color-options legend {
  width: 100%;
  margin-bottom: 2px !important;
  font-size: .66rem !important;
  font-weight: 700 !important;
}

.product-color-options button {
  position: relative;
  display: grid !important;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 1px !important;
  overflow: hidden;
  place-items: center;
  border: 1px solid #d7d7d3 !important;
  border-radius: 4px !important;
  background: #fff !important;
}

.product-color-options button:hover { border-color: #777 !important; }

.product-color-options button.is-selected {
  border: 2px solid #101317 !important;
  box-shadow: none !important;
}

.product-color-options img {
  position: absolute !important;
  inset: 2px !important;
  display: block !important;
  width: calc(100% - 4px) !important;
  height: calc(100% - 4px) !important;
  border-radius: 2px;
  object-fit: contain !important;
  object-position: center !important;
  background: #f1f1ef !important;
}

.product-color-options button:has(img) .product-color-swatch { display: none; }

.product-color-options button:not(:has(img)) .product-color-swatch {
  width: 34px;
  height: 34px;
  border-radius: 3px;
}

.product-color-options strong {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Pop-up campaigns use a compact editor instead of the generic resource modal. */
html[data-admin="true"] .admin-modal[data-resource="popups"] {
  width: min(620px, calc(100vw - 24px)) !important;
}

html[data-admin="true"] .modal-form--popups {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px 16px !important;
}

html[data-admin="true"] .modal-form--popups > .form-feedback,
html[data-admin="true"] .modal-form--popups > .modal-actions,
html[data-admin="true"] .modal-form--popups > label:has([name="campaign_image"]),
html[data-admin="true"] .modal-form--popups > label:has([name="desktop_image_path"]),
html[data-admin="true"] .modal-form--popups > label:has([name="mobile_image_path"]),
html[data-admin="true"] .modal-form--popups > label:has([name="button_url"]),
html[data-admin="true"] .modal-form--popups > label:has([name="image_alt"]),
html[data-admin="true"] .modal-form--popups > label:has([name="is_active"]) {
  grid-column: 1 / -1 !important;
}

html[data-admin="true"] .modal-form--popups input[type="text"],
html[data-admin="true"] .modal-form--popups input[type="url"] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-admin="true"] .modal-form--popups input[type="file"] {
  height: 50px !important;
  padding: 5px !important;
  overflow: hidden;
}

@media (max-width: 700px) {
  html[data-admin="true"] .modal-form--popups { grid-template-columns: 1fr !important; }
  html[data-admin="true"] .modal-form--popups > * { grid-column: 1 !important; }
  .product-card .product-price-login { min-height: 40px; padding-inline: 6px; font-size: .57rem !important; }
}

@media (max-width: 390px) {
  .catalog-grid,
  .catalog-grid:not(.product-related-grid),
  #featured-product-grid,
  body[data-home-page="true"] .catalog-product-row { gap-inline: 8px !important; }

  .product-details h3 { font-size: .73rem !important; }
  .product-quick { right: 5px !important; bottom: 5px !important; left: 5px !important; width: calc(100% - 10px) !important; }
  html[data-admin="true"] .metric-grid { grid-template-columns: 1fr !important; }
}

/* Channel-style brand covers and compact catalog cards. */
.brand-page-hero {
  min-height: 0 !important;
  aspect-ratio: 16 / 5;
  background: #111;
}

.brand-page-landscape { object-position: center !important; }

.brand-page-shade {
  background: linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,.02) 68%) !important;
}

.brand-page-identity {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100% !important;
  min-height: 0 !important;
  padding: clamp(20px, 4vw, 46px) !important;
  justify-content: flex-end !important;
}

.brand-page-logo {
  display: block;
  width: min(260px, 34vw);
  height: clamp(44px, 7vw, 78px);
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 2px 8px rgba(255,255,255,.55)) drop-shadow(0 2px 12px rgba(0,0,0,.7));
}

.brand-page-identity p {
  max-width: 630px;
  margin: 12px 0 0 !important;
  font-size: clamp(.72rem, 1.25vw, .92rem) !important;
  line-height: 1.45 !important;
  text-shadow: 0 1px 9px rgba(0,0,0,.9);
}

.product-card .product-details,
.product-card:has(.product-card-action--login) .product-details {
  display: flex !important;
  padding: 14px 15px 13px !important;
  gap: 9px !important;
}

.product-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.product-title-row h3 { min-width: 0; }
.product-title-row .product-price { margin: 0 !important; text-align: right; }
.product-title-row .product-price s { display: block; margin: 2px 0 0; }

@media (max-width: 700px) {
  .brand-page-hero { min-height: 0 !important; aspect-ratio: 4 / 2.15; }
  .brand-page-identity { min-height: 0 !important; padding: 18px !important; }
  .brand-page-logo { width: min(190px, 48vw); height: 48px; }
  .brand-page-identity p { max-width: 88%; margin-top: 7px !important; font-size: .66rem !important; }
  .product-title-row { gap: 6px; }
  .product-title-row h3 { min-height: 0 !important; }
  .product-title-row .product-price { font-size: .66rem !important; }
  .product-card .product-details,
  .product-card:has(.product-card-action--login) .product-details {
    padding: 11px 10px 10px !important;
  }
}

/* Dedicated category covers use the same full-bleed visual language as brands. */
.category-page-title {
  margin: 0;
  color: #fff;
  font-family: Syne, sans-serif;
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 650;
  line-height: .95;
  letter-spacing: -.045em;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0,0,0,.72);
}

@media (max-width: 700px) {
  .category-page-title { font-size: clamp(1.55rem, 8vw, 2.5rem); }
}

/* Compact dark brand banners: logos stay legible without white image boxes. */
body[data-home-page="true"] .brand-grid .brand-tile,
body[data-home-page="true"] .brand-grid .brand-tile--knightfall {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 72px !important;
  padding: 14px 18px !important;
  background: #0c0c0c !important;
}

body[data-home-page="true"] .brand-grid .brand-tile img,
body[data-home-page="true"] .brand-grid .brand-tile--knightfall img,
.brand-page-logo {
  max-width: 82% !important;
  filter: grayscale(1) invert(1) contrast(8) drop-shadow(0 2px 10px rgba(0,0,0,.32)) !important;
  mix-blend-mode: screen !important;
}

@media (max-width: 700px) {
  body[data-home-page="true"] .brand-grid {
    gap: 8px !important;
  }

  body[data-home-page="true"] .brand-grid .brand-tile,
  body[data-home-page="true"] .brand-grid .brand-tile--knightfall {
    min-height: 50px !important;
    padding: 8px 12px !important;
  }

  body[data-home-page="true"] .brand-grid .brand-tile img,
  body[data-home-page="true"] .brand-grid .brand-tile--knightfall img {
    width: auto !important;
    max-width: 72% !important;
    height: 28px !important;
  }

  .brand-page-logo {
    width: min(142px, 35vw) !important;
    height: 36px !important;
  }

  .category-card,
  .category-card:first-child {
    grid-column: auto !important;
    aspect-ratio: 4 / 3 !important;
  }

  .category-card-body {
    min-height: 52% !important;
    padding: 12px !important;
  }

  .category-card-title { font-size: .86rem !important; }
  .category-card-link { margin-top: 8px !important; font-size: .52rem !important; }
  .category-page-title { font-size: clamp(1.35rem, 6.8vw, 2rem) !important; }
}

/* Homepage cards stay compact: descriptions belong on product pages. */
body[data-home-page="true"] #featured-product-grid .product-description,
body[data-home-page="true"] #featured-product-grid .product-description-block,
body[data-home-page="true"] #featured-product-grid .product-details > p {
  display: none !important;
}

.brand-page-title {
  max-width: 920px;
}

@media (max-width: 700px) {
  html[data-admin="true"] main h1,
  html[data-admin="true"] .page-heading h1 {
    font-size: 1.7rem !important;
  }

  .account-entry-intro h1 {
    max-width: 420px !important;
    font-size: clamp(1.75rem, 8vw, 2.25rem) !important;
    line-height: 1.05 !important;
  }
}

/* Final authority: compact, precise administration layout. */
html[data-admin="true"] { --sidebar-width: 236px; }
html[data-admin="true"] body { background: #f6f6f4 !important; }
html[data-admin="true"] .admin-sidebar { width: var(--sidebar-width) !important; padding: 20px 14px 16px !important; }
html[data-admin="true"] .admin-brand-row { padding: 0 6px 18px !important; }
html[data-admin="true"] .admin-navigation { gap: 14px !important; }
html[data-admin="true"] .admin-nav-group { gap: 2px !important; }
html[data-admin="true"] .admin-nav-group > p { margin: 0 10px 5px !important; }
html[data-admin="true"] .admin-nav-group a {
  min-height: 38px !important;
  gap: 10px !important;
  padding: 7px 10px !important;
  border-radius: 6px !important;
  font-size: .78rem !important;
}
html[data-admin="true"] .admin-nav-icon { width: 19px !important; height: 19px !important; }
html[data-admin="true"] .admin-topbar {
  min-height: 60px !important;
  padding: 0 clamp(18px, 2.5vw, 34px) !important;
  background: rgba(250, 250, 248, .96) !important;
}
html[data-admin="true"] .admin-content {
  width: min(1500px, 100%) !important;
  padding: 26px clamp(18px, 2.4vw, 36px) 48px !important;
}
html[data-admin="true"] .page-heading,
html[data-admin="true"] .dashboard-heading {
  align-items: center !important;
  gap: 14px 24px !important;
  margin-bottom: 20px !important;
}
html[data-admin="true"] .page-heading h1,
html[data-admin="true"] .dashboard-heading h1,
html[data-admin="true"] main h1 {
  margin: 0 !important;
  font-size: clamp(1.55rem, 2vw, 1.9rem) !important;
  font-weight: 500 !important;
  letter-spacing: -.025em !important;
  line-height: 1.12 !important;
}
html[data-admin="true"] .page-heading p:last-child,
html[data-admin="true"] .dashboard-subtitle { margin: 5px 0 0 !important; font-size: .78rem !important; line-height: 1.45 !important; }
html[data-admin="true"] .eyebrow { display: none !important; }
html[data-admin="true"] .button,
html[data-admin="true"] button:not(.admin-nav-close):not(.modal-close) {
  min-height: 40px !important;
  padding: 9px 14px !important;
  border-radius: 6px !important;
  font-size: .75rem !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
html[data-admin="true"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html[data-admin="true"] select {
  height: 44px !important;
  min-height: 44px !important;
  padding: 9px 12px !important;
  border-radius: 6px !important;
  font-size: .84rem !important;
}
html[data-admin="true"] textarea { min-height: 104px !important; padding: 11px 12px !important; border-radius: 6px !important; font-size: .84rem !important; }
html[data-admin="true"] label,
html[data-admin="true"] .modal-form label { gap: 6px !important; font-size: .75rem !important; line-height: 1.35; }
html[data-admin="true"] .resource-toolbar { align-items: center; gap: 8px !important; margin-bottom: 12px !important; }
html[data-admin="true"] .resource-toolbar input,
html[data-admin="true"] .resource-toolbar select { min-height: 40px !important; height: 40px !important; }
html[data-admin="true"] .resource-panel,
html[data-admin="true"] .dashboard-panel,
html[data-admin="true"] .metric-card,
html[data-admin="true"] .editor-card,
html[data-admin="true"] details.editor-card,
html[data-admin="true"] .settings-panels > section,
html[data-admin="true"] .catalog-import-panel {
  border: 1px solid #ddddda !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: none !important;
}
html[data-admin="true"] .resource-panel { margin-bottom: 20px !important; overflow: hidden !important; }
html[data-admin="true"] .resource-table-shell,
html[data-admin="true"] .table-shell { width: 100%; max-width: 100%; overflow-x: auto !important; border: 0 !important; border-radius: 0 !important; }
html[data-admin="true"] .resource-table { display: table !important; width: 100% !important; min-width: 980px !important; table-layout: auto !important; }
html[data-admin="true"] .resource-table thead { display: table-header-group !important; }
html[data-admin="true"] .resource-table tbody { display: table-row-group !important; }
html[data-admin="true"] .resource-table tr { display: table-row !important; }
html[data-admin="true"] .resource-table td { display: table-cell !important; min-width: 82px !important; max-width: 280px; }
html[data-admin="true"] .resource-table td::before { content: none !important; }
html[data-admin="true"] .resource-table th,
html[data-admin="true"] .resource-table td,
html[data-admin="true"] .dashboard-table th,
html[data-admin="true"] .dashboard-table td {
  padding: 12px 14px !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  line-height: 1.3 !important;
}
html[data-admin="true"] .resource-table th,
html[data-admin="true"] .dashboard-table th { font-size: .6rem !important; white-space: nowrap !important; }
html[data-admin="true"] .resource-table td { font-size: .76rem !important; }
html[data-admin="true"] .resource-table td:last-child { min-width: 1px !important; white-space: nowrap; }
html[data-admin="true"] .table-actions { flex-wrap: nowrap !important; gap: 5px !important; }
html[data-admin="true"] .table-action { min-width: 0 !important; min-height: 31px !important; padding: 6px 9px !important; border-radius: 5px !important; font-size: .64rem !important; }
html[data-admin="true"] .loading-state,
html[data-admin="true"] .resource-empty,
html[data-admin="true"] .resource-error { min-height: 112px !important; padding: 24px !important; }
html[data-admin="true"] .product-status-ribbon { margin-bottom: 12px !important; border-radius: 6px; }
html[data-admin="true"] .product-status-ribbon button { min-width: 128px !important; min-height: 40px !important; padding: 9px 12px !important; font-size: .71rem !important; }
html[data-admin="true"] .dashboard { gap: 16px !important; }
html[data-admin="true"] .metric-grid { gap: 10px !important; }
html[data-admin="true"] .metric-card { align-items: center; gap: 11px !important; padding: 15px !important; }
html[data-admin="true"] .metric-icon { width: 34px !important; height: 34px !important; border-radius: 6px !important; }
html[data-admin="true"] .metric-value { font-size: 1.35rem !important; }
html[data-admin="true"] .metric-copy span { margin-top: 3px !important; }
html[data-admin="true"] .dashboard-grid { grid-template-columns: minmax(0, 1.7fr) minmax(260px, .7fr) !important; gap: 12px !important; }
html[data-admin="true"] .panel-header { padding: 15px 17px 12px !important; }
html[data-admin="true"] .panel-header h2,
html[data-admin="true"] .quick-actions h2 { font-size: .94rem !important; font-weight: 600 !important; }
html[data-admin="true"] .sales-chart { min-height: 220px !important; padding: 8px 17px 18px !important; }
html[data-admin="true"] .pulse-list { padding: 0 10px 10px !important; }
html[data-admin="true"] .pulse-item { padding: 13px 7px !important; }
html[data-admin="true"] .inventory-list { padding: 0 12px 12px !important; }
html[data-admin="true"] .inventory-clear { min-height: 140px !important; }
html[data-admin="true"] .empty-state { padding: 25px 18px 28px !important; }
html[data-admin="true"] .quick-actions { gap: 16px !important; padding: 16px 18px !important; border-radius: 7px !important; }
html[data-admin="true"] .quick-actions nav a { padding: 8px 10px !important; border-radius: 5px !important; }
html[data-admin="true"] .admin-editor,
html[data-admin="true"] .product-editor-form { width: 100% !important; max-width: 1320px !important; gap: 14px !important; }
html[data-admin="true"] .product-editor-form .editor-card:not(details),
html[data-admin="true"] .editor-card:not(details) { padding: 20px !important; }
html[data-admin="true"] .editor-card-heading { margin-bottom: 16px !important; padding-bottom: 13px !important; }
html[data-admin="true"] .editor-card-heading h2 { font-size: .96rem !important; font-weight: 600 !important; }
html[data-admin="true"] .editor-grid { gap: 14px !important; }
html[data-admin="true"] details.editor-card > summary { padding: 16px 20px !important; }
html[data-admin="true"] .product-editor-details-body { padding: 18px 20px !important; }
html[data-admin="true"] .settings-console { border: 1px solid #ddddda; border-radius: 7px; background: #fff; overflow: hidden; }
html[data-admin="true"] .settings-nav { display: flex !important; gap: 0 !important; margin: 0 !important; padding: 5px !important; overflow-x: auto !important; border-bottom: 1px solid #e4e4e1 !important; }
html[data-admin="true"] .settings-nav button { min-height: 36px !important; padding: 7px 12px !important; }
html[data-admin="true"] .settings-panels > section { padding: 24px !important; border: 0 !important; border-radius: 0 !important; }
html[data-admin="true"] .admin-modal { width: min(680px, calc(100vw - 24px)) !important; border-radius: 8px !important; }
html[data-admin="true"] .admin-modal > header { padding: 15px 18px !important; }
html[data-admin="true"] .admin-modal header h2 { font-size: 1.02rem !important; }
html[data-admin="true"] .admin-modal-body { padding: 18px !important; }
html[data-admin="true"] .modal-form { gap: 14px !important; }
html[data-admin="true"] .modal-close { width: 34px !important; height: 34px !important; border-radius: 5px !important; }

@media (max-width: 1080px) {
  html[data-admin="true"] .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html[data-admin="true"] .dashboard-grid { grid-template-columns: 1fr !important; }
  html[data-admin="true"] .orders-panel,
  html[data-admin="true"] .inventory-panel { grid-column: 1 !important; }
}
@media (max-width: 860px) {
  html[data-admin="true"] .admin-content { padding: 20px 14px 38px !important; }
  html[data-admin="true"] .page-heading,
  html[data-admin="true"] .dashboard-heading { align-items: flex-start !important; }
  html[data-admin="true"] .resource-table { min-width: 760px !important; }
  html[data-admin="true"] .settings-console { overflow: visible; border: 0; background: transparent; }
  html[data-admin="true"] .settings-nav { border: 1px solid #ddddda !important; border-radius: 7px; background: #fff; }
  html[data-admin="true"] .settings-panels > section { margin-top: 10px; border: 1px solid #ddddda !important; border-radius: 7px !important; }
}
@media (max-width: 620px) {
  html[data-admin="true"] .admin-topbar { min-height: 56px !important; padding: 0 12px !important; }
  html[data-admin="true"] .admin-content { padding: 18px 12px 32px !important; }
  html[data-admin="true"] .page-heading-actions,
  html[data-admin="true"] .dashboard-heading-actions { width: 100%; }
  html[data-admin="true"] .page-heading-actions > *,
  html[data-admin="true"] .dashboard-heading-actions > * { flex: 1; }
  html[data-admin="true"] .metric-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  html[data-admin="true"] .metric-card { display: flex !important; padding: 12px !important; }
  html[data-admin="true"] .metric-copy span { display: none !important; }
  html[data-admin="true"] .quick-actions { align-items: stretch !important; flex-direction: column !important; }
  html[data-admin="true"] .quick-actions nav { display: grid !important; grid-template-columns: 1fr 1fr; }
  html[data-admin="true"] .quick-actions nav a { justify-content: center; }
  html[data-admin="true"] .product-editor-form .editor-card:not(details),
  html[data-admin="true"] .editor-card:not(details),
  html[data-admin="true"] .settings-panels > section { padding: 16px !important; }
}
/* Product CTAs stay aligned even when names wrap to different line counts. */
.product-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.product-card .product-details,
.product-card:has(.product-card-action--login) .product-details {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}

.product-card .product-card-action {
  margin-top: auto !important;
}

/* Restore the original open brand gallery: natural logos, no dark tiles. */
body[data-home-page="true"] .brand-section .brand-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 22px 38px !important;
  margin-top: 46px !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
}

body[data-home-page="true"] .brand-section .brand-grid > .brand-tile,
body[data-home-page="true"] .brand-section .brand-grid > .brand-tile--knightfall {
  display: grid !important;
  flex: 0 1 184px !important;
  min-width: 0 !important;
  min-height: 92px !important;
  place-items: center !important;
  padding: 4px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-home-page="true"] .brand-section .brand-grid > .brand-tile--knightfall {
  flex-basis: 218px !important;
}

body[data-home-page="true"] .brand-section .brand-grid > .brand-tile img,
body[data-home-page="true"] .brand-section .brand-grid > .brand-tile--knightfall img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 90px !important;
  max-height: none !important;
  object-fit: contain !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
}

body[data-home-page="true"] .brand-section .brand-grid > .brand-tile--knightfall img {
  height: 102px !important;
}

/* Keep the product image manager readable inside the editor's narrow gallery column. */
html[data-admin="true"] .product-editor-gallery .media-list {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
}

html[data-admin="true"] .product-editor-gallery .media-item {
  display: grid !important;
  grid-template-columns: 88px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 10px !important;
  overflow: hidden !important;
}

html[data-admin="true"] .product-editor-gallery .media-item > img {
  grid-column: 1 !important;
  width: 88px !important;
  height: 88px !important;
  aspect-ratio: 1 !important;
  object-fit: contain !important;
}

html[data-admin="true"] .product-editor-gallery .media-item > div:not(.media-actions) {
  display: grid !important;
  grid-column: 2 !important;
  min-width: 0 !important;
  gap: 4px !important;
}

html[data-admin="true"] .product-editor-gallery .media-item > div:not(.media-actions) strong,
html[data-admin="true"] .product-editor-gallery .media-item > div:not(.media-actions) small {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
}

html[data-admin="true"] .product-editor-gallery .media-actions {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  width: 100% !important;
  gap: 6px !important;
}

html[data-admin="true"] .product-editor-gallery .media-actions button {
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 6px 7px !important;
  font-size: 10px !important;
  white-space: normal !important;
}

@media (max-width: 767px) {
  body[data-home-page="true"] .brand-section .brand-grid {
    gap: 12px 8px !important;
    margin-top: 28px !important;
  }

  body[data-home-page="true"] .brand-section .brand-grid > .brand-tile,
  body[data-home-page="true"] .brand-section .brand-grid > .brand-tile--knightfall {
    flex: 0 0 calc(50% - 4px) !important;
    min-height: 76px !important;
    padding: 2px 8px !important;
  }

  body[data-home-page="true"] .brand-section .brand-grid > .brand-tile img {
    height: 72px !important;
  }

  body[data-home-page="true"] .brand-section .brand-grid > .brand-tile--knightfall img {
    height: 82px !important;
  }
}
