* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --line: rgba(17, 24, 39, 0.1);
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --shadow: 0 22px 70px rgba(15, 23, 42, 0.12);
  --blue: #007aff;
  --blue-dark: #005ed2;
  --green: #16a34a;
  --amber: #b7791f;
  --red: #dc2626;
  --radius: 24px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(0, 122, 255, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(88, 86, 214, 0.13), transparent 30rem),
    linear-gradient(180deg, #f7f9ff 0%, #eef3fb 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

.container {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(247, 249, 255, 0.78);
  backdrop-filter: blur(24px) saturate(1.25);
}

.topbar-inner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.brand strong {
  display: block;
  letter-spacing: -0.03em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav a,
.branch-switch select {
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #253044;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.nav a {
  padding: 9px 12px;
}

.nav a:hover,
.btn:hover,
.branch-switch select:hover {
  transform: translateY(-1px);
}

.branch-locked {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.row,
.userbox,
.row-actions,
.quick,
.table-actions,
.form-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.row {
  justify-content: space-between;
  margin-bottom: 16px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.045em;
}

h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 0.98;
}

h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.hero,
.panel,
.card,
.form,
.auth-card,
.table {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.18);
}

.hero,
.panel,
.form,
.auth-card {
  border-radius: var(--radius);
}

.hero {
  padding: 26px;
  margin-bottom: 18px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 18px;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 20px;
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -30px -48px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.11);
}

.card-title,
label,
.muted,
.hint {
  color: var(--muted);
}

.card-title,
label {
  font-weight: 750;
}

.card-value {
  margin-top: 10px;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.card-actions,
.hint {
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--blue-dark));
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(0, 122, 255, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.btn.secondary {
  border: 1px solid rgba(17, 24, 39, 0.1);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.btn.primary {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.btn.danger {
  background: linear-gradient(180deg, #ff453a, var(--red));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.18);
}

.btn.small {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.table th,
.table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.07);
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.table tbody tr {
  background: rgba(255, 255, 255, 0.32);
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.68);
}

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

.form,
.panel {
  padding: 18px;
  margin-top: 14px;
}

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

.span-2 {
  grid-column: span 2;
}

label {
  display: grid;
  gap: 7px;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  padding: 11px 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(0, 122, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

textarea {
  resize: vertical;
}

.form-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.form-inline.compact {
  margin-top: 0;
}

.report-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px)) auto;
  gap: 14px;
  align-items: end;
}

.filter-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.table-actions input {
  width: 180px;
  min-height: 34px;
  border-radius: 999px;
  padding: 7px 12px;
}

.form-footer {
  margin-top: 16px;
}

.auth {
  display: grid;
  min-height: calc(100vh - 110px);
  place-items: center;
}

.auth-card {
  width: min(560px, 100%);
  padding: 26px;
}

.auth-logo {
  display: block;
  width: 78px;
  height: 78px;
  margin: 0 auto 14px;
  object-fit: contain;
  filter: drop-shadow(0 16px 26px rgba(15, 23, 42, 0.14));
}

.auth-kicker {
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card .form {
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-submit {
  width: 100%;
  margin-top: 16px;
}

.branch-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.branch-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.branch-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.branch-option span {
  display: grid;
  gap: 4px;
  min-height: 96px;
  align-content: center;
  padding: 16px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.branch-option strong {
  color: var(--ink);
  font-size: 20px;
}

.branch-option small {
  color: var(--muted);
  font-weight: 700;
}

.branch-option input:checked + span {
  border-color: rgba(0, 122, 255, 0.72);
  background: linear-gradient(145deg, rgba(0, 122, 255, 0.16), rgba(255, 255, 255, 0.9));
  box-shadow: 0 18px 40px rgba(0, 122, 255, 0.16);
}

.branch-switch select {
  width: auto;
  min-height: 38px;
  padding: 7px 34px 7px 12px;
}

.alert {
  margin: 12px 0;
  padding: 13px 14px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 18px;
  background: rgba(255, 241, 242, 0.9);
  color: #991b1b;
  font-weight: 750;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 850;
}

.pill.ok {
  border-color: rgba(22, 163, 74, 0.22);
  color: var(--green);
}

.pill.warn {
  border-color: rgba(183, 121, 31, 0.22);
  color: var(--amber);
}

.pill.danger {
  border-color: rgba(220, 38, 38, 0.22);
  color: var(--red);
}

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

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.94em;
}

.dl {
  display: grid;
  gap: 10px;
}

.dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px dashed rgba(17, 24, 39, 0.12);
  padding-bottom: 8px;
}

dt {
  color: var(--muted);
  font-weight: 800;
}

dd {
  margin: 0;
  font-weight: 850;
}

.inline {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.userbox-name {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .topbar-inner {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .topbar-inner .brand {
    flex: 1;
  }

  .cards,
  .grid,
  .split,
  .branch-picker,
  .report-filter {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ─── PUBLIC STORE ─── PREMIUM REDESIGN ─── */

.store-body {
  background: #F7F7F7;
  --navy: #1D2430;
  --navy-soft: #2A3340;
  --store-line: #E5E7EB;
  --store-card-bg: #FFFFFF;
  --store-radius-sm: 12px;
  --store-radius: 18px;
  --store-radius-lg: 28px;
  --store-transition: 0.28s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.store-body .container { display: none; }

/*  Splash  */
.store-splash {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-items: center; gap: 2px;
  background: #fff;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.store-splash img { width: 140px; height: 140px; object-fit: contain; animation: splashPulse 5s ease-in-out infinite alternate; }
.store-splash div { font-size: 38px; font-weight: 900; letter-spacing: -0.04em; color: var(--navy); animation: splashFadeUp 5s ease-out both; }
.store-splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes splashPulse {
  from { transform: scale(0.9); opacity: 0.65; }
  to   { transform: scale(1.05); opacity: 1; }
}
@keyframes splashFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  30%  { opacity: 0; }
  100% { opacity: 1; transform: translateY(0); }
}

/*  Page reveal after splash  */
.store-body .store-top-nav,
.store-body .store-hero,
.store-body .store-section,
.store-body .store-footer {
  opacity: 0;
  transition: opacity 0.6s ease 0.1s;
}
.store-body.page-ready .store-top-nav,
.store-body.page-ready .store-hero,
.store-body.page-ready .store-section,
.store-body.page-ready .store-footer {
  opacity: 1;
}

/*  NAV BAR  */
.store-top-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  padding: 10px 28px;
  background: rgba(255,255,255,0.88); backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--store-line);
}
.store-top-brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; color: var(--navy); }
.store-top-brand img { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; }
.store-top-brand strong { font-size: 17px; letter-spacing: -0.02em; }
.store-top-brand small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
.store-top-actions { display: flex; gap: 8px; align-items: center; }

.store-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 9px 18px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer;
  transition: var(--store-transition);
}
.store-btn.primary { background: var(--navy); color: #fff; }
.store-btn.primary:hover { background: var(--navy-soft); }
.store-btn.ghost { background: transparent; color: var(--navy); border: 1px solid var(--store-line); }
.store-btn.ghost:hover { background: #f1f3f6; }

/*  HERO  */
.store-hero {
  position: relative; overflow: hidden;
  background: var(--navy);
  color: #fff;
  padding: 0;
}
.store-hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
  max-width: 1240px; margin: 0 auto; padding: 52px 28px;
}
.store-hero-text h1 { font-size: clamp(34px, 4.5vw, 56px); line-height: 1.05; margin: 0; font-weight: 900; letter-spacing: -0.04em; }
.store-hero-text p { margin: 16px 0 0; font-size: 17px; line-height: 1.6; opacity: 0.78; color: #d1d5db; }
.store-hero-text .store-hero-actions { display: flex; gap: 12px; margin-top: 24px; }
.store-hero-text .store-btn.ghost { border-color: rgba(255,255,255,0.28); color: #fff; }
.store-hero-text .store-btn.ghost:hover { background: rgba(255,255,255,0.08); }
.store-hero-visual {
  display: grid; place-items: center;
}
.store-hero-visual .hero-logo-circle {
  display: grid;
  place-items: center;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 0 6px rgba(255, 255, 255, 0.15);
}
.store-hero-visual .hero-logo-circle img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 0;
}

/*  SECTIONS  */
.store-section { max-width: 1240px; margin: 0 auto; padding: 48px 28px; }
.store-section-header { display: flex; gap: 14px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; margin-bottom: 28px; }
.store-section-header h2 { font-size: 28px; font-weight: 900; letter-spacing: -0.03em; color: var(--navy); margin: 0; }
.store-section-header .store-eyebrow { font-size: 11px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.store-section-links { display: flex; gap: 10px; align-items: center; }

/*  CIRCULAR CATEGORY CAROUSEL  */
.category-carousel {
  display: flex; gap: 0; overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none; -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.category-carousel::-webkit-scrollbar { display: none; }
.category-circle {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex-shrink: 0; width: 110px;
  text-decoration: none; color: var(--navy);
  transition: var(--store-transition);
  padding: 4px;
}
.category-circle .circle-wrap {
  width: 80px; height: 80px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--store-card-bg);
  border: 2px solid var(--store-line);
  overflow: hidden;
  transition: var(--store-transition);
}
.category-circle img { width: 48px; height: 48px; object-fit: contain; }
.category-circle span { font-size: 12px; font-weight: 700; text-align: center; line-height: 1.25; }
.category-circle:hover .circle-wrap { border-color: var(--navy); transform: scale(1.05); }
.category-circle.active .circle-wrap { border-color: var(--navy); background: var(--navy); }
.category-circle.active img { filter: brightness(0) invert(1); }
.category-circle.active span { color: var(--navy); font-weight: 900; }

/*  PILL FILTERS  */
.pill-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.pill-filter {
  padding: 8px 18px; border: 1px solid var(--store-line); border-radius: 999px;
  background: var(--store-card-bg);
  font-size: 13px; font-weight: 700; text-decoration: none;
  color: var(--navy);
  transition: var(--store-transition);
}
.pill-filter:hover { border-color: var(--navy); background: #f8f9fb; }
.pill-filter.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/*  4-COLUMN PRODUCT GRID  */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.product-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--store-card-bg);
  border-radius: var(--store-radius-lg);
  overflow: hidden;
  transition: var(--store-transition);
  border: 1px solid transparent;
}
.product-card:hover { border-color: var(--store-line); transform: translateY(-2px); }
.product-card-image {
  display: grid; place-items: center;
  aspect-ratio: 1 / 1; overflow: hidden;
  background: #F5F6F8;
  border: none; cursor: pointer; width: 100%; padding: 0;
}
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.product-card-image:hover img { transform: scale(1.07); }
.floating-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 5px 14px; border-radius: 999px;
  background: var(--navy); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 0.02em;
}
.product-card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.product-card-body .product-card-title {
  font-size: 16px; font-weight: 800; text-decoration: none; color: var(--navy);
  line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card-body .product-card-cat { font-size: 12px; color: var(--muted); font-weight: 700; }
.product-card-body .product-card-specs { font-size: 13px; color: var(--muted); }
.product-card-body .product-card-actions { display: flex; gap: 8px; margin-top: 6px; }
.product-card-body .product-card-actions .store-btn { font-size: 13px; min-height: 36px; padding: 7px 14px; }

/*  EMPTY STATE  */
.store-empty { grid-column: 1 / -1; text-align: center; padding: 64px 20px; }
.store-empty img { width: 72px; height: 72px; object-fit: contain; margin-bottom: 16px; opacity: 0.4; }
.store-empty h2 { color: var(--navy); font-weight: 900; margin: 0 0 6px; }
.store-empty p { color: var(--muted); margin: 0 0 18px; }

/*  PRODUCT DETAIL PAGE  */
.store-detail-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 10px 28px;
  background: rgba(255,255,255,0.88); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--store-line);
}
.detail-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  max-width: 1240px; margin: 32px auto; padding: 0 28px;
}
.detail-gallery { position: sticky; top: 80px; align-self: start; }
.detail-main-img {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 1;
  border-radius: var(--store-radius-lg); overflow: hidden;
  background: #F5F6F8; border: none; cursor: pointer; padding: 0;
}
.detail-main-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.detail-main-img:hover img { transform: scale(1.04); }
.detail-thumb-strip { display: flex; gap: 8px; margin-top: 12px; }
.detail-thumb-strip button {
  flex: 0 0 72px; height: 72px; border: 2px solid transparent; border-radius: var(--store-radius-sm);
  overflow: hidden; padding: 0; cursor: pointer; opacity: 0.5; transition: opacity 0.2s, border-color 0.2s;
}
.detail-thumb-strip button.active { border-color: var(--navy); opacity: 1; }
.detail-thumb-strip button img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { display: flex; flex-direction: column; gap: 16px; }
.detail-info h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 900; letter-spacing: -0.04em; color: var(--navy); margin: 0; }
.detail-info .detail-eye { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.detail-spec-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-spec-chips span {
  padding: 7px 16px; border: 1px solid var(--store-line); border-radius: 999px;
  background: var(--store-card-bg); font-size: 13px; font-weight: 700; color: var(--navy);
}
.detail-description { background: var(--store-card-bg); border: 1px solid var(--store-line); border-radius: var(--store-radius); padding: 18px 20px; }
.detail-description h2 { font-size: 16px; font-weight: 900; color: var(--navy); margin: 0 0 8px; }
.detail-description p { color: var(--muted); line-height: 1.6; margin: 0; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.detail-note { color: var(--muted); font-size: 14px; font-style: italic; }

/*  RELATED  */
.related-section { align-self: stretch; }
.related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

/*  LIGHTBOX  */
.store-lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgba(15, 23, 42, 0.88); backdrop-filter: blur(16px);
}
.store-lightbox[hidden] { display: none; }
body.lightbox-open { overflow: hidden; }
.lightbox-close {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  width: 44px; height: 44px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,0.14); font-size: 26px; cursor: pointer; color: #fff;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.24); }
.lightbox-card { text-align: center; width: min(720px, 92vw); max-height: 90vh; overflow-y: auto; }
.lightbox-card img { max-width: 100%; max-height: 54vh; object-fit: contain; border-radius: var(--store-radius-lg); }
.lightbox-card h3 { margin: 16px 0; color: #fff; font-size: 20px; font-weight: 800; }
.lightbox-thumbs { display: flex; gap: 8px; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.lightbox-thumbs button {
  flex: 0 0 60px; height: 60px; border: 2px solid transparent; border-radius: var(--store-radius-sm);
  overflow: hidden; padding: 0; cursor: pointer; opacity: 0.45;
}
.lightbox-thumbs button.active { border-color: #fff; opacity: 1; }
.lightbox-thumbs button img { width: 100%; height: 100%; object-fit: cover; }

/*  FOOTER  */
.store-footer {
  display: flex; gap: 12px; align-items: center; justify-content: center;
  max-width: 1240px; margin: 24px auto; padding: 28px;
  border-top: 1px solid var(--store-line);
}
.store-footer img { width: 36px; height: 36px; object-fit: contain; border-radius: 10px; }
.store-footer strong { display: block; color: var(--navy); }
.store-footer span { color: var(--muted); font-size: 13px; }
.store-footer .store-admin-trigger { margin-left: 12px; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; transition: color 0.2s; }
.store-footer .store-admin-trigger:hover { color: var(--navy); }

/*  Non-store elements kept  */
.store-branch-filter { display: flex; gap: 8px; align-items: center; }
.store-branch-filter select { width: auto; min-height: 38px; border-radius: 999px; padding: 7px 34px 7px 12px; }
.store-nav-actions { display: flex; gap: 8px; align-items: center; }
.mini-thumb { width: 48px; height: 48px; border-radius: var(--store-radius-sm); object-fit: cover; }
.table.compact td { padding: 10px 12px; }

/*  Upload zone (admin)  */
.upload-zone {
  border: 2px dashed var(--store-line); border-radius: var(--store-radius);
  background: var(--store-card-bg); padding: 28px 18px; text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--navy); background: #f8f9fb; }
.upload-zone-hint { display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.upload-icon { font-size: 36px; line-height: 1; }
.upload-preview-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.upload-preview-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: var(--store-radius-sm); border: 1px solid var(--store-line); }

/* ─── RESPONSIVE STORE ─── */
@media (max-width: 1200px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .store-hero-inner { grid-template-columns: 1fr; padding: 36px 22px; }
  .store-hero-visual { order: -1; max-height: 260px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-gallery { position: static; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .container { width: min(100% - 18px, 1180px); }
  .hero, .panel, .form, .auth-card { border-radius: 20px; padding: 16px; }
  .row, .userbox, .row-actions { align-items: stretch; flex-direction: column; }
  .btn, .branch-switch select { width: 100%; }
  .store-section { padding: 32px 16px; }
  .store-hero-inner { padding: 28px 16px; }
  .store-hero-inner h1 { font-size: 28px; }
  .detail-layout { padding: 0 16px; }
  .category-circle { width: 90px; }
  .category-circle .circle-wrap { width: 64px; height: 64px; }
  .category-circle img { width: 36px; height: 36px; }
  .product-card-body { padding: 12px 14px 14px; }
  .product-card-body .product-card-title { font-size: 14px; }
  .store-top-nav { padding: 10px 16px; }
  .store-detail-header { padding: 10px 16px; }
}

/* ─── PRINT RECEIPT ─── */
.print-receipt {
  display: none;
  padding: 20px;
  max-width: 620px;
  margin: 0 auto;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #000;
  background: #fff;
  line-height: 1.5;
}
.print-receipt-header {
  text-align: center;
  margin-bottom: 10px;
}
.print-shop-name {
  display: block;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.print-invoice {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
}
.print-date {
  display: block;
  font-size: 11px;
  color: #555;
}
.print-hr {
  border: 0;
  border-top: 1px dashed #ccc;
  margin: 10px 0;
}
.print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.print-table td,
.print-table th {
  padding: 5px 4px;
  text-align: left;
  vertical-align: top;
}
.print-dt {
  width: 105px;
  font-weight: 700;
  color: #333;
}
.print-thead th {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  border-bottom: 1px solid #000;
  padding-bottom: 4px;
}
.print-section {
  display: block;
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 4px;
}
.print-footer {
  text-align: center;
  font-size: 12px;
  margin-top: 8px;
}
.print-footer span {
  display: block;
}

@media print {
  @page {
    size: 80mm auto;
    margin: 8mm;
  }
  body {
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .store-body,
  .store-body * {
    background: #fff !important;
  }
  .no-print,
  .screen-only,
  .store-nav,
  .store-top-nav,
  .store-detail-header,
  .store-topline,
  .container > nav,
  footer,
  .btn,
  .pill,
  .alert,
  .form,
  .form-inline,
  .row-actions,
  .store-footer,
  .store-lightbox,
  .store-splash {
    display: none !important;
  }
  .print-receipt {
    display: block !important;
  }
}

@media screen {
  .screen-only { display: block; }
}

/* ─── SEARCHABLE DROPDOWN ─── */
.searchable-wrap {
  position: relative;
  flex: 1;
}
.searchable-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.searchable-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}
.searchable-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  display: none;
}
.searchable-results.open {
  display: block;
}
.searchable-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.1s;
}
.searchable-item:last-child { border-bottom: 0; }
.searchable-item:hover,
.searchable-item.highlight {
  background: rgba(0, 122, 255, 0.06);
}
.searchable-item .s-model {
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.searchable-item .s-variant {
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}
.searchable-item .s-imei {
  color: var(--blue);
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 11px;
  margin-left: auto;
  flex-shrink: 0;
}
.searchable-empty {
  padding: 16px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.searchable-hint {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
button.card {
  font-family: inherit;
  transition: all 0.2s ease;
}
button.card:active {
  transform: scale(0.98);
}

/* ─── SALE TYPE BUTTONS ─── */
.sale-type-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.sale-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 10px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s ease;
  text-align: center;
}
.sale-type-btn:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 12px rgba(0,122,255,0.1);
}
.sale-type-btn.active {
  border-color: var(--blue);
  background: rgba(0,122,255,0.06);
  box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}
.sale-type-btn .st-icon {
  font-size: 24px;
  line-height: 1;
}
.sale-type-btn .st-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.sale-type-btn .st-hint {
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 640px) {
  .sale-type-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .sale-type-btn {
    padding: 12px 8px;
  }
}

/* ─── PRODUCT TYPE BUTTONS ─── */
.product-type-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.product-type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s ease;
  text-align: center;
}
.product-type-btn:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 12px rgba(0,122,255,0.1);
}
.product-type-btn.active {
  border-color: var(--blue);
  background: rgba(0,122,255,0.06);
  box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}
.product-type-btn .st-icon {
  font-size: 22px;
  line-height: 1;
}
.product-type-btn .st-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

/* ─── OS BUTTONS ─── */
.os-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.os-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s ease;
  text-align: center;
}
.os-btn:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 12px rgba(0,122,255,0.1);
}
.os-btn.active {
  border-color: var(--blue);
  background: rgba(0,122,255,0.06);
  box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}
.os-btn .st-icon {
  font-size: 22px;
  line-height: 1;
}
.os-btn .st-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

/* ─── MOBILE NAV COLLAPSE ─── */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.68);
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px) scale(1.03);
}

/* Hamburger bars */
.nav-toggle .bars {
  display: inline-block;
  width: 22px;
  height: 18px;
  position: relative;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2.2px;
  background: var(--ink);
  border-radius: 4px;
}
.nav-toggle .bars::before { top: 0; }
.nav-toggle .bars::after  { top: 8px; }
/* Middle bar */
.nav-toggle .bars .mid {
  position: absolute;
  left: 0;
  top: 16px;
  width: 100%;
  height: 2.2px;
  background: var(--ink);
  border-radius: 4px;
}
/* Open state: rotate bars into X */
.nav-toggle.open .bars {
  transform: rotate(90deg);
}
.nav-toggle.open .bars::before {
  top: 8px;
  transform: rotate(45deg);
}
.nav-toggle.open .bars::after {
  top: 8px;
  transform: rotate(-45deg);
}
.nav-toggle.open .bars .mid {
  opacity: 0;
  transform: scaleX(0);
}

.nav-collapse {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  overflow: hidden;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: block;
  }

  .nav-collapse {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    transform: translateY(-16px);
    overflow: hidden;
    pointer-events: none;
  }

  .nav-collapse.open {
    max-height: 700px;
    opacity: 1;
    padding-top: 10px;
    padding-bottom: 10px;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-collapse .nav {
    justify-content: flex-start;
  }

  .nav-collapse .userbox {
    justify-content: flex-start;
  }
}
