:root,
[data-theme="light"] {
  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #d9f7f3;
  --accent: #ef7d5b;
  --accent-soft: #fff0ea;
  --ink: #172033;
  --body: #415064;
  --muted: #6b7a90;
  --surface: #ffffff;
  --surface-soft: #f6faf9;
  --surface-strong: #eef7f4;
  --border: #d7e3df;
  --sidebar: #102f3a;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #2563eb;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.10), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  --sidebar-width: 284px;
  color-scheme: light;
}

[data-theme="dark"] {
  --primary: #5eead4;
  --primary-dark: #2dd4bf;
  --primary-soft: rgba(94, 234, 212, 0.14);
  --accent: #fb9a7a;
  --accent-soft: rgba(251, 154, 122, 0.14);
  --ink: #f8fafc;
  --body: #d5deea;
  --muted: #a3b0c2;
  --surface: #111b26;
  --surface-soft: #0b1420;
  --surface-strong: #182636;
  --border: rgba(255, 255, 255, 0.12);
  --sidebar: #061923;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 4px 14px rgba(0, 0, 0, 0.22);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.24);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--body);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0)),
    var(--surface-soft);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

[data-theme="dark"] body {
  background:
    linear-gradient(180deg, rgba(94, 234, 212, 0.05), rgba(94, 234, 212, 0)),
    var(--surface-soft);
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

[data-theme="dark"] a {
  color: var(--primary);
}

img {
  max-width: 100%;
}

.material-symbols-outlined {
  font-size: 1.25rem;
  line-height: 1;
  vertical-align: middle;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

[data-theme="dark"] .site-header {
  background: rgba(17, 27, 38, 0.88);
}

.header-main {
  display: grid;
  grid-template-columns: minmax(270px, max-content) minmax(340px, 1fr) auto;
  gap: 22px;
  align-items: center;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  min-width: 0;
  max-width: 100%;
  flex: 0 0 auto;
}

.brand > span:last-child {
  display: block;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: #101820;
  border-radius: 50%;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

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

.brand strong {
  display: block;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.brand small {
  display: block;
  max-width: none;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.header-nav-bar {
  background: rgba(248, 250, 252, 0.72);
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

[data-theme="dark"] .header-nav-bar {
  background: rgba(15, 23, 42, 0.50);
}

.header-nav-inner {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  color: var(--body);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.header-search input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 0.88rem;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--body);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.icon-btn:hover,
.icon-btn.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: rgba(15, 118, 110, 0.28);
}

.wishlist-btn.active .material-symbols-outlined,
.icon-btn.active .material-symbols-outlined {
  color: var(--accent);
  font-variation-settings: "FILL" 1;
}

.badge-button b {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  color: #ffffff;
  background: var(--accent);
  border: 2px solid var(--surface);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.mobile-menu-button {
  display: none;
}

.account-menu {
  position: relative;
}

.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.account-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  min-width: 190px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.account-menu:hover .account-panel,
.account-menu:focus-within .account-panel {
  display: grid;
  gap: 4px;
}

.account-panel a {
  padding: 9px 10px;
  color: var(--body);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 800;
}

.account-panel a:hover {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #ffffff;
  background: var(--primary-dark);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  color: #ffffff;
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.18);
}

.btn-primary:hover {
  color: #ffffff;
  background: var(--primary);
}

.btn-accent {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.btn-ghost {
  color: var(--body);
  background: var(--surface);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.btn-danger {
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
}

.btn-small {
  min-height: 34px;
  padding: 0.38rem 0.72rem;
  font-size: 0.78rem;
}

.btn:disabled,
.btn.disabled,
.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.btn.disabled {
  pointer-events: none;
}

.hero-section {
  display: flex;
  align-items: flex-end;
  min-height: 660px;
  color: #ffffff;
  background-image:
    radial-gradient(circle at 76% 48%, rgba(15, 118, 110, 0.20), rgba(15, 118, 110, 0) 32%),
    linear-gradient(90deg, rgba(5, 13, 18, 0.92) 0%, rgba(8, 20, 27, 0.78) 37%, rgba(8, 20, 27, 0.20) 72%),
    linear-gradient(180deg, rgba(5, 13, 18, 0.08) 0%, rgba(5, 13, 18, 0.48) 100%),
    var(--hero-image, url("../img/hero-shop.png"));
  background-position: center;
  background-size: cover;
}

.proposal-hero,
.retail-hero {
  background-position: center right;
}

.hero-copy {
  max-width: 760px;
  padding: 84px 0 42px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #bff3e8;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(3rem, 5.8vw, 5.7rem);
  font-weight: 800;
  line-height: 0.94;
}

.hero-copy p {
  max-width: 650px;
  margin: 20px 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.65;
}

.hero-actions,
.section-actions,
.form-actions,
.cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  margin-top: 28px;
}

.hero-quick-links a {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(14px);
}

.hero-quick-links a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.hero-quick-links .material-symbols-outlined {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #bff3e8;
  background: rgba(15, 118, 110, 0.28);
  border-radius: 8px;
}

.hero-quick-links strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
  max-width: 760px;
}

.trust-row div {
  padding: 14px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.trust-row strong {
  display: block;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
}

.section {
  padding: 48px 0;
}

.section-muted {
  background: rgba(15, 118, 110, 0.05);
}

.proposal-band {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(37, 99, 235, 0.06)),
    var(--surface);
}

.proposal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: center;
}

.proposal-grid h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.proposal-grid p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.65;
}

.proposal-points {
  display: grid;
  gap: 10px;
}

.proposal-points span {
  padding: 12px 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-header h2,
.auth-card h1,
.page-title h1,
.admin-topbar h1 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.08;
}

.section-header h2 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.section-header p,
.page-title p {
  margin: 7px 0 0;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.5;
}

.category-grid,
.product-grid,
.kpi-grid,
.admin-card-grid {
  display: grid;
  gap: 18px;
}

.category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card,
.product-card,
.surface-card,
.auth-card,
.admin-card,
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  color: #ffffff;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(11, 31, 35, 0.10), rgba(11, 31, 35, 0.76));
}

.category-card div {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1;
}

.category-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 800;
}

.category-card p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 650;
}

.product-card {
  overflow: hidden;
}

.product-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 0.82;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96)),
    var(--surface-strong);
}

.product-media img {
  width: 100%;
  height: 100%;
  padding: 14px;
  object-fit: contain;
  transition: transform 0.24s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.035);
}

.product-category {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  padding: 6px 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.demo-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  color: #155e75;
  background: rgba(236, 254, 255, 0.92);
  border: 1px solid rgba(14, 116, 144, 0.20);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.product-card-body {
  padding: 14px;
}

.product-card-top,
.product-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-brand {
  margin-top: 10px;
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.product-brand-large {
  margin: 12px 0 0;
  font-size: 0.84rem;
}

.product-card h3 {
  min-height: 48px;
  margin: 12px 0 7px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.product-card h3 a {
  color: var(--ink);
}

.product-card p {
  min-height: 56px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.45;
}

.product-card-bottom strong,
.cart-price,
.summary-value {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.badge-success {
  color: #166534;
  background: #dcfce7;
}

.badge-warning {
  color: #92400e;
  background: #fef3c7;
}

.badge-danger {
  color: #991b1b;
  background: #fee2e2;
}

.badge-info {
  color: #1e3a8a;
  background: #dbeafe;
}

[data-theme="dark"] .badge-success {
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.18);
}

[data-theme="dark"] .badge-warning {
  color: #fed7aa;
  background: rgba(217, 119, 6, 0.18);
}

[data-theme="dark"] .badge-danger {
  color: #fecaca;
  background: rgba(220, 38, 38, 0.18);
}

[data-theme="dark"] .badge-info {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.18);
}

.page-title {
  padding: 34px 0 20px;
}

.shop-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 48px;
}

.filter-card,
.summary-card {
  padding: 18px;
}

.filter-card {
  position: sticky;
  top: 96px;
  align-self: start;
}

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

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.form-control,
.form-select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.62rem 0.75rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  font-size: 0.88rem;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
}

.flash-wrap {
  padding-top: 18px;
}

.alert-success {
  color: #14532d;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.alert-warning {
  color: #7c2d12;
  background: #ffedd5;
  border-color: #fed7aa;
}

.alert-danger {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: #fecaca;
}

.alert-info {
  color: #1e3a8a;
  background: #dbeafe;
  border-color: #bfdbfe;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 30px;
  padding-bottom: 54px;
}

.gallery-main {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.gallery-main img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.78;
  padding: 18px;
  object-fit: contain;
}

.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.gallery-thumbs button {
  width: 82px;
  height: 68px;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.gallery-thumbs button.active {
  border-color: var(--primary);
}

.gallery-thumbs img {
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
}

.product-detail-copy {
  padding: 8px 0;
}

.product-detail-copy h1 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
}

.product-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.product-meta-grid div {
  padding: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.product-meta-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.product-meta-grid strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.3;
}

.product-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}

.product-price-row strong {
  color: var(--ink);
  font-size: 2rem;
  font-weight: 800;
}

.product-price-row del {
  color: var(--muted);
  font-weight: 800;
}

.product-description {
  color: var(--body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.7;
}

.spec-panel,
.demo-note {
  margin-top: 18px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.spec-panel h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1rem;
}

.spec-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--body);
  font-weight: 650;
  line-height: 1.45;
}

.demo-note {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.55;
}

.demo-note strong {
  color: var(--ink);
}

.demo-note a {
  display: inline-flex;
  margin-left: 8px;
  color: var(--primary-dark);
  font-weight: 800;
}

.quantity-control {
  display: inline-grid;
  grid-template-columns: 44px 68px 44px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.quantity-control button,
.quantity-control input {
  height: 42px;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  text-align: center;
}

.quantity-control input {
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.cart-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding-bottom: 52px;
}

.cart-list {
  display: grid;
  gap: 12px;
}

.cart-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.cart-row img {
  width: 96px;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-row h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 1rem;
}

.cart-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.cart-row-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.summary-card {
  align-self: start;
  position: sticky;
  top: 96px;
}

.summary-card h2,
.surface-card h2,
.admin-card h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  color: var(--body);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.summary-line.total {
  color: var(--ink);
  border-bottom: 0;
  font-size: 1.18rem;
  font-weight: 800;
}

.empty-state {
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.empty-state .material-symbols-outlined {
  display: block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 2rem;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  min-height: 100vh;
}

.auth-hero {
  display: flex;
  align-items: end;
  padding: 48px;
  color: #ffffff;
  background-image:
    linear-gradient(180deg, rgba(12, 28, 34, 0.18), rgba(12, 28, 34, 0.82)),
    url("../img/hero-shop.png");
  background-size: cover;
  background-position: center;
}

.auth-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1;
}

.auth-hero p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 650;
  line-height: 1.6;
}

.auth-panel {
  display: flex;
  align-items: center;
  padding: 32px;
}

.auth-card {
  width: 100%;
  padding: 28px;
}

.auth-card h1 {
  margin-bottom: 8px;
}

.auth-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-weight: 650;
}

.auth-card .brand {
  margin-bottom: 28px;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--body);
  font-size: 0.88rem;
}

.data-table th {
  padding: 12px;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 0.74rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 12px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.data-table strong {
  color: var(--ink);
}

.data-table .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pagination-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 10px;
  color: var(--body);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 800;
}

.pagination-links a.active,
.pagination-links a:hover {
  color: #ffffff;
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.pagination-links a.disabled {
  pointer-events: none;
  opacity: 0.45;
}

.admin-body {
  background: var(--surface-soft);
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 18px 12px;
  overflow-y: auto;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(239, 125, 91, 0.12), rgba(239, 125, 91, 0)),
    var(--sidebar);
}

.admin-brand {
  padding: 10px;
  margin-bottom: 12px;
}

.admin-brand strong,
.admin-brand small {
  color: #ffffff;
}

.admin-brand small {
  color: rgba(255, 255, 255, 0.62);
}

.admin-nav {
  display: grid;
  gap: 4px;
}

.admin-nav a,
.admin-sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 11px;
  color: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 800;
}

.admin-nav a:hover,
.admin-nav a.active,
.admin-sidebar-footer a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
}

.admin-nav a.active {
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.95), rgba(239, 125, 91, 0.55));
}

.admin-sidebar-footer {
  display: grid;
  gap: 6px;
  padding-top: 14px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.user-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
}

.user-row strong {
  display: block;
  color: #ffffff;
  font-size: 0.86rem;
}

.user-row small {
  color: rgba(255, 255, 255, 0.58);
  font-weight: 700;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 44px 1fr;
  align-items: center;
  justify-items: center;
  min-height: 38px;
  margin: 3px 8px 8px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
}

.mode-switch i {
  width: 38px;
  height: 20px;
  background: var(--primary);
  border-radius: 999px;
}

.mode-switch i::before {
  display: block;
  width: 16px;
  height: 16px;
  margin: 2px;
  content: "";
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.18s ease;
}

[data-theme="dark"] .mode-switch i::before {
  transform: translateX(18px);
}

.admin-main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

[data-theme="dark"] .admin-topbar {
  background: rgba(17, 27, 38, 0.88);
}

.admin-topbar h1 {
  font-size: 1.18rem;
}

.admin-topbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-content {
  padding: 28px;
}

.kpi-grid,
.admin-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.admin-card,
.surface-card {
  padding: 18px;
}

.admin-card-wide {
  grid-column: span 2;
}

.kpi-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 8px;
}

.kpi-value {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}

.kpi-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.admin-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.admin-filter-bar .form-group {
  flex: 1 1 190px;
  margin-bottom: 0;
}

.admin-image-preview {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.admin-image-preview img {
  width: 72px;
  height: 58px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
}

.admin-image-preview span,
.detail-text {
  color: var(--muted);
  font-weight: 650;
  line-height: 1.6;
}

.choice-field {
  display: flex;
  gap: 10px;
  align-items: center;
}

.inventory-adjust-form,
.order-update-form {
  gap: 7px;
}

.stock-input {
  width: 92px;
}

.stock-note-input {
  min-width: 180px;
}

.order-status-select {
  min-width: 128px;
}

.payment-status-select {
  min-width: 112px;
}

.order-total-box {
  max-width: 360px;
  margin-top: 16px;
  margin-left: auto;
}

.btn-full {
  width: 100%;
}

.auth-link-spaced {
  margin-top: 18px;
}

.chart-frame {
  position: relative;
  height: 320px;
  min-height: 0;
}

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 900;
  display: grid;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.site-footer {
  padding: 36px 0;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 24px;
}

.footer-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.footer-grid a {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.footer-grid a:hover {
  color: var(--primary-dark);
}

.footer-grid p {
  margin: 0;
  max-width: 280px;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.55;
}

.footer-brand {
  align-items: flex-start;
}

.admin-mobile-menu,
.admin-overlay {
  display: none;
}

@media (max-width: 1100px) {
  .header-main {
    grid-template-columns: minmax(240px, max-content) minmax(240px, 1fr) auto;
    gap: 14px;
  }

  .main-nav a {
    padding-inline: 11px;
  }

  .product-grid,
  .category-grid,
  .kpi-grid,
  .admin-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .header-main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .header-search {
    order: 3;
    grid-column: 1 / -1;
  }

  .header-actions {
    justify-self: end;
  }

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--body);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
  }

  .header-nav-bar {
    position: relative;
    border-top: 0;
    background: transparent;
  }

  .header-nav-inner {
    min-height: 0;
  }

  .main-nav {
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    z-index: 220;
    display: none;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: visible;
  }

  .main-nav.open {
    display: grid;
    gap: 4px;
  }

  .main-nav a {
    justify-content: flex-start;
    width: 100%;
  }

  .account-trigger span:last-child {
    display: none;
  }

  .hero-section {
    min-height: 560px;
    background-position: 64% center;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero-copy h1 {
    font-size: clamp(2.8rem, 8vw, 4.6rem);
  }

  .hero-quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 560px;
  }

  .trust-row,
  .proposal-grid,
  .shop-layout,
  .product-detail-grid,
  .cart-layout,
  .checkout-layout,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .filter-card,
  .summary-card {
    position: static;
  }

  .auth-hero {
    min-height: 340px;
  }

  .auth-panel {
    padding: 20px;
  }

  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.18s ease;
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: none;
    background: rgba(15, 23, 42, 0.5);
  }

  .admin-overlay.active {
    display: block;
  }

  .admin-mobile-menu {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 240;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
  }

  .admin-main {
    margin-left: 0;
  }

  .admin-topbar {
    padding-left: 68px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .header-main {
    gap: 10px;
  }

  .brand small,
  .header-actions .btn {
    display: none;
  }

  .brand strong {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-section {
    min-height: 620px;
    background-position: 72% center;
  }

  .hero-copy {
    padding: 46px 0 40px;
  }

  .hero-copy h1 {
    max-width: 360px;
    font-size: 2.55rem;
    line-height: 0.98;
  }

  .hero-copy p {
    max-width: 360px;
    font-size: 0.98rem;
  }

  .hero-quick-links {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .hero-quick-links a {
    min-height: 82px;
    padding: 12px;
  }

  .trust-row {
    gap: 8px;
  }

  .trust-row div {
    padding: 11px;
  }

  .section {
    padding: 34px 0;
  }

  .section-header,
  .pagination-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-grid,
  .category-grid,
  .kpi-grid,
  .admin-card-grid,
  .product-meta-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .cart-row {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .cart-row img {
    width: 78px;
    height: 76px;
  }

  .cart-row-actions {
    grid-column: 1 / -1;
    justify-items: stretch;
  }

  .cart-row-actions .cart-price {
    text-align: right;
  }

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

  .admin-content {
    padding: 20px 14px;
  }

  .admin-card-wide,
  .admin-card[style*="grid-column"] {
    grid-column: 1 / -1 !important;
  }

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