:root {
  --navy: #0f172a;
  --navy-soft: #1e293b;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-tint: #f0fdfa;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --danger-tint: #fef2f2;
  --warn: #d97706;
  --radius: 12px;
  --control-height: 44px;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3 {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--navy);
  margin-top: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.hidden { display: none !important; }
code {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
  font-family: "SF Mono", Monaco, Consolas, monospace;
  color: var(--teal-dark);
}

/* ---------- Utility bar (external brand links, above main header) ---------- */
.utility-bar {
  background: #020617;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.utility-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.utility-bar-inner a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.utility-bar-inner a:hover { color: #2dd4bf; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: rgba(15, 23, 42, 0.98);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.brand {
  text-decoration: none;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: opacity 0.15s ease;
}
.brand:hover { opacity: 0.9; }
.brand-logo-chip {
  background: #fff;
  border-radius: 14px;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  display: block;
}
.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-word strong {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-word small {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: #94a3b8;
}
.main-nav {
  display: flex;
  gap: 8px;
  flex: 1;
}
.main-nav a {
  text-decoration: none;
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.main-nav a:hover, .main-nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.main-nav a.active {
  background: rgba(13, 148, 136, 0.15);
  color: #2dd4bf;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.icon-link {
  text-decoration: none;
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.icon-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.header-actions .link-button {
  background: transparent;
  border: none;
  padding: 8px 12px;
  color: #cbd5e1;
}
.header-actions .link-button:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.cart-link { position: relative; }
.cart-badge {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 900px) {
  .brand-word { display: none; }
  .utility-bar-inner { justify-content: center; }
  .header-inner { gap: 16px; }
  .main-nav { order: 3; width: 100%; justify-content: center; }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  background: var(--navy);
  color: #e2e8f0;
}
.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 40px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 28px;
}
@media (max-width: 900px) {
  .footer-main { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col h4 {
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 4px 0;
  letter-spacing: 0.02em;
}
.footer-col a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: #2dd4bf; }
.site-footer .muted { color: #64748b; }
.footer-col-brand { gap: 16px; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #fff;
}
.footer-brand img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  flex-shrink: 0;
  display: block;
  background: #fff;
  padding: 2px;
}
.footer-brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.footer-brand strong {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
}
.footer-brand small {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
}
.footer-utility {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}
.footer-utility p { margin: 0; }
.footer-links {
  display: flex;
  gap: 20px;
  align-items: center;
}
.footer-links a {
  color: #2dd4bf;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: #5eead4; }
.footer-divider { color: #334155; }
.link-button {
  background: none;
  border: none;
  padding: 0;
  color: #2dd4bf;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease;
}
.link-button:hover { color: #5eead4; }

/* ---------- Layout ---------- */
main.page {
  flex: 1;
  width: 100%;
  padding-bottom: 48px;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #134e4a 100%);
  color: #fff;
  padding: 64px 24px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(45, 212, 191, 0.12) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(13, 148, 136, 0.1) 0%, transparent 40%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero h1 {
  color: #fff;
  font-size: 2.5rem;
  margin: 0 0 18px 0;
  max-width: none;
  line-height: 1.15;
}
.hero p {
  color: #cbd5e1;
  margin: 0;
  max-width: none;
  font-size: 1.15rem;
  line-height: 1.75;
}
.hero-accent {
  color: #2dd4bf;
  background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 900px) {
  .hero { padding: 48px 24px; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 1rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-height);
  padding: 0 20px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  text-decoration: none;
  box-sizing: border-box;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.btn:hover {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary {
  background: var(--navy);
}
.btn-secondary:hover {
  background: var(--navy-soft);
  box-shadow: var(--shadow);
}
.btn-outline {
  background: transparent;
  color: var(--teal-dark);
  border: 1.5px solid #14b8a6;
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--teal-tint);
  color: #0f766e;
  box-shadow: var(--shadow-sm);
}
.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: var(--shadow);
}
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.84rem; }

/* ---------- Cards / panels ---------- */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.panel h3 { margin-bottom: 14px; }
.panel + .panel { margin-top: 20px; }
.button-row { display: flex; gap: 12px; }
.button-row .btn { flex: 1; }
.table-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  transition: color 0.15s ease;
}
.table-action-btn.danger { color: var(--danger); }
.table-action-btn.danger:hover { color: #991b1b; }
.success-mark {
  font-size: 2.5rem;
  color: var(--teal-dark);
  line-height: 1;
}
.panel-centered { text-align: center; }
.order-success-title { font-size: 1.5rem; margin: 8px 0; }

/* ---------- Product grid ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 22px 0;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.search-field {
  position: relative;
  flex: 1 1 280px;
  min-width: 200px;
  max-width: 440px;
}
.search-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-field input[type="text"] {
  width: 100%;
  height: var(--control-height);
  padding: 0 14px 0 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
  transition: all 0.15s ease;
}
.search-field input:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.filters select {
  height: var(--control-height);
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filters select:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin: 0 0 48px 0;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: #cbd5e1;
}
.product-thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--teal-tint) 0%, #f0fdfa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-dark);
  font-family: inherit;
  font-size: 0.95rem;
  text-align: center;
  padding: 12px;
  position: relative;
  overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-thumb img.is-placeholder { object-fit: contain; padding: 28px; box-sizing: border-box; }
.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}
.product-card h3 a { text-decoration: none; color: var(--navy); transition: color 0.15s ease; }
.product-card h3 a:hover { color: var(--teal-dark); }
.product-sku {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: "SF Mono", Monaco, Consolas, monospace;
}
.product-price {
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 4px;
}
.product-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 12px;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
  letter-spacing: 0.01em;
}
.badge-category { background: var(--teal-tint); color: var(--teal-dark); }
.badge-instock { background: #dcfce7; color: #166534; }
.badge-lowstock { background: #fef3c7; color: #92400e; }
.badge-outstock { background: var(--danger-tint); color: #991b1b; }
.badge-role { background: var(--navy); color: #fff; }
.badge-status { background: var(--teal-tint); color: var(--teal-dark); text-transform: capitalize; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0 48px 0;
}
.pagination button {
  min-width: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s ease;
}
.pagination button:hover:not(:disabled):not(.active) {
  border-color: #14b8a6;
  color: var(--teal-dark);
  background: var(--teal-tint);
}
.pagination button.active {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  border-color: #0d9488;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--navy);
}
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], select {
  width: 100%;
  height: var(--control-height);
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
  transition: all 0.15s ease;
}
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
  resize: vertical;
}
input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}
.field-error {
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: 6px;
}
.form-error-banner {
  background: var(--danger-tint);
  color: var(--danger);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  border-left: 4px solid var(--danger);
}
.form-hint {
  background: var(--teal-tint);
  color: var(--teal-dark);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.85rem;
  margin-top: 16px;
  border-left: 4px solid var(--teal);
}
.auth-card {
  margin: 56px auto;
  max-width: 420px;
}
.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--muted);
}
.auth-switch a { color: var(--teal-dark); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ---------- Cart / order tables ---------- */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}
.cart-table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0 0 10px 0;
  border-bottom: 1px solid var(--border);
}
.cart-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cart-item-info { display: flex; align-items: center; gap: 12px; }
.cart-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: var(--teal-tint);
  flex-shrink: 0;
  overflow: hidden;
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-item-thumb img.is-placeholder { object-fit: contain; padding: 8px; box-sizing: border-box; }
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.qty-stepper button {
  width: 30px;
  height: 30px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}
.qty-stepper button:hover { background: var(--teal-tint); }
.qty-stepper span {
  width: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.remove-link {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.92rem;
}
.summary-row.total {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
  margin: 28px 0 48px 0;
}
@media (max-width: 860px) {
  .cart-layout { grid-template-columns: 1fr; }
}

/* ---------- Data table (orders / admin) ---------- */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table th {
  text-align: left;
  background: linear-gradient(135deg, var(--teal-tint) 0%, #f0fdfa 100%);
  color: var(--teal-dark);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 16px;
  font-weight: 700;
}
.data-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  vertical-align: middle;
}
.data-table td:first-child:has(.admin-thumb) { width: 64px; }
.data-table tr:hover td { background: #f8fafc; }
.table-link { color: var(--teal-dark); font-weight: 700; text-decoration: none; }
.table-link:hover { text-decoration: underline; }

/* ---------- Empty states ---------- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}
.empty-state h2 { color: var(--navy); margin-bottom: 8px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 18px 0;
}
.breadcrumb a { color: var(--teal-dark); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Product detail ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 48px;
  margin: 18px 0 56px 0;
}
@media (max-width: 900px) {
  .product-detail { grid-template-columns: 1fr; }
}
.product-detail-image {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--teal-tint) 0%, #f0fdfa 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--teal-dark);
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-detail-image img.is-placeholder { object-fit: contain; padding: 18%; box-sizing: border-box; }
.product-detail h1 { font-size: 1.9rem; margin-bottom: 8px; }
.product-detail .price { font-size: 1.8rem; color: var(--teal-dark); font-weight: 700; margin: 14px 0; }
.product-detail .description { color: var(--text); line-height: 1.7; margin: 20px 0; }
.qty-row { display: flex; align-items: center; gap: 16px; margin: 24px 0; }

/* ---------- Status/step indicator ---------- */
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
  background: var(--teal-tint);
  color: var(--teal-dark);
}

/* ---------- Account ---------- */
.account-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  margin: 32px 0 56px 0;
}
@media (max-width: 760px) {
  .account-grid { grid-template-columns: 1fr; }
}
.account-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.account-nav button {
  text-align: left;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  transition: all 0.15s ease;
}
.account-nav button:hover { background: var(--teal-tint); color: var(--teal-dark); }
.account-nav button.active {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ---------- Admin ---------- */
.admin-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--teal-tint);
  overflow: hidden;
}
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-thumb img.is-placeholder { object-fit: contain; padding: 7px; box-sizing: border-box; }
.optional-tag {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8rem;
}
.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 6px 0 0 0;
}
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 16px 0;
  flex-wrap: wrap;
  gap: 12px;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 36, 56, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---------- Toasts ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}
.toast {
  background: var(--navy);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 360px;
  border-left: 4px solid #2dd4bf;
}
.toast-show { opacity: 1; transform: translateY(0); }
.toast-success { background: #064e3b; border-left-color: #34d399; }
.toast-error { background: #7f1d1d; border-left-color: #f87171; }

/* ---------- Loading ---------- */
.loading-text { color: var(--muted); padding: 24px 0; }

/* ---------- Page title row ---------- */
.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 8px;
}
.page-header {
  margin: 32px 0 8px 0;
}
.auth-card h1 {
  font-size: 1.5rem;
}
.admin-toolbar h1 {
  margin-bottom: 4px;
}

/* ---------- Legal pages (Terms, Privacy) ---------- */
.legal-page {
  padding-bottom: 56px;
}
.legal-page h2 {
  font-size: 1.1rem;
  margin: 28px 0 10px 0;
}
.legal-page p {
  line-height: 1.65;
  margin: 0 0 12px 0;
}
.legal-page ul {
  line-height: 1.65;
  margin: 0 0 12px 0;
  padding-left: 22px;
}
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: var(--teal-dark); text-decoration: underline; }
.legal-page a:hover { color: var(--teal); }
