/* ============ Humidity Control Cabinet site — dark premium theme ============ */
:root {
  --bg: #0d0f12;
  --bg2: #14171c;
  --panel: #1a1e24;
  --line: #2a2f38;
  --txt: #ecebe7;
  --muted: #9aa0aa;
  --gold: #c99a3c;
  --gold-soft: rgba(201, 154, 60, 0.14);
  --blue: #4a7dbd;
  --radius: 14px;
  --maxw: 1160px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* thin, low-contrast scrollbar for the page and every scroll area (Firefox + WebKit) */
html { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }

h1 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 8px; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

/* buttons */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  background: var(--gold); color: #14110a; font-weight: 700; font-size: 0.95rem;
  border: 1px solid var(--gold); cursor: pointer; transition: 0.18s; text-align: center;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--txt); border-color: var(--line); font-weight: 500; }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn.sm { padding: 8px 18px; font-size: 0.85rem; }
.btn.full { width: 100%; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 15, 18, 0.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 26px; height: 66px; }
.logo { font-weight: 800; font-size: 1.15rem; letter-spacing: 0.04em; }
.logo small { color: var(--muted); font-weight: 400; font-size: 0.72rem; margin-left: 6px; }
.logo-mark { color: var(--gold); }
.main-nav { display: flex; gap: 22px; margin-left: auto; font-size: 0.92rem; }
.main-nav a { color: var(--muted); padding: 6px 2px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--txt); border-bottom-color: var(--gold); }
.header-actions { margin-left: 10px; }

/* product scroll showcase (hero bar) */
.ps-head { margin-top: 40px; border-top: 1px solid var(--line); }
.ps-head-inner { display: flex; align-items: baseline; justify-content: space-between; padding-top: 18px; }
.ps-head-inner h3 { font-size: 1.05rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--txt); }
.ps-head-inner a { color: var(--gold); font-size: 0.88rem; }
.ps-head-inner a:hover { text-decoration: underline; }
.pscroll {
  margin-top: 14px; overflow: hidden; cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.pscroll-track { display: flex; width: max-content; animation: pscroll 48s linear infinite; }
.pscroll:hover .pscroll-track { animation-play-state: paused; }
.pscroll-half { display: flex; gap: 14px; padding-right: 14px; }
@keyframes pscroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .pscroll-track { animation: none; } }
.ps-card { width: 212px; flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: 0.2s; display: block; }
.ps-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0,0,0,0.35); }
.ps-img { height: 118px; background: linear-gradient(180deg, #f4f2ee 0%, #e8e5df 100%); display: flex; align-items: center; justify-content: center; }
.ps-img img { max-height: 100px; max-width: 82%; object-fit: contain; mix-blend-mode: multiply; }
.ps-body { padding: 10px 12px 12px; }
.ps-body h4 { font-size: 0.8rem; line-height: 1.35; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.ps-body .ps-model { font-size: 0.66rem; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-body .ps-price { color: var(--gold); font-weight: 700; font-size: 0.92rem; margin-top: 5px; }

/* hero */
.hero { padding: 72px 0 40px; background:
  radial-gradient(900px 420px at 85% -10%, rgba(201,154,60,0.10), transparent 60%),
  radial-gradient(700px 380px at 0% 110%, rgba(74,125,189,0.08), transparent 60%),
  var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.kicker { color: var(--gold); font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 14px; }
.hero-sub { font-size: 1.05rem; margin: 18px 0 22px; max-width: 46ch; }
.hero-links { display: flex; gap: 14px; align-items: center; font-size: 0.95rem; }
.hero-links a { color: var(--gold); font-weight: 600; border-bottom: 1px solid transparent; padding-bottom: 2px; }
.hero-links a:hover { border-bottom-color: var(--gold); }
.hero-links .sep { color: var(--muted); }
.hero-media { position: relative; min-height: 340px; }
.hero-img { width: 62%; border-radius: 18px; box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
.hero-img.ghost-img { position: absolute; right: 0; bottom: -30px; width: 46%; opacity: 0.95; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 34px; padding: 22px 0; border-top: 1px solid var(--line); }
.stats div { text-align: center; display: flex; flex-direction: column; justify-content: center; }
.stats b { display: block; font-size: 1.4rem; color: var(--gold); line-height: 1.3; }
.stats span { color: var(--muted); font-size: 0.8rem; }

/* sections */
.section { padding: 72px 0; }
.section.alt { background: var(--bg2); }
.section > .wrap > h2, .section > .wrap > .section-sub { text-align: left; }
.section-sub { margin-bottom: 36px; }
.cta-band { background: linear-gradient(120deg, rgba(201,154,60,0.12), rgba(201,154,60,0.02)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* product grid */
.grid { display: grid; gap: 22px; }
.products-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.product-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: 0.2s; display: flex; flex-direction: column; height: 100%; }
.product-card:hover { transform: translateY(-4px); border-color: rgba(201,154,60,0.5); box-shadow: 0 18px 40px rgba(0,0,0,0.4); }
.card-img { background: linear-gradient(180deg, #f4f2ee 0%, #e8e5df 100%); display: flex; align-items: center; justify-content: center; padding: 18px; aspect-ratio: 4 / 3; }
.card-img img { max-height: 100%; max-width: 88%; object-fit: contain; mix-blend-mode: multiply; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.02rem; line-height: 1.35; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body h3 a:hover { color: var(--gold); }
.model-line { font-size: 0.82rem; letter-spacing: 0.05em; }
.card-body .desc { font-size: 0.88rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; min-height: 23px; align-content: flex-start; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.price { color: var(--gold); font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.price small { font-weight: 500; color: var(--muted); font-size: 0.7rem; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 0.68rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); letter-spacing: 0.04em; }
.badge.moisture { border-color: var(--blue); color: #9dc0e8; }
.badge.humidity { border-color: var(--gold); color: var(--gold); }

/* why grid */
.why-grid { grid-template-columns: repeat(4, 1fr); margin-top: 34px; }
.why-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; }
.why-num { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.2em; margin-bottom: 10px; }
.prose { margin-top: 28px; max-width: 74ch; }

/* product detail */
.crumbs { color: var(--muted); font-size: 0.85rem; margin-bottom: 20px; }
.crumbs a:hover { color: var(--gold); }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.pd-media { background: linear-gradient(180deg, #f4f2ee 0%, #e8e5df 100%); border-radius: 18px; padding: 34px; position: sticky; top: 90px; }
.pd-info h1 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.pd-suitable { margin: 14px 0 6px; }
.pd-sec { margin: 22px 0 12px; color: var(--gold); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.14em; }
.variants { display: grid; gap: 14px; }
.variant-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.variant-card.soldout { opacity: 0.55; }
.variant-card .buy-btn[disabled] { cursor: not-allowed; filter: grayscale(0.6); }
.variant-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.price-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 0.95rem; }
.price-table td { padding: 6px 0; }
.price-table td:last-child { text-align: right; }
.pd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 60px; }
.pd-cols h3 { margin-bottom: 14px; color: var(--gold); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.spec-table th, .spec-table td { border-bottom: 1px solid var(--line); padding: 11px 10px; text-align: left; vertical-align: top; }
.spec-table th { color: var(--muted); font-weight: 500; width: 42%; }
.config-list { list-style: none; }
.config-list li { padding: 7px 0 7px 26px; position: relative; border-bottom: 1px dashed var(--line); font-size: 0.94rem; }
.config-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--gold); }
.config-list.optional li::before { content: "+"; }

/* faq */
.faq { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px; margin: 12px 0; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; }
.faq summary::before { content: "+ "; color: var(--gold); }
.faq[open] summary::before { content: "– "; }
.faq p { padding: 0 0 16px; }

/* contact */
.contact-grid { grid-template-columns: repeat(2, minmax(0, 320px)); margin-top: 28px; }
.contact-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.contact-card:hover { border-color: var(--gold); }
.contact-card b { color: var(--gold); }

/* checkout modal */
#checkoutModal { position: fixed; inset: 0; z-index: 100; display: none; }
#checkoutModal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(3px); }
.modal-card { position: relative; z-index: 1; max-width: 560px; margin: 5vh auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 28px 28px 20px; max-height: 90vh; overflow-y: auto; }
/* thin, low-contrast scrollbar for the modal only (Firefox + WebKit) */
.modal-card { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.modal-card::-webkit-scrollbar { width: 7px; }
.modal-card::-webkit-scrollbar-track { background: transparent; }
.modal-card::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.modal-card::-webkit-scrollbar-thumb:hover { background: var(--muted); }
/* sticky checkout title: top + padding-top cancel .modal-card's 28px padding-top so the
   title sits flush against the card edge while scrolling; the negative margins keep the
   resting spacing unchanged. keep these in sync with .modal-card's padding-top. */
#coTitle {
  position: sticky; top: -28px; z-index: 1;
  padding: 28px 40px 8px 0;
  margin: -28px 0 -8px;
  background: var(--bg2);
}
/* the order-placed notice is prepended above the title; drop the negative offset there
   so the title background does not cover it */
#orderPlacedBox + #coTitle { margin-top: 0; }
/* × rides along with the sticky title: floated so it takes no flow space, and the negative
   margins put it back on the old 12px/16px spot inside .modal-card's 28px padding */
.modal-x { position: sticky; top: -16px; z-index: 2; float: right; margin: -16px -12px 0 0; background: none; border: none; color: var(--muted); font-size: 1.6rem; cursor: pointer; }
.modal-x:hover { color: var(--gold); }
.co-summary { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 14px 0 18px; }
.co-line { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.co-line label { color: var(--muted); font-size: 0.9rem; }
.co-line input { width: 76px; padding: 8px 10px; background: var(--bg); color: var(--txt); border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; }
.co-line .price { margin-left: auto; }
.co-buyer { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.co-buyer input,
.co-buyer textarea {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  background: var(--bg); color: var(--txt);
  border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 1rem; line-height: 1.5;
}
.co-buyer textarea { min-height: 60px; resize: vertical; }
.co-buyer input::placeholder,
.co-buyer textarea::placeholder { color: var(--muted); opacity: 1; }
.co-buyer input:focus,
.co-buyer textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
/* admin form inputs: same focus / placeholder treatment */
.settings-form input:focus { outline: none; border-color: var(--gold); }
.login-card input::placeholder,
.settings-form input::placeholder { color: var(--muted); }
.pay-group { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.pay-option { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.pay-option h4 { margin-bottom: 4px; }
.co-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.ok { color: #7bc47f; font-weight: 600; }
#paypal-buttons iframe { border-radius: 8px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 20px; background: var(--bg2); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { margin-bottom: 12px; font-size: 0.9rem; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; }
.footer-grid a { display: block; color: var(--muted); padding: 4px 0; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--txt); }
.footer-logo { margin-bottom: 10px; }
.footer-base { padding-top: 28px; margin-top: 30px; border-top: 1px solid var(--line); font-size: 0.82rem; }

/* responsive */
@media (max-width: 960px) {
  .hero-grid, .pd-grid, .pd-cols { grid-template-columns: 1fr; }
  .pd-media { position: static; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .main-nav { display: none; }
}
@media (max-width: 600px) {
  .products-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-media { min-height: 260px; }
  .ps-card { width: 178px; }
  .ps-img { height: 96px; }
  .ps-img img { max-height: 80px; }
  .pscroll-track { animation-duration: 32s; }
}
