/* =========================================================
   Onitoy Store - Premium Japanese Gunpla/Hobby Retailer
   Phase 4 Visual Redesign
   ========================================================= */

/* =========================================================
   1. VARIABLES
   ========================================================= */
:root {
  /* Colors - Premium Japanese Gunpla retailer */
  --bg: #0d0d14;
  --bg-2: #14141f;
  --surface: #1a1a24;
  --surface-2: #202030;
  --border: #3a3a4f;
  --border-strong: #4a4a64;
  --text: #f5f0e8;
  --text-muted: #a8a29e;
  --red-primary: #d12b2b;
  --red-accent: #c42f37;
  --navy: #0f172a;
  --gold: #c9a84c;
  --gold-subtle: rgba(201, 168, 76, 0.12);
  --success: #38a169;
  --danger: #e53e3e;

  /* Subtle effects only - no neon, no RGB */
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.3);

  /* Shape */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;
  --container-max: 1440px;

  /* Typography */
  --font-body: "Inter", "YuGo", "Hiragino Kaku Gothic ProN", "Hiragino Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Noto Sans JP", "Inter", "YuGo", system-ui, -apple-system, sans-serif;
}

/* =========================================================
   2. RESET & BASE
   ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   3. TYPOGRAPHY
   ========================================================= */
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.section-head h2,
.page-hero h1 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.section-head p {
  color: var(--text-muted);
  margin-top: 8px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-subtle);
  margin-bottom: 10px;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--border-strong);
  border-radius: 2px;
}

/* =========================================================
   4. NAVIGATION
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 20, 0.8);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.logo span {
  background: var(--red-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* =========================================================
   Fix for invisible text on Contact page
   ========================================================= */
.section .order-summary,
.section .contact-grid,
.section .summary-item,
.section .order-summary h3,
.section .order-summary .summary-item,
.section .order-summary span {
  color: #f5f0e8 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

  visibility: visible !important;
}

/* Ensure var(--text) resolves correctly - add explicit fallback */
:root {
  --text: #f5f0e8;
}

/* Direct color override for contact-specific elements */
[data-key*="contact"] {
  color: #f5f0e8 !important;
  opacity: 1 !important;
}

/* Admin orders: fulfillment dropdown + confirm-paid button */
.orders-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.orders-actions .confirm-payment {
  padding: 7px 12px;
  font-size: 0.78rem;
  white-space: nowrap;
}

/* =========================================================
   Message / contact image attachments
   ========================================================= */
/* Customer contact form attachment preview */
.contact-attachment-preview {
  position: relative;
  display: inline-block;
  margin-top: 12px;
}

.contact-attachment-preview img {
  max-width: 160px;
  max-height: 160px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
}

/* Admin messages list attachment indicator */
.messages-table .msg-attachment {
  display: inline-block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 500;
}

.messages-table .msg-attachment:hover {
  color: var(--text);
}

/* Admin message detail attachment image */
.message-detail-attachment {
  display: inline-block;
  margin-top: 14px;
}

.message-detail-attachment img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-2);
}

/* =========================================================
   Responsive - Messages & Payment Settings
   ========================================================= */
@media (max-width: 768px) {
  .messages-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .messages-toolbar .filter-box select {
    width: 100%;
  }

  .messages-unread-badge {
    align-self: flex-start;
  }

  .messages-table .msg-preview {
    max-width: 220px;
  }

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

  .qr-block {
    flex-direction: column;
  }

  .qr-upload {
    min-width: 0;
  }

  .message-detail {
    max-width: 100%;
  }
}

@media (max-width: 400px) {
  .messages-table .msg-preview {
    max-width: 160px;
  }

  .messages-table .actions-btn-group {
    flex-direction: column;
    gap: 6px;
  }

  .message-detail-dialog[open] {
    padding: 12px;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  position: relative;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.93rem;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--border-strong);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover {
  color: var(--red-primary);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a.active {
  color: var(--red-primary);
}

.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* Search button in nav */
.nav-search {
  min-width: 84px;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 0.2s, color 0.2s;
}

.nav-search:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
}

@media (max-width: 480px) {
  .nav-search {
    min-width: 72px;
    padding: 0 12px;
    font-size: 0.88rem;
  }
}

/* Cart button with badge */
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  background: var(--red-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.15s;
}

.cart-btn:hover {
  background: var(--red-accent);
  transform: translateY(-1px);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1200;
  font-size: 0.65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.cart-count.hidden {
  display: none;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.menu-toggle:hover {
  color: var(--red-primary);
}

/* =========================================================
   5. HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 100px 0;
  background: var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0d0d14 0%, var(--bg) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 64px;
}

.hero-content {
  animation: fadeUp 0.8s ease both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 22px;
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: var(--text);
}

.hero p {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.hero-stats div {
  display: flex;
  flex-direction: column;
}

.hero-stats strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
}

.hero-stats span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Visual area - clean, no glowing orbs */
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 440px;
  animation: fadeIn 1s ease 0.2s both;
}

.hero-visual img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-md);
}

/* =========================================================
   6. BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.15s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-primary {
  background: var(--red-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(209, 43, 43, 0.35);
}

.btn-primary:hover {
  background: var(--red-accent);
  box-shadow: 0 6px 20px rgba(209, 43, 43, 0.45);
}

.btn-outline {
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid var(--border);
  color: var(--gold);
}

.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.16);
  color: var(--gold);
}

.btn-danger {
  background: rgba(229, 62, 62, 0.12);
  color: var(--danger);
  border: 1px solid rgba(229, 62, 62, 0.25);
}

.btn-danger:hover {
  background: rgba(229, 62, 62, 0.2);
  box-shadow: 0 0 14px rgba(229, 62, 62, 0.2);
}

.btn-block { width: 100%; }
.btn-lg { padding: 16px 34px; font-size: 0.95rem; }
.btn-sm { padding: 9px 16px; font-size: 0.72rem; }

/* =========================================================
   7. SECTIONS, PAGE HERO & HEADINGS
   ========================================================= */
.section {
  padding: 80px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.section-head p {
  color: var(--text-muted);
  margin-top: 8px;
}

/* Page hero for About / Contact / Checkout */
.page-hero {
  position: relative;
  padding: 56px 0;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}

.page-hero p {
  color: var(--text-muted);
  margin-top: 8px;
}

.about-logo {
  width: clamp(120px, 28vw, 200px);
  height: auto;
  margin: 0 auto 24px;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

/* Generic content card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.card h2 {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
}

.card h3 {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

/* =========================================================
   8. SEARCH & CATEGORIES
   ========================================================= */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 18px;
  width: 100%;
  max-width: 460px;
  transition: border-color 0.2s;
}

.search-bar:focus-within {
  border-color: var(--red-primary);
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--text);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar .search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.6;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.22s;
}

.chip:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
  transform: translateY(-1px);
}

.chip.active {
  background: var(--red-primary);
  border-color: transparent;
  color: #fff;
}

/* =========================================================
   9. PRODUCTS & DEALS
   ========================================================= */
.product-grid,
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.3s, border-color 0.3s;
  animation: fadeUp 0.55s ease both;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(209, 43, 43, 0.25);
  box-shadow: var(--shadow-hover);
}

/* Image area - clean, product images focus */
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

/* Grade badge - replaces card-badge */
.card-grade {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: none;
}

.card-grade.hg {
  background: rgba(209, 43, 43, 0.2);
  color: var(--red-primary);
  border: 1px solid rgba(209, 43, 43, 0.3);
}

.card-grade.rg {
  background: rgba(15, 23, 42, 0.5);
  color: var(--navy);
  border: 1px solid rgba(15, 23, 42, 0.4);
}

.card-grade.mg {
  background: rgba(209, 43, 43, 0.2);
  color: var(--red-primary);
  border: 1px solid rgba(209, 43, 43, 0.3);
}

.card-grade.pg {
  background: rgba(15, 23, 42, 0.5);
  color: var(--navy);
  border: 1px solid rgba(15, 23, 42, 0.4);
}

.card-grade.sd {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.card-grade.tools {
  background: rgba(209, 43, 43, 0.2);
  color: var(--red-primary);
  border: 1px solid rgba(209, 43, 43, 0.3);
}

.card-grade.decals {
  background: rgba(15, 23, 42, 0.5);
  color: var(--navy);
  border: 1px solid rgba(15, 23, 42, 0.4);
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category {
  font-family: var(--font-display);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-line-clamp: 2;
  overflow: hidden;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 16px;
  line-height: 1.4;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.price-block {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
}

.price::before {
  content: none;
}

.old-price {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.old-price::before {
  content: none;
}

.card-footer .add-to-cart {
  white-space: nowrap;
}

/* "Added" feedback */
.add-feedback {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  background: var(--success);
  color: #052e22;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.product-card.just-added .add-feedback {
  opacity: 1;
  transform: scale(1);
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.empty-state .big-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
  filter: none;
}

/* =========================================================
   10. FEATURES / TRUST
   ========================================================= */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.feature {
  position: relative;
  background: rgba(26, 26, 36, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  overflow: hidden;
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.25s;
}

.feature:hover {
  border-color: rgba(209, 43, 43, 0.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--border-strong);
  opacity: 0.4;
}

.feature-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: var(--radius-md);
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.2);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.feature h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.feature p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =========================================================
   11. CART DRAWER
   ========================================================= */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 13, 20, 0.8);
  backdrop-filter: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s;
  z-index: 200;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 100%;
  max-width: 420px;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s ease;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.cart-header h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.15rem;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.close-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--red-primary);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
}

.cart-empty .big-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
  filter: none;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  animation: fadeUp 0.3s ease both;
}

.cart-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  color: var(--text);
  display: grid;
  place-items: center;
  transition: all 0.15s;
}

.qty-btn:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
}

.qty-value {
  min-width: 20px;
  text-align: center;
  font-weight: 600;
}

.remove-btn {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--danger);
  font-weight: 500;
}

.remove-btn:hover {
  text-decoration: underline;
}

.cart-item-total {
  font-weight: 700;
  color: var(--red-primary);
  white-space: nowrap;
}

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}

.cart-summary-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.cart-summary-row.total span:last-child {
  color: var(--red-primary);
}

/* =========================================================
   12. FORMS
   ========================================================= */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--bg-2);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #6a6a7c;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red-primary);
  box-shadow: 0 0 0 3px rgba(209, 43, 43, 0.1), 0 0 8px rgba(209, 43, 43, 0.1);
}

.form-group select option {
  background: var(--surface);
  color: var(--text);
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* =========================================================
   13. CHECKOUT
   ========================================================= */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: start;
}

.order-summary {
  position: sticky;
  top: 88px;
}

.order-summary h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border-strong);
  font-size: 0.88rem;
  color: var(--text);
}

.summary-item .qty {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.summary-lines {
  margin-bottom: 10px;
}

@media (min-width: 768px) {
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .contact-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .contact-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .summary-item:last-child {
    grid-column: 1 / -1;
  }
}

.grand-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 700;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.grand-total span:last-child {
  color: var(--red-primary);
}

/* =========================================================
   14. ALERTS & TOAST
   ========================================================= */
.alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.88rem;
  margin-bottom: 12px;
  display: none;
}

.alert.show {
  display: block;
  animation: fadeUp 0.3s ease both;
}

.alert-success {
  background: rgba(56, 161, 105, 0.12);
  color: var(--success);
  border: 1px solid rgba(56, 161, 105, 0.2);
}

.alert-error {
  background: rgba(229, 62, 62, 0.12);
  color: var(--danger);
  border: 1px solid rgba(229, 62, 62, 0.2);
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-3);
  border: 1px solid var(--red-primary);
  color: var(--text);
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 300;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.telegram-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.telegram-qr-image {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.telegram-qr-label {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Focused contact page */
.contact-page-hero {
  background:
    linear-gradient(135deg, rgba(209, 43, 43, 0.08), transparent 45%),
    var(--bg);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}

.contact-details {
  display: grid;
  gap: 14px;
}

.contact-info-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: rgba(26, 26, 36, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.contact-info-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: var(--gold-subtle);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius-md);
  font-size: 1.1rem;
}

.contact-info-card h2 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  margin-bottom: 5px;
}

.contact-info-card p,
.contact-form-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--gold);
  font-weight: 600;
}

.contact-link:hover {
  color: var(--text);
}

.telegram-card .telegram-qr-image {
  margin-top: 14px;
  width: 136px;
  height: 136px;
  object-fit: contain;
  background: #fff;
  padding: 6px;
}

.contact-form h2 {
  margin-bottom: 8px;
}

.contact-form-intro {
  margin: 0 0 24px;
}

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

@media (max-width: 600px) {
  .telegram-qr-image {
    width: 80px;
    height: 80px;
  }
}

/* Telegram card - two owner QR entries */
.telegram-card .telegram-owners {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 8px;
}
.telegram-card .telegram-owner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.telegram-card .telegram-owner-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 6px;
}
.telegram-card .telegram-qr-btn {
  margin-top: 0;
}

/* Telegram QR enlargement modal / lightbox */
.telegram-card .telegram-qr-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 0;
  background: none;
  border: none;
  cursor: zoom-in;
  line-height: 0;
}

.qr-dialog {
  border: none;
  color: var(--text);
}

/* Center the enlarged QR in the middle of the viewport via a
   fixed-position overlay that covers the screen and flex centering. */
.qr-dialog[open] {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  padding: 24px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.qr-dialog::backdrop {
  background: rgba(8, 8, 12, 0.9);
  backdrop-filter: blur(2px);
}

.qr-dialog-content {
  margin: auto;
  max-width: 1040px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  text-align: center;
}

.qr-dialog-content img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(88vw, 900px);
  max-height: 78vh;
  object-fit: contain;
  margin: 0 auto 16px;
  background: #fff;
  padding: 8px;
  border-radius: var(--radius-md);
}

.qr-dialog-content h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.qr-dialog-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

@media (max-width: 600px) {
  .qr-dialog-content {
    padding: 18px;
    max-width: 96vw;
  }
  .qr-dialog-content img {
    max-width: 92vw;
    max-height: 70vh;
  }
}

/* =========================================================
   15. FOOTER
   ========================================================= */
.site-footer {
  background: #08080c;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  margin-top: auto;
  padding: 40px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 26px;
}

.footer-grid p {
  font-size: 0.88rem;
  margin-top: 8px;
  max-width: 300px;
}

.footer h4 {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.footer ul {
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
}

.footer ul a {
  transition: color 0.2s;
}

.footer ul a:hover {
  color: var(--red-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-size: 0.8rem;
  text-align: center;
}

/* =========================================================
   16. ANIMATIONS
   ========================================================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =========================================================
   17. RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-visual {
    min-height: 280px;
  }

  .hero {
    min-height: auto;
  }

  .hero-stats {
    gap: 24px;
  }
}

@media (max-width: 860px) {
  .nav {
    gap: 8px;
  }

  .nav-actions {
    gap: 8px;
    flex-wrap: nowrap;
  }

  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-2);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px;
    gap: 2px;
    transform: translateY(-140%);
    transition: transform 0.3s ease;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-links a {
    display: block;
    padding: 12px 14px;
  }

  .cart-text {
    display: none;
  }

  .cart-btn {
    padding: 11px 14px;
  }

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

  .order-summary {
    position: static;
  }

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

@media (max-width: 600px) {
  .hero {
    padding: 48px 0;
  }

  .hero-stats {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-visual {
    min-height: 220px;
  }

  .visual-ring {
    display: none;
  }

  .section {
    padding: 44px 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 16px;
  }

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

/* =========================================================
   Admin Panel Styles - Light Onitoy brand refresh
   ========================================================= */
.admin-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.admin-product-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-featured-badge {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-featured-badge.yes {
  background: rgba(209, 43, 43, 0.2);
  color: var(--red-primary);
  border: 1px solid rgba(209, 43, 43, 0.3);
}

.admin-featured-badge.no {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}

.admin-status-pending,
.admin-status-processing,
.admin-status-shipped,
.admin-status-delivered {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}

.admin-status-pending {
  background: rgba(209, 43, 43, 0.15);
  color: var(--red-primary);
  border: 1px solid rgba(209, 43, 43, 0.25);
}

.admin-status-processing {
  background: var(--surface-2);
  color: var(--navy);
  border: 1px solid var(--border-strong);
}

.admin-status-shipped {
  background: rgba(56, 161, 105, 0.15);
  color: var(--success);
  border: 1px solid rgba(56, 161, 105, 0.2);
}

.admin-status-delivered {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}

.admin-stock-input {
  width: 50px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  text-align: center;
}

.admin-stock-input:focus {
  outline: none;
  border-color: var(--red-primary);
  box-shadow: 0 0 0 3px rgba(209, 43, 43, 0.1);
}

.btn-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-icon:hover {
  color: var(--red-primary);
}

.status-pending {
  background: rgba(209, 43, 43, 0.15);
  color: var(--red-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-processing {
  background: var(--surface-2);
  color: var(--navy);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-shipped {
  background: rgba(56, 161, 105, 0.15);
  color: var(--success);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-delivered {
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =========================================================
   18. ADMIN LOGIN PAGE
   ========================================================= */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(209, 43, 43, 0.1), transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(201, 168, 76, 0.05), transparent 45%),
    linear-gradient(180deg, var(--bg) 0%, #0a0a10 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  background: rgba(26, 26, 36, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 40px rgba(209, 43, 43, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
}

.login-logo {
  width: 110px;
  height: 110px;
  margin: 0 auto 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--text);
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.login-form .form-group {
  text-align: left;
  margin-bottom: 20px;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.password-toggle:hover {
  color: var(--gold);
  background: var(--gold-subtle);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.password-toggle .password-eye-off {
  display: none;
}

.password-toggle.showing .password-eye {
  display: none;
}

.password-toggle.showing .password-eye-off {
  display: block;
}

.login-form .form-group:last-of-type {
  margin-bottom: 0;
}

.btn-login {
  margin-top: 8px;
  padding: 14px;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

@media (max-width: 480px) {
  .login-page {
    padding: 16px;
  }

  .login-card {
    padding: 36px 24px;
  }

  .login-logo {
    width: 90px;
    height: 90px;
    margin-bottom: 22px;
  }

  .login-title {
    font-size: 1.35rem;
  }

  .login-subtitle {
    font-size: 0.85rem;
    margin-bottom: 26px;
  }
}

/* =========================================================
   19. ADMIN PANEL
   ========================================================= */
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
}

.sidebar-logo .logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.toggle-nav {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 4px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.93rem;
  transition: background 0.2s, color 0.2s;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background: var(--gold-subtle);
  color: var(--gold);
}

.sidebar-nav .nav-link svg {
  flex-shrink: 0;
}

.admin-main {
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 90;
  height: 72px;
  padding: 0 28px;
  background: rgba(13, 13, 20, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-header h1 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-name {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.user-dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  list-style: none;
  padding: 6px;
  display: none;
}

.user-dropdown.open {
  display: block;
}

.user-dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
}

.user-dropdown a:hover {
  background: var(--surface-2);
}

.dashboard,
.products-page,
.inventory-page,
.orders-page,
.product-editor,
.categories-page,
.settings-page,
.activity-log-page,
.messages-page,
.payment-settings-page {
  flex: 1;
  padding: 28px;
}

.section-header {
  margin-bottom: 24px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gold-subtle);
  color: var(--gold);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.card-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.card-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.products-toolbar,
.inventory-toolbar,
.orders-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 360px;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.93rem;
}

.filter-box select,
.inventory-toolbar select,
.orders-toolbar select {
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.93rem;
  min-width: 160px;
}

.products-table-container,
.categories-table-container,
.activity-log-table-container,
.messages-table-container,
.orders-table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.products-table,
.inventory-table,
.orders-table,
.messages-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.products-table thead,
.inventory-table thead,
.orders-table thead,
.messages-table thead {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.products-table th,
.inventory-table th,
.orders-table th,
.messages-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.products-table td,
.inventory-table td,
.orders-table td,
.messages-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.products-table tbody tr:last-child td,
.inventory-table tbody tr:last-child td,
.orders-table tbody tr:last-child td,
.messages-table tbody tr:last-child td {
  border-bottom: none;
}

.product-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-right: 12px;
  vertical-align: middle;
  background: var(--bg-2);
}

.product-thumb-small {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-right: 10px;
  vertical-align: middle;
  background: var(--bg-2);
}

.product-name {
  display: inline-block;
  vertical-align: middle;
  font-weight: 500;
}

.actions-btn-group {
  display: flex;
  gap: 8px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.btn-icon:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
  background: rgba(209, 43, 43, 0.08);
}

.featured-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-2);
  color: var(--text-muted);
}

.featured-badge.featured {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
}

.status-in-stock,
.status-delivered {
  color: var(--success);
  font-weight: 500;
}

.status-low-stock,
.status-pending {
  color: #f6ad55;
  font-weight: 500;
}

.status-out-of-stock,
.status-cancelled {
  color: var(--danger);
  font-weight: 500;
}

.status-processing,
.status-shipped {
  color: #63b3ed;
  font-weight: 500;
}

.status-pending-payment {
  color: #f6ad55;
  font-weight: 500;
}

.status-paid {
  color: var(--success);
  font-weight: 500;
}

.status-failed,
.status-refunded,
.status-expired {
  color: var(--danger);
  font-weight: 500;
}

.stock-input {
  width: 80px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.9rem;
}

.status-update {
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.85rem;
}

.product-form {
  max-width: 760px;
}

.product-form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.product-image-preview-container {
  position: relative;
  display: inline-block;
  margin-top: 10px;
}

.product-image-preview-container img {
  max-width: 180px;
  max-height: 180px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: cover;
}

.remove-image-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  border: none;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.admin-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.categories-table-container,
.activity-log-table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.categories-table,
.activity-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.categories-table thead,
.activity-log-table thead {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.categories-table th,
.categories-table td,
.activity-log-table th,
.activity-log-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.categories-table th,
.activity-log-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.categories-table tbody tr:last-child td,
.activity-log-table tbody tr:last-child td {
  border-bottom: none;
}

.categories-table code {
  background: var(--bg-2);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.settings-form .admin-card .form-group {
  margin-bottom: 16px;
}

.settings-form .admin-card .form-group:last-child {
  margin-bottom: 0;
}

.settings-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.settings-form input,
.settings-form textarea {
  width: 100%;
  max-width: 480px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.93rem;
}

.settings-form textarea {
  resize: vertical;
}

.empty-state,
.loading-state {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pagination-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* =========================================================
   Customer Messages (admin) - table + detail dialog
   ========================================================= */
.messages-unread-badge {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.message-row.unread td:first-child {
  box-shadow: inset 3px 0 0 var(--gold);
}

.messages-table .msg-sender {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.messages-table .msg-contact {
  color: var(--text-muted);
  font-size: 0.83rem;
}

.messages-table .msg-subject-cell {
  min-width: 240px;
}

.messages-table .msg-subject {
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.messages-table .msg-no-subject {
  font-style: italic;
  opacity: 0.7;
  font-weight: 400;
  color: var(--text-muted);
}

.messages-table .msg-preview {
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messages-table .actions-btn-group .btn-icon:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-subtle);
}

.msg-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.msg-badge.msg-unread {
  background: rgba(201, 168, 76, 0.18);
  color: var(--gold);
}

.msg-badge.msg-read {
  background: rgba(134, 144, 158, 0.15);
  color: var(--text-muted);
}

.toggle-message-status {
  padding: 7px 12px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.error-state {
  text-align: center;
  padding: 32px;
  color: var(--danger);
  font-size: 0.95rem;
}

/* Message detail dialog */
.message-detail-dialog {
  border: none;
  color: var(--text);
}

.message-detail-dialog[open] {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  padding: 24px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.message-detail-dialog::backdrop {
  background: rgba(8, 8, 12, 0.9);
  backdrop-filter: blur(2px);
}

.message-detail {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin: auto;
}

.message-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.message-detail-head h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.message-detail-meta {
  padding: 18px 20px 0;
}

.detail-from {
  font-size: 0.95rem;
  color: var(--text);
}

.detail-from span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.detail-date {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 4px;
}

.message-detail-body {
  padding: 16px 20px 20px;
}

.message-detail-body p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.message-detail-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
}

/* =========================================================
   Payment Settings (admin)
   ========================================================= */
.payment-status-card {
  border-left: 3px solid var(--border-strong);
}

.payment-status-card.payment-enabled {
  border-left-color: var(--success);
}

.payment-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.payment-status-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.payment-status-dot {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #6a6a7c;
}

.payment-status-dot.enabled {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(56, 161, 105, 0.15);
}

.payment-status-dot.disabled {
  background: #6a6a7c;
}

.payment-status-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.payment-status-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card-description {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.field-hint {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.75;
  margin-top: 2px;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s, background 0.2s;
}

.switch input:checked + .switch-track {
  background: var(--success);
  border-color: var(--success);
}

.switch input:checked + .switch-track::after {
  transform: translateX(22px);
  background: #fff;
}

.switch-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.qr-block {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.qr-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.qr-preview img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
}

.qr-preview span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.qr-upload {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-label {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.qr-upload input[type="file"] {
  padding: 10px;
  background: var(--bg-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.qr-upload small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

@media (max-width: 900px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .toggle-nav {
    display: block;
  }

  .dashboard-cards {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 640px) {
  .admin-header {
    padding: 0 16px;
  }

  .dashboard,
  .products-page,
  .inventory-page,
  .orders-page,
  .product-editor,
  .categories-page,
  .settings-page,
  .activity-log-page,
  .messages-page,
  .payment-settings-page {
    padding: 18px;
  }

  .products-table th,
  .products-table td,
  .inventory-table th,
  .inventory-table td,
  .orders-table th,
  .orders-table td,
  .categories-table th,
  .categories-table td,
  .activity-log-table th,
  .activity-log-table td {
    padding: 12px;
  }

  .product-form .form-row,
  .category-form .form-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   24. PRODUCT DETAIL PAGE
   ========================================================= */

.product-detail-page {
  flex: 1;
  padding: 32px 0 80px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--red-primary);
}

.breadcrumb span:last-child {
  color: var(--text);
}

.product-detail {
  margin-bottom: 64px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.product-detail-media {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: grid;
  grid-template-rows: 100%;
  place-items: center;
}

.product-detail-media img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.product-detail-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--bg-2);
  font-size: 5rem;
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.product-detail-category {
  font-family: var(--font-display);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--gold);
}

.product-detail-name {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

.product-detail-price-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.product-detail-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

.product-detail-old-price {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-detail-stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
}

.product-detail-stock.in-stock {
  background: rgba(56, 161, 105, 0.15);
  color: var(--success);
}

.product-detail-stock.low-stock {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
}

.product-detail-stock.out-of-stock {
  background: rgba(229, 62, 62, 0.15);
  color: var(--danger);
}

.product-detail-description {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.product-detail-meta {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.product-detail-meta span {
  color: var(--text);
  font-weight: 500;
}

.product-detail-meta code {
  font-family: var(--font-body);
  background: var(--bg-2);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text);
}

.product-detail-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.quantity-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}

.quantity-selector input {
  width: 56px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 0;
  -moz-appearance: textfield;
}

.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-selector .qty-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--text);
  transition: background 0.2s;
}

.quantity-selector .qty-btn:hover {
  background: var(--bg-2);
}

.product-detail-actions .add-to-cart-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.product-detail-loading,
.product-detail-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  gap: 16px;
  color: var(--text-muted);
}

.product-detail-error h2 {
  color: var(--text);
  font-size: 1.5rem;
}

.product-detail-error .btn {
  margin-top: 8px;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--red-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Make product card media/title clickable links */
.product-card {
  cursor: pointer;
}

.product-card .add-to-cart,
.product-card .qty-btn {
  cursor: pointer;
}

/* Language switcher in nav */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  transition: border-color 0.2s, color 0.2s;
}

.lang-switcher:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
}

.lang-current {
  pointer-events: none;
}

.related-products .section-head {
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .product-detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .quantity-selector {
    width: 100%;
    justify-content: center;
  }

  .aba-qr-section {
    margin-top: 24px;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px var(--border);
  }

  .aba-qr-preview {
    text-align: center;
    margin-bottom: 16px;
  }

  .aba-qr-preview img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px var(--border);
    padding: 8px;
    background: var(--surface-elevated);
  }

  .aba-qr-text {
    color: var(--muted);
    font-size: 0.875rem;
    margin-top: 8px;
  }

  .aba-qr-instructions {
    margin-top: 12px;
    padding: 12px;
    background: var(--surface-light);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    line-height: 1.5;
  }
}

/* =========================================================
   Fix for invisible text on Contact page
   ========================================================= */
.section .order-summary,
.section .contact-grid,
.section .summary-item,
.section .order-summary h3,
.section .order-summary .summary-item,
.section .order-summary span {
  color: #f5f0e8 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

  visibility: visible !important;
}

/* Ensure var(--text) resolves correctly - add explicit fallback */
:root {
  --text: #f5f0e8;
}

/* Direct color override for contact-specific elements */
[data-key*="contact"] {
  color: #f5f0e8 !important;
  opacity: 1 !important;
}

/* Admin orders: fulfillment dropdown + confirm-paid button */
.orders-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.orders-actions .confirm-payment {
  padding: 7px 12px;
  font-size: 0.78rem;
  white-space: nowrap;
}

/* Product pagination */
.pagination {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}
.pagination.show { display: flex; }
.page-btn {
  padding: 10px 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.page-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.page-indicator { color: var(--text-muted); font-size: 0.9rem; }

/* ABA QR compact preview + lightbox viewer (checkout) */
.aba-qr-open {
  display: inline-block;
  padding: 0;
  margin: 0 auto;
  background: none;
  border: none;
  cursor: zoom-in;
  line-height: 0;
  border-radius: var(--radius-md);
  transition: box-shadow 0.2s, transform 0.15s;
}
.aba-qr-open:hover {
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.25), 0 6px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}
.aba-qr-open img {
  display: block;
  width: 190px;
  height: auto;
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px;
}

@media (max-width: 640px) {
  .aba-qr-open img {
    width: 160px;
  }
}
.qr-viewer {
  border: none;
  color: var(--text);
}
.qr-viewer[open] {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  padding: 24px;
  background: rgba(8, 8, 12, 0.92);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}
.qr-viewer::backdrop {
  background: rgba(8, 8, 12, 0.92);
  backdrop-filter: blur(2px);
}
.qr-viewer-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 90vh;
}
.qr-viewer-content img {
  display: block;
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  background: #fff;
  padding: 12px;
}
.qr-viewer-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.qr-viewer-close:hover {
  background: rgba(255, 255, 255, 0.22);
}
body.modal-open {
  overflow: hidden;
}

/* Admin orders: customer information */
.order-customer-name { font-weight: 600; }
.order-customer-contact { color: var(--text-muted); font-size: 0.83rem; margin-top: 2px; }
.order-customer-location { color: var(--text-muted); font-size: 0.83rem; margin-top: 2px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Product listing sort control */
.store-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 18px;
  flex-wrap: wrap;
}
.sort-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#product-sort {
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 200px;
}
#product-sort:focus {
  outline: none;
  border-color: var(--red-primary);
  box-shadow: 0 0 0 3px rgba(209, 43, 43, 0.1);
}
@media (max-width: 640px) {
  #product-sort {
    width: 100%;
    min-width: 0;
  }
}

/* Checkout success: download receipt button */
.receipt-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
}

/* Admin destructive delete actions */
.message-delete-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(229, 62, 62, 0.1);
}

/* =========================================================
   Order Review + Order Confirmation (checkout)
   ========================================================= */
.order-summary .review-head,
.order-summary .review-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
}
.order-summary .review-head {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-strong);
}
.order-summary .review-row {
  padding: 9px 0;
  border-bottom: 1px dashed var(--border-strong);
  font-size: 0.86rem;
  color: var(--text);
}
.order-summary .review-product {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-summary .review-qty,
.order-summary .review-price,
.order-summary .review-subtotal {
  text-align: right;
  color: var(--text-muted);
}
.order-summary .review-subtotal {
  color: var(--text);
  font-weight: 600;
}
.order-summary .grand-total.total {
  border-top: 2px solid var(--brand);
  margin-top: 4px;
}
.order-summary .grand-total.total span:last-child {
  color: var(--brand);
}

.order-confirmation {
  max-width: 640px;
  margin: 24px auto;
  text-align: center;
  padding: 28px 24px;
}
.order-confirmation h2 {
  font-family: var(--font-display);
  margin-bottom: 10px;
}
.order-confirmation .summary-lines {
  text-align: left;
  max-width: 420px;
  margin: 18px auto;
}
.order-confirmation .payment-note {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 18px;
}
.order-confirmation .payment-manual-section {
  max-width: 320px;
  margin: 12px auto 18px;
  text-align: center;
}
.order-confirmation .receipt-download,
.order-confirmation #conf-new-order {
  margin: 4px 6px;
  display: inline-block;
}
@media (max-width: 768px) {
  .order-summary .review-head {
    display: none;
  }
  .order-summary .review-row {
    grid-template-columns: 1fr auto;
  }
  .order-summary .review-price {
    display: none;
  }
}

/* =========================================================
   About - Owner section
   ========================================================= */
.owner-section {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.owner-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 8px;
}
.owner-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
}
.owner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px;
  width: 100%;
  max-width: 300px;
  text-align: center;
}
.owner-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.owner-img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: top;
}
.owner-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.owner-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.owner-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
@media (max-width: 480px) {
  .owner-img {
    height: 260px;
  }
}

/* =========================================================
   Admin - table pagination controls
   ========================================================= */
.table-pagination {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.table-pagination.show {
  display: flex;
}
.table-pagination .page-btn {
  padding: 8px 14px;
  min-width: 36px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.table-pagination .page-btn:hover:not(:disabled):not(.active) {
  border-color: var(--gold);
  color: var(--gold);
}
.table-pagination .page-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #0d0d14;
}
.table-pagination .page-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.table-pagination .page-ellipsis {
  color: var(--text-muted);
  padding: 0 2px;
}
.table-pagination .pagination-summary {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0 6px;
}

