/* =====================================================================
   TitanCraft — Premium B2B Jewelry Components Showcase
   European / US aesthetic: refined neutrals, gold accent, generous space
   ===================================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
  /* Light theme (default) */
  --bg: #fbfaf8;
  --bg-soft: #f4f1ec;
  --surface: #ffffff;
  --surface-2: #f8f6f2;
  --text: #1a1814;
  --text-soft: #4a463f;
  --muted: #8a8478;
  --accent: #b08a45;
  --accent-deep: #8c6d33;
  --accent-soft: #f3ead9;
  --slate: #232a33;
  --border: rgba(26, 24, 20, 0.09);
  --border-strong: rgba(26, 24, 20, 0.16);
  --shadow-sm: 0 1px 3px rgba(26,24,20,0.06), 0 1px 2px rgba(26,24,20,0.04);
  --shadow-md: 0 10px 30px -12px rgba(26,24,20,0.18);
  --shadow-lg: 0 24px 60px -20px rgba(26,24,20,0.28);
  --glass: rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.6);
  --radius: 16px;
  --radius-lg: 24px;
  --radius-sm: 10px;
  --maxw: 1240px;
  --header-h: 72px;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #0c0e11;
  --bg-soft: #111418;
  --surface: #161a1f;
  --surface-2: #1c2127;
  --text: #f4f1ea;
  --text-soft: #cfc9bd;
  --muted: #8d877b;
  --accent: #d4af6a;
  --accent-deep: #e8c887;
  --accent-soft: #2a2417;
  --slate: #c9d2dd;
  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 14px 40px -14px rgba(0,0,0,0.6);
  --shadow-lg: 0 30px 70px -22px rgba(0,0,0,0.7);
  --glass: rgba(20,24,29,0.66);
  --glass-border: rgba(255,255,255,0.10);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; color: var(--text); }

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

/* ---------- Background ambient ---------- */
.ambient {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 0%, var(--accent-soft) 0%, transparent 60%),
    radial-gradient(50% 45% at 100% 10%, rgba(176,138,69,0.07) 0%, transparent 55%);
}
[data-theme="dark"] .ambient { opacity: .9; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.brand .logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  display: grid; place-items: center; color: #fff; font-size: 19px;
  box-shadow: var(--shadow-sm);
}
.brand .brand-sub { font-family: var(--font-body); font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; display: block; margin-top: -4px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 16px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--text-soft);
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--accent-deep); background: var(--accent-soft); }

.header-tools { display: flex; align-items: center; gap: 10px; }

/* Language switcher */
.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--text-soft);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.lang-btn:hover { border-color: var(--border-strong); color: var(--text); }
.lang-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 168px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s; z-index: 50;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text-soft); transition: background-color .2s;
}
.lang-menu button:hover { background: var(--surface-2); color: var(--text); }
.lang-menu button.active { color: var(--accent-deep); font-weight: 600; }

/* Theme toggle */
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; color: var(--text-soft); font-size: 18px;
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .3s var(--ease);
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); transform: rotate(15deg); }

.menu-toggle { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-size: 15px; font-weight: 600; letter-spacing: .01em;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
  will-change: transform;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; box-shadow: 0 8px 22px -8px rgba(176,138,69,0.6); }
.btn-primary:hover { box-shadow: 0 14px 30px -8px rgba(176,138,69,0.7); }
.btn-outline { border: 1.5px solid var(--border-strong); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn-ghost { color: var(--text-soft); padding: 13px 18px; }
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 16px 34px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:active { transform: scale(.97); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-deep); background: var(--accent-soft); padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(38px, 5vw, 62px); margin-bottom: 22px; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-deep) 60%, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.lead { font-size: 19px; color: var(--text-soft); max-width: 520px; margin-bottom: 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 52px; }
.hero-stats .stat .num { font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--text); }
.hero-stats .stat .lbl { font-size: 13px; color: var(--muted); letter-spacing: .04em; }

/* Hero visual — floating product mock */
.hero-visual { position: relative; height: 440px; display: grid; place-items: center; }
.hero-visual .orb {
  position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-soft), transparent 70%);
  filter: blur(8px);
}
.glass-card {
  position: relative; display: block; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-lg);
  padding: 26px; width: 320px; color: inherit;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.glass-card:hover { transform: translateY(-6px); box-shadow: 0 32px 80px -22px rgba(26,24,20,0.34); }
.glass-card .gc-img { width: 100%; height: 220px; border-radius: var(--radius); background: var(--surface-2); overflow: hidden; display: grid; place-items: center; }
.glass-card .gc-img img { width: 100%; height: 100%; object-fit: cover; }
.glass-card .gc-title { font-family: var(--font-display); font-size: 18px; margin-top: 16px; }
.glass-card .gc-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.glass-card .gc-price { font-weight: 700; color: var(--accent-deep); }
.glass-card .gc-tag { font-size: 12px; color: var(--muted); }

.float-badge {
  position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-md); padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600;
  animation: floaty 5s ease-in-out infinite;
}
.float-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: #3fb950; box-shadow: 0 0 0 4px rgba(63,185,80,0.18); }
.float-badge.b1 { top: 8%; left: -8%; }
.float-badge.b2 { bottom: 14%; right: -6%; animation-delay: 1.5s; }

@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Section ---------- */
.section { padding: 84px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section-head .eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-deep); }
.section-head h2 { font-size: clamp(30px, 3.4vw, 44px); margin: 14px 0 14px; }
.section-head p { color: var(--text-soft); font-size: 17px; }

/* ---------- Feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 28px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.feature-card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
  background: var(--accent-soft); color: var(--accent-deep); margin-bottom: 20px;
}
.feature-card h3 { font-family: var(--font-body); font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { color: var(--text-soft); font-size: 15px; }

/* ---------- Category chips ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cat-card {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; display: flex; flex-direction: column; gap: 12px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.cat-card .c-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); display: grid; place-items: center; font-size: 22px; }
.cat-card h3 { font-family: var(--font-body); font-size: 18px; font-weight: 700; }
.cat-card .c-desc { color: var(--muted); font-size: 14px; flex: 1; }
.cat-card .c-count { font-size: 13px; color: var(--accent-deep); font-weight: 600; }

/* ---------- Product grid ---------- */
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.search-box { position: relative; flex: 1; min-width: 240px; }
.search-box input {
  width: 100%; padding: 13px 18px 13px 44px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 15px; font-family: inherit; transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.search-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-box .si { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 17px; }
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none; -webkit-appearance: none; padding: 13px 40px 13px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit; cursor: pointer;
}
.select-wrap::after { content: '▾'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 12px; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }

.product-card {
  position: relative;
  isolation: isolate;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.product-card .pc-img { position: relative; aspect-ratio: 1/1; background: var(--surface-2); overflow: hidden; }
.product-card .pc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.product-card:hover .pc-img img { transform: scale(1.07); }
.product-card .pc-badge {
  position: absolute; top: 14px; left: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 12px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep);
  box-shadow: var(--shadow-sm);
}
.product-card .pc-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-card .pc-cat { font-size: 12px; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.product-card .pc-name { font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--text); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .pc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.product-card .pc-price { font-weight: 700; color: var(--accent-deep); font-size: 17px; }
.product-card .pc-price small { font-size: 12px; color: var(--muted); font-weight: 500; }
.product-card .pc-moq { font-size: 12px; color: var(--muted); }
.product-card .pc-link { position: absolute; inset: 0; z-index: 1; }

/* ---------- Product detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.detail-gallery { position: sticky; top: 100px; }
.detail-gallery .main-img { border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); aspect-ratio: 1/1; box-shadow: var(--shadow-md); }
.detail-gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-info .breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.detail-info .breadcrumb a:hover { color: var(--accent-deep); }
.detail-info h1 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 16px; }
.detail-info .d-meta { display: flex; gap: 28px; margin-bottom: 26px; flex-wrap: wrap; }
.detail-info .d-meta .m .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.detail-info .d-meta .m .v { font-weight: 700; font-size: 20px; color: var(--accent-deep); }
.detail-info .d-meta .m .v small { font-size: 13px; color: var(--muted); font-weight: 500; }
.detail-info .block { margin-bottom: 28px; }
.detail-info .block h3 { font-family: var(--font-body); font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.detail-info .block p { color: var(--text-soft); font-size: 16px; }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.spec-list .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.spec-list .row .sk { color: var(--muted); }
.spec-list .row .sv { color: var(--text); font-weight: 600; text-align: right; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-visual { border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); aspect-ratio: 4/3; display: grid; place-items: center; box-shadow: var(--shadow-md); }
.about-visual .av-mark { font-family: var(--font-display); font-size: 64px; color: var(--accent); }
.about-text h2 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 20px; }
.about-text p { color: var(--text-soft); font-size: 17px; margin-bottom: 16px; }
.about-list { display: grid; gap: 12px; margin-top: 24px; }
.about-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-soft); }
.about-list li .ck { color: var(--accent-deep); font-weight: 700; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info .ci-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.contact-info .ci-item .ci-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.contact-info .ci-item .ci-k { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.contact-info .ci-item .ci-v { font-weight: 600; color: var(--text); }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-family: inherit; font-size: 15px; line-height: 1.4; transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; }
.field select {
  /* strip browser-native chrome so it matches input exactly */
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  /* room for custom chevron on the right */
  padding-right: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%237a6b56' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
}
[data-theme="dark"] .field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%23c2b89c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface);
}
/* Checkbox / radio escape .field input's full-width + chrome (otherwise
   the 100% width + padding pulls the box to the middle and pushes the
   label text to the far right, breaking the inline row layout). */
.field input[type="checkbox"],
.field input[type="radio"] {
  width: auto; padding: 0; border: 0; background: transparent;
  margin: 0; box-shadow: none; accent-color: var(--accent); cursor: pointer;
}
.field input[type="checkbox"]:focus,
.field input[type="radio"]:focus {
  outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none;
}
/* Checkbox list used in settings (translation fallbacks, etc.) */
.checkbox-list { display: flex; flex-direction: column; gap: 4px; padding: 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); }
.checkbox-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--text);
  transition: background .18s var(--ease); }
.checkbox-item:hover { background: rgba(122,107,86,0.08); }
[data-theme="dark"] .checkbox-item:hover { background: rgba(255,255,255,0.05); }
.checkbox-item input { flex: 0 0 auto; width: 16px; height: 16px; }
.checkbox-item .ci-num { flex: 0 0 24px; height: 22px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
  color: var(--muted); }
.checkbox-item:has(input:checked) .ci-num { background: var(--accent); color: #fff; border-color: var(--accent); }
.checkbox-item .ci-name { flex: 1 1 auto; }
.checkbox-item .ci-meta { color: var(--muted); font-size: 12px; margin-left: auto; }

/* Sortable list — drag to reorder, tick to enable. Used by 翻译服务 fallback. */
.sortable-list { display: flex; flex-direction: column; gap: 4px; padding: 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.sortable-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 6px; font-size: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  cursor: grab; transition: background .18s var(--ease), border-color .18s var(--ease), opacity .18s var(--ease); user-select: none; }
.sortable-item:hover { border-color: var(--accent); }
.sortable-item:active { cursor: grabbing; }
.sortable-item .si-handle { flex: 0 0 auto; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 2px; letter-spacing: -2px; }
.sortable-item .si-num { flex: 0 0 24px; height: 22px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.sortable-item.is-on .si-num { background: var(--accent); color: #fff; border-color: var(--accent); }
.sortable-item .si-toggle { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; }
.sortable-item .si-toggle input { flex: 0 0 auto; width: 16px; height: 16px; cursor: pointer; }
.sortable-item .si-name { flex: 1 1 auto; }
.sortable-item.is-off { opacity: .45; }
.sortable-item.is-off .si-num { background: transparent; color: transparent; border-color: transparent; }
.sortable-item.dragging { opacity: .4; border-style: dashed; }
.sortable-item.drag-over { border-color: var(--accent); box-shadow: 0 -2px 0 var(--accent); }

/* shared control row — keeps label-above + button-baseline aligned */
.field-row { display:flex; gap:14px; align-items:flex-end; flex-wrap:wrap; }
.field-row > .field { flex: 1 1 0; min-width: 160px; margin-bottom: 0; }
.field-row > .field-btn { flex: 0 0 auto; margin-bottom: 0; }
.field-row > .field-btn .btn { padding: 13px 26px; }  /* match input vertical padding */
.form-msg { padding: 13px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; font-weight: 500; }
.form-msg.ok { background: rgba(63,185,80,0.12); color: #2c8a3c; border: 1px solid rgba(63,185,80,0.3); }
.form-msg.err { background: rgba(220,80,60,0.1); color: #c0392b; border: 1px solid rgba(220,80,60,0.3); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--slate), #2f3947); color: #fff; border-radius: var(--radius-lg); padding: 56px 48px; text-align: center; }
[data-theme="dark"] .cta-band { background: linear-gradient(135deg, #1a1f26, #232b35); }
.cta-band h2 { color: #fff; font-size: clamp(30px, 3.2vw, 42px); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; margin-bottom: 18px; }
.cta-band .cta-company { color: var(--accent); font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; letter-spacing: .05em; margin-bottom: 14px; }
.cta-band p { color: rgba(255,255,255,0.65); font-size: 15px; margin-bottom: 32px; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-band .btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 64px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; margin-bottom: 44px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { color: var(--text-soft); font-size: 15px; max-width: 320px; }
.footer-col h4 { font-family: var(--font-body); font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 18px; }
.footer-col a { display: block; color: var(--text-soft); font-size: 15px; padding: 6px 0; transition: color .2s; }
.footer-col a:hover { color: var(--accent-deep); }
.footer-news p { color: var(--text-soft); font-size: 14px; margin-bottom: 14px; }
.footer-news .news-row { display: flex; gap: 8px; }
.footer-news input { flex: 1; padding: 11px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-family: inherit; font-size: 14px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .float-badge { animation: none; } }

/* ---------- Back to top ---------- */
.to-top { position: fixed; right: 24px; bottom: 24px; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); display: grid; place-items: center; font-size: 20px; color: var(--text); opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .35s var(--ease); z-index: 90; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--accent-deep); border-color: var(--accent); }

/* ---------- Breadcrumb / page header ---------- */
.page-head { padding: 56px 0 12px; text-align: center; }
.page-head h1 { font-size: clamp(32px, 3.6vw, 48px); }
.page-head p { color: var(--text-soft); font-size: 17px; margin-top: 12px; }

/* ---------- Admin ---------- */
.admin-wrap { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.admin-side { background: var(--slate); color: #fff; padding: 28px 20px; display: flex; flex-direction: column; gap: 6px; }
.admin-side .a-brand { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 24px; padding: 0 8px; }
.admin-side a { color: rgba(255,255,255,0.7); padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 500; transition: background .2s, color .2s; display: flex; align-items: center; gap: 10px; }
.admin-side a:hover, .admin-side a.active { background: rgba(255,255,255,0.1); color: #fff; }
.admin-side .a-spacer { flex: 1; }
.admin-side .a-out { color: rgba(255,255,255,0.6); }
.admin-main { padding: 32px 40px; overflow: auto; }
.admin-main h1 { font-size: 28px; margin-bottom: 8px; }
.admin-main .a-sub { color: var(--muted); margin-bottom: 28px; }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.admin-table tr:hover td { background: var(--surface-2); }
.admin-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent-deep); }
.tag.off { background: var(--surface-2); color: var(--muted); }
.intro-cell { max-width: 280px; color: var(--muted); font-size: 12px; line-height: 1.5; vertical-align: top; }
.field-help { font-size: 12px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
.tab-row { display: inline-flex; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.tab { padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; transition: background .2s, color .2s; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); color: #fff; }
.db-label { display: block; margin-bottom: 6px; font-weight: 600; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.img-cell { position: relative; display: block; border: 2px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; transition: border-color .2s, transform .2s; background: var(--surface-2); }
.img-cell:hover { transform: translateY(-2px); }
.img-cell input[type=checkbox] { position: absolute; top: 8px; left: 8px; width: 18px; height: 18px; accent-color: var(--accent); z-index: 2; }
.img-cell:has(input:checked) { border-color: var(--accent); }
.img-cell img { width: 100%; height: 110px; object-fit: cover; display: block; }
.platform-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent-deep); }
.admin-actions { display: flex; gap: 8px; }
.admin-actions a, .admin-actions button { padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; border: 1px solid var(--border); color: var(--text-soft); transition: all .2s; }
.admin-actions a:hover, .admin-actions button:hover { border-color: var(--accent); color: var(--accent-deep); }
.admin-actions .del:hover { border-color: #c0392b; color: #c0392b; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.stat-card .sc-num { font-family: var(--font-display); font-size: 32px; font-weight: 700; }
.stat-card .sc-lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(60% 50% at 50% 0%, var(--accent-soft), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-lg); }
.login-card h1 { font-size: 26px; text-align: center; margin-bottom: 6px; }
.login-card .lc-sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); transition: border-color .25s, color .25s; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); color: var(--accent-deep); }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px,1fr)); gap: 10px; margin-top: 14px; }
.preview-grid .pg { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.preview-grid .pg img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Admin image preview widget (carousel) ---------- */
.img-preview { margin: 8px 0 4px; }
.img-preview .ip-frame {
    position: relative;
    aspect-ratio: 4/3;
    max-height: 360px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    overflow: hidden;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.img-preview .ip-frame:hover { border-color: var(--accent); }
.img-preview.has-image .ip-frame { border-style: solid; cursor: default; }
.img-preview .ip-img {
    width: 100%; height: 100%;
    object-fit: contain;
    background:
      linear-gradient(45deg, #f6f6f4 25%, transparent 25%),
      linear-gradient(-45deg, #f6f6f4 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, #f6f6f4 75%),
      linear-gradient(-45deg, transparent 75%, #f6f6f4 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    display: none;
}
[data-theme="dark"] .img-preview .ip-img {
    background:
      linear-gradient(45deg, #1f1d1a 25%, transparent 25%),
      linear-gradient(-45deg, #1f1d1a 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, #1f1d1a 75%),
      linear-gradient(-45deg, transparent 75%, #1f1d1a 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.img-preview.has-image .ip-img { display: block; }
.img-preview .ip-empty {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    padding: 24px;
    line-height: 1.5;
    user-select: none;
}
.img-preview.has-image .ip-empty { display: none; }
.img-preview .ip-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px; height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background-color .2s var(--ease), transform .2s var(--ease);
    z-index: 2;
}
.img-preview .ip-nav:hover { background: rgba(0,0,0,.85); transform: translateY(-50%) scale(1.06); }
.img-preview .ip-prev { left: 10px; }
.img-preview .ip-next { right: 10px; }
.img-preview.multi.has-image .ip-nav { display: flex; }
.img-preview .ip-remove {
    position: absolute;
    top: 10px; right: 10px;
    width: 30px; height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(192,57,43,.92);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background-color .2s var(--ease);
}
.img-preview .ip-remove:hover { background: #c0392b; }
.img-preview.has-image .ip-remove { display: flex; }
.img-preview .ip-existing-tag {
    position: absolute;
    top: 10px; left: 10px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(26,24,20,.7);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    display: none;
    z-index: 2;
}
.img-preview .ip-existing-tag.show { display: inline-block; }
.img-preview .ip-counter {
    position: absolute;
    bottom: 12px; left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: none;
    z-index: 2;
}
.img-preview.multi.has-image .ip-counter { display: block; }
.img-preview .ip-toolbar {
    display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap;
}
.img-preview .ip-pick {
    padding: 9px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: all .2s var(--ease);
    white-space: nowrap;
}
.img-preview .ip-pick:hover { border-color: var(--accent); color: var(--accent-deep); }
.img-preview .ip-names {
    color: var(--muted);
    font-size: 12px;
    flex: 1 1 auto;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    line-height: 1.4;
}
.img-preview .ip-names strong { color: var(--text); font-weight: 600; }
.img-preview .ip-names .ip-nsep { color: var(--border-strong); margin: 0 4px; }
.label-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.label-row .lc { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; display: block; }
.pill-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.pill-tabs button { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); font-size: 14px; font-weight: 600; }
.pill-tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Admin language switcher (中文 / EN) */
.admin-topbar { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 6px; }
.admin-lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.admin-lang-switch a { padding: 7px 18px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease); }
.admin-lang-switch a:hover { color: var(--text); }
.admin-lang-switch a.on { background: var(--accent); color: #fff; }
.login-lang { display: flex; justify-content: center; margin-top: 16px; }

/* ---------- Mobile nav ---------- */
@media (max-width: 1024px) {
  .feature-grid, .cat-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .nav, .header-tools .lang-switch .lang-btn span { display: none; }
  .menu-toggle { display: grid; }
  .nav.open {
    display: flex; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 4px;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 16px 24px; box-shadow: var(--shadow-md);
  }
  .nav.open a { padding: 12px 16px; }
  .hero-grid, .about-grid, .detail-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 360px; order: -1; }
  .detail-gallery { position: static; }
  .hero-stats { gap: 28px; }
}
@media (max-width: 560px) {
  .feature-grid, .cat-grid, .product-grid, .spec-list, .stat-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .label-row { grid-template-columns: 1fr; }
  .section, .hero { padding: 56px 0; }
  .container { padding: 0 18px; }
  .login-card, .contact-form, .cta-band { padding: 28px 22px; }
  .admin-wrap { grid-template-columns: 1fr; }
  .admin-side { flex-direction: row; flex-wrap: wrap; padding: 14px; gap: 4px; }
  .admin-side .a-brand { width: 100%; margin-bottom: 8px; }
  .admin-side .a-spacer { display: none; }
  .admin-main { padding: 22px 16px; }
}
