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

:root {
  --shop-bg: #0a0e27;
  --shop-panel: #1a1f3a;
  --shop-text: #e0e0e0;
  --shop-muted: #9aa3c0;
  --shop-link: #00d2d3;
  --shop-inline-link: #00d2d3;
  --shop-accent: #00d2d3;
  --shop-violet: #6c5ce7;
  --shop-price: #00d2d3;
  --shop-heading-from: #6c5ce7;
  --shop-heading-to: #00d2d3;
  --shop-border: #3d4a7a;
  --shop-input-bg: #141a35;
  --shop-input-border: #5c4cc4;
  --shop-btn-text: #ffffff;
}

.shop-body {
  margin: 0;
  font-family: 'Rajdhani', sans-serif;
  background: var(--shop-bg);
  color: var(--shop-text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.shop-body img,
.shop-body video {
  max-width: 100%;
  height: auto;
}

.shop-site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  row-gap: 0.75rem;
  padding: 1rem max(1rem, 5%);
  padding-left: max(1rem, 5%, env(safe-area-inset-left));
  padding-right: max(1rem, 5%, env(safe-area-inset-right));
  background: var(--shop-panel);
  border-bottom: 1px solid color-mix(in srgb, var(--shop-border) 55%, transparent);
}

.shop-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: 'Orbitron', sans-serif;
  color: var(--shop-text);
  text-decoration: none;
}

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

.shop-brand .shop-admin-suffix {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--shop-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.shop-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.shop-nav a {
  color: var(--shop-link);
  text-decoration: none;
  font-weight: 600;
}

.shop-nav a:hover {
  text-decoration: underline;
}

.shop-nav-dropdown {
  position: relative;
}

.shop-nav-dropdown summary {
  list-style: none;
  cursor: pointer;
  color: var(--shop-link);
  font-weight: 600;
}

.shop-nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.shop-nav-dropdown summary::after {
  content: " \25BE";
  font-size: 0.75em;
  vertical-align: middle;
}

.shop-nav-dropdown[open] summary {
  text-decoration: underline;
}

.shop-nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  min-width: 13rem;
  z-index: 50;
  background: var(--shop-panel);
  border: 1px solid color-mix(in srgb, var(--shop-border) 70%, transparent);
  border-radius: 10px;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--shop-bg) 65%, #000 35%);
  padding: 0.45rem;
}

.shop-nav-dropdown-menu a {
  display: block;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  text-decoration: none;
}

.shop-nav-dropdown-menu a:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--shop-link) 12%, transparent);
}

/* Keep section and menu titles consistently title-cased across storefront/admin. */
.shop-title,
.shop-main h2,
.shop-main h3,
.shop-nav a,
.shop-nav-dropdown summary,
.shop-nav-dropdown-menu a,
.shop-footer-heading,
.shop-footer-links a {
  text-transform: capitalize;
}

.shop-main {
  flex: 1;
  padding: 2rem max(1rem, 5%) 3rem;
  padding-left: max(1rem, 5%, env(safe-area-inset-left));
  padding-right: max(1rem, 5%, env(safe-area-inset-right));
  max-width: min(1280px, 100%);
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Standalone auth / install pages: centered card, full readable width */
.shop-page-auth {
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}

.shop-page-auth .shop-auth-wrap {
  width: 100%;
  max-width: min(32rem, 100%);
  margin: 0 auto;
}

.shop-auth-wrap--wide {
  max-width: min(42rem, 100%);
}

.shop-auth-card {
  width: 100%;
  box-sizing: border-box;
  padding: 2rem 1.75rem;
  background: var(--shop-panel);
  border: 1px solid color-mix(in srgb, var(--shop-violet) 28%, transparent);
  border-radius: 16px;
}

.shop-page-auth .shop-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: none;
  width: 100%;
  padding-top: clamp(1.5rem, 5vh, 3rem);
  padding-bottom: clamp(2rem, 6vh, 4rem);
}

.shop-page-auth .shop-auth-wrap .shop-title {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  line-height: 1.25;
}

.shop-page-auth .shop-form input[type="text"],
.shop-page-auth .shop-form input[type="email"],
.shop-page-auth .shop-form input[type="password"],
.shop-page-auth .shop-form input[type="number"] {
  max-width: none;
}

/* Maintenance page card (avoid inline style attrs under strict CSP) */
.shop-maintenance-title {
  text-align: center;
  margin-top: 0;
}

.shop-maintenance-lead {
  text-align: center;
  margin-bottom: 0;
  opacity: 0.92;
  line-height: 1.55;
}

.shop-site-footer {
  padding: 2rem max(1rem, 5%) 1.75rem;
  padding-left: max(1rem, 5%, env(safe-area-inset-left));
  padding-right: max(1rem, 5%, env(safe-area-inset-right));
  font-size: 0.9rem;
  opacity: 1;
  border-top: 1px solid color-mix(in srgb, var(--shop-violet) 20%, transparent);
}

.shop-footer-primary {
  margin-bottom: 1.5rem;
}

.shop-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 2rem 2.25rem;
  align-items: start;
  text-align: left;
}

.shop-footer-grid--admin {
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
}

.shop-footer-col {
  min-width: 0;
}

.shop-footer-about .shop-footer-logo-link {
  display: inline-block;
  line-height: 0;
  margin-bottom: 0.35rem;
}

.shop-footer-logo {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

.shop-footer-shop-name {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  margin: 0 0 0.45rem;
}

.shop-footer-shop-name a {
  color: var(--shop-text);
  text-decoration: none;
}

.shop-body .shop-site-footer .shop-footer-shop-name a:hover {
  color: var(--shop-link);
  filter: none;
}

.shop-footer-tagline {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  opacity: 0.82;
  max-width: 22rem;
}

.shop-footer-heading {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.65rem;
  color: var(--shop-link);
}

.shop-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.shop-body .shop-site-footer .shop-footer-links a:not(.shop-btn) {
  text-decoration: none;
  font-weight: 600;
}

.shop-body .shop-site-footer .shop-footer-links a:not(.shop-btn):hover {
  text-decoration: underline;
  filter: brightness(1.12);
}

.shop-footer-newsletter-lead {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  opacity: 0.82;
  line-height: 1.4;
}

.shop-footer-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: min(20rem, 100%);
}

.shop-footer-newsletter-form input[type="email"] {
  width: 100%;
  box-sizing: border-box;
}

.shop-footer-nl-msg {
  margin-top: 0.5rem;
  font-size: 0.88rem;
}

.shop-footer-bottom {
  border-top: 1px solid color-mix(in srgb, var(--shop-violet) 20%, transparent);
  padding-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 2rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.88;
}

.shop-footer-bottom--admin {
  opacity: 0.9;
}

.shop-footer-legal {
  margin: 0;
  flex: 1 1 14rem;
  line-height: 1.45;
}

.shop-footer-studio {
  margin: 0;
  white-space: nowrap;
}

.shop-footer-studio-label {
  opacity: 0.8;
  margin-right: 0.35rem;
}

@media (max-width: 520px) {
  .shop-footer-studio {
    white-space: normal;
  }
}

/* In-page, footer, and muted text: use theme "In-page & footer links" (not browser default / visited purple) */
.shop-body .shop-main a:not(.shop-btn),
.shop-body .shop-site-footer a:not(.shop-btn),
.shop-body .shop-text-muted a:not(.shop-btn),
.shop-body .shop-lead a:not(.shop-btn) {
  color: var(--shop-inline-link);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.shop-body .shop-main a:not(.shop-btn):visited,
.shop-body .shop-site-footer a:not(.shop-btn):visited,
.shop-body .shop-text-muted a:not(.shop-btn):visited,
.shop-body .shop-lead a:not(.shop-btn):visited {
  color: var(--shop-inline-link);
}

.shop-body .shop-main a:not(.shop-btn):hover,
.shop-body .shop-site-footer a:not(.shop-btn):hover,
.shop-body .shop-text-muted a:not(.shop-btn):hover,
.shop-body .shop-lead a:not(.shop-btn):hover {
  color: var(--shop-inline-link);
  filter: brightness(1.15);
}

.shop-account-section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  color: var(--shop-text);
}

.shop-account-billing-heading {
  display: block;
  margin: 1.25rem 0 0.5rem;
  font-weight: 600;
  font-size: 1rem;
}

.shop-text-muted,
.shop-lead {
  color: var(--shop-muted);
}

.shop-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
  background: linear-gradient(135deg, var(--shop-heading-from), var(--shop-heading-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shop-index-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 1.25rem 0 0;
  max-width: min(52rem, 100%);
}

.shop-index-toolbar .shop-index-search,
.shop-index-toolbar .shop-index-select {
  flex: 1 1 10rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--shop-violet) 45%, var(--shop-border));
  background: var(--shop-input-bg);
  color: var(--shop-text);
  box-sizing: border-box;
  font-family: inherit;
  font-size: 1rem;
}

.shop-index-toolbar .shop-btn {
  flex: 0 0 auto;
  margin-top: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: calc(2px + 1.1rem + 1em);
  box-sizing: border-box;
}

.shop-product-category {
  margin: -0.35rem 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--shop-accent);
}

.shop-product-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1.25rem;
}

.shop-product-card {
  background: var(--shop-panel);
  border: 1px solid color-mix(in srgb, var(--shop-border) 70%, transparent);
  border-radius: 12px;
  padding: 1.5rem;
  overflow: hidden;
}

.shop-product-card-media {
  margin: -1.5rem -1.5rem 1rem;
  aspect-ratio: 16 / 9;
  background: color-mix(in srgb, var(--shop-bg) 80%, var(--shop-panel));
  border-bottom: 1px solid color-mix(in srgb, var(--shop-border) 50%, transparent);
}

.shop-product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-product-detail-figure {
  margin: 0 0 1.25rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--shop-border) 55%, transparent);
  background: color-mix(in srgb, var(--shop-bg) 70%, var(--shop-panel));
  max-width: min(960px, 100%);
}

.shop-product-detail-figure img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.shop-product-card h2 {
  margin: 0 0 0.5rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--shop-heading-from), var(--shop-heading-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shop-price {
  color: var(--shop-price);
  font-weight: 700;
  font-size: 1.25rem;
}

.shop-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.shop-btn-primary {
  background: linear-gradient(135deg, var(--shop-accent), var(--shop-violet));
  color: var(--shop-btn-text);
}

.shop-btn-secondary {
  background: transparent;
  color: var(--shop-text);
  border: 2px solid var(--shop-accent);
}

.shop-form label {
  display: block;
  margin: 1rem 0 0.35rem;
  font-weight: 600;
}

.shop-form input[type="text"],
.shop-form input[type="email"],
.shop-form input[type="password"],
.shop-form input[type="number"] {
  width: 100%;
  max-width: min(420px, 100%);
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--shop-input-border) 65%, transparent);
  background: var(--shop-input-bg);
  color: var(--shop-text);
  box-sizing: border-box;
}

.shop-alert {
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.shop-alert-error {
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.5);
}

.shop-alert-success {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.5);
}

.shop-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.shop-table th,
.shop-table td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--shop-border) 50%, transparent);
}

/* Staff-only: floating theme editor (storefront) */
.shop-theme-float {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100050;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  pointer-events: none;
}

.shop-theme-float * {
  pointer-events: auto;
}

.shop-theme-float-toggle {
  align-self: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  background: linear-gradient(145deg, var(--shop-accent), var(--shop-violet));
  color: var(--shop-btn-text);
  box-shadow: 4px 2px 16px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-theme-float-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.shop-theme-float-panel {
  width: 0;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--shop-panel);
  border-right: 1px solid color-mix(in srgb, var(--shop-border) 65%, transparent);
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.25);
  transition: width 0.28s ease;
}

.shop-theme-float.is-open .shop-theme-float-panel {
  width: min(380px, calc(100vw - 52px));
}

.shop-theme-float-inner {
  width: min(380px, calc(100vw - 52px));
  max-height: 100dvh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 1rem 1.1rem max(1.25rem, env(safe-area-inset-bottom));
  padding-top: max(1rem, env(safe-area-inset-top));
}

.shop-theme-float-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--shop-border) 50%, transparent);
  padding-bottom: 0.5rem;
}

.shop-theme-float-tab {
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--shop-muted);
  cursor: pointer;
  font-family: inherit;
}

.shop-theme-float-tab.is-active {
  color: var(--shop-link);
  border-color: color-mix(in srgb, var(--shop-link) 40%, transparent);
  background: color-mix(in srgb, var(--shop-link) 10%, transparent);
}

.shop-theme-float-pane {
  display: none;
}

.shop-theme-float-pane.is-active {
  display: block;
}

.shop-theme-float h2 {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.05rem;
  background: linear-gradient(135deg, var(--shop-heading-from), var(--shop-heading-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shop-theme-float .shop-theme-field label {
  font-size: 0.88rem;
  margin-top: 0.65rem;
}

.shop-theme-float .shop-theme-field input[type="color"] {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--shop-border) 65%, transparent);
  cursor: pointer;
  box-sizing: border-box;
}

.shop-theme-float-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--shop-border) 45%, transparent);
}

.shop-theme-float-actions .shop-btn {
  margin-top: 0;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

@media (max-width: 720px) {
  .shop-title {
    font-size: clamp(1.2rem, 5.5vw, 1.7rem);
  }

  .shop-nav {
    gap: 0.65rem 1rem;
    justify-content: flex-start;
  }

  .shop-nav-dropdown {
    width: 100%;
  }

  .shop-nav-dropdown-menu {
    position: static;
    margin-top: 0.35rem;
    width: min(100%, 20rem);
  }

  .shop-product-list {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .shop-site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-nav {
    justify-content: flex-start;
  }

  .shop-brand {
    justify-content: flex-start;
  }
}

/* Invoice / receipt — matches storefront theme + email branding */
.shop-main > .shop-invoice-page {
  width: 100%;
  max-width: min(760px, 100%);
  margin: 0 auto;
}

.shop-invoice-card {
  background: var(--shop-panel);
  border: 1px solid color-mix(in srgb, var(--shop-border) 70%, transparent);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px color-mix(in srgb, var(--shop-bg) 65%, #000 35%);
}

.shop-invoice-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.75rem;
  padding: 1.75rem clamp(1.25rem, 4vw, 2rem);
  border-bottom: 1px solid color-mix(in srgb, var(--shop-border) 55%, transparent);
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--shop-panel) 92%, var(--shop-heading-from) 8%) 0%,
    var(--shop-panel) 48%,
    color-mix(in srgb, var(--shop-panel) 94%, var(--shop-heading-to) 6%) 100%
  );
}

.shop-invoice-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 1.25rem;
  min-width: min(100%, 14rem);
}

.shop-invoice-logo {
  max-height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
}

.shop-invoice-kicker {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--shop-link);
  margin: 0 0 0.35rem;
}

.shop-invoice-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.65rem, 5vw, 2.1rem);
  font-weight: 900;
  margin: 0 0 0.25rem;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--shop-heading-from), var(--shop-heading-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shop-invoice-shop-name {
  margin: 0;
  font-size: 0.95rem;
  color: var(--shop-muted);
  font-weight: 600;
}

.shop-invoice-meta {
  margin: 0;
  display: grid;
  gap: 0.65rem 1.5rem;
  font-size: 0.9rem;
  min-width: min(100%, 15rem);
}

.shop-invoice-meta dt {
  margin: 0;
  font-size: 0.72rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--shop-muted);
}

.shop-invoice-meta dd {
  margin: 0.15rem 0 0;
  color: var(--shop-text);
  font-weight: 600;
}

.shop-invoice-table-wrap {
  padding: 0 clamp(1.25rem, 4vw, 2rem);
  overflow-x: auto;
}

.shop-invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.shop-invoice-table thead th {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--shop-muted);
  text-align: left;
  padding: 1rem 0.75rem 0.65rem 0;
  border-bottom: 2px solid color-mix(in srgb, var(--shop-border) 60%, transparent);
}

.shop-invoice-th-num,
.shop-invoice-td-num {
  text-align: right;
}

.shop-invoice-table tbody td {
  padding: 0.9rem 0.75rem 0.9rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--shop-border) 45%, transparent);
  color: var(--shop-text);
  vertical-align: top;
}

.shop-invoice-qty {
  display: inline-block;
  min-width: 1.5rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--shop-bg) 55%, var(--shop-panel));
  color: var(--shop-muted);
  font-weight: 600;
  font-size: 0.88rem;
}

.shop-invoice-amount {
  font-weight: 700;
  color: var(--shop-price);
}

.shop-invoice-totals {
  padding: 1.25rem clamp(1.25rem, 4vw, 2rem) 1.5rem;
  margin-left: auto;
  max-width: 20rem;
}

.shop-invoice-total-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.35rem 0;
  font-size: 0.95rem;
  color: var(--shop-text);
}

.shop-invoice-total-final {
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--shop-violet) 35%, var(--shop-border));
  font-family: 'Orbitron', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.shop-invoice-total-final span:last-child {
  background: linear-gradient(135deg, var(--shop-heading-from), var(--shop-heading-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shop-invoice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 1.25rem clamp(1.25rem, 4vw, 2rem) 1.75rem;
  border-top: 1px solid color-mix(in srgb, var(--shop-border) 50%, transparent);
  background: color-mix(in srgb, var(--shop-bg) 40%, var(--shop-panel));
}

.shop-invoice-actions .shop-btn {
  margin-top: 0;
}

@media print {
  /* Paper / PDF: browsers often strip backgrounds and break gradient “clipped” text — use solid ink colors. */
  body.shop-body {
    background: #fff !important;
    color: #111 !important;
    -webkit-print-color-adjust: economy;
    print-color-adjust: economy;
  }

  .shop-site-header,
  .shop-site-footer,
  .shop-invoice-actions,
  .shop-theme-float {
    display: none !important;
  }

  .shop-main {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .shop-main > .shop-invoice-page {
    max-width: 100% !important;
    margin: 0 !important;
  }

  .shop-invoice-card {
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
    border: 1px solid #222 !important;
    border-radius: 0 !important;
  }

  .shop-invoice-header {
    background: #f3f4f6 !important;
    border-bottom: 1px solid #222 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .shop-invoice-kicker {
    color: #333 !important;
  }

  /* Critical: gradient text uses transparent fill — disappears in many print engines */
  .shop-invoice-title {
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: #111 !important;
    color: #111 !important;
  }

  .shop-invoice-shop-name {
    color: #444 !important;
  }

  .shop-invoice-meta dt {
    color: #333 !important;
  }

  .shop-invoice-meta dd {
    color: #111 !important;
  }

  .shop-invoice-table thead th {
    color: #222 !important;
    border-bottom-color: #222 !important;
  }

  .shop-invoice-table tbody td {
    color: #111 !important;
    border-bottom-color: #ccc !important;
  }

  .shop-invoice-qty {
    background: #e8e8e8 !important;
    color: #222 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .shop-invoice-amount {
    color: #111 !important;
  }

  .shop-invoice-total-row {
    color: #111 !important;
  }

  .shop-invoice-total-final {
    color: #111 !important;
    border-top-color: #222 !important;
  }

  .shop-invoice-total-final span:last-child {
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: #111 !important;
    color: #111 !important;
    font-size: 1.15rem !important;
  }
}

/*
 * Admin (staff): centered column, wider than default ~1280px main but not full-bleed.
 */
body.shop-admin-area > main.shop-main {
  max-width: min(1680px, calc(100vw - 4rem));
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  align-self: center;
  box-sizing: border-box;
  padding: 2rem max(1rem, clamp(0.75rem, 2.5vw, 2.5rem), env(safe-area-inset-left, 0px)) 3rem max(1rem, clamp(0.75rem, 2.5vw, 2.5rem), env(safe-area-inset-right, 0px));
}

@media (max-width: 899px) {
  body.shop-admin-area > main.shop-main {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    align-self: stretch;
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }
}

body.shop-admin-area .shop-site-footer {
  padding-left: max(1rem, clamp(0.75rem, 2vw, 2.5rem), env(safe-area-inset-left, 0px));
  padding-right: max(1rem, clamp(0.75rem, 2vw, 2.5rem), env(safe-area-inset-right, 0px));
}

body.shop-admin-area .admin-table {
  table-layout: auto;
  width: 100%;
}

body.shop-admin-area .admin-table-scroll {
  width: 100%;
  max-width: none;
}
