* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f0f2f5;
  color: #121212;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}
.site-header {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
}
.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cart-toggle {
  display: none;
  border: 1px solid #e2e2e2;
  background: #fff;
  color: #1a1a2e;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.cart-toggle:active {
  transform: translateY(1px);
}
.site-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
}
.site-logo-mark {
  flex-shrink: 0;
}
.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -0.02em;
}
.brand-sub {
  font-size: 0.85rem;
  color: #666;
  margin-top: 2px;
}
.thumb-slider {
  position: relative;
}
.thumb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: rgba(18, 18, 18, 0.0);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.thumb-nav:active {
  transform: translateY(-50%) scale(0.98);
}
.thumb-nav-prev {
  left: 10px;
  z-index: 2;
}
.thumb-nav-next {
  right: 10px;
  z-index: 2;
}
.thumb-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e8e8e8;
}
.thumb-track {
  display: flex;
  height: 100%;
  transition: transform 0.38s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}
.thumb-track.is-instant {
  transition: none;
}
.thumb-slide {
  min-width: 0;
  height: 100%;
  flex-shrink: 0;
}
.thumb-slide .thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: auto;
  vertical-align: middle;
  background: #e8e8e8;
}
.thumb-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 6px 2px;
}
.thumb-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.thumb-dot.is-active {
  background: #5d2dff;
  transform: scale(1.2);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.08);
}
.thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e8e8e8;
}
.meta {
  padding: 10px 12px 14px;
}
.price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.price {
  color: #5d2dff;
  font-weight: 800;
  font-size: 22px;
}
.name {
  font-size: 17px;
  font-weight: 800;
  margin: 6px 0;
}
.desc {
  color: #555;
  line-height: 1.35;
  margin: 0 0 10px;
  font-size: 14px;
}
.info {
  color: #555;
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.qty-block {
  margin-bottom: 10px;
}
.qty-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #444;
  margin-bottom: 6px;
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 160px;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: #f3f4f6;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  flex: 0 0 40px;
  color: #1a1a2e;
}
.qty-btn:active {
  background: #e8e8e8;
}
.qty-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  color: #1a1a2e;
  appearance: textfield;
}
.meta > * + * {
  margin-top: 8px;
}
.price-row {
  margin-bottom: 0;
}
.name {
  margin: 0;
}
.desc {
  margin: 0;
}
.info {
  margin-bottom: 0;
}
.qty-input:focus {
  outline: none;
  background: #faf8ff;
}
/* Remove number spinners (little up/down buttons) */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-input[type="number"] {
  -moz-appearance: textfield;
}

.order-block {
  margin-top: 4px;
}
.btn-order-open {
  width: 100%;
  background: #5d2dff;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-order-open:hover {
  background: #4c25d4;
}
body.order-modal-open {
  overflow: hidden;
}
.order-modal[hidden] {
  display: none !important;
}
.order-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overflow: auto;
}
.order-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  z-index: 0;
  cursor: pointer;
}
.order-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: min(92vh, 720px);
  margin-top: min(2vh, 12px);
  margin-bottom: 32px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  padding: 16px 16px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.order-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
  transition: background 0.15s, color 0.15s;
}
.order-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.order-modal-title {
  margin: 0 40px 12px 0;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  color: #1a1a2e;
}
.order-modal-gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  margin: 0 0 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #fafafa;
}
.order-modal-gallery-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  background: #e8e8e8;
  width: 140px;
  height: 140px;
}
.order-modal-gallery-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.order-modal-gallery-empty {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  width: 100%;
}
.order-modal-hint {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
  margin: 0 0 10px;
}
.order-modal-rows {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 10px 4px;
  background: #fafafa;
}
.order-size-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ececec;
}
.order-size-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.order-size-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.3;
}
.order-size-delim {
  margin: 0 4px;
  color: #9ca3af;
  font-weight: 500;
}
.order-size-price {
  font-weight: 600;
  color: #5d2dff;
  white-space: nowrap;
}
.order-size-row .order-qty {
  flex: 0 0 auto;
  max-width: 132px;
  border-radius: 8px;
}
.order-size-row .order-qty .qty-btn {
  width: 32px;
  height: 34px;
  flex: 0 0 32px;
  font-size: 18px;
}
.order-size-row .order-qty .qty-input {
  height: 34px;
  font-size: 15px;
}
.btn-line-add {
  flex: 0 0 auto;
  width: auto;
  min-width: 4.2rem;
  margin: 0;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
  transition: background 0.15s, transform 0.1s;
}
.btn-line-add:hover {
  background: #1d4ed8;
}
.btn-line-add:active {
  transform: scale(0.98);
}
@media (max-width: 420px) {
  .order-size-row {
    flex-wrap: wrap;
  }
  .order-size-name {
    flex: 1 1 100%;
  }
  .order-size-row .order-qty {
    max-width: none;
    flex: 1 1 auto;
  }
  .btn-line-add {
    flex: 0 0 100%;
    width: 100%;
    text-align: center;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.lightbox[hidden] {
  display: none !important;
}
.lightbox-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: min(980px, 94vw);
}
.lightbox-viewport {
  width: 100%;
  max-height: 88vh;
  overflow: hidden;
  border-radius: 14px;
  background: #111;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  line-height: 0;
  display: flex;
  align-items: center;
}
.lightbox-track {
  display: flex;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}
.lightbox-track.is-instant {
  transition: none;
}
.lightbox-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex-shrink: 0;
}
.lightbox-open-img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  vertical-align: middle;
}
.lightbox-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}
.lightbox-dots[hidden] {
  display: none !important;
}
.lightbox-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.lightbox-dot.is-active {
  background: #fff;
  transform: scale(1.15);
}
.lightbox-close {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(18, 18, 18, 0.35);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #fff;
  font-size: 54px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 14px;
  cursor: pointer;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75);
  user-select: none;
}
.lightbox-nav[hidden] {
  display: none !important;
}
.lightbox-prev {
  left: 6px;
}
.lightbox-next {
  right: 6px;
}
.btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.btn-primary {
  background: #5d2dff;
  color: #fff;
}
.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}
.panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.08);
  padding: 14px;
  height: fit-content;
}
.lang-switch {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.lang-btn {
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  padding: 4px 8px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
}
.lang-btn.active {
  background: #5d2dff;
  color: #fff;
  border-color: #5d2dff;
}
.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cart-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #ececec;
  padding: 8px 0;
  font-size: 14px;
}
.cart-list li:last-child {
  border-bottom: none;
}
.cart-line .cart-qty {
  color: #5d2dff;
  font-size: 15px;
  margin-right: 4px;
}
.cart-size {
  color: #666;
  font-size: 13px;
  font-weight: 600;
}
.total {
  margin: 10px 0;
  font-size: 16px;
  font-weight: 800;
}
.field {
  width: 100%;
  padding: 10px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  margin-bottom: 8px;
}
.small {
  font-size: 12px;
  color: #666;
}
.status {
  margin-top: 10px;
  min-height: 20px;
  font-size: 13px;
}
.ok {
  color: #0f7a2a;
}
.err {
  color: #b00020;
}
/* —— Admin (muted palette; scoped to .admin-body) —— */
.admin-body {
  --admin-fg: #1e293b;
  --admin-muted: #64748b;
  --admin-border: #e2e8f0;
  --admin-surface: #ffffff;
  --admin-page: #f1f5f9;
  --admin-accent: #475569;
  --admin-accent-soft: #e2e8f0;
  --admin-focus: #334155;
  --admin-drop-border: #94a3b8;
  --admin-drop-bg: #f8fafc;
  --admin-drop-active: #e2e8f0;
  color: var(--admin-fg);
  background: var(--admin-page);
}
.admin-body a {
  color: #3d5a80;
}
.admin-body .admin-card .ok,
.admin-body .admin-card .err {
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 13px;
  margin: 0 0 12px;
  line-height: 1.4;
}
.admin-body .admin-card .ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.admin-body .admin-card .err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.admin-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--admin-border);
}
.admin-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--admin-fg);
}
.admin-card--form > .admin-title:first-child {
  margin-bottom: 12px;
  padding-bottom: 0;
  border: none;
}
.admin-logout {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--admin-muted);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--admin-border);
  background: var(--admin-surface);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.admin-logout:hover {
  color: var(--admin-fg);
  background: #f8fafc;
  border-color: #cbd5e1;
}
.admin-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 16px 18px 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  margin-bottom: 16px;
}
.admin-card--form #adminProductForm {
  max-width: 100%;
}
.admin-section-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--admin-fg);
}
.admin-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-muted);
  margin: 0 0 4px;
  letter-spacing: 0.01em;
}
.admin-body .field.admin-field {
  margin-bottom: 8px;
  padding: 8px 10px;
  font-size: 14px;
  border-color: #cbd5e1;
  border-radius: 8px;
}
.admin-body .field.admin-field:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 2px rgba(71, 85, 105, 0.12);
}
.admin-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-muted);
  margin: 0;
}
.admin-label--block {
  display: block;
  margin: 10px 0 4px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-fg);
}
.admin-label--block + .admin-hint {
  margin-top: 0;
}
.admin-label + .admin-hint,
.admin-hint {
  margin-top: 0;
}
.admin-hint {
  font-size: 12px;
  line-height: 1.4;
  color: var(--admin-muted);
  margin: 0 0 8px;
}
.admin-hint strong {
  color: #475569;
  font-weight: 700;
}
.admin-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 4px;
}
.admin-label-row .admin-label {
  flex: 1;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-fg);
}
.admin-variants {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.admin-variant-card {
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.admin-variant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 38px;
  align-items: center;
  gap: 8px;
}
@media (max-width: 400px) {
  .admin-variant-row {
    grid-template-columns: minmax(0, 1fr) 84px 36px;
  }
}
.admin-variant-row .field.admin-field {
  margin-bottom: 0;
  min-width: 0;
}
.btn-remove-variant {
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #f43f5e;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  color: #be123c;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.btn-remove-variant:hover {
  color: #9f1239;
  background: #fecdd3;
  border-color: #e11d48;
}
.btn-add-variant {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #16a34a;
  border-radius: 8px;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #15803d;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
/* Critical: do not use global .btn (width:100%) on the add control */
.btn-add-variant:hover {
  background: #bbf7d0;
  border-color: #15803d;
  color: #14532d;
}
.admin-staged {
  font-size: 12px;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #5eead4;
  border-radius: 6px;
  padding: 7px 10px;
  margin: 0 0 8px;
  line-height: 1.35;
}
.image-dropzone-wrap {
  position: relative;
  margin-bottom: 10px;
}
.admin-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.image-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 128px;
  padding: 20px 16px 18px;
  text-align: center;
  cursor: pointer;
  border: 2px dashed var(--admin-drop-border);
  border-radius: 10px;
  background: var(--admin-drop-bg);
  color: #475569;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.image-dropzone:hover {
  border-color: #64748b;
  background: #f1f5f9;
}
.image-dropzone:focus {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(71, 85, 105, 0.25);
}
.image-dropzone.is-dragover {
  border-color: #64748b;
  background: var(--admin-drop-active);
  border-style: solid;
  box-shadow: inset 0 0 0 1px #cbd5e1;
}
.image-dropzone-icon {
  color: #94a3b8;
  margin-bottom: 2px;
}
.image-dropzone:hover .image-dropzone-icon,
.image-dropzone.is-dragover .image-dropzone-icon {
  color: #64748b;
}
.image-dropzone-text {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  line-height: 1.35;
}
.image-dropzone-text em {
  font-style: normal;
  font-weight: 800;
  color: #1e3a5f;
}
.image-dropzone-cta {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}
.image-dropzone-hint {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  max-width: 280px;
  line-height: 1.35;
}
.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.admin-body .btn {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.admin-body .btn.btn-primary,
.admin-body .admin-btn-submit {
  margin-top: 4px;
  padding: 11px 14px;
  font-size: 15px;
  background: #2563eb;
  color: #fff;
  border: 1px solid #1d4ed8;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}
.admin-body .btn.btn-primary:hover,
.admin-body .admin-btn-submit:hover {
  background: #1d4ed8;
  border-color: #1e40af;
}
.admin-body .btn.btn-primary:focus-visible,
.admin-body .admin-btn-submit:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fafafa;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid var(--admin-border);
  text-align: left;
  white-space: nowrap;
}
.admin-table td {
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  padding: 8px 10px;
  font-size: 13px;
  color: #334155;
  vertical-align: middle;
}
.admin-table tr:last-child td {
  border-bottom: none;
}
.admin-table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  white-space: normal;
  max-width: 180px;
}
.admin-btn-ghost-pill {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  color: #334155;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  flex-shrink: 0;
}
.admin-btn-ghost-pill:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}
.admin-link {
  font-size: 13px;
  font-weight: 600;
  color: #1e3a5f;
  text-decoration: none;
  margin-right: 8px;
}
.admin-link:hover {
  text-decoration: underline;
}
.admin-inline-form {
  display: inline;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}
.admin-btn-tiny {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid #3b82f6;
  background: #eff6ff;
  color: #1d4ed8;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  vertical-align: middle;
  box-shadow: 0 1px 0 rgba(37, 99, 235, 0.15);
}
.admin-btn-tiny:hover {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e3a8a;
}
.admin-btn-tiny--danger {
  border-color: #fdba8c;
  background: #fff7ed;
  color: #c2410c;
  box-shadow: none;
}
.admin-btn-tiny--danger:hover {
  background: #ffedd5;
  border-color: #fb923c;
  color: #9a3412;
}
.admin-btn-ghost {
  display: inline;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: inherit;
}
.admin-btn-ghost:hover {
  color: #b91c1c;
}
.img-small {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e8f0;
  border: 1px solid #e2e8f0;
}
.admin-existing {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.admin-existing-item {
  position: relative;
  width: 72px;
  height: 72px;
}
.admin-existing-thumb {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
  border: 1px solid var(--admin-border);
}
.admin-existing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-existing-remove {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--admin-border);
  background: #fff;
  color: #64748b;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: color 0.15s, background 0.15s;
}
.admin-existing-remove:hover {
  color: #b91c1c;
  background: #fef2f2;
}
.variant-pick {
  margin-bottom: 8px;
}
.variant-pick .field {
  margin-bottom: 0;
}
.map-pick-btns[hidden] {
  display: none !important;
}
.map-pick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}
.map-pick-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  box-shadow: 0 1px 0 rgba(37, 99, 235, 0.12);
}
.map-pick-btn:hover {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e3a8a;
}
.map-pick-btn:active {
  transform: scale(0.99);
}
#locationValue[hidden] {
  display: none !important;
}
.location-help[hidden] {
  display: none !important;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .cart-toggle {
    display: inline-grid;
    place-items: center;
  }
  .panel {
    position: fixed;
    top: 12px;
    right: 12px;
    bottom: 12px;
    width: min(360px, calc(100vw - 24px));
    max-width: 92vw;
    overflow: auto;
    z-index: 40;
    transform: translateX(calc(100% + 24px));
    transition: transform 220ms ease;
  }
  body.cart-open .panel {
    transform: translateX(0);
  }
  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 35;
  }
}

@media (max-width: 360px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
