:root {
  --myshop-primary: #0f766e;
  --myshop-primary-dark: #115e59;
  --myshop-ink: #102a43;
  --myshop-muted: #62748e;
  --myshop-surface: #f8fafc;
  --myshop-border: #d9e2ec;
}

body {
  background: var(--myshop-surface);
  color: var(--myshop-ink);
  min-width: 320px;
  padding-bottom: 4.75rem;
}

.skip-link {
  position: absolute;
  z-index: 1080;
  left: 1rem;
  top: 1rem;
  padding: .5rem .75rem;
  background: #fff;
  border: 1px solid var(--myshop-border);
  border-radius: .375rem;
}

.brand-mark {
  align-items: center;
  background: var(--myshop-primary);
  border-radius: .5rem;
  color: #fff;
  display: inline-flex;
  font-size: .9rem;
  font-weight: 700;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.brand-mark-admin {
  background: #fff;
  color: #164e63;
}

.hero-band {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .12), rgba(3, 105, 161, .08)),
    #fff;
  border-bottom: 1px solid var(--myshop-border);
}

.admin-hero {
  background: #e8f5f3;
  border-bottom: 1px solid var(--myshop-border);
}

.admin-navbar {
  background: #164e63;
}

.eyebrow {
  color: var(--myshop-primary-dark);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.btn-primary {
  --bs-btn-bg: var(--myshop-primary);
  --bs-btn-border-color: var(--myshop-primary);
  --bs-btn-hover-bg: var(--myshop-primary-dark);
  --bs-btn-hover-border-color: var(--myshop-primary-dark);
}

.btn-outline-primary {
  --bs-btn-color: var(--myshop-primary-dark);
  --bs-btn-border-color: var(--myshop-primary);
  --bs-btn-hover-bg: var(--myshop-primary);
  --bs-btn-hover-border-color: var(--myshop-primary);
}

.feature-card,
.status-panel,
.error-panel,
.admin-table-shell,
.empty-state {
  background: #fff;
  border: 1px solid var(--myshop-border);
  border-radius: .5rem;
  padding: 1.25rem;
}

.feature-card p,
.error-panel p,
.empty-state p {
  color: var(--myshop-muted);
}

.admin-table-shell {
  padding: 0;
  overflow: hidden;
}

.empty-state {
  border: 0;
  padding: 3rem 1.25rem;
  text-align: center;
}

.admin-form .nav-tabs .nav-link {
  color: var(--myshop-ink);
}

.image-manager-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

.description-image-list {
  display: grid;
  gap: .875rem;
}

.image-manager-item,
.description-image-item {
  border: 1px solid var(--myshop-border);
  border-radius: .5rem;
  overflow: hidden;
  background: #fff;
}

.image-manager-item img,
.description-image-item img,
.rich-editor img {
  display: block;
  height: auto;
  max-width: 100%;
}

.image-manager-item img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

.description-image-item img {
  width: 100%;
}

.image-missing-placeholder {
  align-items: center;
  aspect-ratio: 1;
  background: #f8d7da;
  color: #842029;
  display: flex;
  font-size: .85rem;
  justify-content: center;
  padding: .75rem;
  text-align: center;
  width: 100%;
}

.image-actions {
  display: grid;
  gap: .35rem;
  grid-template-columns: repeat(3, 1fr);
  padding: .5rem;
}

.crop-canvas {
  border: 1px solid var(--myshop-border);
  border-radius: .5rem;
  display: block;
  max-width: 100%;
  width: 100%;
}

.rich-editor-toolbar {
  border: 1px solid var(--myshop-border);
  border-bottom: 0;
  border-radius: .5rem .5rem 0 0;
  padding: .5rem;
  background: #fff;
}

.rich-editor {
  background: #fff;
  border: 1px solid var(--myshop-border);
  border-radius: .5rem;
  min-height: 11rem;
  padding: .75rem;
}

.rich-editor:focus {
  border-color: var(--myshop-primary);
  box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .15);
  outline: 0;
}

.status-grid {
  display: grid;
  gap: .75rem;
}

.status-grid span {
  background: #f1f7f6;
  border-radius: .375rem;
  padding: .75rem;
}

.storefront-bottom-nav {
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid var(--myshop-border);
  bottom: 0;
  left: 0;
  padding: .25rem 0 max(.25rem, env(safe-area-inset-bottom));
  position: fixed;
  right: 0;
  z-index: 1040;
}

.storefront-bottom-nav-inner {
  background: transparent;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  max-width: none;
  padding: 0 .25rem;
  width: 100%;
}

.storefront-bottom-nav-link {
  align-items: center;
  border-radius: .5rem;
  color: var(--myshop-muted);
  display: flex;
  flex-direction: column;
  font-weight: 800;
  gap: 0;
  justify-content: center;
  min-width: 0;
  min-height: 3.25rem;
  padding: .45rem .25rem;
  position: relative;
  text-decoration: none;
}

.storefront-bottom-nav-link:hover,
.storefront-bottom-nav-link.is-active {
  background: #edf7f6;
  color: var(--myshop-primary-dark);
}

.storefront-bottom-nav-icon {
  font-size: 1.45rem;
  line-height: 1;
  position: relative;
}

.storefront-bottom-nav-badge {
  align-items: center;
  background: #dc2626;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  min-height: 1.15rem;
  min-width: 1.15rem;
  padding: 0 .25rem;
  position: absolute;
  right: -.75rem;
  top: -.45rem;
}

.shop-page-header {
  background: #fff;
  border-bottom: 1px solid var(--myshop-border);
}

.product-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-filter {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .25rem;
}

.category-filter-link {
  background: #fff;
  border: 1px solid var(--myshop-border);
  border-radius: 999px;
  color: var(--myshop-ink);
  flex: 0 0 auto;
  font-size: .9rem;
  font-weight: 700;
  padding: .45rem .8rem;
  text-decoration: none;
}

.category-filter-link.is-active,
.category-filter-link:hover {
  background: var(--myshop-primary);
  border-color: var(--myshop-primary);
  color: #fff;
}

.product-card {
  background: #fff;
  border: 1px solid var(--myshop-border);
  border-radius: .5rem;
  overflow: hidden;
}

.product-card-media {
  align-items: center;
  aspect-ratio: 1;
  background: #eef6f5;
  color: var(--myshop-muted);
  display: flex;
  justify-content: center;
  text-decoration: none;
}

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

.product-card-body {
  padding: .75rem;
}

.product-card-body a {
  color: var(--myshop-ink);
  text-decoration: none;
}

.product-card-body a:hover {
  color: var(--myshop-primary-dark);
}

.product-category {
  color: var(--myshop-primary-dark);
  font-size: .72rem;
  font-weight: 800;
}

.product-price {
  color: var(--myshop-primary-dark);
  font-weight: 800;
}

.product-price-lg {
  font-size: 1.65rem;
}

.product-price-old {
  color: var(--myshop-muted);
  font-size: .9rem;
  margin-left: .35rem;
  text-decoration: line-through;
}

.stock-pill {
  background: #edf7f6;
  border: 1px solid #c6e4df;
  border-radius: 999px;
  color: var(--myshop-primary-dark);
  font-size: .78rem;
  font-weight: 700;
  padding: .25rem .55rem;
  white-space: nowrap;
}

.product-card .stock-pill {
  font-size: .72rem;
  padding: .2rem .45rem;
}

.product-card .product-price-old {
  display: block;
  margin-left: 0;
}

.variant-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.variant-chip {
  background: #f8fafc;
  border: 1px solid var(--myshop-border);
  border-radius: 999px;
  color: var(--myshop-muted);
  font-size: .72rem;
  font-weight: 700;
  max-width: 100%;
  padding: .2rem .45rem;
}

.cart-stepper {
  align-items: center;
  display: grid;
  gap: .35rem;
  grid-template-columns: 2.25rem minmax(2rem, 1fr) 2.25rem;
}

.cart-stepper-button,
.cart-stepper-count {
  align-items: center;
  border-radius: .375rem;
  display: inline-flex;
  height: 2.25rem;
  justify-content: center;
}

.cart-stepper-button {
  background: #fff;
  border: 1px solid var(--myshop-primary);
  color: var(--myshop-primary-dark);
  font-weight: 800;
}

.cart-stepper-button:disabled {
  border-color: var(--myshop-border);
  color: var(--myshop-muted);
  cursor: not-allowed;
  opacity: .65;
}

.cart-stepper-count {
  background: #edf7f6;
  border: 1px solid #c6e4df;
  color: var(--myshop-primary-dark);
  font-weight: 800;
  min-width: 0;
}

.cart-summary-grid {
  min-width: min(100%, 26rem);
}

.cart-page-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.cart-item-list {
  display: grid;
  gap: .75rem;
}

.cart-page-item,
.cart-page-summary {
  background: #fff;
  border: 1px solid var(--myshop-border);
  border-radius: .5rem;
}

.cart-page-item {
  display: grid;
  gap: .75rem;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  padding: .75rem;
  padding-right: 3.25rem;
  position: relative;
}

.cart-page-item-media {
  align-items: center;
  aspect-ratio: 1;
  background: #eef6f5;
  border-radius: .375rem;
  color: var(--myshop-muted);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.cart-page-item-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.cart-page-item a {
  color: var(--myshop-ink);
  text-decoration: none;
}

.cart-page-item-body {
  min-width: 0;
}

.cart-line-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.cart-line-stepper {
  max-width: 9rem;
  min-width: 8.25rem;
}

.cart-remove-form {
  position: absolute;
  right: .65rem;
  top: .65rem;
}

.cart-remove-button {
  align-items: center;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 999px;
  color: #b91c1c;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 700;
  height: 2.25rem;
  justify-content: center;
  padding: 0;
  width: 2.25rem;
}

.cart-remove-button:hover,
.cart-remove-button:focus-visible {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.cart-select-control {
  align-items: center;
  display: inline-flex;
  height: 2.25rem;
  justify-content: center;
  position: absolute;
  right: .65rem;
  top: 3.15rem;
  width: 2.25rem;
}

.cart-select-checkbox {
  accent-color: var(--myshop-primary);
  height: 1.15rem;
  width: 1.15rem;
}

.cart-page-summary {
  padding: 1rem;
}

.checkout-flow-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.checkout-panel,
.checkout-complete-panel {
  background: #fff;
  border: 1px solid var(--myshop-border);
  border-radius: .5rem;
  padding: 1rem;
}

.checkout-item-list {
  display: grid;
  gap: .75rem;
}

.checkout-item-row {
  align-items: center;
  border-bottom: 1px solid var(--myshop-border);
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: .75rem;
}

.checkout-item-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.checkout-address-box {
  background: #f8fafc;
  border: 1px solid var(--myshop-border);
  border-radius: .5rem;
  padding: .85rem;
}

.address-suggestion-list {
  background: #fff;
  border: 1px solid var(--myshop-border);
  border-radius: .5rem;
  box-shadow: 0 .75rem 1.75rem rgba(16, 42, 67, .14);
  display: grid;
  gap: .25rem;
  margin-top: .35rem;
  max-height: 16rem;
  overflow-y: auto;
  padding: .35rem;
  position: absolute;
  width: min(100% - 1.5rem, 44rem);
  z-index: 1060;
}

.address-suggestion-list[hidden] {
  display: none;
}

.address-suggestion-item {
  background: #fff;
  border: 0;
  border-radius: .375rem;
  color: var(--myshop-ink);
  display: grid;
  gap: .15rem;
  padding: .55rem .65rem;
  text-align: left;
  width: 100%;
}

.address-suggestion-item:hover,
.address-suggestion-item.is-active {
  background: #edf7f6;
}

.address-suggestion-empty {
  color: var(--myshop-muted);
  cursor: default;
}

.address-suggestion-title {
  font-weight: 800;
}

.address-suggestion-meta {
  color: var(--myshop-muted);
  font-size: .85rem;
  overflow-wrap: anywhere;
}

.checkout-complete-panel {
  margin: 0 auto;
  max-width: 42rem;
  text-align: center;
}

.checkout-complete-icon {
  align-items: center;
  background: #dcfce7;
  border-radius: 999px;
  color: #166534;
  display: inline-flex;
  font-size: 2rem;
  height: 4rem;
  justify-content: center;
  margin-bottom: 1rem;
  width: 4rem;
}

@media (min-width: 992px) {
  .checkout-flow-layout {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
  }

  .checkout-summary-panel {
    align-self: start;
    position: sticky;
    top: 5rem;
  }
}

.auth-shell {
  display: flex;
  justify-content: center;
}

.auth-panel {
  background: #fff;
  border: 1px solid var(--myshop-border);
  border-radius: .5rem;
  max-width: 34rem;
  padding: 1.25rem;
  width: 100%;
}

.auth-panel-wide {
  max-width: 48rem;
}

.customer-search-form {
  display: grid;
  gap: .5rem;
  grid-template-columns: minmax(12rem, 1fr) auto;
  width: min(100%, 32rem);
}

.customer-info-panel {
  background: #fff;
  border: 1px solid var(--myshop-border);
  border-radius: .5rem;
  padding: 1rem;
}

.customer-summary-grid {
  min-width: min(100%, 28rem);
}

.customer-definition-list {
  display: grid;
  gap: .25rem .75rem;
  grid-template-columns: minmax(6rem, auto) 1fr;
  margin-bottom: 0;
}

.customer-definition-list dt {
  color: var(--myshop-muted);
  font-weight: 700;
}

.customer-definition-list dd {
  margin-bottom: .5rem;
}

.customer-address {
  border: 1px solid var(--myshop-border);
  border-radius: .375rem;
  padding: .75rem;
}

.customer-order-summary {
  align-items: center;
  display: grid;
  gap: .5rem;
  grid-template-columns: 1fr auto auto auto;
  width: 100%;
}

.order-history-entry {
  background: #f8fafc;
  border: 1px solid var(--myshop-border);
  border-radius: .375rem;
  padding: .75rem;
}

@media (max-width: 575.98px) {
  .customer-search-form,
  .customer-order-summary,
  .cart-page-layout {
    grid-template-columns: 1fr;
  }

  .cart-page-item {
    grid-template-columns: 4.5rem minmax(0, 1fr);
  }
}

.product-detail-media,
.product-buy-panel,
.product-description {
  background: #fff;
  border: 1px solid var(--myshop-border);
  border-radius: .5rem;
  overflow: hidden;
}

.product-detail-media img,
.product-detail-placeholder {
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  width: 100%;
}

.product-detail-placeholder {
  align-items: center;
  background: #eef6f5;
  color: var(--myshop-muted);
  display: flex;
  justify-content: center;
}

.product-thumbs {
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
}

.product-thumb {
  aspect-ratio: 1;
  background: #fff;
  border: 2px solid transparent;
  border-radius: .375rem;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

.product-thumb.is-active {
  border-color: var(--myshop-primary);
}

.product-thumb:focus-visible {
  outline: .2rem solid rgba(15, 118, 110, .25);
  outline-offset: .15rem;
}

.product-thumb img {
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  width: 100%;
}

.product-buy-panel,
.product-description {
  padding: 1rem;
}

.product-variant-list {
  display: grid;
  gap: .75rem;
}

.product-variant-row {
  border: 1px solid var(--myshop-border);
  border-radius: .5rem;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(0, 1fr) minmax(9.25rem, 12rem);
  padding: .75rem;
}

.product-variant-meta,
.product-variant-action {
  min-width: 0;
}

.product-description-text {
  color: var(--myshop-ink);
  margin-bottom: 1rem;
}

.product-description-images {
  display: grid;
  gap: .75rem;
}

.product-description-images img {
  border-radius: .375rem;
  display: block;
  height: auto;
  width: 100%;
}

@media (max-width: 575.98px) {
  .btn-lg {
    width: 100%;
  }

  .product-variant-row {
    grid-template-columns: 1fr;
  }

  .product-variant-action .text-end {
    text-align: left !important;
  }
}

.thermal-print-shell {
  background: #f3f4f6;
  color: #111827;
  font-family: Arial, sans-serif;
  margin: 0;
}

.thermal-print-shell main {
  margin: 0 auto;
  width: 54mm;
}

.thermal-print-content {
  margin: 0 auto;
  width: 54mm;
}

.print-toolbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--myshop-border);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  padding: .75rem;
  position: sticky;
  top: 0;
  z-index: 2;
}

.print-toolbar-actions {
  display: flex;
  gap: .75rem;
}

.print-toolbar-link,
.print-toolbar-button {
  background: #fff;
  border: 1px solid var(--myshop-primary);
  border-radius: .375rem;
  color: var(--myshop-primary);
  cursor: pointer;
  font: inherit;
  padding: .45rem .75rem;
  text-decoration: none;
}

.print-toolbar-button {
  background: var(--myshop-primary);
  color: #fff;
}

.print-toolbar-hint {
  color: #4b5563;
  flex: 0 0 100%;
  font-size: .85rem;
  margin: 0;
  text-align: center;
}

.thermal-ticket {
  background: #fff;
  box-sizing: border-box;
  color: #000;
  font-size: 11px;
  line-height: 1.32;
  margin: 6px auto;
  min-height: 1px;
  padding: 1.5mm;
  width: 54mm;
}

.thermal-ticket + .thermal-ticket {
  margin-top: 2mm;
}

.thermal-ticket-header {
  border-bottom: 1px dashed #000;
  margin-bottom: 2mm;
  padding-bottom: 2mm;
  text-align: center;
}

.thermal-ticket-brand {
  font-size: 13px;
  font-weight: 700;
}

.thermal-ticket h1,
.thermal-ticket h2,
.thermal-ticket p {
  margin: 0;
}

.thermal-ticket h1 {
  font-size: 14px;
  font-weight: 700;
}

.thermal-ticket h2 {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 1mm;
}

.thermal-ticket-section {
  border-bottom: 1px dashed #000;
  margin-bottom: 2mm;
  padding-bottom: 2mm;
}

.thermal-ticket-line,
.thermal-ticket-item,
.thermal-ticket-footer {
  display: grid;
  gap: 1mm;
}

.thermal-ticket-line {
  grid-template-columns: minmax(15mm, auto) 1fr;
}

.thermal-ticket-item,
.thermal-ticket-footer {
  grid-template-columns: 1fr auto;
}

.thermal-ticket-line span,
.thermal-ticket-item span,
.thermal-ticket-footer div {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.thermal-ticket-address,
.thermal-ticket-note {
  overflow-wrap: anywhere;
}

.thermal-ticket-note {
  margin-top: 1mm;
}

.thermal-ticket-footer {
  font-weight: 700;
}

@page {
  margin: 0;
  size: 54mm auto;
}

@media print {
  html {
    background: #fff;
    height: auto;
    margin: 0;
    min-height: 0;
    padding: 0;
    width: 54mm;
  }

  body.thermal-print-shell {
    background: #fff;
    height: auto !important;
    margin: 0;
    min-height: 0 !important;
    overflow: visible;
    padding: 0;
    width: 54mm;
  }

  .thermal-print-shell main {
    display: block;
    height: auto;
    margin: 0;
    min-height: 0;
    overflow: visible;
    padding: 0;
    width: 54mm;
  }

  .thermal-print-content {
    display: block;
    height: auto;
    margin: 0;
    min-height: 0;
    overflow: visible;
    padding: 0;
    width: 54mm;
  }

  .print-toolbar {
    display: none;
  }

  .thermal-ticket {
    break-after: auto;
    break-inside: avoid;
    box-shadow: none;
    margin: 0;
    padding: 1.5mm;
    page-break-after: auto;
    page-break-inside: avoid;
    width: 54mm;
  }

  .thermal-ticket + .thermal-ticket {
    break-before: auto;
    margin-top: 2mm;
    page-break-before: auto;
  }

  .thermal-ticket:last-child {
    break-after: auto;
    margin-bottom: 0;
    page-break-after: auto;
  }
}
