:root {
  --bg: #090909;
  --bg-accent: #232323;
  --surface: #121212;
  --surface-alt: #1b1b1b;
  --gold: #d4af37;
  --gold-soft: #f2db9c;
  --text: #f3f3f3;
  --muted: #c0c0c0;
  --body-copy: #ececec;
  --card-copy: #d8d8d8;
  --overlay-text: #ffffff;
  --link-hover: #ffffff;
  --header-bg: rgba(10, 10, 10, 0.82);
  --header-hover-text: #111111;
  --panel-bg: rgba(255, 255, 255, 0.05);
  --panel-border: rgba(212, 175, 55, 0.22);
  --footer-link: #d6d6d6;
  --button-bg: #121212;
  --button-text: #ffffff;
  --copyright-bg: #515151;
  --copyright-text: #f0f8ff;
  --product-title: #e8e8e8;
  --product-meta: #d3d3d3;
  --product-subtle: #bbbbbb;
  --product-heading: #f2db9c;
  --product-section-heading: #f0d890;
  --product-category-label: #d9a441;
  --product-category-value: #f1f1f1;
  --spec-head-bg: #1c1f25;
  --spec-cell-bg: #111318;
  --spec-border: rgba(212, 175, 55, 0.22);
  --radius: 18px;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg: #f7f4ea;
  --bg-accent: #ffffff;
  --surface: #ffffff;
  --surface-alt: #fbf7eb;
  --gold: #b88a22;
  --gold-soft: #8d6a12;
  --text: #1c1c1c;
  --muted: #5d5d5d;
  --body-copy: #222222;
  --card-copy: #2c2c2c;
  --overlay-text: #ffffff;
  --link-hover: #111111;
  --header-bg: rgba(255, 255, 255, 0.92);
  --header-hover-text: #ffffff;
  --panel-bg: rgba(255, 255, 255, 0.75);
  --panel-border: rgba(184, 138, 34, 0.28);
  --footer-link: #2d2d2d;
  --button-bg: #ffffff;
  --button-text: #1f1f1f;
  --copyright-bg: #1f1f1f;
  --copyright-text: #f5f5f5;
  --product-title: #2a2a2a;
  --product-meta: #3a3a3a;
  --product-subtle: #4b4b4b;
  --product-heading: #8d6a12;
  --product-section-heading: #9b7418;
  --product-category-label: #a56e00;
  --product-category-value: #2a2a2a;
  --spec-head-bg: #f3efe2;
  --spec-cell-bg: #ffffff;
  --spec-border: rgba(184, 138, 34, 0.25);
  --shadow: 0 16px 36px rgba(84, 68, 33, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at 20% 20%, var(--bg-accent) 0%, var(--bg) 55%);
}

a {
  color: var(--gold-soft);
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 14px clamp(16px, 4vw, 56px);
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

header img.logo {
  width: auto;
  height: clamp(56px, 7vw, 76px);
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.35));
}

header h1 {
  margin: 0;
  margin-right: auto;
  color: var(--gold-soft);
  letter-spacing: 1px;
  font-size: clamp(1.5rem, 4vw, 2.35rem);
}

header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

header a {
  color: var(--text);
  text-decoration: none;
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  padding: 10px 14px;
  border-radius: 999px;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

header a:hover {
  color: var(--header-hover-text);
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transform: translateY(-2px);
}

.theme-toggle {
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  color: var(--header-hover-text);
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--gold-soft);
}

p,
li,
label,
small,
td,
th {
  color: var(--body-copy);
}

.container,
.view {
  width: min(1240px, 94vw);
  margin-left: auto;
  margin-right: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button,
input[type="button"],
input[type="submit"] {
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

button:hover,
.button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  transform: translateY(-2px);
  background: var(--gold);
  color: #121212;
}

input,
select,
textarea {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

.card,
.panel,
.product-container,
.product-info,
.text,
.blog-block,
.ccontent {
  background: linear-gradient(145deg, var(--panel-bg), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-alt);
}

th,
td {
  border-bottom: 1px solid var(--panel-border);
  padding: 10px 12px;
}

th {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-soft);
}

footer {
  width: min(1240px, 94vw);
  margin: 42px auto 0;
  padding: 28px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel-bg);
}

footer h3 {
  margin-top: 0;
}

footer p,
footer a,
.contact-info a {
  color: var(--footer-link);
  text-decoration: none;
  line-height: 1.7;
}

footer a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.footer {
  margin-top: 18px;
  text-align: center;
  padding: 14px;
  color: var(--copyright-text);
  background: var(--copyright-bg);
}

@media (max-width: 980px) {
  header {
    flex-wrap: wrap;
    justify-content: center;
  }

  header h1 {
    margin-right: 0;
  }
}

@media (max-width: 680px) {
  header nav {
    width: 100%;
    justify-content: center;
  }

  footer {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Hard lock top menu layout across all pages */
body > header:first-of-type {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 1000 !important;
  width: 100% !important;
  min-height: 96px !important;
  margin: 0 !important;
  padding: 14px clamp(16px, 4vw, 56px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  background: var(--header-bg) !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
  backdrop-filter: blur(8px) !important;
}

body > header:first-of-type img.logo {
  height: 72px !important;
  width: auto !important;
  margin: 0 !important;
}

body > header:first-of-type h1 {
  margin: 0 !important;
  margin-right: auto !important;
  font-size: clamp(1.5rem, 4vw, 2.35rem) !important;
  line-height: 1 !important;
}

body > header:first-of-type nav {
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

body > header:first-of-type nav a,
body > header:first-of-type .theme-toggle {
  min-height: 42px !important;
  margin: 0 !important;
}

body > header:first-of-type nav a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 18px !important;
  border-radius: 999px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  transform: none !important;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease !important;
}

body > header:first-of-type nav a:hover,
body > header:first-of-type nav a:focus-visible,
body > header:first-of-type nav a.menu-current {
  background: linear-gradient(90deg, var(--gold), var(--gold-soft)) !important;
  color: var(--header-hover-text) !important;
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.25) !important;
  transform: none !important;
  font-size: 1rem !important;
}

body > header:first-of-type nav a small {
  font-size: 1em !important;
  line-height: 1 !important;
}

/* Product listing readability (Bc/Ear/Nec/Ring/Other and similar pages) */
.product h2,
.product-grid .product h2,
.product .product-title {
  color: var(--product-title) !important;
}

.product p,
.product-grid .product p,
.product .product-code,
.filter-sort span,
.filter-sort label,
.sort label,
.pagination-info,
.stock-status,
.note {
  color: var(--product-meta) !important;
}

.filter-sort,
.sort {
  color: var(--product-meta) !important;
}

/* Product toolbar contrast fix (FILTER / count / SORT BY) */
.filter-sort {
  background: linear-gradient(145deg, var(--panel-bg), rgba(255, 255, 255, 0.03)) !important;
  border: 1px solid var(--panel-border) !important;
  color: var(--body-copy) !important;
}

.filter-sort span,
.filter-sort label,
.filter-sort .sort,
.filter-sort .sort label {
  color: var(--body-copy) !important;
  font-weight: 600 !important;
}

.filter-sort .filter-button,
button.filter-button {
  background: var(--button-bg) !important;
  color: var(--button-text) !important;
  border: 1px solid var(--panel-border) !important;
  border-radius: 999px !important;
  padding: 10px 18px !important;
  font-weight: 700 !important;
}

.filter-sort .filter-button:hover,
button.filter-button:hover {
  background: var(--gold) !important;
  color: #121212 !important;
}

.filter-sort select,
.sort select,
select#sort {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--panel-border) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  font-weight: 600 !important;
}

.product-info p,
.product-info td,
.product-info li,
.product-details p,
.product-details li {
  color: var(--body-copy) !important;
}

/* Product detail key texts contrast fix */
.product-details > h1,
.product-details h1 {
  color: var(--product-heading) !important;
}

.product-details .price {
  color: var(--product-category-label) !important;
  font-weight: 700 !important;
}

.product-details .sub-text {
  color: var(--product-category-value) !important;
  font-weight: 600 !important;
}

.product-info h2,
.product-details .product-info h2 {
  color: var(--product-section-heading) !important;
}

/* Product specification table theme fix */
table.specifications,
.specifications {
  background: var(--spec-cell-bg) !important;
  border: 1px solid var(--spec-border) !important;
}

.specifications th {
  background: var(--spec-head-bg) !important;
  color: var(--gold-soft) !important;
  border-bottom: 1px solid var(--spec-border) !important;
}

.specifications td {
  background: var(--spec-cell-bg) !important;
  color: var(--body-copy) !important;
  border-bottom: 1px solid var(--spec-border) !important;
}

/* Product detail layout: image under title, above category, centered */
.product-container.product-layout-stacked {
  display: block !important;
}

.product-container.product-layout-stacked > .product-details {
  width: min(980px, 94vw) !important;
  margin: 0 auto !important;
}

.product-container.product-layout-stacked > .product-details > .product-image {
  position: static !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  margin: 14px auto 18px !important;
  padding: 0 !important;
  overflow: visible !important;
  cursor: zoom-in !important;
}

.product-container.product-layout-stacked > .product-details > .product-image img {
  position: static !important;
  display: block !important;
  width: min(460px, 92%) !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 14px !important;
  transition: transform 0.2s ease !important;
}

.product-image.zoom-enabled {
  cursor: crosshair !important;
}

@media (max-width: 980px) {
  body > header:first-of-type {
    min-height: 88px !important;
  }

  body > header:first-of-type img.logo {
    height: 62px !important;
  }
}

@media (max-width: 680px) {
  body > header:first-of-type {
    min-height: 84px !important;
    justify-content: center !important;
  }

  body > header:first-of-type img.logo {
    height: 56px !important;
  }

  body > header:first-of-type nav {
    width: 100% !important;
    justify-content: center !important;
  }
}
