/*
 * DRIFT — 商品详情页 + 购物车样式
 * 沿用 Drift 暖色调：espresso #321C04 / cream #F6E4CF / cream-light #FFF9F2 / muted-accent #D9C4AA
 * 选择器统一 .drift- / #drift- 前缀，只作用于本页面。
 */

.drift-page {
  margin: 0;
  min-height: 100vh;
  background: #f6e4cf;
  color: #321c04;
  font-family: Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.drift-page em,
.drift-page--product {
  font-family: Inter, sans-serif;
}

/* ---------- 页面骨架 ---------- */
.drift-product {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(1.6rem, 4vw, 3rem) clamp(1.1rem, 4vw, 3rem) 5rem;
}

.drift-product__back {
  display: inline-flex;
  color: #321c04;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.65;
  transition: opacity 0.25s;
}

.drift-product__back:hover {
  opacity: 1;
}

.drift-product__loading {
  margin-top: 4rem;
  font-size: 0.95rem;
  font-weight: 300;
  opacity: 0.6;
}

.drift-product__shell-wrap {
  display: block;
}

.drift-product__shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: 2.2rem;
  align-items: start;
}

/* 左栏（图库）整栏吸顶：右栏信息往下滚时左侧图片固定，图下方不再留白 */
.drift-gallery {
  align-self: start;
  position: sticky;
  top: 1.5rem;
}

/* ---------- 画廊 ---------- */
.drift-gallery__hero {
  overflow: hidden;
  border: 1px solid #d9c4aa;
  border-radius: 18px;
  background: #fff9f2;
}

.drift-gallery__hero img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.drift-gallery__noimage {
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  font-size: 0.9rem;
  opacity: 0.5;
}

.drift-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.drift-gallery__thumb {
  padding: 0;
  overflow: hidden;
  border: 1px solid #d9c4aa;
  border-radius: 12px;
  background: #fff9f2;
  cursor: pointer;
  transition: border-color 0.25s;
}

.drift-gallery__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.drift-gallery__thumb:hover,
.drift-gallery__thumb.is-active {
  border-color: #321c04;
}

.drift-gallery__thumb:focus-visible {
  outline: 2px solid #321c04;
  outline-offset: 2px;
}

/* ---------- 信息区 ---------- */
.drift-copy__eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.5;
}

.drift-copy h1 {
  margin: 0.9rem 0 0;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 400;
  line-height: 1.3;
}

.drift-copy__price {
  margin: 1rem 0 0;
  font-family: 'Instrument Serif', serif;
  font-size: 1.9rem;
}

.drift-copy__stock {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  opacity: 0.55;
}

/* 预估运费行（登录 + 有默认地址时显示金额；否则按口径提示或隐藏） */
.drift-copy__ship {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: #321c04;
  opacity: 0.8;
}
.drift-copy__ship[hidden] {
  display: none;
}

.drift-detail p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.8;
  opacity: 0.72;
}

.drift-options,
.drift-facts,
.drift-detail,
.drift-pack,
.drift-reviews {
  margin-top: 2.2rem;
}

.drift-options__head,
.drift-facts h2,
.drift-detail h2,
.drift-pack h2,
.drift-reviews h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  font-family: 'Instrument Serif', serif;
  font-size: 1.2rem;
  font-weight: 400;
}

.drift-options__head h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.2rem;
  font-weight: 400;
}

.drift-options__head span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.45;
}

.drift-options__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: 0.75rem;
}

/* 规格卡：卡片 + 该 SKU 自己的 − N +（与 PAWMELO / LINORA 同口径，可一次给多个 SKU 设数量） */
.drift-option-cell {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.drift-option-cell .drift-option {
  width: 100%;
}

.drift-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  /* 顶部多留一行给左上角的数量角标 */
  padding: 1.5rem 1rem 0.7rem;
  border: 1px solid #d9c4aa;
  /* 与下面的数量条拼成一个整体：下边不封口，只留上两角 */
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #fff9f2;
  color: #321c04;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}

.drift-option:hover {
  border-color: #321c04;
}

.drift-option.is-active {
  border-color: #321c04;
  background: #f6e4cf;
}

/* 选中态：数量条跟着卡片一起变，拼成整块 */
.drift-option-cell.is-active .drift-qty {
  border-color: #321c04;
  border-top-color: rgba(50, 28, 4, 0.18);
  background: #f6e4cf;
}

.drift-option-cell:hover .drift-qty {
  border-color: #321c04;
}

.drift-option:focus-visible {
  outline: 2px solid #321c04;
  outline-offset: 2px;
}

.drift-option span {
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.drift-option small {
  font-size: 0.72rem;
  opacity: 0.55;
}

.drift-option.is-sold-out {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 已加入购物车的数量：贴在规格卡左上角 */
.drift-option-badge {
  position: absolute;
  top: 0.45rem;
  left: 0.55rem;
  min-width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #321c04;
  color: #fff9f2;
  font-size: 0.68rem;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
}

/* 每个 SKU 自己的 − N + */
.drift-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.22rem 0.4rem;
  border: 1px solid #d9c4aa;
  border-top-color: rgba(217, 196, 170, 0.65);
  border-radius: 0 0 12px 12px;
  background: #fff9f2;
}

.drift-qty button {
  width: 1.55rem;
  height: 1.55rem;
  border: 0;
  border-radius: 50%;
  background: #f6e4cf;
  color: #321c04;
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.drift-qty button:hover:not(:disabled) {
  background: #321c04;
  color: #fff9f2;
}

.drift-qty button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.drift-qty-num {
  min-width: 1rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #321c04;
}

/* ---------- 数量与加购 ---------- */
.drift-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.drift-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9c4aa;
  border-radius: 12px;
  background: #fff9f2;
}

.drift-stepper button {
  width: 44px;
  height: 48px;
  border: 0;
  background: transparent;
  color: #321c04;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.2s;
}

.drift-stepper button:hover {
  background: #f6e4cf;
}

.drift-stepper b {
  min-width: 40px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
}

.drift-add {
  flex: 1;
  padding: 0 1.6rem;
  border: 0;
  border-radius: 12px;
  background: #321c04;
  color: #fff9f2;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.25s;
}

.drift-add:hover {
  opacity: 0.88;
}

.drift-add:disabled {
  background: #d9c4aa;
  color: #f6e4cf;
  cursor: not-allowed;
}

/* 立即购买：次级按钮（描边），与 Add to cart 并排 */
.drift-buynow {
  flex: 1 1 140px;
  position: relative;
  min-width: 140px;
  padding: 0 1.6rem;
  border: 1px solid #321c04;
  border-radius: 12px;
  background: transparent;
  color: #321c04;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.drift-buynow:hover {
  background: #321c04;
  color: #fff9f2;
}

.drift-buynow:disabled {
  border-color: #d9c4aa;
  color: #d9c4aa;
  background: transparent;
  cursor: not-allowed;
}

/* ---------- 属性 / 包装 / 评价 ---------- */
.drift-facts dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.7rem 1.5rem;
  margin: 0;
  padding-top: 1.2rem;
  border-top: 1px solid #d9c4aa;
}

.drift-facts div {
  display: flex;
  gap: 0.6rem;
  font-size: 0.82rem;
  line-height: 1.7;
}

.drift-facts dt {
  flex: 0 0 auto;
  opacity: 0.5;
}

.drift-facts dd {
  margin: 0;
  opacity: 0.85;
  overflow-wrap: anywhere;
}

.drift-pack div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.drift-pack span {
  padding: 0.45rem 0.85rem;
  border: 1px solid #d9c4aa;
  border-radius: 999px;
  font-size: 0.78rem;
  opacity: 0.7;
}

.drift-reviews ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #d9c4aa;
}

.drift-reviews li {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(217, 196, 170, 0.6);
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.8;
  opacity: 0.75;
}

/* ---------- 购物车 ---------- */
#drift-cart-button {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 42px;
  padding: 0 1.1rem;
  border: 1px solid #321c04;
  border-radius: 999px;
  background: #fff9f2;
  color: #321c04;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

#drift-cart-scrim {
  position: fixed;
  inset: 0;
  z-index: 10005;
  background: rgba(50, 28, 4, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

#drift-cart-drawer.is-open ~ #drift-cart-scrim {
  opacity: 1;
  pointer-events: auto;
}

#drift-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10010;
  display: flex;
  flex-direction: column;
  width: min(420px, 100vw);
  height: 100%;
  border-left: 1px solid #d9c4aa;
  background: #fff9f2;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#drift-cart-drawer.is-open {
  transform: none;
}

#drift-cart-drawer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.5rem;
  border-bottom: 1px solid #d9c4aa;
}

#drift-cart-drawer header span {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  opacity: 0.55;
}

#drift-cart-drawer header h2 {
  margin: 0.4rem 0 0;
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  font-weight: 400;
}

#drift-cart-close {
  width: 36px;
  height: 36px;
  border: 1px solid #d9c4aa;
  border-radius: 50%;
  background: transparent;
  color: #321c04;
  cursor: pointer;
}

#drift-cart-lines {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem 1.5rem;
}

.drift-cart-empty {
  font-size: 0.9rem;
  font-weight: 300;
  opacity: 0.6;
}

.drift-cart-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0.9rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid rgba(217, 196, 170, 0.7);
}

.drift-cart-line img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

.drift-cart-line strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.drift-cart-line small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  opacity: 0.55;
}

.drift-cart-line span {
  display: block;
  margin-top: 0.35rem;
  font-family: 'Instrument Serif', serif;
  font-size: 1rem;
}

.drift-cart-stepper {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}

.drift-cart-stepper button {
  min-width: 36px;
  height: 36px;
  border: 1px solid #d9c4aa;
  border-radius: 8px;
  background: transparent;
  color: #321c04;
  cursor: pointer;
}

.drift-cart-stepper b {
  min-width: 32px;
  text-align: center;
  font-size: 0.85rem;
}

.drift-cart-stepper .drift-cart-remove {
  margin-left: auto;
  padding: 0 0.75rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.6;
}

#drift-cart-drawer footer {
  padding: 1.3rem 1.5rem 1.6rem;
  border-top: 1px solid #d9c4aa;
}

#drift-cart-drawer footer div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}

#drift-cart-drawer footer span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
}

#drift-cart-total {
  font-family: 'Instrument Serif', serif;
  font-size: 1.4rem;
  font-weight: 400;
}

/* 抽屉里的总计运费（预估）；未登录/空车/无地址时按口径隐藏或提示 */
#drift-cart-freight {
  display: block;
  font-size: 0.74rem;
  color: rgba(50, 28, 4, 0.75);
}
#drift-cart-freight[hidden] {
  display: none;
}

#drift-cart-checkout {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: #321c04;
  color: #fff9f2;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

/* 清空购物车（次级文字按钮，与另三站口径一致） */
#drift-cart-clear {
  width: 100%;
  height: 38px;
  margin-bottom: 0.55rem;
  border: 0;
  background: transparent;
  color: rgba(50, 28, 4, 0.6);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

#drift-cart-clear:hover {
  color: #321c04;
}

/* 未登录时的站内登录入口（次级按钮） */
#drift-cart-signin {
  width: 100%;
  height: 44px;
  margin-bottom: 0.55rem;
  border: 1px solid rgba(50, 28, 4, 0.25);
  border-radius: 12px;
  background: transparent;
  color: #321c04;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}
#drift-cart-signin[hidden] {
  display: none;
}
#drift-cart-signin:hover {
  border-color: #321c04;
  background: rgba(50, 28, 4, 0.05);
}

.drift-cart-hint {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 10015;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.3rem;
  border: 1px solid #321c04;
  border-radius: 999px;
  background: #fff9f2;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.3s, transform 0.3s;
}

.drift-cart-hint.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.drift-cart-hint a {
  color: #321c04;
  font-weight: 600;
  text-decoration: none;
}

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
  .drift-product__shell {
    grid-template-columns: 1fr;
  }
  /* 单栏时取消左栏吸顶 */
  .drift-gallery {
    position: static;
    top: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drift-page * {
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 登录弹窗 / 协议弹层 / Toast（DriftShop） ---------- */

#drift-toast {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  transform: translate(-50%, 1rem);
  z-index: 10030;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: #321c04;
  color: #fff9f2;
  font: 500 0.78rem/1 Inter, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#drift-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.drift-login-mask,
.drift-policy-mask {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(50, 28, 4, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.drift-policy-mask {
  z-index: 10020;
  background: rgba(50, 28, 4, 0.6);
}
.drift-login-mask.is-visible,
.drift-policy-mask.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.drift-login-card {
  position: relative;
  width: min(420px, 100%);
  background: #fff9f2;
  color: #321c04;
  padding: 2.4rem 2rem 1.8rem;
  border-radius: 1rem;
  box-shadow: 0 30px 70px rgba(50, 28, 4, 0.35);
}
.drift-login-close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  background: transparent;
  border: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: rgba(50, 28, 4, 0.6);
  cursor: pointer;
}
.drift-login-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.6;
}
.drift-login-title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 1.9rem;
  margin: 0.5rem 0 0.4rem;
}
.drift-login-sub {
  font-size: 0.78rem;
  line-height: 1.5;
  opacity: 0.72;
  margin: 0 0 1.4rem;
}
.drift-login-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.drift-login-label {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-top: 0.6rem;
}
.drift-login-input {
  border: 1px solid rgba(50, 28, 4, 0.25);
  background: #fff;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: inherit;
  border-radius: 0.55rem;
  outline: none;
}
.drift-login-input:focus {
  border-color: #321c04;
}
.drift-login-agree {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.7rem;
  line-height: 1.4;
  margin: 0.9rem 0 0.2rem;
  opacity: 0.85;
}
.drift-login-agree span {
  flex: 1;
}
.drift-login-error {
  background: rgba(180, 60, 40, 0.1);
  color: #a4301c;
  font-size: 0.72rem;
  padding: 0.5rem 0.6rem;
  border-left: 3px solid #a4301c;
  border-radius: 0.2rem;
}
.drift-login-submit {
  margin-top: 0.9rem;
  background: #321c04;
  color: #fff9f2;
  border: 0;
  padding: 0.9rem 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  border-radius: 999px;
  cursor: pointer;
}
.drift-login-submit:disabled {
  opacity: 0.6;
  cursor: default;
}
.drift-login-links {
  display: flex;
  justify-content: space-between;
  margin-top: 1.1rem;
  font-size: 0.72rem;
}
.drift-login-links a {
  color: #8a5a3a;
}
.drift-policy-link {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #8a5a3a;
  text-decoration: underline;
  cursor: pointer;
}
.drift-policy-link:hover {
  color: #321c04;
}

.drift-policy-card {
  display: flex;
  flex-direction: column;
  width: min(760px, 92vw);
  max-height: 80vh;
  background: #fff9f2;
  color: #321c04;
  border-radius: 1rem;
  box-shadow: 0 30px 70px rgba(50, 28, 4, 0.35);
}
.drift-policy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid rgba(50, 28, 4, 0.15);
}
.drift-policy-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.25rem;
  font-weight: 400;
}
.drift-policy-close {
  background: none;
  border: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: rgba(50, 28, 4, 0.6);
  cursor: pointer;
}
.drift-policy-body {
  padding: 1.2rem 1.4rem;
  overflow-y: auto;
  line-height: 1.8;
  font-size: 0.86rem;
}
.drift-policy-body h1,
.drift-policy-body h2,
.drift-policy-body h3 {
  font-family: 'Instrument Serif', serif;
  line-height: 1.4;
  margin: 1rem 0 0.5rem;
}
.drift-policy-body a {
  color: #8a5a3a;
}
.drift-policy-hint {
  opacity: 0.6;
}

/* ==========================================================================
   详情页视觉增强（用户要求：背景更好看 + 一点特效）
   1) 背景：分层暖色径向光 + 缓慢漂浮的暖光斑（极光）+ 细颗粒质感
   2) 加购反馈：按钮脉冲 + 环形涟漪 + 粒子迸发 + 购物车抖动
   全部只用 .drift- 前缀 / 仅作用于详情页，不影响其他站点。
   ========================================================================== */

/* ---------- 1) 背景 ---------- */
.drift-page--product {
  position: relative;
  background:
    radial-gradient(64rem 64rem at 8% -14%, rgba(214, 176, 128, 0.92), transparent 60%),
    radial-gradient(56rem 56rem at 100% 2%, rgba(190, 126, 74, 0.48), transparent 60%),
    radial-gradient(72rem 72rem at 72% 118%, rgba(120, 72, 40, 0.42), transparent 58%),
    repeating-linear-gradient(135deg, rgba(138, 90, 58, 0.055) 0 1px, transparent 1px 20px),
    linear-gradient(180deg, #fdf5e7 0%, #f4ddbe 44%, #e6c9a1 100%);
  background-attachment: fixed;
}

/* 缓慢漂浮的暖光斑（左上一团 + 右下由 .drift-product::before 补一团） */
.drift-page--product::before {
  content: "";
  position: fixed;
  left: -18vw;
  top: -24vh;
  z-index: 0;
  width: 78vw;
  height: 78vw;
  max-width: 1000px;
  max-height: 1000px;
  pointer-events: none;
  background:
    radial-gradient(circle at 38% 40%, rgba(230, 190, 136, 0.95), rgba(230, 190, 136, 0) 60%),
    radial-gradient(circle at 70% 68%, rgba(190, 126, 74, 0.62), rgba(190, 126, 74, 0) 58%);
  filter: blur(4px);
  animation: driftAurora 18s ease-in-out infinite alternate;
}

/* 细颗粒质感（很轻，不遮挡交互） */
.drift-page--product::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.075;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

@keyframes driftAurora {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translate3d(12vw, 9vh, 0) scale(1.22);
    opacity: 1;
  }
  100% {
    transform: translate3d(5vw, -6vh, 0) scale(1.06);
    opacity: 0.9;
  }
}

/* 内容与购物车浮在背景层之上 */
.drift-product {
  position: relative;
  z-index: 2;
}

/* 右下角第二团暖光（反方向漂浮，制造流动感） */
.drift-product::before {
  content: "";
  position: fixed;
  right: -16vw;
  bottom: -20vh;
  z-index: -1;
  width: 64vw;
  height: 64vw;
  max-width: 820px;
  max-height: 820px;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(196, 140, 82, 0.6), rgba(196, 140, 82, 0) 62%);
  filter: blur(6px);
  animation: driftAurora2 22s ease-in-out infinite alternate;
}

@keyframes driftAurora2 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate3d(-9vw, -7vh, 0) scale(1.24);
    opacity: 1;
  }
}

/* ---------- 2) 加购反馈 ---------- */
.drift-add {
  position: relative;
}

/* 按钮：成功时轻微脉冲（先缩后弹） */
.drift-add.is-added,
.drift-buynow.is-added {
  animation: driftAddPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes driftAddPop {
  0% {
    transform: scale(1);
  }
  32% {
    transform: scale(0.955);
  }
  62% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

/* 按钮外扩的环形涟漪 */
.drift-add.is-added::after,
.drift-buynow.is-added::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(138, 90, 58, 0.55);
  animation: driftRipple 0.7s ease-out forwards;
}

@keyframes driftRipple {
  to {
    box-shadow: 0 0 0 18px rgba(138, 90, 58, 0);
  }
}

/* 迸发粒子（JS 动态生成，颜色/方向由内联样式给） */
.drift-spark {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10040;
  animation: driftSpark 0.9s cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}

@keyframes driftSpark {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.2);
    opacity: 0;
  }
}

/* 右上角购物车按钮抖动呼应 */
#drift-cart-button.is-bounce {
  animation: driftCartBounce 0.55s ease;
}

@keyframes driftCartBounce {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.14);
  }
  55% {
    transform: scale(0.96);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .drift-page--product::before,
  .drift-product::before {
    animation: none;
  }
  .drift-add.is-added,
  .drift-add.is-added::after,
  #drift-cart-button.is-bounce {
    animation: none;
  }
  .drift-spark {
    display: none;
  }
}

/* ========== 四站统一细节（2026-10） ========== */

/* 空态：未登录给登录引导 */
.drift-cart-empty{display:flex;flex-direction:column;align-items:flex-start;gap:.8rem}
.drift-cart-empty p{margin:0}
.drift-cart-empty button{border:1px solid #d9c4aa;border-radius:999px;background:transparent;color:#321c04;padding:.55rem .95rem;font:600 .66rem/1 Inter,sans-serif;letter-spacing:.08em;text-transform:uppercase;cursor:pointer;transition:background .2s ease,color .2s ease,border-color .2s ease}
.drift-cart-empty button:hover{background:#321c04;color:#fff9f2;border-color:#321c04}

/* 运费提示可点 */
#drift-cart-freight.is-link,
#drift-ship.is-link{cursor:pointer;color:#8a5a3a;text-decoration:underline;text-underline-offset:2px}
#drift-cart-freight.is-link:hover,
#drift-ship.is-link:hover{color:#321c04}

/* 清空购物车确认层（盖住整个抽屉） */
.drift-confirm-mask{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;padding:1.5rem;background:rgba(50,28,4,.5);backdrop-filter:blur(2px);opacity:0;pointer-events:none;transition:opacity .2s ease}
.drift-confirm-mask.is-visible{opacity:1;pointer-events:auto}
.drift-confirm-card{width:100%;max-width:330px;padding:1.6rem 1.4rem 1.3rem;border-radius:14px;background:#fff9f2;color:#321c04;box-shadow:0 24px 60px rgba(50,28,4,.3)}
.drift-confirm-card h3{margin:0 0 .5rem;font-family:'Instrument Serif',Georgia,serif;font-size:1.2rem;font-weight:400}
.drift-confirm-card p{margin:0 0 1.2rem;font-size:.8rem;line-height:1.55;opacity:.68}
.drift-confirm-actions{display:flex;gap:.6rem;justify-content:flex-end}
.drift-confirm-cancel{border:1px solid rgba(50,28,4,.3);border-radius:999px;background:transparent;color:#321c04;padding:.6rem 1rem;font:600 .66rem/1 Inter,sans-serif;letter-spacing:.08em;text-transform:uppercase;cursor:pointer}
.drift-confirm-cancel:hover{background:rgba(50,28,4,.06)}
.drift-confirm-danger{border:1px solid #a4301c;border-radius:999px;background:#a4301c;color:#fff;padding:.6rem 1rem;font:600 .66rem/1 Inter,sans-serif;letter-spacing:.08em;text-transform:uppercase;cursor:pointer;transition:background .2s ease}
.drift-confirm-danger:hover:not(:disabled){background:#852614}
.drift-confirm-danger:disabled{opacity:.6;cursor:not-allowed}

/* 账号入口：右上角购物车按钮左侧（位置由 JS 计算） */
#drift-account{position:fixed;top:20px;right:170px;z-index:10000;display:inline-flex;align-items:center;gap:.5rem;max-width:min(240px,62vw);padding:.32rem .38rem .32rem .75rem;border-radius:999px;background:#321c04;color:#fff9f2;border:1px solid #321c04;box-shadow:0 8px 22px rgba(50,28,4,.22);font:600 .68rem/1 Inter,sans-serif;letter-spacing:.05em;white-space:nowrap;transition:right .2s ease,top .2s ease}
#drift-account .drift-account-name{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.9}
#drift-account .drift-account-btn{border:1px solid rgba(255,249,242,.4);border-radius:999px;background:transparent;color:inherit;padding:.34rem .62rem;font:inherit;cursor:pointer;transition:background .2s ease,color .2s ease}
#drift-account .drift-account-btn:hover{background:#fff9f2;color:#321c04}

/* 顶部固定规格：属性里的尺寸类字段 */
.drift-fixed-specs{display:flex;flex-direction:column;gap:.5rem;margin:.8rem 0 .2rem}
.drift-fixed-spec{display:flex;align-items:center;gap:.6rem;padding:.6rem .85rem;border-left:3px solid #d9c4aa;border-radius:0 8px 8px 0;background:rgba(217,196,170,.2);font-size:.8rem;line-height:1.35}
.drift-fixed-spec-label{flex:0 0 auto;font:600 .62rem/1 Inter,sans-serif;letter-spacing:.14em;text-transform:uppercase;color:#8a5a3a}
.drift-fixed-spec-value{font-weight:600;color:#321c04}

/* Checkout this product 置灰：仍可点击，点击给提示 */
.drift-buynow.is-disabled{opacity:.42;cursor:not-allowed}
.drift-buynow.is-disabled:hover{background:transparent;color:#321c04}
