/* ============ UFLY HOBBY — dark tech storefront ============ */
:root {
  --bg: #0b0e11;
  --bg-soft: #101418;
  --panel: #151a20;
  --panel-2: #1b222a;
  --line: #232b34;
  --text: #e8edf2;
  --muted: #8b97a3;
  --accent: #ff6b1a;
  --accent-2: #ffb37a;
  --teal: #2dd4bf;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --font: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container { width: min(1180px, 92%); margin: 0 auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 14, 17, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: 2px; font-size: 18px;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #ff9145);
  display: grid; place-items: center; font-size: 15px;
  box-shadow: 0 4px 14px rgba(255, 107, 26, 0.4);
}
.main-nav { display: flex; gap: 26px; font-size: 14px; color: var(--muted); }
.main-nav a { transition: color 0.2s; text-transform: uppercase; letter-spacing: 1px; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-link {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 10px; font-size: 14px;
  transition: border-color 0.2s;
}
.cart-link:hover { border-color: var(--accent); }
.cart-count {
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: inline-grid; place-items: center; padding: 0 5px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff8b3d);
  color: #fff; box-shadow: 0 8px 22px rgba(255, 107, 26, 0.32);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 107, 26, 0.45); }
.btn-ghost {
  background: transparent; color: var(--text); border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }
.btn-lg { padding: 15px 32px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 620px;
  display: flex; align-items: center;
  background: url("/img/hero-mountain.png") center / cover no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11,14,17,0.92) 0%, rgba(11,14,17,0.55) 55%, rgba(11,14,17,0.25) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 80px 0; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent-2); border: 1px solid rgba(255,107,26,0.4);
  background: rgba(255,107,26,0.08);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 68px); line-height: 1.05;
  font-weight: 800; letter-spacing: -1px; max-width: 640px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.hero h1 .accent { color: var(--accent); }
.hero p.lead {
  margin: 22px 0 34px; max-width: 520px;
  color: #c4cdd6; font-size: 18px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 40px; margin-top: 56px; flex-wrap: wrap;
}
.hero-stats .stat b { font-size: 26px; display: block; color: var(--text); }
.hero-stats .stat span { font-size: 13px; color: var(--muted); }

/* ---------- sections ---------- */
section.block { padding: 84px 0; }
.section-head { margin-bottom: 44px; }
.section-head .eyebrow {
  color: var(--accent); font-size: 12px; letter-spacing: 3px;
  text-transform: uppercase; font-weight: 700;
}
.section-head h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; margin-top: 8px; letter-spacing: -0.5px; }
.section-head p { color: var(--muted); margin-top: 10px; max-width: 640px; }
.section-head.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- product cards ---------- */
.grid-products {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
@media (max-width: 980px) { .grid-products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-products { grid-template-columns: 1fr; } }
.product-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.product-card:hover {
  transform: translateY(-6px); border-color: rgba(255,107,26,0.5);
  box-shadow: var(--shadow);
}
.product-card .thumb {
  aspect-ratio: 1; overflow: hidden; background: var(--bg-soft);
  position: relative;
}
.product-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.product-card:hover .thumb img { transform: scale(1.06); }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 6px;
}
.product-card .info { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .cat { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--teal); }
.product-card h3 { font-size: 16px; font-weight: 700; line-height: 1.35; }
.product-card h3 a:hover { color: var(--accent-2); }
.product-card .rating { font-size: 12px; color: var(--muted); }
.product-card .rating .stars { color: #fbbf24; letter-spacing: 1px; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-top: auto; padding-top: 8px; }
.price { font-size: 20px; font-weight: 800; color: var(--accent-2); }
.price-old { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.card-actions { padding: 0 18px 18px; }
.btn-add {
  width: 100%; padding: 10px; border-radius: 9px;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); font-weight: 600; font-size: 14px;
  transition: all 0.2s;
}
.btn-add:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- category tiles ---------- */
.grid-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid-cats { grid-template-columns: repeat(2, 1fr); } }
.cat-tile {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; transition: all 0.25s;
}
.cat-tile:hover { border-color: rgba(255,107,26,0.5); transform: translateY(-4px); }
.cat-tile .icon { font-size: 26px; }
.cat-tile h3 { font-size: 16px; margin-top: 12px; }
.cat-tile p { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- features ---------- */
.grid-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid-features { grid-template-columns: repeat(2, 1fr); } }
.feature {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.feature .icon { font-size: 24px; }
.feature h3 { font-size: 15px; margin-top: 12px; }
.feature p { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- lifestyle banner ---------- */
.banner {
  position: relative; border-radius: 20px; overflow: hidden;
  min-height: 380px; display: flex; align-items: center;
  background: url("/img/lifestyle-pilot.png") center / cover no-repeat;
  border: 1px solid var(--line);
}
.banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11,14,17,0.9), rgba(11,14,17,0.3));
}
.banner-inner { position: relative; z-index: 2; padding: 48px; max-width: 520px; }
.banner h2 { font-size: 32px; font-weight: 800; }
.banner p { color: #c4cdd6; margin: 14px 0 26px; }

/* ---------- shop ---------- */
.shop-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .shop-layout { grid-template-columns: 1fr; } }
.filter-panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; position: sticky; top: 84px;
}
.filter-panel h3 { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.filter-panel ul li button {
  width: 100%; text-align: left; background: none; border: none;
  color: var(--muted); padding: 9px 12px; border-radius: 8px; font-size: 14px;
  transition: all 0.15s;
}
.filter-panel ul li button:hover { color: var(--text); background: var(--panel-2); }
.filter-panel ul li button.active { color: var(--accent); background: rgba(255,107,26,0.1); font-weight: 700; }
.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; gap: 14px; flex-wrap: wrap;
}
.shop-toolbar .count { color: var(--muted); font-size: 14px; }
select.sort {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  padding: 9px 12px; border-radius: 9px; font-size: 14px; font-family: inherit;
}

/* ---------- product detail ---------- */
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: start; }
@media (max-width: 860px) { .pdp { grid-template-columns: 1fr; } }
.pdp-gallery {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; position: relative;
}
.pdp-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.pdp-info h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; line-height: 1.2; }
.pdp-info .rating { color: var(--muted); font-size: 14px; margin-top: 8px; }
.pdp-info .rating .stars { color: #fbbf24; }
.pdp-price { display: flex; align-items: baseline; gap: 12px; margin: 18px 0; }
.pdp-price .price { font-size: 32px; }
.pdp-info .short { color: #b9c3cd; margin-bottom: 22px; }
.spec-box {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin: 22px 0;
}
.spec-box h3 { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.spec-box ul li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px;
}
.spec-box ul li:last-child { border-bottom: none; }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 20px 0; }
.qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.qty button {
  width: 40px; height: 42px; background: var(--panel); border: none;
  color: var(--text); font-size: 18px;
}
.qty button:hover { background: var(--panel-2); }
.qty span { width: 44px; text-align: center; font-weight: 700; }
.stock-note { font-size: 13px; color: var(--teal); }
.description-block { margin-top: 52px; }
.description-block h2 { font-size: 22px; margin-bottom: 14px; }
.description-block p { color: #b9c3cd; max-width: 760px; }

/* ---------- cart ---------- */
.cart-page { max-width: 880px; margin: 0 auto; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th {
  text-align: left; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); padding: 12px 10px; border-bottom: 1px solid var(--line);
}
.cart-table td { padding: 18px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-item { display: flex; align-items: center; gap: 16px; }
.cart-item img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.cart-item .name { font-weight: 600; font-size: 15px; }
.cart-item .cat { font-size: 12px; color: var(--teal); }
.link-btn { background: none; border: none; color: var(--muted); font-size: 13px; padding: 0; }
.link-btn:hover { color: var(--danger); }
.cart-summary {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-top: 28px;
}
.cart-summary .row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 15px; }
.cart-summary .row.total { font-size: 20px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; }
.empty-state { text-align: center; padding: 80px 0; color: var(--muted); }
.empty-state .icon { font-size: 52px; }
.empty-state h2 { color: var(--text); margin: 18px 0 8px; }

/* ---------- checkout / forms ---------- */
.checkout-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 860px) { .checkout-layout { grid-template-columns: 1fr; } }
.form-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); padding: 12px 14px;
  font-size: 15px; font-family: inherit; transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
}
.field textarea { min-height: 110px; resize: vertical; }
.form-note { font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.form-error {
  background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239,68,68,0.4);
  color: #fca5a5; border-radius: 10px; padding: 12px 16px;
  font-size: 14px; margin-bottom: 18px; display: none;
}
.form-error.show { display: block; }
.summary-card { position: sticky; top: 84px; }
.summary-card .line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px; border-bottom: 1px dashed var(--line); }
.summary-card .line span:last-child { white-space: nowrap; }
.success-box {
  text-align: center; padding: 70px 20px; max-width: 560px; margin: 0 auto;
}
.success-box .icon {
  width: 74px; height: 74px; margin: 0 auto 24px; border-radius: 50%;
  background: rgba(45, 212, 191, 0.12); border: 1px solid rgba(45,212,191,0.4);
  display: grid; place-items: center; font-size: 32px; color: var(--teal);
}
.success-box h1 { font-size: 28px; margin-bottom: 12px; }
.success-box p { color: var(--muted); }

/* ---------- about / contact ---------- */
.prose { max-width: 760px; }
.prose p { color: #b9c3cd; margin-bottom: 16px; }
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-info h2 { font-size: 30px; font-weight: 800; margin-bottom: 14px; }
.contact-info ul { margin-top: 24px; }
.contact-info ul li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: #b9c3cd; }
.contact-info ul li b { color: var(--text); display: block; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 2px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 60px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  padding: 56px 0 40px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer-grid ul li { margin-bottom: 10px; font-size: 14px; color: #b9c3cd; }
.footer-grid ul li a:hover { color: var(--accent-2); }
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 12px; max-width: 300px; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 0; display: flex; justify-content: space-between;
  font-size: 13px; color: var(--muted); flex-wrap: wrap; gap: 8px;
}

/* ---------- page header (inner pages) ---------- */
.page-head { padding: 56px 0 8px; }
.page-head h1 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 10px; max-width: 620px; }

/* ---------- admin ---------- */
.inq-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px;
}
.inq-card .head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.inq-card .head b { color: var(--accent-2); }
.tag {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 6px;
  letter-spacing: 1px; text-transform: uppercase;
}
.tag.order { background: rgba(255,107,26,0.15); color: var(--accent); }
.tag.contact { background: rgba(45,212,191,0.15); color: var(--teal); }
.inq-card .meta { font-size: 13px; color: var(--muted); }
.inq-card .items { margin-top: 10px; font-size: 14px; }
.inq-card .items div { padding: 4px 0; }

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--accent); color: #fff; font-weight: 600; font-size: 14px;
  padding: 13px 24px; border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- PDP v2: gallery / trust strip / notices ---------- */
.pdp-gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumb-btn {
  width: 72px; height: 72px; padding: 6px; border-radius: 10px;
  border: 2px solid transparent; background: var(--panel, rgba(255,255,255,0.04));
  cursor: pointer; opacity: 0.65; transition: all 0.15s;
}
.thumb-btn img { width: 100%; height: 100%; object-fit: contain; }
.thumb-btn:hover { opacity: 1; }
.thumb-btn.active { border-color: var(--accent); opacity: 1; }
.ship-strip {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px;
  padding: 12px 16px; border-radius: 10px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); font-size: 13px; color: var(--muted);
}
.rf-notice {
  margin-top: 18px; padding: 14px 18px; border-radius: 10px; font-size: 13px; line-height: 1.6;
  background: rgba(180, 83, 9, 0.08); border: 1px solid rgba(180, 83, 9, 0.35); color: var(--muted);
}
.rf-notice b { color: #d97706; }
.plain-list { list-style: none; padding: 0; }
.plain-list li { padding: 7px 0 7px 26px; position: relative; border-bottom: 1px dashed rgba(255,255,255,0.07); }
.plain-list li:last-child { border-bottom: none; }
.plain-list li::before { content: '✓'; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }
.stock-note.is-backorder { color: #d97706 !important; }
.tag.oem { background: rgba(255,122,0,0.15); color: #ff9a3c; border: 1px solid rgba(255,122,0,0.4); }
