/* Shared site header, cart, auth — matches index.html */
:root {
  --site-header-offset: 64px;
}

html {
  background: #0c0f14;
  font-family: "Inter", system-ui, Arial, sans-serif;
  overflow-x: clip;
}

body {
  background: #0c0f14;
  margin: 0;
  font-family: "Inter", system-ui, Arial, sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Opaque header — backdrop-filter causes white flashes during fast scroll */
  background: #0c0f14;
  border-bottom: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
header.site-header .row,
body > header:first-of-type:not(.post-header) .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  gap: 15px;
  flex-wrap: wrap;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
a.logo,
a.logo:link,
a.logo:visited,
a.logo:hover,
a.logo:active,
a.logo:focus {
  color: #fff;
  text-decoration: none;
}
.logo-part {
  color: #fff;
}
.logo-part--gold {
  color: var(--gold, #e5c67b);
}
nav {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
nav a {
  color: #eee;
  text-decoration: none;
  font-weight: 600;
}
nav a:hover { color: var(--gold, #e5c67b); }
nav a.nav-active { color: var(--gold, #e5c67b); }
nav a[href="/admin"] { color: var(--gold, #e5c67b); font-weight: 700; }

/* Blog links hidden until /api/blog/status check completes (see blog-nav.js). */
a[data-nav="blog"],
.blog-public-only,
a[href="/blog.html"]:not(.blog-public-only a),
a[href^="/blog.html?"]:not(.blog-public-only a) {
  display: none !important;
}

html.blog-nav-ready a[data-nav="blog"].blog-nav-visible,
html.blog-nav-ready a[href="/blog.html"]:not(.blog-public-only a).blog-nav-visible,
html.blog-nav-ready a[href^="/blog.html?"]:not(.blog-public-only a).blog-nav-visible {
  display: revert !important;
}

html.blog-nav-ready .blog-public-only.blog-nav-visible {
  display: inline !important;
}

.bonus-badge {
  position: relative;
  cursor: pointer;
  background: linear-gradient(135deg, #e5c67b, #d4a835);
  color: #000;
  padding: 8px 16px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s;
}
.bonus-badge:hover { transform: scale(1.05); }
.bonus-tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 25, 35, 0.98);
  backdrop-filter: blur(14px);
  border: 1px solid var(--gold, #e5c67b);
  border-radius: 16px;
  padding: 15px 20px;
  width: 280px;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}
.bonus-badge:hover .bonus-tooltip {
  opacity: 1;
  visibility: visible;
  bottom: 140%;
}
.bonus-tooltip h4 { color: var(--gold, #e5c67b); margin-bottom: 8px; font-size: 14px; }
.bonus-tooltip p { margin-bottom: 8px; }
.bonus-tooltip .bonus-percent { color: var(--gold, #e5c67b); font-weight: bold; }

.phone {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.phone.copied { background: #4CAF50; color: white; }

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold, #e5c67b);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 16px 6px 12px;
  border-radius: 40px;
}
.user-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.user-menu-btn:hover { background: rgba(255, 255, 255, 0.2); }

/* Логін / реєстрація — лише після повного завантаження chrome та перевірки сесії */
html:not(.site-chrome-ready) #authButtons,
html:not(.site-chrome-ready) #userInfo {
  visibility: hidden;
  pointer-events: none;
}

.auth-buttons { display: flex; gap: 10px; align-items: center; }
.login-btn {
  background: var(--gold, #e5c67b);
  border: none;
  padding: 8px 16px;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  color: #000;
}
.register-btn {
  background: transparent;
  border: 1px solid var(--gold, #e5c67b);
  padding: 8px 16px;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gold, #e5c67b);
}

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.cart-btn:hover {
  background: rgba(229, 198, 123, 0.16);
  border-color: rgba(229, 198, 123, 0.45);
}
.cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--gold, #e5c67b);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  padding: 3px 7px;
}

.header-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 20px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.header-icon-btn:hover {
  background: rgba(229, 198, 123, 0.16);
  border-color: rgba(229, 198, 123, 0.45);
}

.header-icon-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold, #e5c67b);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.header-icon-badge[hidden] {
  display: none !important;
}

.product-extra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  min-width: 0;
}

.product-action-btn {
  flex: 1 1 calc(50% - 5px);
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(229, 198, 123, 0.35);
  background: rgba(229, 198, 123, 0.08);
  color: #eee;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.product-action-btn:hover {
  background: rgba(229, 198, 123, 0.18);
  border-color: rgba(229, 198, 123, 0.55);
  color: #fff;
}

.product-action-btn.is-active {
  background: rgba(229, 198, 123, 0.24);
  border-color: var(--gold, #e5c67b);
  color: var(--gold, #e5c67b);
}

.product-action-btn .action-icon {
  font-size: 18px;
  line-height: 1;
}

.compare-page { max-width: 1200px; margin: 0 auto; padding: 30px 20px 60px; font-family: inherit; }
.compare-page h1 {
  color: var(--gold, #e5c67b);
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-family: inherit;
}
.compare-page .compare-hint { color: #aaa; margin-bottom: 24px; font-size: 16px; font-family: inherit; }
.compare-table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); font-family: inherit; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 640px; font-family: inherit; }
.compare-table th, .compare-table td { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); vertical-align: top; text-align: left; font-family: inherit; }
.compare-table th { color: rgba(255,255,255,0.72); font-weight: 600; width: 180px; background: rgba(0,0,0,0.15); }
.compare-table td { color: #fff; }
.compare-product-head { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 160px; font-family: inherit; }
.compare-product-head img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; background: #1a1a2e; }
.compare-product-head a { color: var(--gold, #e5c67b); font-weight: 700; text-decoration: none; font-family: inherit; }
.compare-remove-btn { border: none; background: rgba(244,67,54,0.15); color: #ff8a80; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; font-family: inherit; }
.compare-empty { text-align: center; padding: 48px 20px; color: #ccc; font-family: inherit; }
.compare-toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.compare-clear-btn { padding: 10px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #fff; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; }
.favorites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.favorite-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; overflow: hidden; font-family: inherit; }
.favorite-card img { width: 100%; height: 180px; object-fit: cover; display: block; background: #1a1a2e; }
.favorite-card-body { padding: 14px; font-family: inherit; }
.favorite-card-body h3 { font-size: 18px; font-weight: 600; line-height: 1.3; margin: 0 0 8px; color: #fff; font-family: inherit; }
.favorite-card-price { color: var(--gold, #e5c67b); font-weight: 800; margin-bottom: 10px; font-family: inherit; }
.favorite-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.favorite-card-actions a, .favorite-card-actions button { flex: 1; text-align: center; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; font-family: inherit; }
.favorite-card-actions a { background: rgba(229,198,123,0.18); color: var(--gold, #e5c67b); border: 1px solid rgba(229,198,123,0.35); }
.favorite-card-actions button { background: rgba(244,67,54,0.12); color: #ff8a80; border: 1px solid rgba(244,67,54,0.25); }

.user-dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: rgba(20, 25, 35, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  min-width: 200px;
  display: none;
  z-index: 100;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
  padding: 12px 16px;
  color: #eee;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.dropdown-item:hover { background: rgba(255, 255, 255, 0.1); color: var(--gold, #e5c67b); }

.auth-modal, .profile-modal, .order-history-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
}
.auth-modal.open, .profile-modal.open, .order-history-modal.open { display: flex; }

.auth-card, .profile-card, .order-history-card {
  --card-pad: 30px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: var(--card-pad);
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  margin: auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
}

.auth-card--login {
  max-width: 400px;
  padding: 24px 28px;
}

.auth-card--login .auth-subtitle {
  margin-top: 0;
}
.order-history-card { max-width: 800px; max-height: 80vh; overflow-y: auto; }

.auth-header, .profile-header, .order-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.auth-title, .profile-title, .order-history-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--gold, #e5c67b);
  margin: 0;
}
.auth-close, .profile-close, .order-history-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}

/* Keep title + close reachable while the order history card scrolls */
.order-history-header {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 20px;
  padding: var(--card-pad) var(--card-pad) 14px;
  background: rgba(24, 26, 33, 0.92);
  backdrop-filter: blur(14px);
}
.auth-switch { margin-top: 15px; text-align: center; font-size: 14px; color: #ddd; }
.auth-switch a { color: var(--gold, #e5c67b); cursor: pointer; text-decoration: none; }

.auth-panel[hidden] { display: none !important; }
.auth-credentials-form { margin-bottom: 4px; }
.auth-credentials-form .form-group { margin-bottom: 12px; }
.auth-card--login .auth-header { margin-bottom: 12px; padding-bottom: 12px; }

.auth-subtitle {
  margin: 0 0 20px;
  font-size: 14px;
  color: #ccc;
  text-align: center;
  line-height: 1.45;
}

.auth-login-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  min-height: 118px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: #aaa;
  font-size: 12px;
  line-height: 1;
  user-select: none;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.auth-divider span {
  flex-shrink: 0;
  padding: 0 2px;
}

.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  box-sizing: border-box;
  white-space: nowrap;
}

.auth-provider-btn:hover:not(:disabled) {
  opacity: 0.92;
}

.auth-provider-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.auth-provider-telegram {
  background: #2aabee;
  border-color: #229ed9;
  color: #fff;
}

.auth-provider-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.auth-provider-google {
  width: 100%;
  display: block;
}

/* Standard Google-branded button (Photo 2) — same on index, products, account */
.auth-provider-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  margin: 0;
  padding: 0 16px;
  border-radius: 4px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #747775;
  color: #1f1f1f;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.auth-provider-google-btn span {
  flex: 0 1 auto;
  text-align: center;
}

.auth-provider-google-btn:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #5f6368;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.15);
  opacity: 1;
}

.auth-provider-google-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Never show GIS personalized widget inside the login modal */
#loginModal .auth-provider-google iframe,
#loginModal .auth-provider-google [id^="g_id_"],
#loginModal .auth-provider-google > div:not(.auth-provider-google-btn) {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

#loginTelegramBlock[hidden],
#loginTelegramBlock.hidden {
  display: none !important;
}

.tradluk-google-hidden-host {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.auth-provider-icon-google {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

.auth-wait-panel {
  text-align: center;
  padding: 8px 0;
}

.auth-wait-panel[hidden] {
  display: none !important;
}

.auth-wait-link {
  display: inline-block;
  margin: 8px 0 12px;
  color: var(--gold, #e5c67b);
  font-size: 14px;
}

.telegram-bot-hint {
  font-size: 13px;
  color: #ccc;
  line-height: 1.45;
  margin: 0 0 14px;
}
.telegram-bot-hint a { color: var(--gold, #e5c67b); }

.auth-step[hidden] { display: none !important; }

.telegram-wait-msg {
  font-size: 15px;
  color: var(--gold, #e5c67b);
  text-align: center;
  margin: 12px 0;
  line-height: 1.5;
}

.link-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border: none;
  color: #bbb;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
}
.link-btn:hover { color: #fff; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: #aaa;
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}
.google-signin-wrap {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 4px;
}

.chrome-form-group, .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 15px;
}
.chrome-form-group label, .form-group label { font-weight: 600; font-size: 14px; color: #ddd; }
.form-group .small {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.65);
}
.chrome-form-group input, .form-group input,
.chrome-form-group textarea, .form-group textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
}
.submit-btn {
  background: var(--gold, #e5c67b);
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  width: 100%;
  font-size: 16px;
}
.profile-info {
  background: rgba(255, 255, 255, 0.08);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.profile-info-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.profile-info-item:last-child { border-bottom: none; }

.profile-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  max-width: 520px;
}

.profile-card .profile-header {
  flex-shrink: 0;
  margin-bottom: 0;
  padding: var(--card-pad) var(--card-pad) 14px;
}

.profile-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--card-pad) var(--card-pad);
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(229, 198, 123, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(229, 198, 123, 0.28);
}

.profile-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1a1408;
  background: linear-gradient(145deg, #f0d998, #e5c67b);
  box-shadow: 0 4px 16px rgba(229, 198, 123, 0.35);
}

.profile-hero-text {
  min-width: 0;
  flex: 1;
}

.profile-display-name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
  word-break: break-word;
}

.profile-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-section-label {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.profile-bonuses-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 22px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.profile-stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

.profile-stat-card--highlight {
  background: linear-gradient(160deg, rgba(229, 198, 123, 0.22), rgba(212, 168, 53, 0.1));
  border-color: rgba(229, 198, 123, 0.35);
}

.profile-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.2;
}

.profile-stat-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold, #e5c67b);
  line-height: 1.2;
  word-break: break-word;
}

.profile-bonuses-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.5;
  margin: 0 0 10px;
}

.profile-cashback-levels {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.profile-cashback-levels summary {
  cursor: pointer;
  color: var(--gold, #e5c67b);
  font-weight: 600;
  list-style: none;
}

.profile-cashback-levels summary::-webkit-details-marker { display: none; }

.profile-cashback-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin-top: 10px;
}

.profile-cashback-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.profile-cashback-row span:last-child {
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.profile-form {
  padding-top: 4px;
}

.profile-form .form-group:last-of-type {
  margin-bottom: 18px;
}

.profile-form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-save-btn {
  background: linear-gradient(135deg, #e5c67b, #d4a835);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.profile-save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(229, 198, 123, 0.25);
}

.profile-account-link {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  padding: 8px;
  border-radius: 10px;
  transition: color 0.15s ease, background 0.15s ease;
}

.profile-account-link:hover {
  color: var(--gold, #e5c67b);
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 480px) {
  .profile-stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-cashback-table {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

.notification-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
}
.notification {
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
}
.notification.error { border-left: 4px solid #f44336; }
.notification.warning { border-left: 4px solid #ff9800; }
.notification.success { border-left: 4px solid #4CAF50; }

/* Semi-transparent overlay when cart is open (no blur — reliable in Firefox) */
.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: none;
}
.cart-backdrop.open {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

html.tradluk-cart-open body {
  overflow: hidden;
}

html.tradluk-cart-open header.site-header,
html.tradluk-cart-open body > header:first-of-type:not(.post-header) {
  z-index: 10001;
}

.cart-drawer {
  position: fixed;
  top: var(--site-header-offset);
  right: 0;
  width: min(400px, 92vw);
  max-width: 100%;
  height: calc(100dvh - var(--site-header-offset));
  height: calc(100vh - var(--site-header-offset));
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(14px);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.35);
  z-index: 9999;
  display: none;
  flex-direction: column;
  pointer-events: none;
  transition: none;
}
.cart-drawer.open {
  display: flex;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .cart-drawer {
    width: 100%;
  }
}
.cart-head {
  padding: 18px 20px;
  font-size: 22px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-head span { color: var(--gold, #e5c67b); }
.close-cart-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.cart-items {
  flex: 1;
  overflow: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cart-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}
.cart-item img { width: 50px; height: 50px; border-radius: 10px; object-fit: cover; }
.cart-item .meta { flex: 1; }
.cart-item .meta b { font-size: 13px; display: block; margin-bottom: 4px; }
.cart-foot { padding: 18px; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.checkout-btn {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border-radius: 12px;
  border: none;
  background: var(--gold, #e5c67b);
  font-weight: 800;
  color: #000;
  cursor: pointer;
}
.clear-cart-btn {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  font-weight: 600;
  color: #ddd;
  cursor: pointer;
}
.cart-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-qty button {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
}
.remove-item-btn {
  background: transparent;
  border: none;
  color: #ff4444;
  cursor: pointer;
  font-size: 16px;
  margin-left: 8px;
}

.add-to-cart-btn.in-cart,
.add-btn.in-cart,
.add-btn-small.in-cart {
  background: rgba(76, 175, 80, 0.35);
  border: 1px solid var(--success, #4CAF50);
  color: #fff;
}

.cart-item-variants {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
}

.component-choices {
  margin-bottom: 16px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(0,0,0,0.1));
  border: 1px solid rgba(229, 198, 123, 0.18);
  overflow: visible;
}

.component-choices-title {
  margin-bottom: 6px;
  padding: 10px 12px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold, #e5c67b);
}

.component-choice-group + .component-choice-group {
  border-top: 1px solid rgba(255,255,255,0.08);
}

.component-choice-group {
  padding: 10px 12px 12px;
  overflow: visible;
}

.component-choice-selection {
  min-height: 1.2em;
  margin-bottom: 8px;
  font-size: 13px;
  color: #ddd;
  line-height: 1.35;
}

.component-choice-selection strong {
  color: var(--gold, #e5c67b);
  font-weight: 700;
}

.component-choice-pending {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
}

.component-choice-group.is-incomplete {
  margin: 0 -8px;
  padding: 10px 8px 12px;
  border-radius: 10px;
  background: rgba(244, 67, 54, 0.1);
  box-shadow: inset 0 0 0 2px rgba(244, 67, 54, 0.55);
  animation: component-choice-incomplete-pulse 0.9s ease 2;
}

.component-choice-group.is-incomplete .component-choice-pending {
  color: #ff8a80;
  font-weight: 700;
}

@keyframes component-choice-incomplete-pulse {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(244, 67, 54, 0.55); }
  50% { box-shadow: inset 0 0 0 2px rgba(255, 138, 128, 0.95); }
}

.component-choice-options {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 4px 8px;
  margin: 0 -2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 198, 123, 0.45) transparent;
}

.component-choice-options::-webkit-scrollbar {
  height: 5px;
}

.component-choice-options::-webkit-scrollbar-thumb {
  background: rgba(229, 198, 123, 0.45);
  border-radius: 999px;
}

.component-choice-option {
  position: relative;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  min-width: 58px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: #141820;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  overflow: hidden;
  isolation: isolate;
}

.component-choice-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.component-choice-thumb {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #141820;
}

.component-choice-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
}

.component-choice-option:has(input:checked) {
  border-color: var(--gold, #e5c67b);
  background: rgba(229, 198, 123, 0.08);
}

.component-choice-option:not(.is-disabled):hover {
  border-color: rgba(229, 198, 123, 0.75);
}

.component-choice-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.component-choice-oos {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.product-description--gallery {
  margin-top: 20px;
  margin-bottom: 0;
}

.product-attributes--info {
  margin-top: 20px;
}

.product-description--bottom {
  margin-top: 28px;
  margin-bottom: 0;
}

.product-info.has-component-variants .quantity-selector {
  display: flex;
}

@media (max-width: 768px) {
  .cart-drawer { width: 100%; }
}

@media (max-width: 768px) {
  .auth-modal, .profile-modal, .order-history-modal { padding: 10px; }
  .auth-card, .profile-card, .order-history-card {
    --card-pad: 18px;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }
  .auth-title, .profile-title, .order-history-title { font-size: 20px; }
}

/* Product pages: resilient layout at browser zoom / narrow columns */
.product-page {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.product-gallery,
.product-info {
  min-width: 0;
}

.product-info h1 {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.thumbnail-list {
  overflow-y: visible;
  padding-top: 6px;
}

.horizontal-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 992px) {
  .product-page {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
}

/* Product pages: sticky gallery is desktop-only */
@media (max-width: 992px) {
  .product-gallery {
    position: static;
    top: auto;
  }
}

/* Blog/article title block — never use site header sticky styles */
.post-header,
header.post-header {
  position: static;
  top: auto;
  z-index: auto;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
}

/* Site nav on pages that still use plain <header> (until static HTML is regenerated) */
body > header:first-of-type:not(.post-header) {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #0c0f14;
  border-bottom: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
