:root {
  --ink: #0d1117;
  --muted: #4d5562;
  --line: #0d1117;
  --paper: #fffdf4;
  --soft: #f4f1e8;
  --blue: #56c7ef;
  --red: #ff6b6b;
  --green: #c8f23c;
  --yellow: #f8c84a;
  --purple: #7c5cff;
  --sakura: #ff7aa8;
  --indigo: #0d1117;
  --cyan: #56c7ef;
  --lime: #c8f23c;
  --coral: #ff6b6b;
  --shadow: 7px 7px 0 #0d1117;
  font-family: "TH Sarabun PSK", "TH Sarabun New", "Sarabun", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 18%, rgba(86, 199, 239, 0.18), transparent 24%),
    radial-gradient(circle at 84% 8%, rgba(255, 107, 107, 0.12), transparent 22%),
    linear-gradient(90deg, rgba(13, 17, 23, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(13, 17, 23, 0.035) 1px, transparent 1px),
    #f4f1e8;
  background-size: auto, auto, 34px 34px, 34px 34px, auto;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(14px, 3vw, 44px);
  border-bottom: 1px solid rgba(222, 215, 206, 0.9);
  background: rgba(255, 250, 245, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0 30%, transparent 31%),
    linear-gradient(135deg, #d92d20, #a91515);
  box-shadow: 0 10px 24px rgba(217, 45, 32, 0.22);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand h1 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: 0;
}

.brand p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.nav-tabs button,
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
}

.nav-tabs button.active,
.segmented button.active {
  color: var(--ink);
  background: #fff1f1;
  box-shadow: inset 0 0 0 1px rgba(217, 45, 32, 0.18);
}

.icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}

.icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page {
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: clamp(14px, 2vw, 28px) clamp(12px, 3vw, 44px) 48px;
}

.store-layout {
  display: grid;
  grid-template-columns: clamp(220px, 17vw, 300px) minmax(0, 1fr) clamp(300px, 24vw, 390px);
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}

.store-sidebar {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 14px;
}

.sidebar-card {
  border: 1px solid rgba(222, 215, 206, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(217, 45, 32, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(24, 35, 58, 0.035) 1px, transparent 1px),
    rgba(255, 255, 255, 0.86);
  background-size: 24px 24px;
  box-shadow: 0 10px 26px rgba(24, 35, 58, 0.07);
  padding: 14px;
}

.sidebar-heading {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
}

.sidebar-heading span,
.shipping-current small,
.shipping-option small {
  color: var(--muted);
  font-size: 0.8rem;
}

.sidebar-heading strong {
  color: var(--indigo);
  font-size: 1.08rem;
}

.category-menu,
.shipping-list {
  display: grid;
  gap: 8px;
}

.category-filter-btn,
.shipping-option {
  display: grid;
  width: 100%;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
}

.category-filter-btn {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  padding: 6px 10px 6px 6px;
}

.category-filter-btn img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}

.category-chip-dot {
  display: inline-flex;
  width: 16px;
  height: 16px;
  margin-left: 9px;
  border-radius: 999px;
  background: var(--dot-color);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--dot-color), transparent 82%);
}

.all-dot {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(217, 45, 32, 0.14);
}

.category-filter-btn strong {
  display: inline-flex;
  min-width: 26px;
  justify-content: center;
  border-radius: 999px;
  color: var(--indigo);
  background: #fff1f1;
  font-size: 0.78rem;
}

.category-filter-btn.active,
.shipping-option.active {
  border-color: rgba(217, 45, 32, 0.45);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 215, 223, 0.44));
  box-shadow: inset 4px 0 0 var(--red), 0 10px 20px rgba(217, 45, 32, 0.08);
}

.shipping-current {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  color: white;
  background:
    radial-gradient(circle at 88% 22%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(135deg, var(--indigo), var(--blue));
}

.shipping-current strong {
  font-size: 1.55rem;
}

.shipping-current small {
  color: rgba(255, 255, 255, 0.78);
}

.shipping-list {
  margin-top: 10px;
}

.shipping-option {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px 10px;
}

.shipping-option span {
  display: grid;
  gap: 2px;
}

.shipping-option b {
  color: var(--red);
}

.store-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.store-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  min-height: clamp(190px, 24vw, 280px);
  padding: clamp(22px, 4vw, 42px);
  overflow: hidden;
  border-radius: 8px;
  position: relative;
  color: var(--indigo);
  background:
    linear-gradient(90deg, rgba(217, 45, 32, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(24, 35, 58, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 82% 18%, rgba(217, 45, 32, 0.15), transparent 20%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 247, 0.8)),
    linear-gradient(125deg, #fffaf5, #f8d7df 56%, #e7ecf8 100%);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
  box-shadow: var(--shadow);
}

.store-hero::after {
  content: "";
  position: absolute;
  right: clamp(18px, 5vw, 64px);
  top: clamp(18px, 4vw, 44px);
  width: clamp(82px, 11vw, 140px);
  aspect-ratio: 1;
  border: 14px solid rgba(217, 45, 32, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.store-hero h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.store-hero p {
  max-width: 680px;
  margin: 18px 0 0;
  color: #4c5870;
  font-size: 1.02rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 700;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, #18233a, #284b8f);
  box-shadow: 0 12px 24px rgba(24, 35, 58, 0.2);
}

.secondary-btn {
  color: var(--indigo);
  background: white;
  box-shadow: inset 0 0 0 1px var(--line);
}

.danger-btn {
  color: #b42318;
  background: #fff1f1;
}

.ghost-btn {
  color: var(--muted);
  background: transparent;
}

.hero-stack {
  display: grid;
  align-content: center;
  gap: 12px;
}

.mini-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(222, 215, 206, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.mini-stat strong {
  font-size: 1.4rem;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 12px;
  margin: 22px 0;
  align-items: center;
}

.toolbar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--indigo);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.field,
.select-field,
.textarea-field {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  outline: none;
}

.field,
.textarea-field {
  padding: 0 13px;
}

.textarea-field {
  min-height: 88px;
  padding-top: 11px;
  resize: vertical;
}

.detail-textarea {
  min-height: 132px;
}

.select-field {
  padding: 0 36px 0 13px;
}

.field:focus,
.select-field:focus,
.textarea-field:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: clamp(14px, 1.5vw, 20px);
}

.product-card,
.panel,
.cart-panel,
.admin-panel {
  border: 1px solid rgba(222, 215, 206, 0.92);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(24, 35, 58, 0.07);
}

.product-card {
  overflow: hidden;
}

.product-art {
  display: grid;
  width: 100%;
  min-height: 148px;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    radial-gradient(circle at 70% 24%, rgba(255, 255, 255, 0.86), transparent 25%),
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent), white 70%));
  background-size: 22px 22px, 22px 22px, auto, auto;
}

.product-card-image {
  width: 100%;
  height: 148px;
  object-fit: cover;
}

.product-detail-trigger {
  border-radius: 0;
}

.product-detail-trigger:hover .product-shape,
.product-title-btn:hover {
  transform: translateY(-2px);
}

.product-shape {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.96);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 20px 40px rgba(31, 41, 55, 0.16);
}

.product-shape svg {
  width: 52px;
  height: 52px;
}

.product-body {
  padding: 15px;
}

.product-meta,
.cart-row,
.table-actions,
.inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.84rem;
}

.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--dot-color);
}

.product-card h3 {
  margin: 11px 0 8px;
  min-height: 48px;
  font-size: 1.08rem;
  line-height: 1.32;
}

.product-title-btn {
  padding: 0;
  color: inherit;
  background: transparent;
  font-weight: 800;
  text-align: left;
  transition: transform 160ms ease;
}

.product-card p {
  min-height: 62px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.52;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.compact-btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.price {
  font-size: 1.24rem;
  font-weight: 800;
}

.cart-panel {
  position: sticky;
  top: 86px;
  padding: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 1.18rem;
}

.count-badge,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--indigo);
  background: #fff1f1;
  font-size: 0.78rem;
  font-weight: 800;
}

.empty-state {
  display: grid;
  min-height: 160px;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.cart-items {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.cart-row {
  justify-content: space-between;
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
}

.cart-row strong {
  display: block;
  font-size: 0.9rem;
}

.cart-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-controls button {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: var(--ink);
  background: white;
  box-shadow: inset 0 0 0 1px var(--line);
}

.totals {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.totals div,
.grand-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.grand-total {
  font-size: 1.1rem;
  font-weight: 900;
}

.checkout-form,
.admin-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.9rem;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 8px;
  color: white;
  background: var(--indigo);
  box-shadow: var(--shadow);
}

.product-detail-page {
  display: grid;
  gap: 20px;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(min(360px, 100%), 0.95fr) minmax(min(360px, 100%), 1.05fr);
  gap: 24px;
  align-items: start;
}

.detail-gallery,
.detail-content,
.detail-section {
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 26px rgba(31, 41, 55, 0.06);
}

.detail-gallery {
  overflow: hidden;
}

.detail-main-media {
  display: grid;
  min-height: 480px;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    radial-gradient(circle at 70% 24%, rgba(255, 255, 255, 0.86), transparent 25%),
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent), white 62%));
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.detail-main-media img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

.detail-main-media .product-shape {
  width: 150px;
  height: 150px;
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px;
  padding: 12px;
  background: #fff;
}

.detail-thumbs button {
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.detail-thumbs button.active {
  box-shadow: inset 0 0 0 3px var(--blue);
}

.detail-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-content {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 4vw, 36px);
}

.detail-content h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
}

.detail-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.detail-section {
  padding: clamp(18px, 3vw, 28px);
}

.detail-section h3 {
  margin: 0 0 14px;
  font-size: 1.25rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.video-grid iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  background: #111827;
}

.review-links {
  display: grid;
  gap: 10px;
}

.review-link {
  display: block;
  padding: 12px 14px;
  overflow-wrap: anywhere;
  border-radius: 8px;
  color: var(--indigo);
  background: var(--soft);
  text-decoration: none;
}

.file-field {
  padding-top: 9px;
}

.media-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.media-preview.single {
  grid-template-columns: 120px;
}

.media-preview img,
.table-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: var(--soft);
}

.table-product-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.table-thumb {
  width: 38px;
  height: 38px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
}

.product-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 1.15fr);
  width: min(880px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 900;
}

.product-modal-art {
  display: grid;
  min-height: 390px;
  place-items: center;
  background:
    radial-gradient(circle at 70% 24%, rgba(255, 255, 255, 0.86), transparent 25%),
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent), white 62%));
}

.product-modal-art .product-shape {
  width: 150px;
  height: 150px;
}

.product-modal-art .product-shape svg {
  width: 82px;
  height: 82px;
}

.product-modal-body {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 40px);
}

.product-modal-body h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

.product-modal-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-copy {
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
}

.detail-copy h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list span {
  color: var(--muted);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-layout {
  display: grid;
  grid-template-columns: clamp(220px, 18vw, 280px) minmax(0, 1fr);
  gap: 22px;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(min(280px, 100%), 0.8fr) minmax(min(320px, 100%), 1fr);
  gap: 18px;
  align-items: start;
}

.account-orders {
  grid-column: 1 / -1;
}

.address-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.address-card {
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.address-card p {
  margin: 6px 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 150px);
  place-items: center;
}

.login-panel {
  display: grid;
  width: min(420px, 100%);
  gap: 14px;
  padding: 28px;
}

.login-panel h2 {
  margin: 0;
  font-size: 1.6rem;
}

.login-panel p {
  margin: 0 0 4px;
  line-height: 1.5;
}

.admin-sidebar {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 12px;
  align-self: start;
}

.admin-summary {
  display: grid;
  gap: 12px;
}

.summary-tile {
  padding: 16px;
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), transparent),
    var(--tile-bg);
}

.summary-tile span {
  display: block;
  font-size: 0.78rem;
  opacity: 0.86;
}

.summary-tile strong {
  display: block;
  margin-top: 5px;
  font-size: 1.6rem;
}

.segmented {
  display: grid;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.admin-panel {
  padding: clamp(16px, 3vw, 24px);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(min(260px, 100%), 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
}

.admin-form .smtp-check {
  display: flex;
  color: var(--ink);
}

.smtp-help {
  padding: 18px;
}

.smtp-help h3 {
  margin: 0 0 10px;
}

.smtp-help p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.ai-settings-form {
  gap: 16px;
}

.ai-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 14px;
}

.ai-provider-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.data-table th,
.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  background: #fffaf5;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
}

.swatch {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  vertical-align: middle;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Pricewise-inspired retro download portal theme */
.topbar {
  border-bottom: 2px solid var(--ink);
  background: rgba(244, 241, 232, 0.92);
}

.brand {
  gap: 16px;
  min-width: min(460px, 52vw);
}

.brand-mark {
  width: clamp(62px, 6vw, 88px);
  height: clamp(62px, 6vw, 88px);
  border: 4px solid var(--ink);
  border-radius: 24px;
  color: var(--lime);
  background:
    radial-gradient(circle at 26% 22%, rgba(255, 255, 255, 0.92), transparent 18%),
    linear-gradient(135deg, #ff6b6b 0 38%, #56c7ef 38% 72%, #c8f23c 72%);
  box-shadow: 6px 6px 0 var(--ink), 10px 10px 0 var(--coral);
}

.brand h1 {
  width: fit-content;
  font-size: clamp(2rem, 4vw, 3.9rem);
  font-weight: 900;
  line-height: 0.9;
  color: transparent;
  background:
    linear-gradient(90deg, #d92d20 0 34%, #0d1117 34% 66%, #1aa7ec 66% 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 2px 2px 0 rgba(200, 242, 60, 0.42);
}

.brand p {
  width: fit-content;
  margin-top: 6px;
  padding: 3px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--lime);
  font-size: clamp(0.82rem, 1.1vw, 1rem);
  font-weight: 900;
  box-shadow: 3px 3px 0 var(--ink);
}

.nav-tabs,
.segmented {
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: rgba(255, 253, 244, 0.86);
  box-shadow: none;
}

.nav-tabs button,
.segmented button {
  border-radius: 999px;
  color: var(--ink);
  font-weight: 800;
}

.nav-tabs button.active,
.segmented button.active {
  color: var(--lime);
  background: var(--ink);
  box-shadow: none;
}

.sidebar-card,
.product-card,
.panel,
.cart-panel,
.admin-panel,
.detail-gallery,
.detail-content,
.detail-section,
.login-panel,
.ai-provider-panel,
.address-card {
  border: 2px solid var(--ink);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.sidebar-card {
  background:
    linear-gradient(90deg, rgba(13, 17, 23, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(13, 17, 23, 0.03) 1px, transparent 1px),
    var(--paper);
  background-size: 26px 26px;
}

.sidebar-heading span,
.product-meta,
.brand p,
.cart-row span,
.shipping-current small,
.shipping-option small {
  font-weight: 700;
}

.category-filter-btn,
.shipping-option,
.field,
.select-field,
.textarea-field,
.toolbar-count,
.mini-stat,
.cart-row,
.qty-controls button {
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: #fffdf4;
  box-shadow: none;
}

.category-filter-btn,
.shipping-option {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.category-filter-btn:hover,
.shipping-option:hover,
.product-card:hover {
  transform: translateY(-2px);
}

.category-filter-btn.active,
.shipping-option.active {
  border-color: var(--ink);
  background: #e7f8ff;
  box-shadow: 4px 4px 0 var(--ink);
}

.category-filter-btn strong,
.count-badge,
.status-chip,
.toolbar-count {
  color: var(--ink);
  background: var(--lime);
  border: 2px solid var(--ink);
}

.category-chip-dot {
  box-shadow: 0 0 0 6px rgba(86, 199, 239, 0.2);
}

.all-dot {
  background: var(--coral);
  box-shadow: 0 0 0 6px rgba(255, 107, 107, 0.18);
}

.shipping-current {
  border: 2px solid var(--ink);
  border-radius: 18px;
  color: var(--lime);
  background:
    radial-gradient(circle at 88% 24%, rgba(86, 199, 239, 0.42), transparent 26%),
    var(--ink);
  box-shadow: 5px 5px 0 var(--cyan);
}

.shipping-current span,
.shipping-current small {
  color: #fffdf4;
}

.shipping-option b {
  color: var(--ink);
}

.store-hero {
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  min-height: clamp(220px, 28vw, 330px);
  padding: clamp(16px, 4vw, 42px) clamp(10px, 3vw, 28px);
}

.store-hero::after {
  right: 7%;
  top: 16%;
  width: clamp(98px, 12vw, 160px);
  border: 18px solid rgba(86, 199, 239, 0.32);
  border-radius: 28px;
  transform: rotate(-3deg);
}

.store-hero h2 {
  font-weight: 900;
  color: var(--ink);
}

.store-hero p {
  color: #323946;
  font-weight: 600;
}

.hero-stack .mini-stat {
  background: rgba(255, 253, 244, 0.82);
}

.primary-btn,
.secondary-btn,
.danger-btn,
.ghost-btn {
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 900;
}

.primary-btn {
  color: var(--lime);
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--cyan);
}

.secondary-btn {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
}

.danger-btn {
  color: var(--ink);
  background: #ffd7d7;
  box-shadow: 3px 3px 0 var(--ink);
}

.ghost-btn {
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.field:focus,
.select-field:focus,
.textarea-field:focus {
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--cyan);
}

.product-card {
  overflow: hidden;
  background: var(--paper);
}

.product-art {
  min-height: 178px;
  border-bottom: 2px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.72), transparent 22%),
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent), white 62%));
  background-size: 24px 24px, 24px 24px, auto, auto;
}

.product-card-image {
  height: 178px;
}

.product-body {
  padding: 18px 22px 22px;
}

.product-card h3 {
  font-size: 1.45rem;
  line-height: 1.12;
  font-weight: 900;
}

.product-card p {
  color: #333b47;
  font-size: 1rem;
  font-weight: 600;
}

.price {
  font-size: 1.38rem;
  font-weight: 900;
}

.compact-btn {
  min-height: 40px;
}

.cart-panel {
  background: #e7f8ff;
}

.totals {
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.summary-tile {
  border: 2px solid var(--ink);
  border-radius: 18px;
  color: var(--ink);
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--ink);
}

.data-table {
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
}

.data-table th,
.data-table td {
  border-bottom: 2px solid var(--ink);
}

.data-table th {
  color: var(--ink);
  background: #e7f8ff;
  font-weight: 900;
}

.detail-copy,
.empty-state {
  border: 2px dashed var(--ink);
  border-radius: 18px;
  background: #e7f8ff;
}

.toast {
  border: 2px solid var(--ink);
  border-radius: 18px;
  color: var(--lime);
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--coral);
}

.muted {
  color: var(--muted);
}

@media (max-width: 1240px) {
  .store-layout {
    grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
  }

  .cart-panel {
    position: static;
    grid-column: 1 / -1;
  }

}

@media (max-width: 1120px) {
  .admin-layout,
  .account-layout,
  .admin-grid,
  .ai-provider-grid {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .topbar,
  .store-layout,
  .store-hero,
  .toolbar,
  .form-row {
    grid-template-columns: 1fr;
  }

  .store-sidebar {
    position: static;
  }

  .topbar {
    display: grid;
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 20px;
  }

  .brand h1 {
    font-size: 2rem;
  }

  .nav-tabs {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-tabs button {
    flex: 1 0 max-content;
    padding: 0 12px;
  }

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

  .store-hero h2 {
    font-size: 2.35rem;
  }

  .data-table {
    min-width: 680px;
  }

  .price-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-actions {
    width: 100%;
    justify-content: stretch;
  }

  .product-actions button {
    flex: 1;
  }

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

  .product-detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-main-media,
  .detail-main-media img {
    min-height: 260px;
    height: 260px;
  }

  .product-modal-art {
    min-height: 230px;
  }

  .product-modal-body {
    padding: 22px;
  }
}

@media (max-width: 520px) {
  :root {
    --shadow: 4px 4px 0 #0d1117;
  }

  .page {
    padding: 12px 10px 36px;
  }

  .topbar {
    padding: 10px;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    border-width: 3px;
    border-radius: 18px;
    box-shadow: 4px 4px 0 var(--ink), 7px 7px 0 var(--coral);
  }

  .brand h1 {
    font-size: 1.62rem;
  }

  .brand p {
    padding: 2px 9px;
    font-size: 0.72rem;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .nav-tabs {
    border-radius: 18px;
    padding: 3px;
  }

  .nav-tabs button {
    min-height: 36px;
    gap: 6px;
    font-size: 0.92rem;
  }

  .sidebar-card,
  .product-card,
  .panel,
  .cart-panel,
  .admin-panel,
  .detail-gallery,
  .detail-content,
  .detail-section,
  .login-panel,
  .ai-provider-panel,
  .address-card {
    border-radius: 18px;
  }

  .store-hero {
    min-height: auto;
    padding: 18px 2px 20px;
  }

  .store-hero::after {
    right: 2px;
    top: 8px;
    width: 88px;
    border-width: 12px;
    opacity: 0.55;
  }

  .store-hero h2 {
    max-width: 92%;
    font-size: 2.05rem;
    line-height: 1;
  }

  .store-hero p {
    max-width: 100%;
    font-size: 0.98rem;
  }

  .hero-actions,
  .product-actions,
  .detail-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-btn,
  .secondary-btn,
  .danger-btn,
  .ghost-btn {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
  }

  .toolbar {
    gap: 10px;
  }

  .category-filter-btn {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }

  .shipping-option {
    grid-template-columns: 1fr;
  }

  .product-art,
  .product-card-image {
    min-height: 160px;
    height: 160px;
  }

  .product-body {
    padding: 16px;
  }

  .product-card h3 {
    min-height: auto;
    font-size: 1.28rem;
  }

  .product-card p {
    min-height: auto;
  }

  .table-scroll {
    margin-inline: -10px;
    padding-inline: 10px;
  }
}
