/* ============================================================
   JLOWCO.COM — Design System
   Target: US market DTC storefront
   Deployment: Cloudflare Pages (static)
   ============================================================ */

:root {
  /* Brand palette — 调品牌色只需要改这里 */
  --brand:        #0F1F3D;   /* 深海军蓝：主色，按钮/重点 */
  --brand-dark:   #091428;
  --accent:       #C9A961;   /* 香槟金：点缀，价格高亮 */
  --bg:           #FFFFFF;
  --bg-soft:      #F6F5F2;   /* 米白：区块背景 */
  --ink:          #16181D;   /* 正文 */
  --ink-soft:     #5A6070;   /* 次级文字 */
  --line:         #E5E3DD;
  --success:      #1E7A46;
  --error:        #B3362B;

  /* Typography */
  --font-display: "Georgia", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --wrap: 1180px;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(15,31,61,.08);
  --shadow-md: 0 8px 28px rgba(15,31,61,.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Layout primitives ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.eyebrow {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 10px;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.18; }
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(26px, 3.6vw, 38px); }
h3 { font-size: 20px; }
.section-head p { color: var(--ink-soft); margin-top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 34px; border-radius: 999px; border: 1.5px solid transparent;
  font-size: 15px; font-weight: 700; letter-spacing: .02em;
  cursor: pointer; transition: all .2s ease; text-align: center;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--gold { background: var(--accent); color: #fff; }
.btn--gold:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--brand); color: #fff; text-align: center;
  font-size: 13px; padding: 9px 16px; letter-spacing: .04em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.logo { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: .06em; }
.logo em { font-style: normal; color: var(--accent); }
.logo small { display: block; font-family: var(--font-body); font-size: 9px; letter-spacing: .34em; color: var(--ink-soft); font-weight: 600; }

.nav { display: flex; gap: 34px; }
.nav a { font-size: 14.5px; font-weight: 600; color: var(--ink-soft); transition: color .2s; }
.nav a:hover, .nav a.active { color: var(--brand); }

.cart-btn { position: relative; background: none; border: none; cursor: pointer; padding: 6px; }
.cart-btn svg { width: 24px; height: 24px; }
.cart-count {
  position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }

@media (max-width: 860px) {
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; flex-direction: column; gap: 0; padding: 8px 24px 20px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero { padding: 90px 0 80px; background: linear-gradient(180deg, #FDFCFA 0%, #fff 100%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.hero h1 .accent { color: var(--accent); font-style: italic; }
.hero p.lead { font-size: 18px; color: var(--ink-soft); margin: 20px 0 32px; max-width: 480px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 26px; margin-top: 38px; flex-wrap: wrap; }
.hero-trust div { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); font-weight: 600; }
.hero-trust svg { width: 17px; height: 17px; color: var(--success); flex-shrink: 0; }

.hero-visual { position: relative; }
.hero-visual .frame {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
  aspect-ratio: 4/4.4; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
}
.hero-visual .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .frame .ph {
  font-size: 15px; color: var(--ink-soft); text-align: center; padding: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.hero-visual .frame .ph svg { width: 54px; height: 54px; opacity: .35; }
.badge-float {
  position: absolute; bottom: 22px; left: -14px;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-md);
  padding: 12px 18px; display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700;
}
.badge-float svg { width: 20px; height: 20px; color: var(--accent); }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 56px 0 60px; }
  .badge-float { left: 12px; }
}

/* ---------- Feature cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.card .icon svg { width: 22px; height: 22px; color: var(--brand); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 14.5px; }

/* ---------- Product card ---------- */
.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card .media {
  aspect-ratio: 1/1; background: var(--bg-soft); display: flex;
  align-items: center; justify-content: center; overflow: hidden;
}
.product-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .media img { transform: scale(1.04); }
.product-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .name { font-weight: 700; font-size: 16px; }
.product-card .price { color: var(--ink-soft); font-size: 15px; }
.product-card .price strong { color: var(--brand); font-size: 19px; }
.product-card .cta { margin-top: auto; padding-top: 14px; }

/* ---------- Testimonials ---------- */
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.stars { color: var(--accent); letter-spacing: 2px; font-size: 15px; margin-bottom: 10px; }
.quote p { font-size: 14.5px; color: var(--ink); }
.quote .who { margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; padding: 20px 4px; font-weight: 700; font-size: 15.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--accent); transition: transform .25s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 4px 20px; color: var(--ink-soft); font-size: 14.5px; max-width: 720px; }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--brand); color: #fff; text-align: center; }
.newsletter h2 { color: #fff; }
.newsletter p { color: rgba(255,255,255,.72); margin: 12px 0 26px; }
.newsletter form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; flex-wrap: wrap; }
.newsletter input {
  flex: 1; min-width: 220px; padding: 14px 20px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08);
  color: #fff; font-size: 14.5px; outline: none;
}
.newsletter input::placeholder { color: rgba(255,255,255,.5); }
.newsletter input:focus { border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: rgba(255,255,255,.75); padding: 56px 0 28px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .logo { color: #fff; margin-bottom: 12px; }
.site-footer h4 { color: #fff; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { display: block; padding: 4px 0; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: rgba(255,255,255,.5); }

/* ---------- Product page (PDP) ---------- */
.pdp { display: grid; grid-template-columns: 1.1fr .9fr; gap: 52px; padding: 52px 0 72px; }
@media (max-width: 960px) { .pdp { grid-template-columns: 1fr; gap: 32px; } }

.gallery { display: flex; flex-direction: column; gap: 14px; }
.gallery-main {
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1;
  background: var(--bg-soft); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; cursor: zoom-in;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.gallery-thumbs button {
  aspect-ratio: 1/1; border-radius: 10px; overflow: hidden; border: 2px solid transparent;
  cursor: pointer; background: var(--bg-soft); padding: 0; transition: border-color .2s;
}
.gallery-thumbs button.active { border-color: var(--brand); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pdp-info .rating { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13.5px; color: var(--ink-soft); }
.pdp-info .rating .stars { margin: 0; }
.pdp-price { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 6px; }
.pdp-price .now { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--brand); }
.pdp-price .was { color: var(--ink-soft); text-decoration: line-through; font-size: 17px; }
.pdp-price .save {
  font-size: 12px; font-weight: 800; color: var(--success);
  background: rgba(30,122,70,.1); padding: 3px 10px; border-radius: 999px;
}
.pdp-desc { color: var(--ink-soft); margin: 14px 0 22px; font-size: 15.5px; }

.option-group { margin: 18px 0; }
.option-group .label { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.option-row { display: flex; gap: 10px; flex-wrap: wrap; }
.option-row button {
  padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; transition: all .2s;
}
.option-row button:hover { border-color: var(--brand); }
.option-row button.selected { background: var(--brand); color: #fff; border-color: var(--brand); }

.qty-row { display: flex; align-items: center; gap: 16px; margin: 20px 0 26px; }
.qty { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 42px; height: 42px; border: none; background: none; font-size: 18px; cursor: pointer; }
.qty button:hover { background: var(--bg-soft); }
.qty span { width: 44px; display: flex; align-items: center; justify-content: center; font-weight: 700; }

.buy-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 24px; background: var(--bg-soft); }
.buy-box .assurance { display: grid; gap: 10px; }
.buy-box .assurance div { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink-soft); font-weight: 600; }
.buy-box .assurance svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; }

/* ---------- Specs table ---------- */
.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec-table th, .spec-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.spec-table th { width: 32%; color: var(--ink-soft); font-weight: 700; background: var(--bg-soft); }
.spec-table tr:nth-child(even) td { background: rgba(246,245,242,.4); }

/* ---------- Policies pages ---------- */
.policy-page { max-width: 780px; margin: 0 auto; padding: 60px 24px 90px; }
.policy-page h1 { font-size: 34px; margin-bottom: 8px; }
.policy-page .updated { color: var(--ink-soft); font-size: 13px; margin-bottom: 36px; }
.policy-page h2 { font-size: 22px; margin: 34px 0 12px; }
.policy-page p, .policy-page li { color: var(--ink-soft); font-size: 15px; margin-bottom: 12px; }
.policy-page ul { padding-left: 20px; list-style: disc; }
.policy-page li { margin-bottom: 6px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 16px; }
.form label { font-size: 13px; font-weight: 700; display: grid; gap: 6px; }
.form input, .form textarea, .form select {
  padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 14.5px; font-family: inherit; outline: none; transition: border-color .2s; background: #fff;
}
.form input:focus, .form textarea:focus { border-color: var(--brand); }

/* ---------- Cart drawer ---------- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(9,20,40,.45); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 92vw; height: 100vh;
  background: #fff; z-index: 201; transition: right .3s ease; display: flex; flex-direction: column;
  box-shadow: -10px 0 40px rgba(9,20,40,.18);
}
.drawer.open { right: 0; }
.drawer-head { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer-head h3 { font-size: 19px; }
.drawer-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--ink-soft); line-height: 1; }
.drawer-items { flex: 1; overflow-y: auto; padding: 10px 24px; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--bg-soft); }
.cart-item .n { font-weight: 700; font-size: 14px; }
.cart-item .v { font-size: 12.5px; color: var(--ink-soft); }
.cart-item .p { font-weight: 700; }
.cart-item .qty-mini { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-item .qty-mini button { width: 22px; height: 22px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1; }
.drawer-foot { padding: 20px 24px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.drawer-foot .row { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 6px; }
.drawer-foot .note { font-size: 12px; color: var(--ink-soft); margin: 10px 0 14px; text-align: center; }

.cart-empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.cart-empty svg { width: 44px; height: 44px; opacity: .3; margin: 0 auto 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--ink); color: #fff; padding: 13px 26px; border-radius: 999px;
  font-size: 14px; font-weight: 600; z-index: 300; transition: transform .3s;
  box-shadow: var(--shadow-md); max-width: 90vw; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Utilities ---------- */
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.text-center { text-align: center; }
.hide { display: none !important; }

/* Placeholder box for missing product images */
.ph-box {
  border: 1.5px dashed #C9C4B8; border-radius: var(--radius); background: var(--bg-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: #A39E90; text-align: center; padding: 24px; font-size: 13.5px; width: 100%; height: 100%;
}
.ph-box svg { width: 44px; height: 44px; opacity: .5; }
