* { box-sizing: border-box; }
:root {
  --theme-accent: #253238;
  --theme-brand: #d7b46a;
  --theme-surface: rgba(255,255,255,0.28);
  --theme-hero: linear-gradient(135deg, rgba(255,255,255,0.88), rgba(255,255,255,0.42));
  --text-main: #1f2933;
  --text-soft: rgba(31,41,51,0.72);
  --button-radius: 14px;
  --card-radius: 22px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 26px 60px rgba(15, 23, 42, 0.12);
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-family-base, Arial, sans-serif);
  color: var(--text-main);
  background-color: var(--page-bg-color, #f5f7fb);
  background-image: var(--page-bg-image, none);
  background-repeat: no-repeat;
  background-attachment: var(--page-bg-attach, scroll);
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  line-height: 1.55;
  transition: background-color 0.2s ease, color 0.2s ease, font-family 0.2s ease;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: var(--page-bg-overlay, none);
}

body.theme-preview-solid .glass,
body.theme-preview-solid .site-header,
body.theme-preview-solid .admin-account-dropdown summary {
  backdrop-filter: none;
}

body.theme-preview-solid .glass {
  background: var(--dynamic-card-background, var(--card-bg, var(--theme-surface)));
}

a { color: inherit; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 14px 0;
  background: var(--dynamic-nav-background, color-mix(in srgb, var(--dynamic-card-background, rgba(255,255,255,0.28)) 90%, transparent));
  backdrop-filter: var(--nav-backdrop-filter, blur(18px));
  border-bottom: var(--theme-border-width, 1px) var(--theme-border-style, solid) color-mix(in srgb, var(--theme-border-color, rgba(37,50,56,0.08)) 70%, transparent);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
.nav-wrap, .row-between { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.brand {
  text-decoration: none;
  color: var(--text-main);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}
.brand-logo { display: block; max-height: 76px; width: auto; max-width: 280px; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: flex-end; }
.nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--button-radius, 999px);
  background: var(--nav-pill-background, rgba(255,255,255,0.52));
  border: var(--theme-border-width, 1px) var(--theme-border-style, solid) color-mix(in srgb, var(--theme-border-color, rgba(37,50,56,0.10)) 70%, transparent);
  box-shadow: var(--nav-pill-shadow, inset 0 1px 0 rgba(255,255,255,0.55));
  transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.nav a:hover,
.nav a:focus-visible {
  transform: translateY(-1px);
  background: var(--nav-pill-hover-background, rgba(255,255,255,0.72));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

main.container { padding-bottom: 42px; }
.hero, .form-card, .product, .card, .glass { margin-top: 24px; }
.glass {
  background: var(--dynamic-card-background, var(--card-bg, var(--theme-surface)));
  border: var(--theme-border-width, 1px) var(--theme-border-style, solid) color-mix(in srgb, var(--theme-border-color, rgba(255,255,255,0.34)) 80%, transparent);
  backdrop-filter: blur(14px);
  border-radius: var(--card-radius, 22px);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  transition: background 0.2s ease, border-color 0.2s ease, border-radius 0.2s ease, backdrop-filter 0.2s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.inner-glass { background: rgba(255,255,255,0.22); }

.hero-upgraded {
  padding: 34px;
  background: var(--hero-panel-background, var(--theme-hero, linear-gradient(135deg, rgba(255,255,255,0.88), rgba(255,255,255,0.40))));
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr); gap: 24px; align-items: stretch; }
.hero-copy-stack { display: grid; gap: 18px; }
.hero-copy h1 { margin: 0; font-size: clamp(36px, 5vw, 60px); line-height: 1.02; letter-spacing: -0.04em; }
.hero-copy p { margin: 0; font-size: 18px; line-height: 1.7; max-width: 720px; color: var(--text-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--hero-panel-background, rgba(255,255,255,0.42));
  border: var(--theme-border-width, 1px) var(--theme-border-style, solid) color-mix(in srgb, var(--theme-border-color, rgba(255,255,255,0.45)) 70%, transparent);
}
.site-logo { display: block; width: auto; height: auto; max-height: 160px; max-width: 100%; object-fit: contain; }
.hero-side-card h2, .feature-card h2, .storefront-section h2 { margin-top: 0; }
.hero-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero-checklist li, .trust-row span, .product-badge, .status-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--chip-background, rgba(255,255,255,0.58));
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.42);
}
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; }
.section-headline { margin-bottom: 8px; }
.section-headline h2 { margin: 6px 0 0; font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.03em; }
.section-headline p { margin: 8px 0 0; color: var(--text-soft); max-width: 640px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  border: 0;
  border-radius: var(--button-radius, 999px);
  padding: 13px 22px;
  background: var(--button-bg, var(--theme-accent));
  color: var(--button-text, #ffffff);
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  min-height: 46px;
  box-shadow: 0 14px 28px rgba(31, 41, 51, 0.16);
  transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(31, 41, 51, 0.18);
}
.button-secondary {
  background: rgba(255,255,255,0.78);
  color: var(--button-secondary-text, var(--theme-accent));
  border: 1px solid rgba(37,50,56,0.12);
}
.button-small { padding: 10px 16px; font-size: 14px; min-height: 40px; }
.button-danger { background: #a33434; color: #fff; }

.button:disabled,
.button[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.register-form-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.register-form-fieldset[disabled] {
  opacity: 0.62;
}

body.agreement-modal-open {
  overflow: hidden;
}
.agreement-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 42px);
  background: rgba(15, 23, 42, 0.48);
}
.agreement-modal.is-open {
  display: flex;
}
.agreement-modal-card {
  width: min(860px, 100%);
  max-height: min(88vh, 920px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: clamp(22px, 3vw, 30px);
  background: var(--dynamic-card-background, var(--card-bg, var(--theme-surface)));
  box-shadow: var(--shadow-strong);
}
.agreement-modal-card h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.03em;
}
.agreement-scroll-box {
  overflow: auto;
  max-height: min(52vh, 500px);
  padding: 20px 22px;
  border-radius: max(14px, calc(var(--card-radius, 22px) - 8px));
  background: var(--dynamic-nested-card-background, rgba(255,255,255,0.56));
  border: var(--theme-border-width, 1px) var(--theme-border-style, solid) color-mix(in srgb, var(--theme-border-color, rgba(37,50,56,0.12)) 78%, transparent);
  color: var(--text-main);
  line-height: 1.7;
}
.agreement-scroll-box > :first-child {
  margin-top: 0;
}
.agreement-scroll-box > :last-child {
  margin-bottom: 0;
}
.agreement-scroll-box h1,
.agreement-scroll-box h2,
.agreement-scroll-box h3,
.agreement-scroll-box h4 {
  margin: 0 0 14px;
  color: var(--text-main);
}
.agreement-scroll-box p,
.agreement-scroll-box ul,
.agreement-scroll-box ol {
  margin: 0 0 14px;
}
.agreement-scroll-box ul,
.agreement-scroll-box ol {
  padding-left: 22px;
}
.agreement-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}
.agreement-actions .button {
  margin-top: 0;
}
@media (max-width: 680px) {
  .agreement-modal-card {
    max-height: min(94vh, 940px);
  }
  .agreement-scroll-box {
    max-height: min(56vh, 440px);
    padding: 18px;
  }
  .agreement-actions {
    flex-direction: column-reverse;
  }
  .agreement-actions .button {
    width: 100%;
  }
}

.grid, .catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 24px 0 40px; }
.feature-card-grid { margin-top: 28px; }
.feature-card { min-height: 100%; }
.feature-card p { color: var(--text-soft); }
.storefront-section { padding: 30px; }
.home-featured-grid,
.storefront-catalog-grid { gap: 22px; }

.product-card {
  display: grid;
  gap: 16px;
  min-height: 100%;
  position: relative;
}
.product-card:hover,
.product-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}
.product-card-copy { display: grid; gap: 10px; align-content: start; }
.product-card h2,
.product-card h3 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.product-card p { margin: 0; color: var(--text-soft); }
.product-card .row-between { margin-top: 4px; align-items: center; }
.storefront-category {
  margin: 0;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.thumb-wrap,
.product-image,
.edit-preview {
  width: 100%;
  border-radius: 20px;
  background: rgba(255,255,255,0.42);
  border: 1px solid rgba(255,255,255,0.38);
}
.thumb-wrap { aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.thumb-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(0,0,0,0.04));
  pointer-events: none;
}
.thumb { height: 100%; width: 100%; object-fit: cover; transition: transform 0.35s ease; }
.product-card:hover .thumb,
.product-card:focus-within .thumb { transform: scale(1.04); }
.product-image { max-width: 520px; padding: 18px; box-shadow: var(--shadow-soft); }
.edit-preview { max-width: 220px; padding: 8px; margin-top: 10px; }

.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 30px;
  align-items: start;
}
.product-media-panel,
.product-detail-panel { display: grid; gap: 16px; }
.product-detail-panel h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.03em; }
.product-description { font-size: 16px; line-height: 1.8; color: var(--text-soft); }
.product-detail-stack {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.30);
  border: 1px solid rgba(255,255,255,0.36);
}
.product-meta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.price { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; color: var(--text-main); }
.muted { color: var(--text-soft); }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 8px;
}

.catalog-shell { padding: 30px; }
.catalog-toolbar { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 10px; }
.catalog-toolbar h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.03em; }
.catalog-toolbar p { margin: 6px 0 0; color: var(--text-soft); }
.catalog-search {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.34);
  border: 1px solid rgba(255,255,255,0.42);
}
.catalog-search input { min-width: min(280px, 100%); }
.catalog-empty-state { text-align: center; padding: 38px 24px; }
.catalog-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.catalog-page-links { display: flex; flex-wrap: wrap; gap: 8px; }
.catalog-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: var(--button-radius, 999px);
  text-decoration: none;
  background: rgba(255,255,255,0.60);
  border: 1px solid rgba(37,50,56,0.10);
  font-weight: 700;
}
.catalog-page-link.is-active { background: var(--theme-accent); color: var(--accent-text, #fff); }

form { display: grid; gap: 10px; }
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
}
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
  white-space: normal;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"],
.checkbox-row input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}
input, textarea, select {
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(37,50,56,0.12);
  width: 100%;
  background: rgba(255,255,255,0.86);
  color: var(--text-main);
}
.alert {
  background: #253238;
  border: 1px solid rgba(37, 50, 56, 0.85);
  padding: 12px 14px;
  border-radius: 14px;
  margin: 18px 0 0;
  color: #fff;
}
.alert-success { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.alert-error { background: #b3261e; border-color: #b3261e; color: #fff; }
.alert-info { background: #1f4f82; border-color: #1f4f82; color: #fff; }
.alert-toast {
  position: fixed;
  top: 92px;
  right: 24px;
  z-index: 120;
  min-width: min(420px, calc(100vw - 32px));
  max-width: min(420px, calc(100vw - 32px));
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.alert-toast.is-hiding { opacity: 0; transform: translateY(-10px); pointer-events: none; }

.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 14px 12px; border-bottom: 1px solid rgba(37, 50, 56, 0.12); text-align: left; vertical-align: top; }
.simple-list { display: grid; gap: 12px; }
.list-row { padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,0.22); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.site-footer { margin: 32px 0 10px; padding: 18px 0 0; color: var(--text-soft); }
.site-footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 2px 2px; }
.site-footer-note { font-size: 14px; }

@media (max-width: 980px) {
  .hero-grid,
  .product,
  .admin-card-grid.two-up,
  .admin-stat-row { grid-template-columns: 1fr; }
  .catalog-toolbar,
  .site-footer-inner { align-items: start; flex-direction: column; }
  .catalog-pagination { flex-direction: column; align-items: stretch; }
}

@media (max-width: 720px) {
  .container { width: min(100% - 20px, 1180px); }
  .site-header { padding: 12px 0; }
  .nav-wrap { align-items: start; flex-direction: column; }
  .nav { width: 100%; justify-content: flex-start; }
  .hero-upgraded,
  .storefront-section,
  .catalog-shell,
  .glass { padding: 18px; }
  .hero-copy h1 { font-size: clamp(32px, 10vw, 46px); }
  .catalog-search { width: 100%; display: grid; grid-template-columns: 1fr; }
  .catalog-search input { min-width: 0; }
  .product-image { max-width: 100%; }
  .button,
  .nav a,
  .catalog-page-link { min-height: 44px; }
}


/* UI correction pass from ui-admin-correction.zip only */
.catalog-grid,
.storefront-catalog-grid,
.home-featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 280px));
  justify-content: start;
  align-items: stretch;
}
.catalog-grid > *,
.storefront-catalog-grid > *,
.home-featured-grid > * {
  width: 100%;
  max-width: 280px;
}
.product-card,
.catalog-grid .glass,
.storefront-catalog-grid .glass,
.home-featured-grid .glass {
  width: 100%;
  max-width: 280px;
}
.thumb-wrap {
  aspect-ratio: 4 / 3;
  max-height: 220px;
}
.product-card h2,
.product-card h3 {
  font-size: 20px;
}
.product-card p {
  font-size: 14px;
}

.admin-page-shell {
  display: grid;
  gap: 22px;
}
.admin-navbar-shell {
  padding-top: 24px;
  padding-bottom: 42px;
}
.admin-nav-wrap {
  align-items: center;
}
.admin-top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-top-nav a,
.admin-top-nav a.is-active {
  text-decoration: none;
}
.admin-top-nav a.is-active {
  background: var(--theme-accent);
  color: var(--accent-text, #ffffff);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}
.admin-account-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.admin-welcome {
  font-weight: 700;
  color: var(--text-main);
}
.admin-account-dropdown {
  position: relative;
}
.admin-account-dropdown summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--nav-pill-background, rgba(255,255,255,0.52));
  border: var(--theme-border-width, 1px) var(--theme-border-style, solid) color-mix(in srgb, var(--theme-border-color, rgba(37,50,56,0.10)) 70%, transparent);
  font-weight: 700;
}
.admin-account-dropdown summary::-webkit-details-marker {
  display: none;
}
.admin-account-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 220px;
  display: grid;
  gap: 10px;
  padding: 14px;
  z-index: 50;
}
.admin-account-dropdown-menu a {
  text-decoration: none;
  font-weight: 600;
}

.admin-hero,
.admin-card-grid,
.admin-card-grid.two-up,
.stats-grid.compact,
.admin-stat-row {
  display: grid;
  gap: 18px;
}
.admin-card-grid.two-up,
.admin-stat-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stats-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-panel-card,
.theme-preview-card,
.selectable-card,
.admin-person-card,
.mini-stat-card,
.stat-box {
  min-width: 0;
}

.admin-tabs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  background: var(--nav-pill-background, rgba(255,255,255,0.56));
  border: var(--theme-border-width, 1px) var(--theme-border-style, solid) color-mix(in srgb, var(--theme-border-color, rgba(37,50,56,0.10)) 70%, transparent);
}
.admin-tab-btn.active {
  background: var(--theme-accent);
  color: var(--accent-text, #ffffff);
}
.admin-section {
  display: none;
}
.admin-section.active {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

@media (max-width: 980px) {
  .admin-card-grid.two-up,
  .admin-stat-row,
  .stats-grid.compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .catalog-grid,
  .storefront-catalog-grid,
  .home-featured-grid {
    grid-template-columns: 1fr;
  }
  .catalog-grid > *,
  .storefront-catalog-grid > *,
  .home-featured-grid > *,
  .product-card,
  .catalog-grid .glass,
  .storefront-catalog-grid .glass,
  .home-featured-grid .glass {
    max-width: none;
  }
  .admin-nav-wrap {
    align-items: start;
  }
  .admin-account-menu {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }
}



/* Fix storefront card sizing */
.catalog-grid,
.storefront-catalog-grid,
.home-featured-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
  justify-content: start;
}
.catalog-grid > *,
.storefront-catalog-grid > *,
.home-featured-grid > * {
  width: 100%;
  max-width: 320px;
}
.thumb-wrap {
  max-height: 260px;
}
.product-card {
  align-self: start;
}

/* Admin nav + focus fixes */
.admin-nav-wrap {
  align-items: center;
}
.admin-top-nav {
  flex: 1 1 auto;
}
.admin-top-nav a {
  position: relative;
}
.admin-page-settings.admin-focus-themes #public-profile-card,
.admin-page-settings.admin-focus-themes .public-profile-card,
.admin-page-settings.admin-focus-themes [data-admin-focus="profile"] {
  display: none !important;
}
.admin-page-settings.admin-focus-profile #theme-studio-card,
.admin-page-settings.admin-focus-profile .theme-studio-card,
.admin-page-settings.admin-focus-profile [data-admin-focus="themes"] {
  display: none !important;
}
.admin-page-settings.admin-focus-themes #theme-studio-card,
.admin-page-settings.admin-focus-profile #public-profile-card {
  scroll-margin-top: 110px;
}



/* Theme studio polish - visual only, no logic changes */
#theme-studio-card,
.theme-studio-card,
.admin-page-settings.admin-focus-themes .admin-panel-card {
  background: rgba(194, 186, 173, 0.94);
  border-color: rgba(74, 66, 58, 0.28);
  box-shadow: 0 14px 32px rgba(60, 48, 34, 0.10);
}

#theme-studio-card h2,
.theme-studio-card h2,
#theme-studio-card h3,
.theme-studio-card h3 {
  margin-top: 0;
  color: #2f332f;
}

#theme-studio-card .card-heading span,
.theme-studio-card .card-heading span,
#theme-studio-card p,
.theme-studio-card p,
#theme-studio-card label,
.theme-studio-card label,
#theme-studio-card small,
.theme-studio-card small {
  color: var(--text-soft);
}

#theme-studio-card form,
.theme-studio-card form,
.admin-page-settings.admin-focus-themes form {
  gap: 12px;
}

#theme-studio-card input:not([type="color"]):not([type="checkbox"]):not([type="radio"]),
#theme-studio-card select,
#theme-studio-card textarea,
.theme-studio-card input:not([type="color"]):not([type="checkbox"]):not([type="radio"]),
.theme-studio-card select,
.theme-studio-card textarea {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(82, 76, 67, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

#theme-studio-card input[type="color"],
.theme-studio-card input[type="color"],
.admin-page-settings.admin-focus-themes input[type="color"] {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border: 3px solid rgba(255,255,255,0.9);
  border-radius: 7px;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(82, 76, 67, 0.22);
  cursor: pointer;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  vertical-align: middle;
}

#theme-studio-card input[type="color"]::-webkit-color-swatch-wrapper,
.theme-studio-card input[type="color"]::-webkit-color-swatch-wrapper,
.admin-page-settings.admin-focus-themes input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

#theme-studio-card input[type="color"]::-webkit-color-swatch,
.theme-studio-card input[type="color"]::-webkit-color-swatch,
.admin-page-settings.admin-focus-themes input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 4px;
}

#theme-studio-card input[type="file"],
.theme-studio-card input[type="file"] {
  padding: 8px 10px;
}

#theme-studio-card input[type="file"]::file-selector-button,
.theme-studio-card input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(82, 76, 67, 0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  color: #3b413b;
  cursor: pointer;
}

#theme-studio-card .button,
#theme-studio-card button,
.theme-studio-card .button,
.theme-studio-card button,
.admin-page-settings.admin-focus-themes .button,
.admin-page-settings.admin-focus-themes button {
  min-height: 34px;
  padding: 8px 12px;
  margin-top: 0;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

#theme-studio-card .button-secondary,
.theme-studio-card .button-secondary,
.admin-page-settings.admin-focus-themes .button-secondary {
  background: rgba(255,255,255,0.82);
}

#theme-studio-card .row-between,
.theme-studio-card .row-between {
  align-items: start;
}

#theme-studio-card .theme-preview-card,
.theme-studio-card .theme-preview-card,
#theme-studio-card .admin-panel-card,
.theme-studio-card .admin-panel-card {
  background: rgba(198, 190, 176, 0.72);
  border: 1px solid rgba(82, 76, 67, 0.16);
  box-shadow: none;
}

#theme-studio-card .theme-preview-card img,
.theme-studio-card .theme-preview-card img {
  border-radius: 12px;
}

#theme-studio-card .admin-card-grid.two-up,
.theme-studio-card .admin-card-grid.two-up,
.admin-page-settings.admin-focus-themes .admin-card-grid.two-up {
  gap: 14px;
}

#theme-studio-card .admin-card-grid.two-up > *,
.theme-studio-card .admin-card-grid.two-up > * {
  min-width: 0;
}

#theme-studio-card .admin-feature-list,
.theme-studio-card .admin-feature-list {
  gap: 8px;
}

#theme-studio-card .mini-stat-card,
#theme-studio-card .stat-box,
.theme-studio-card .mini-stat-card,
.theme-studio-card .stat-box {
  background: rgba(255,255,255,0.34);
  box-shadow: none;
}

@media (min-width: 900px) {
  #theme-studio-card .admin-card-grid.two-up,
  .theme-studio-card .admin-card-grid.two-up,
  .admin-page-settings.admin-focus-themes .admin-card-grid.two-up {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  }
}

@media (max-width: 720px) {
  #theme-studio-card input[type="color"],
  .theme-studio-card input[type="color"],
  .admin-page-settings.admin-focus-themes input[type="color"] {
    width: 30px;
    height: 30px;
  }
}



/* Theme studio visual match v2 */
.admin-page-settings.admin-focus-themes,
.admin-page-settings.admin-focus-themes .glass,
.admin-page-settings.admin-focus-themes .admin-panel-card,
#theme-studio-card,
.theme-studio-card {
  color: #4c4f4a;
}

#theme-studio-card,
.theme-studio-card,
.admin-page-settings.admin-focus-themes .admin-panel-card,
.admin-page-settings.admin-focus-themes .glass {
  background: #c8c0b4;
  border: 1px solid rgba(54, 49, 42, 0.32);
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: none;
}

.admin-page-settings.admin-focus-themes .card-heading,
#theme-studio-card .card-heading,
.theme-studio-card .card-heading {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(54, 49, 42, 0.18);
}

.admin-page-settings.admin-focus-themes h1,
.admin-page-settings.admin-focus-themes h2,
.admin-page-settings.admin-focus-themes h3,
#theme-studio-card h1,
#theme-studio-card h2,
#theme-studio-card h3,
.theme-studio-card h1,
.theme-studio-card h2,
.theme-studio-card h3 {
  color: #333831;
  letter-spacing: 0;
}

.admin-page-settings.admin-focus-themes .card-heading h2,
#theme-studio-card .card-heading h2,
.theme-studio-card .card-heading h2 {
  font-size: 15px;
  font-weight: 700;
}

.admin-page-settings.admin-focus-themes p,
.admin-page-settings.admin-focus-themes label,
.admin-page-settings.admin-focus-themes small,
.admin-page-settings.admin-focus-themes span,
#theme-studio-card p,
#theme-studio-card label,
#theme-studio-card small,
#theme-studio-card span,
.theme-studio-card p,
.theme-studio-card label,
.theme-studio-card small,
.theme-studio-card span {
  color: #5f625d;
  font-size: 11px;
  line-height: 1.35;
}

.admin-page-settings.admin-focus-themes .admin-card-grid.two-up,
#theme-studio-card .admin-card-grid.two-up,
.theme-studio-card .admin-card-grid.two-up {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.admin-page-settings.admin-focus-themes form,
#theme-studio-card form,
.theme-studio-card form {
  display: grid;
  gap: 8px;
}

.admin-page-settings.admin-focus-themes .row-between,
#theme-studio-card .row-between,
.theme-studio-card .row-between {
  gap: 12px;
}

.admin-page-settings.admin-focus-themes input:not([type="color"]):not([type="checkbox"]):not([type="radio"]),
.admin-page-settings.admin-focus-themes select,
.admin-page-settings.admin-focus-themes textarea,
#theme-studio-card input:not([type="color"]):not([type="checkbox"]):not([type="radio"]),
#theme-studio-card select,
#theme-studio-card textarea,
.theme-studio-card input:not([type="color"]):not([type="checkbox"]):not([type="radio"]),
.theme-studio-card select,
.theme-studio-card textarea {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 11px;
  background: #f8f8f8;
  border: 1px solid #d7d7d7;
  color: #3b4039;
  box-shadow: none;
}

.admin-page-settings.admin-focus-themes input[type="color"],
#theme-studio-card input[type="color"],
.theme-studio-card input[type="color"] {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border: 3px solid #ffffff;
  border-radius: 4px;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(60, 54, 47, 0.25);
  appearance: none;
  -webkit-appearance: none;
  vertical-align: middle;
  cursor: pointer;
}

.admin-page-settings.admin-focus-themes input[type="color"]::-webkit-color-swatch-wrapper,
#theme-studio-card input[type="color"]::-webkit-color-swatch-wrapper,
.theme-studio-card input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.admin-page-settings.admin-focus-themes input[type="color"]::-webkit-color-swatch,
#theme-studio-card input[type="color"]::-webkit-color-swatch,
.theme-studio-card input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 1px;
}

.admin-page-settings.admin-focus-themes input[type="file"],
#theme-studio-card input[type="file"],
.theme-studio-card input[type="file"] {
  padding: 3px 6px;
  font-size: 11px;
  background: #f8f8f8;
  border: 1px solid #d7d7d7;
}

.admin-page-settings.admin-focus-themes input[type="file"]::file-selector-button,
#theme-studio-card input[type="file"]::file-selector-button,
.theme-studio-card input[type="file"]::file-selector-button {
  margin-right: 8px;
  padding: 3px 8px;
  border: 1px solid #b8b0a2;
  border-radius: 3px;
  background: #efefef;
  color: #3f433d;
  font-size: 11px;
  cursor: pointer;
}

.admin-page-settings.admin-focus-themes .button,
.admin-page-settings.admin-focus-themes button,
#theme-studio-card .button,
#theme-studio-card button,
.theme-studio-card .button,
.theme-studio-card button {
  min-height: 28px;
  margin-top: 0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  box-shadow: none;
  background: #b7aa86;
  color: #40433f;
}

.admin-page-settings.admin-focus-themes .button:hover,
.admin-page-settings.admin-focus-themes button:hover,
#theme-studio-card .button:hover,
#theme-studio-card button:hover,
.theme-studio-card .button:hover,
.theme-studio-card button:hover {
  transform: none;
  box-shadow: none;
  filter: brightness(0.98);
}

.admin-page-settings.admin-focus-themes .button-secondary,
#theme-studio-card .button-secondary,
.theme-studio-card .button-secondary {
  background: #ece7dc;
  color: #40433f;
  border: 1px solid rgba(60, 54, 47, 0.14);
}

.admin-page-settings.admin-focus-themes .theme-preview-card,
.admin-page-settings.admin-focus-themes .mini-stat-card,
.admin-page-settings.admin-focus-themes .stat-box,
#theme-studio-card .theme-preview-card,
#theme-studio-card .mini-stat-card,
#theme-studio-card .stat-box,
.theme-studio-card .theme-preview-card,
.theme-studio-card .mini-stat-card,
.theme-studio-card .stat-box {
  background: rgba(201, 194, 180, 0.72);
  border: 1px solid rgba(60, 54, 47, 0.14);
  box-shadow: none;
}

.admin-page-settings.admin-focus-themes .theme-preview-card,
#theme-studio-card .theme-preview-card,
.theme-studio-card .theme-preview-card {
  padding: 8px;
  border-radius: 4px;
}

.admin-page-settings.admin-focus-themes .theme-preview-card img,
#theme-studio-card .theme-preview-card img,
.theme-studio-card .theme-preview-card img {
  border-radius: 3px;
}

.admin-page-settings.admin-focus-themes .admin-feature-list,
#theme-studio-card .admin-feature-list,
.theme-studio-card .admin-feature-list {
  gap: 6px;
  font-size: 11px;
}

.admin-page-settings.admin-focus-themes .admin-panel-card > .button:last-child,
.admin-page-settings.admin-focus-themes .admin-panel-card > button:last-child,
#theme-studio-card .admin-panel-card > .button:last-child,
#theme-studio-card .admin-panel-card > button:last-child,
.theme-studio-card .admin-panel-card > .button:last-child,
.theme-studio-card .admin-panel-card > button:last-child {
  justify-self: end;
}

@media (max-width: 900px) {
  .admin-page-settings.admin-focus-themes .admin-card-grid.two-up,
  #theme-studio-card .admin-card-grid.two-up,
  .theme-studio-card .admin-card-grid.two-up {
    grid-template-columns: 1fr;
  }
}

/* Theme studio refresh */
.theme-studio-panel {
  padding: 22px;
}
.theme-studio-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.theme-studio-heading > div:first-child {
  display: grid;
  gap: 4px;
}
.theme-studio-layout,
.theme-studio-left,
.theme-editor-shell {
  display: grid;
  gap: 18px;
}
.theme-studio-top-grid,
.theme-studio-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.98fr);
  gap: 18px;
}
.theme-editor-card {
  background: rgba(197, 189, 178, 0.94);
  border: 1px solid rgba(88, 81, 71, 0.24);
  border-radius: var(--card-radius, 22px);
  padding: 14px;
  box-shadow: none;
}
.theme-form-panel,
.theme-preview-config-card {
  align-content: start;
}
.theme-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}
.theme-inline-help,
.theme-lock-note,
.theme-navbar-note,
.theme-preview-meta {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-soft);
}
.theme-form-panel label,
.theme-editor-shell label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 5px;
  display: block;
}
.theme-form-panel input:not([type="color"]):not([type="file"]),
.theme-form-panel select,
.theme-editor-shell input:not([type="color"]):not([type="file"]),
.theme-editor-shell input[type="number"],
.theme-editor-shell select {
  width: 100%;
  min-height: 31px;
  border-radius: 3px;
  border: 1px solid rgba(122, 112, 98, 0.34);
  background: rgba(255,255,255,0.85);
  padding: 6px 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.theme-editor-shell input[type="file"] {
  width: 100%;
  min-height: 31px;
  border-radius: 3px;
  border: 1px solid rgba(122, 112, 98, 0.34);
  background: rgba(255,255,255,0.85);
  padding: 4px 8px;
}
.theme-editor-shell input[type="file"]::file-selector-button {
  border: 1px solid rgba(122, 112, 98, 0.34);
  border-radius: 3px;
  background: #f8f8f8;
  padding: 4px 9px;
  margin-right: 10px;
}
.theme-panel-actions,
.theme-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.theme-panel-actions-top {
  margin-top: 8px;
}
.theme-editor-footer {
  flex-wrap: wrap;
}
.theme-editor-footer .button {
  margin-left: auto;
}
.theme-settings-grid-visual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
.theme-background-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
.theme-setting-field {
  min-width: 0;
}
.theme-setting-field-wide,
.theme-font-field {
  grid-column: 1 / -1;
}
.theme-setting-field-compact .theme-inline-number {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.theme-color-control,
.theme-color-chip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.theme-color-swatch {
  appearance: none;
  -webkit-appearance: none;
  inline-size: 26px;
  block-size: 22px;
  padding: 0;
  border: 1px solid rgba(144, 132, 115, 0.38);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}
.theme-color-swatch-small {
  inline-size: 22px;
  block-size: 22px;
}
.theme-color-swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}
.theme-color-swatch::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}
.theme-color-value {
  font-size: 11px;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}
.theme-color-value-inline {
  white-space: nowrap;
}
.theme-preview-box {
  margin-top: 16px;
  border: 1px solid rgba(150, 138, 120, 0.32);
  border-radius: var(--card-radius, 22px);
  padding: 10px;
  background: rgba(199, 192, 182, 0.34);
}
.theme-preview-box-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}
.theme-preview-surface {
  min-height: 110px;
  border-radius: clamp(10px, calc(var(--card-radius, 22px) - 8px), 999px);
  border: 1px solid rgba(162, 150, 133, 0.28);
  background-color: #e3e7ee;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}
.theme-preview-overlay {
  min-height: 110px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 10px;
  border-radius: inherit;
}
.theme-preview-chip-row {
  display: none;
}
.theme-preview-color-chip {
  display: none;
}
.theme-preview-meta {
  margin-top: 6px;
}
.theme-selector-dropdown {
  width: 100%;
}
@media (max-width: 1100px) {
  .theme-studio-top-grid,
  .theme-studio-main-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .theme-studio-heading,
  .theme-panel-actions,
  .theme-editor-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .theme-settings-grid-visual,
  .theme-background-grid {
    grid-template-columns: 1fr;
  }
  .theme-setting-field-compact .theme-inline-number {
    grid-template-columns: 1fr;
  }
  .theme-editor-footer .button {
    margin-left: 0;
  }
}


/* Storefront home navbar aligned with admin navbar */
.storefront-topbar .storefront-nav-wrap {
  align-items: center;
}
.storefront-topbar .storefront-top-nav {
  flex: 1 1 auto;
}
.storefront-topbar .storefront-account-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.storefront-topbar .storefront-brand {
  min-height: 44px;
}
.storefront-topbar .storefront-brand .brand-logo,
.storefront-topbar .storefront-brand.brand-logo-only .brand-logo {
  max-height: 54px;
  max-width: 220px;
}
.storefront-topbar .storefront-account-dropdown > summary {
  min-width: 96px;
}
@media (max-width: 720px) {
  .storefront-topbar .storefront-nav-wrap {
    align-items: start;
  }
  .storefront-topbar .storefront-account-menu {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }
}

/* Admin polish follow-up: theme-driven navbar text, primary container cards, branded inner cards, and modern dropdown */
.admin-screen-body {
  --admin-primary-surface: linear-gradient(160deg, color-mix(in srgb, var(--theme-accent) 96%, white 4%), color-mix(in srgb, var(--theme-accent) 82%, black 18%));
  --admin-secondary-surface: linear-gradient(160deg, color-mix(in srgb, var(--theme-brand) 94%, white 6%), color-mix(in srgb, var(--theme-brand) 82%, black 18%));
  --admin-primary-text: var(--text-main, #1f2933);
  --admin-secondary-text: var(--text-main, #1f2933);
  --admin-border-primary: color-mix(in srgb, var(--admin-primary-text) 14%, transparent);
  --admin-border-secondary: color-mix(in srgb, var(--admin-secondary-text) 16%, transparent);
  --admin-muted-primary: var(--text-soft, rgba(31,41,51,0.72));
  --admin-muted-secondary: var(--text-soft, rgba(31,41,51,0.72));
  --admin-button-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  --admin-button-shadow-hover: 0 18px 34px rgba(0, 0, 0, 0.22);
  --admin-shell-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.admin-screen-body .admin-topbar {
  background: var(--admin-primary-surface);
  backdrop-filter: none !important;
  border-bottom: var(--theme-border-width, 1px) var(--theme-border-style, solid) var(--admin-border-primary);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.admin-screen-body .admin-top-nav a,
.admin-screen-body .admin-account-dropdown > summary {
  background: var(--button-bg, var(--theme-accent));
  color: var(--button-text, #ffffff);
  border-radius: var(--button-radius, 999px);
  border: var(--theme-border-width, 1px) var(--theme-border-style, solid) color-mix(in srgb, var(--button-text, #ffffff) 12%, transparent);
  box-shadow: var(--admin-button-shadow);
}

.admin-screen-body .admin-top-nav a:hover,
.admin-screen-body .admin-top-nav a:focus-visible,
.admin-screen-body .admin-account-dropdown > summary:hover,
.admin-screen-body .admin-account-dropdown > summary:focus-visible,
.admin-screen-body .admin-account-dropdown[open] > summary {
  background: var(--button-bg, var(--theme-accent));
  color: var(--button-text, #ffffff);
  box-shadow: var(--admin-button-shadow-hover);
}

.admin-screen-body .admin-top-nav a.is-active {
  background: var(--button-bg, var(--theme-accent));
  color: var(--button-text, #ffffff);
  box-shadow: var(--admin-button-shadow-hover), 0 0 0 2px color-mix(in srgb, var(--button-text, #ffffff) 20%, transparent);
}

.admin-screen-body .admin-welcome {
  color: var(--admin-primary-text);
}

.admin-screen-body .admin-account-menu {
  gap: 10px;
}

.admin-screen-body .admin-account-dropdown > summary {
  min-width: 0;
}

.admin-screen-body .admin-account-dropdown > summary::after {
  content: "▾";
  font-size: 12px;
  margin-left: 8px;
  opacity: 0.8;
}

.admin-screen-body .admin-account-dropdown-menu {
  background: var(--admin-secondary-surface);
  color: var(--admin-secondary-text);
  border: var(--theme-border-width, 1px) var(--theme-border-style, solid) var(--admin-border-secondary);
  border-radius: var(--card-radius, 22px);
  box-shadow: var(--nested-card-shadow, 0 16px 36px rgba(15,23,42,0.18));
  backdrop-filter: none;
}

.admin-screen-body .admin-account-dropdown-menu a {
  padding: 10px 12px;
  border-radius: var(--button-radius, 14px);
  color: inherit;
}

.admin-screen-body .admin-account-dropdown-menu a:hover,
.admin-screen-body .admin-account-dropdown-menu a:focus-visible {
  background: color-mix(in srgb, var(--theme-brand) 84%, white 16%);
  color: var(--admin-secondary-text);
}

.admin-screen-body .admin-panel-card,
.admin-screen-body #theme-studio-card,
.admin-screen-body .theme-studio-card,
.admin-screen-body .admin-page-settings.admin-focus-themes .admin-panel-card {
  background: var(--admin-primary-surface) !important;
  color: var(--admin-primary-text);
  border: var(--theme-border-width, 1px) var(--theme-border-style, solid) var(--admin-border-primary) !important;
  border-radius: var(--card-radius, 22px);
  box-shadow: var(--admin-shell-shadow);
  backdrop-filter: none;
}

.admin-screen-body .admin-panel-card .card-heading h2,
.admin-screen-body #theme-studio-card .card-heading h2,
.admin-screen-body .theme-studio-card .card-heading h2,
.admin-screen-body .admin-panel-card > h1,
.admin-screen-body .admin-panel-card > h2,
.admin-screen-body .admin-panel-card > h3 {
  color: var(--admin-primary-text);
}
.admin-screen-body .admin-combined-panel {
  display: grid;
  gap: 24px;
}

.admin-screen-body .admin-combined-stack {
  display: grid;
  gap: 24px;
}

.admin-screen-body .admin-combined-grid.two-up {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.admin-screen-body .admin-combined-section {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.admin-screen-body .product-workspace-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.admin-screen-body .product-workspace-form .form-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.admin-screen-body .product-workspace-form .span-2 {
  grid-column: 1 / -1;
}

.admin-screen-body .product-workspace-form .form-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.admin-screen-body .product-workspace-form .form-actions-row .button {
  min-width: 200px;
}

.admin-screen-body .compact-picker {
  max-height: 520px;
  overflow: auto;
  align-content: start;
}

.admin-screen-body .admin-combined-section .card-heading {
  margin-bottom: 0;
}

.admin-screen-body .admin-combined-section .card-heading h3 {
  margin: 0;
  color: var(--admin-primary-text);
  font-size: 1.05rem;
}

.admin-screen-body .admin-combined-section .card-heading span {
  color: var(--admin-muted-primary);
}

.admin-screen-body .admin-section-divider {
  height: 1px;
  width: 100%;
  background: color-mix(in srgb, var(--admin-border-primary) 82%, transparent 18%);
}


.admin-screen-body .admin-panel-card .card-heading span,
.admin-screen-body .admin-panel-card > p,
.admin-screen-body .admin-panel-card > .eyebrow,
.admin-screen-body #theme-studio-card .card-heading span,
.admin-screen-body .theme-studio-card .card-heading span,
.admin-screen-body #theme-studio-card p,
.admin-screen-body .theme-studio-card p,
.admin-screen-body #theme-studio-card label,
.admin-screen-body .theme-studio-card label,
.admin-screen-body #theme-studio-card small,
.admin-screen-body .theme-studio-card small,
.admin-screen-body #theme-studio-card span,
.admin-screen-body .theme-studio-card span {
  color: var(--admin-muted-primary);
}

.admin-screen-body .admin-panel-card :is(.theme-editor-card, .theme-preview-card, .mini-stat-card, .stat-box, .list-row, .admin-person-card, .selectable-card, .theme-preview-box, .edit-preview, .admin-note-box),
.admin-screen-body #theme-studio-card :is(.theme-editor-card, .theme-preview-card, .mini-stat-card, .stat-box, .list-row, .admin-person-card, .selectable-card, .theme-preview-box, .edit-preview, .admin-note-box),
.admin-screen-body .theme-studio-card :is(.theme-editor-card, .theme-preview-card, .mini-stat-card, .stat-box, .list-row, .admin-person-card, .selectable-card, .theme-preview-box, .edit-preview, .admin-note-box) {
  background: var(--admin-secondary-surface) !important;
  color: var(--admin-secondary-text);
  border: var(--theme-border-width, 1px) var(--theme-border-style, solid) var(--admin-border-secondary) !important;
  border-radius: var(--card-radius, 22px);
  box-shadow: var(--nested-card-shadow, 0 16px 36px rgba(15,23,42,0.18));
}

.admin-screen-body .theme-preview-surface {
  border-radius: clamp(10px, calc(var(--card-radius, 22px) - 8px), 999px);
  border: var(--theme-border-width, 1px) var(--theme-border-style, solid) var(--admin-border-secondary) !important;
  box-shadow: var(--nested-card-shadow, 0 16px 36px rgba(15,23,42,0.18));
  overflow: hidden;
}

.admin-screen-body .theme-preview-overlay {
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  border-radius: inherit;
}

.admin-screen-body .admin-panel-card :is(.theme-editor-card, .theme-preview-card, .mini-stat-card, .stat-box, .list-row, .admin-person-card, .selectable-card, .theme-preview-box, .theme-preview-surface, .theme-preview-overlay, .edit-preview, .admin-note-box) :is(h1, h2, h3, h4, strong, label, legend, .price),
.admin-screen-body #theme-studio-card :is(.theme-editor-card, .theme-preview-card, .mini-stat-card, .stat-box, .list-row, .admin-person-card, .selectable-card, .theme-preview-box, .theme-preview-surface, .theme-preview-overlay, .edit-preview, .admin-note-box) :is(h1, h2, h3, h4, strong, label, legend, .price),
.admin-screen-body .theme-studio-card :is(.theme-editor-card, .theme-preview-card, .mini-stat-card, .stat-box, .list-row, .admin-person-card, .selectable-card, .theme-preview-box, .theme-preview-surface, .theme-preview-overlay, .edit-preview, .admin-note-box) :is(h1, h2, h3, h4, strong, label, legend, .price) {
  color: var(--admin-secondary-text);
}

.admin-screen-body .admin-panel-card :is(.theme-editor-card, .theme-preview-card, .mini-stat-card, .stat-box, .list-row, .admin-person-card, .selectable-card, .theme-preview-box, .theme-preview-surface, .theme-preview-overlay, .edit-preview, .admin-note-box) :is(p, small, span),
.admin-screen-body #theme-studio-card :is(.theme-editor-card, .theme-preview-card, .mini-stat-card, .stat-box, .list-row, .admin-person-card, .selectable-card, .theme-preview-box, .theme-preview-surface, .theme-preview-overlay, .edit-preview, .admin-note-box) :is(p, small, span),
.admin-screen-body .theme-studio-card :is(.theme-editor-card, .theme-preview-card, .mini-stat-card, .stat-box, .list-row, .admin-person-card, .selectable-card, .theme-preview-box, .theme-preview-surface, .theme-preview-overlay, .edit-preview, .admin-note-box) :is(p, small, span) {
  color: var(--admin-muted-secondary);
}

.admin-screen-body .theme-preview-overlay {
  justify-content: flex-end;
}

.admin-screen-body .button,
.admin-screen-body button,
.admin-screen-body .admin-tab-btn {
  box-shadow: var(--admin-button-shadow);
}

.admin-screen-body .button:hover,
.admin-screen-body button:hover,
.admin-screen-body .admin-tab-btn:hover,
.admin-screen-body .button:focus-visible,
.admin-screen-body button:focus-visible,
.admin-screen-body .admin-tab-btn:focus-visible {
  box-shadow: var(--admin-button-shadow-hover);
}

.admin-screen-body .alert-toast {
  top: 96px;
}

@media (max-width: 720px) {
  .admin-screen-body .admin-account-menu {
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }
}


/* Image fit pass: keep uploaded images inside their frames site-wide */
img {
  max-width: 100%;
  height: auto;
}

.thumb-wrap {
  display: grid;
  place-items: center;
  padding: 14px;
  overflow: hidden;
}

.thumb,
.storefront-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.product-card:hover .thumb,
.product-card:focus-within .thumb {
  transform: scale(1.02);
}

.product-image,
.edit-preview,
.brand-preview-large {
  display: block;
  width: 100%;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
}

.product-image {
  max-width: 520px;
  height: clamp(260px, 48vw, 520px);
  margin-inline: auto;
}

.edit-preview {
  width: min(100%, 220px);
  height: 160px;
}

.brand-preview-large {
  width: min(100%, 320px);
  max-width: 320px;
  height: 140px;
}

.brand-logo,
.site-logo {
  object-fit: contain;
  object-position: center left;
}


.admin-category-select-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-category-select-row select {
  flex: 1 1 auto;
  min-width: 0;
}
.admin-inline-action {
  margin-top: 0;
  flex: 0 0 auto;
}
.admin-helper-text {
  margin: 8px 0 0;
}
@media (max-width: 720px) {
  .admin-category-select-row {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-inline-action {
    width: 100%;
  }
}


@media (max-width: 980px) {
  .admin-screen-body .admin-combined-grid.two-up,
  .admin-screen-body .product-workspace-form {
    grid-template-columns: 1fr;
  }

  .admin-screen-body .product-workspace-form .span-2 {
    grid-column: auto;
  }
}

.admin-screen-body .card-heading-spread {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-screen-body .admin-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-screen-body .table-featured-cell {
  white-space: nowrap;
}

.admin-screen-body .table-featured-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--admin-primary-text);
}

.admin-screen-body .table-featured-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--button-bg);
}

.admin-screen-body .table-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-screen-body .table-action-row form {
  margin: 0;
}

.admin-screen-body .admin-pagination {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-screen-body .admin-pagination-pages {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-screen-body .admin-pagination-link {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: clamp(12px, calc(var(--button-radius, 18px) - 2px), 999px);
  border: var(--theme-border-width, 1px) var(--theme-border-style, solid) var(--admin-border-secondary);
  background: var(--button-bg);
  color: var(--button-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--button-shadow, 0 8px 24px rgba(15,23,42,0.16));
}

.admin-screen-body .admin-pagination-link.is-active {
  outline: 2px solid color-mix(in srgb, var(--button-bg) 55%, white 45%);
  outline-offset: 2px;
}

body.admin-modal-open {
  overflow: hidden;
}

.admin-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1400;
}

.admin-modal[hidden] {
  display: none !important;
}

.admin-modal.is-open {
  display: flex;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
}

.admin-modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(88vh, 980px);
  overflow: auto;
  padding: 22px;
}

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

.admin-modal-header h3 {
  margin: 0;
  color: var(--admin-primary-text);
}

.admin-modal-close {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
}

.admin-screen-body .admin-modal-form {
  margin-top: 0;
}

.admin-screen-body .admin-modal-preview {
  margin-top: 10px;
  width: min(100%, 220px);
  min-height: 140px;
  display: grid;
  place-items: center;
  padding: 12px;
  background: var(--admin-secondary-surface);
  border: var(--theme-border-width, 1px) var(--theme-border-style, solid) var(--admin-border-secondary);
  border-radius: clamp(12px, calc(var(--card-radius, 22px) - 8px), 999px);
  box-shadow: var(--nested-card-shadow, 0 16px 36px rgba(15,23,42,0.18));
}

.admin-screen-body .admin-modal-preview img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: contain;
}

.admin-screen-body .modal-actions-row {
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 720px) {
  .admin-modal {
    padding: 14px;
  }

  .admin-modal-card {
    padding: 18px;
    width: 100%;
  }

  .admin-screen-body .admin-pagination {
    justify-content: center;
  }

  .admin-screen-body .admin-toolbar-actions,
  .admin-screen-body .modal-actions-row,
  .admin-screen-body .table-action-row {
    width: 100%;
  }

  .admin-screen-body .admin-toolbar-actions .button,
  .admin-screen-body .modal-actions-row .button,
  .admin-screen-body .table-action-row .button {
    width: 100%;
  }
}


.admin-screen-body .community-section-grid {
  gap: 16px;
}

.admin-screen-body .community-section-setting {
  display: grid;
  gap: 8px;
}

.admin-screen-body .community-section-setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-screen-body .community-section-setting-row input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-screen-body .checkbox-row.community-reply-toggle {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.admin-screen-body .checkbox-row.community-reply-toggle input {
  margin: 0;
}

@media (max-width: 720px) {
  .admin-screen-body .community-section-setting-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-screen-body .checkbox-row.community-reply-toggle {
    justify-content: flex-start;
  }
}



.public-screen-body .site-header .brand,
.public-screen-body .site-header .nav a,
.admin-screen-body .site-header .brand,
.admin-screen-body .site-header .nav a {
  color: inherit;
}

.public-screen-body .site-header .brand,
.admin-screen-body .site-header .brand {
  color: var(--text-main);
}

.admin-screen-body .theme-panel-title,
.admin-screen-body .theme-form-panel label,
.admin-screen-body .theme-editor-shell label,
.admin-screen-body .theme-preview-box-title {
  color: var(--text-main);
}

.admin-screen-body .theme-inline-help,
.admin-screen-body .theme-lock-note,
.admin-screen-body .theme-navbar-note,
.admin-screen-body .theme-preview-meta,
.admin-screen-body .theme-color-value {
  color: var(--text-soft);
}

.public-screen-body .price,
.public-screen-body .eyebrow,
.public-screen-body .storefront-category,
.admin-screen-body .price,
.admin-screen-body .eyebrow,
.admin-screen-body .storefront-category {
  color: var(--text-main);
}

/* Licensing dashboard */
.licensing-stack{
  gap:1.5rem;
}
.licensing-top-grid,
.licensing-mid-grid{
  align-items:start;
}
.licensing-note-card,
.licensing-note-card h2,
.licensing-note-card li{
  color:var(--text-main);
}
.licensing-inline-note{
  color:var(--text-soft);
}
.licensing-db-form,
.licensing-create-form{
  gap:1rem 1rem;
}
.licensing-endpoint-list{
  display:grid;
  gap:1rem;
  margin-bottom:1rem;
}
.licensing-endpoint-card{
  background:var(--dynamic-inner-card-background, var(--card-bg));
  border:var(--theme-border-width,1px) var(--theme-border-style,solid) var(--theme-border-color, rgba(15,23,42,.14));
  border-radius:var(--card-radius, 18px);
  padding:1rem;
  box-shadow:var(--nested-card-shadow, 0 12px 26px rgba(15,23,42,.12));
}
.licensing-endpoint-card strong,
.licensing-endpoint-card code,
.licensing-product-title,
.license-key-code{
  color:var(--text-main);
}
.licensing-endpoint-card code,
.license-key-code{
  display:block;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:.9rem;
  overflow-wrap:anywhere;
}
.licensing-product-row-form{
  display:grid;
  grid-template-columns:minmax(140px,1.4fr) 96px 94px 110px 100px 110px 110px 120px;
  gap:.75rem;
  align-items:center;
}
.licensing-product-row-form input[type="text"],
.licensing-product-row-form input[type="number"],
.licensing-product-row-form select{
  width:100%;
}
.checkbox-row.compact{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  margin:0;
  white-space:nowrap;
}
.licensing-filter-form{
  display:flex;
  align-items:center;
  gap:.75rem;
}
.licensing-filter-form label,
.licensing-filter-form select,
.licensing-inline-form select,
.licensing-inline-form button,
.licensing-log-row,
.licensing-mini-list .list-row,
.licensing-license-table td,
.licensing-license-table th,
.licensing-table td,
.licensing-table th{
  color:var(--text-main);
}
.licensing-inline-form{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  align-items:center;
}
.licensing-actions-cell{
  justify-content:flex-start;
}
.licensing-log-list{
  max-height:420px;
  overflow:auto;
}
.licensing-log-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}
@media (max-width: 1080px){
  .licensing-product-row-form{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px){
  .licensing-product-row-form,
  .licensing-filter-form,
  .licensing-inline-form{
    grid-template-columns:1fr;
    flex-direction:column;
    align-items:stretch;
  }
  .licensing-filter-form,
  .licensing-inline-form{
    display:flex;
  }
}

/* Licensing dashboard refinements */
.licensing-top-grid{
  display:block;
}
.licensing-card-actions{
  display:flex;
  align-items:center;
  gap:.75rem;
  flex-wrap:wrap;
}
.licensing-subcard-header h3{
  margin:0;
  font-size:1rem;
  color:var(--text-main);
}
.licensing-db-subcard{
  margin-top:1.25rem;
}
.licensing-db-summary-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:.85rem;
  margin-bottom:1rem;
}
.licensing-db-summary-grid div{
  display:grid;
  gap:.2rem;
}
.licensing-db-summary-grid strong,
.licensing-db-summary-grid span,
.licensing-log-table td,
.licensing-log-table th{
  color:var(--text-main);
}
.licensing-log-header{
  gap:1rem;
}
.licensing-log-filter-form input[type="date"]{
  min-width:160px;
}
.licensing-log-filter-form .button,
.licensing-card-actions .button{
  white-space:nowrap;
}
.licensing-log-table code{
  white-space:normal;
}
@media (max-width: 980px){
  .licensing-db-summary-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px){
  .licensing-card-actions,
  .licensing-log-filter-form{
    width:100%;
  }
  .licensing-log-filter-form{
    justify-content:flex-start;
  }
  .licensing-db-summary-grid{
    grid-template-columns:1fr;
  }
}

.link-button {
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font: inherit;
}
