/* Shared storefront/admin shell; page-specific content stays scoped below. */
:is(.storefront, .admin-page) {
  background: #f7f7f5;
  min-height: 100vh;
}
:is(.storefront, .admin-page) #app {
  /* Keep the navigation's top margin inside the shared page background. */
  display: flow-root;
}
:is(.storefront, .admin-page) .topbar {
  max-width: 1400px;
  margin: 24px auto 0;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  gap: 42px;
  padding: 0 26px;
}
:is(.storefront, .admin-page) .topbar nav {
  gap: 28px;
}
:is(.storefront, .admin-page) .top-actions {
  gap: 10px;
}
:is(.storefront, .admin-page) .workspace {
  max-width: 1400px;
  margin: 26px auto 0;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  min-height: calc(100vh - 122px);
}
:is(.storefront, .admin-page) .sidebar {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 0;
  min-width: 0;
  position: sticky;
  top: 24px;
}
.sidebar-heading {
  padding-bottom: 16px;
}
:is(.storefront, .admin-page) .sidebar-heading {
  padding: 27px 24px;
  border-bottom: 1px solid var(--line);
}
:is(.storefront, .admin-page) .sidebar-heading .eyebrow {
  margin-bottom: 12px;
}
:is(.storefront, .admin-page) .sidebar-heading h2 {
  font-size: 23px;
  margin: 0;
  letter-spacing: -0.5px;
}
:is(.storefront, .admin-page) .category-links {
  padding: 16px 14px;
}
:is(.storefront, .admin-page) .category {
  padding: 12px;
  min-height: 48px;
  margin-bottom: 4px;
  border-radius: 6px;
}
:is(.storefront, .admin-page) .category:last-child {
  margin-bottom: 0;
}
:is(.storefront, .admin-page) .category.selected {
  background: #f0f0ed;
  color: var(--ink);
}
.storefront .side-bottom {
  display: none;
}
.admin-page .sidebar {
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}
.admin-page .category .notification-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-left: 10px;
  border-radius: 50%;
  background: #d92d20;
}
.admin-page .category .notification-dot[hidden] {
  display: none;
}
.admin-page .sidebar-heading,
.admin-page .side-bottom {
  flex-shrink: 0;
}
.admin-page .side-bottom {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--line);
}
.admin-page .breadcrumb {
  display: none;
}
.admin-page #page {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 24px 20px;
  min-width: 0;
}
.admin-page #page > .heading {
  margin: 0 -24px 24px;
  padding: 27px 24px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.admin-page #page > .heading .muted {
  margin-bottom: 0;
}
.admin-page h1 {
  font-size: 25px;
}
.admin-page .scroll-table {
  overflow-x: auto;
}
.admin-page .admin-orders-table {
  min-width: 1000px;
}
.admin-page .finance-back {
  margin-top: 24px;
}
.admin-page .finance-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 1350px) {
  .admin-page .finance-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
:is(.storefront, .admin-page) main {
  padding: 0;
  width: 100%;
  min-width: 0;
  margin: 0;
  max-width: none;
  min-height: 0;
}
.catalog-page .breadcrumb {
  display: none;
}
.catalog-page #page {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 24px 20px;
  overflow: hidden;
}
.catalog-page .heading {
  margin: 0 -24px 22px;
  padding: 27px 24px;
  min-height: 116px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  gap: 20px;
}
.catalog-page .heading .eyebrow {
  margin: 0 0 12px;
}
.catalog-page h1 {
  font-size: 25px;
}
.catalog-page .search {
  width: 290px;
  max-width: 45%;
  margin: 0;
  padding: 6px 6px 6px 12px;
  gap: 8px;
  background: #fff;
}
.search-submit {
  border: 0;
  border-radius: 4px;
  background: #292927;
  color: white;
  min-width: 34px;
  min-height: 34px;
}
.catalog-page .notice {
  font-size: 12px;
  padding: 10px 12px;
  margin-bottom: 18px;
}
.catalog-page .catalog {
  table-layout: auto;
}
.catalog-page .catalog th {
  padding: 14px;
  background: #f7f7f5;
}
.catalog-page .catalog td {
  padding: 24px 14px;
}
.catalog-page .catalog th:first-child {
  width: auto;
}
.catalog-page .catalog th:not(:first-child),
.catalog-page .catalog td:not(:first-child) {
  white-space: nowrap;
}
.catalog-page .catalog td:first-child {
  width: 100%;
}
.catalog-page .product-name {
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.catalog-page .product-cell {
  gap: 14px;
}
.catalog-page .price {
  font-size: 18px;
}
.catalog-page .current-price-column .price {
  display: block;
}
.catalog-page .catalog-saving {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.catalog-member-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.catalog-member-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.catalog-member-link .ph-icon {
  width: 13px;
  height: 13px;
}
.catalog-page .stock,
.catalog-page .sales-column {
  font-size: 13px;
  color: var(--muted);
}
.catalog-page .sales-column {
  text-align: center;
}
.catalog-page .stock.available {
  color: #4b8063;
}
.catalog-page .table-foot {
  padding: 14px;
  font-size: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.catalog-page .flow {
  margin: 24px 0 0;
  font-size: 12px;
}
:is(.storefront, .admin-page) footer {
  margin-top: 24px;
  padding: 20px 0;
  font-size: 11px;
}
.content-page .workspace {
  display: block;
  max-width: 1120px;
}
.content-page .breadcrumb {
  padding: 0 2px;
}
.content-page .product-detail {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  margin-bottom: 24px;
}
.content-page .product-art {
  position: sticky;
  top: 24px;
}
.content-page .purchase-panel {
  min-width: 0;
}
.content-page .purchase-panel h1 {
  font-size: 25px;
}
.content-page .product-copy {
  background: white;
  border-radius: 10px;
}
.content-page .purchase-panel .button.blue {
  background: var(--ink);
  border-color: var(--ink);
}
.content-page .variant-option input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.content-page .boxed,
.content-page .lookup-card {
  background: white;
}
.auth-page {
  background: #fff;
  min-height: 100vh;
}
.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 40px;
}
.auth-page main {
  display: block;
  padding: 0 24px;
  min-height: 0;
  max-width: none;
}
.auth-page .auth-wrap {
  max-width: 380px;
  margin: 60px auto 64px;
}
.auth-page .auth-mark {
  border-color: var(--line);
  color: var(--ink);
  border-radius: 8px;
}
.auth-page .auth-wrap h1 {
  letter-spacing: -0.8px;
}
.auth-page .auth-wrap .muted {
  line-height: 1.8;
}
.auth-page .auth-switch {
  color: var(--muted);
}
@media (max-width: 1450px) {
  :is(.storefront, .admin-page) .topbar,
  :is(.storefront, .admin-page) .workspace {
    margin-left: 24px;
    margin-right: 24px;
  }
  .content-page .workspace {
    margin-left: auto;
    margin-right: auto;
    width: calc(100% - 48px);
  }
}
@media (max-width: 1100px) {
  :is(.storefront, .admin-page) .workspace {
    grid-template-columns: 225px minmax(0, 1fr);
    gap: 18px;
  }
  :is(.storefront, .admin-page) .topbar {
    gap: 26px;
  }
  :is(.storefront, .admin-page) .topbar nav {
    gap: 18px;
  }
  .catalog-page .catalog td,
  .catalog-page .catalog th {
    padding: 18px 10px;
  }
  .catalog-page #page {
    padding-left: 18px;
    padding-right: 18px;
  }
  .catalog-page .heading {
    margin-left: -18px;
    margin-right: -18px;
    padding: 27px 18px;
  }
}
@media (max-width: 800px) {
  :is(.storefront, .admin-page) .topbar {
    margin: 12px 12px 0;
    padding: 14px 16px 0;
    height: auto;
    gap: 12px;
  }
  :is(.storefront, .admin-page) .topbar nav {
    gap: 24px;
    height: 44px;
    overflow-x: auto;
  }
  :is(.storefront, .admin-page) .topbar nav a {
    flex-shrink: 0;
  }
  :is(.storefront, .admin-page) .top-actions {
    gap: 6px;
  }
  :is(.storefront, .admin-page) .top-actions select {
    max-width: 90px;
    padding: 6px 2px;
  }
  :is(.storefront, .admin-page) .top-actions .button {
    padding: 7px 10px;
    font-size: 12px;
    min-height: 36px;
  }
  :is(.storefront, .admin-page) .workspace {
    display: block;
    margin: 16px 12px 0;
    min-height: 0;
  }
  :is(.storefront, .admin-page) .sidebar {
    display: block;
    position: static;
    margin-bottom: 16px;
    overflow: hidden;
    max-height: none;
  }
  :is(.storefront, .admin-page) .sidebar-heading {
    display: none;
  }
  :is(.storefront, .admin-page) .category-links {
    display: flex;
    overflow-x: auto;
    padding: 10px;
    gap: 6px;
  }
  :is(.storefront, .admin-page) .category {
    flex: 0 0 auto;
    margin: 0;
    min-height: 42px;
    padding: 8px 12px;
    gap: 14px;
  }
  .catalog-page #page {
    padding: 0 16px 18px;
  }
  .admin-page #page {
    padding: 0 16px 18px;
  }
  .admin-page #page > .heading {
    margin: 0 -16px 22px;
    padding: 22px 16px;
  }
  .admin-page h1 {
    font-size: 22px;
  }
  .catalog-page .heading {
    display: flex;
    margin: 0 -16px 18px;
    padding: 22px 16px;
  }
  .catalog-page h1 {
    font-size: 22px;
  }
  .catalog-page .search {
    max-width: 48%;
  }
  .catalog-page .catalog .stock-column {
    display: table-cell;
  }
  .content-page .workspace {
    width: auto;
  }
  .content-page .product-detail {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 24px;
  }
  .content-page .product-art {
    position: static;
    aspect-ratio: 1.4;
  }
  :is(.storefront, .admin-page) footer {
    margin-top: 12px;
  }
  .auth-header {
    padding: 24px;
  }
  .auth-page .auth-wrap {
    margin-top: 30px;
  }
}
@media (max-width: 580px) {
  .catalog-page .heading {
    display: block;
  }
  .catalog-page .search {
    width: 100%;
    max-width: none;
    margin-top: 18px;
  }
  .catalog-page .catalog,
  .catalog-page .catalog tbody {
    display: block;
  }
  .catalog-page .catalog thead {
    display: none;
  }
  .catalog-page .catalog tr {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 18px 14px;
    gap: 12px;
    border-bottom: 1px solid var(--line);
  }
  .catalog-page .catalog tr:last-child {
    border-bottom: 0;
  }
  .catalog-page .catalog td {
    display: block;
    border: 0;
    padding: 0;
  }
  .catalog-page .catalog td:first-child {
    grid-column: 1 / -1;
    width: auto;
  }
  .catalog-page .catalog .current-price-column {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
  }
  .catalog-page .current-price-column .price {
    font-size: 20px;
  }
  .catalog-page .catalog td:last-child {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: center;
  }
  .catalog-page .catalog .stock-column {
    display: block;
    grid-column: 1;
    grid-row: 3;
    font-size: 12px;
  }
  .catalog-page .catalog .sales-column {
    display: none;
  }
  .catalog-page .catalog td:last-child .button {
    padding: 8px 14px;
    min-height: 38px;
  }
  .catalog-page .table-foot {
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px;
  }
  .catalog-page .table-foot span {
    display: block;
  }
  .content-page .purchase-panel h1 {
    font-size: 23px;
  }
  .content-page .quantity-line {
    flex-wrap: wrap;
  }
  :is(.storefront, .admin-page) footer {
    flex-wrap: wrap;
    gap: 8px;
  }
}
.verification-field {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.verification-field .field {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.auth-wrap .verification-field .button {
  margin: 0;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 13px;
}
.verification-field + .field-help {
  margin-top: 8px;
}
.order-refresh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 24px;
}
.order-refresh:empty {
  display: none;
}

.order-email-notice {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
