/* Product pages: header + drawer navigation (extracted) */
/* 商品详情页：PC 双栏 + H5 适配 */

:root {
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg-page: #f1f5f9;
  --bg: #f8fafc;
  --surface: #ffffff;
  --accent: #ff6000;
  --accent-hover: #e55500;
  --paypal: #0070ba;
  --container: 1180px;
  --aside-w: 340px;
  --tap: 44px;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body.page-product {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-page);
  padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 960px) {
  body.page-product {
    padding-bottom: 80px;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mobile-only {
  display: flex;
}

@media (min-width: 960px) {
  .mobile-only {
    display: none !important;
  }
}

.desktop-only {
  display: none !important;
}

@media (min-width: 960px) {
  .desktop-only {
    display: flex !important;
  }

  .p-footer__cols.desktop-only {
    display: grid !important;
  }

  .p-prinav.desktop-only {
    display: flex !important;
  }

  .p-search.desktop-only {
    display: flex !important;
  }

  .p-auth.desktop-only {
    display: flex !important;
  }
}

/* ----- Main layout ----- */
.p-main {
  flex: 1;
  padding: 20px 0 32px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ----- Header ----- */
.p-util {
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.p-util__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  gap: 8px;
  flex-wrap: wrap;
}

.p-util__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.p-util__links a {
  color: var(--muted);
  font-weight: 500;
  padding: 4px 2px;
}

.p-util__links a:hover {
  color: var(--text);
}

.p-util__end {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.dot {
  color: #cbd5e1;
}

.p-util__app {
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}

.p-lang {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 4px;
}

.p-head-main {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 80;
}

.p-head-main__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 0;
}

@media (min-width: 960px) {
  .p-head-main__inner {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    column-gap: 20px;
    min-height: 64px;
  }

  .p-head-actions {
    margin-left: 0;
    justify-self: end;
  }

  .p-search.desktop-only {
    width: 100%;
    max-width: 480px;
    justify-self: center;
  }
}

.logo {
  font-weight: 800;
  font-size: 20px;
  color: var(--accent);
}

.p-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.p-search--block {
  border-radius: 10px;
  max-width: none;
}

.p-search__input {
  flex: 1;
  border: none;
  padding: 10px 14px;
  min-width: 0;
}

.p-search__input:focus {
  outline: none;
}

.p-search__icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.p-search__go {
  padding: 0 16px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
}

.p-head-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.p-auth {
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
}

.p-auth a:hover {
  color: var(--accent);
}

.slash {
  color: var(--muted);
}

.p-auth-mobile {
  font-weight: 700;
  color: var(--accent);
  padding: 8px 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
}

.p-mobile-search {
  border-top: 1px solid var(--border);
  padding: 8px 0 12px;
  background: #fff;
}

.icon-btn {
  width: var(--tap);
  height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text);
}

.icon-btn:active {
  background: var(--bg-page);
}

.burger {
  width: 20px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  border-radius: 1px;
}

/* Drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.drawer:not([hidden]) {
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 0.2s;
}

.drawer:not([hidden]) .drawer-backdrop {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(88vw, 300px);
  background: #fff;
  padding: 16px;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.drawer:not([hidden]) .drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.drawer-panel > a {
  display: block;
  padding: 14px 12px;
  font-weight: 600;
  border-radius: 8px;
}

.drawer-panel > a:active {
  background: var(--bg-page);
}

