/* ===== 璞方实验室 · 全站统一样式 =====
   浅色主题 · 所有页面共享
   修改色彩/间距/字体只需改这一个文件 */

/* ===== RESET ===== */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth;font-size:16px}
body{
  font-family:'PingFang SC','Noto Sans SC','HarmonyOS Sans','Microsoft YaHei',sans-serif;
  background:#FFFFFF;
  color:#2C2C2A;
  line-height:1.7;
  overflow-x:hidden;
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%;height:auto}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}

/* ===== DESIGN TOKENS ===== */
:root{
  /* 背景色系 */
  --bg-primary:#FFFFFF;        /* 白底（主内容） */
  --bg-secondary:#F8F6F1;      /* 暖灰背景（区块底色） */
  --bg-tertiary:#FAFAFA;      /* 浅灰（导航/卡片） */
  --bg-overlay:rgba(0,0,0,0.4);/* 遮罩 */

  /* 文字色系 */
  --text-primary:#2C2C2A;     /* 主文字（近黑） */
  --text-secondary:#5F5E5A;   /* 次要文字 */
  --text-muted:#888780;       /* 提示文字 */
  --text-on-dark:#FFFFFF;     /* 深色按钮上的文字 */

  /* 强调色 */
  --accent-dark:#2C2C2A;      /* 深色点缀（按钮/标题） */
  --accent-coral:#D85A30;     /* 珊瑚橙（价格/角标） */
  --accent-purple:#534AB7;    /* 紫色（链接/C端） */
  --accent-gold:#B8784C;     /* 金棕（辅助强调） */

  /* 边框 */
  --border-light:#E0E0E0;     /* 默认边框 */
  --border-medium:#D3D1C7;    /* 中等边框 */

  /* 圆角 */
  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:16px;
  --radius-full:999px;

  /* 布局 */
  --max-width:1200px;
  --nav-height:64px;
}

/* ===== NAVBAR ===== */
.nav{
  position:sticky;top:0;z-index:100;
  background:rgba(255,255,255,0.92);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-bottom:0.5px solid var(--border-light);
  transition:box-shadow .3s;
}
.nav.scrolled{box-shadow:0 1px 8px rgba(0,0,0,0.06)}
.nav-inner{
  max-width:var(--max-width);margin:0 auto;padding:0 24px;
  height:var(--nav-height);display:flex;align-items:center;justify-content:space-between;
}
.nav-logo{
  font-size:18px;font-weight:700;letter-spacing:1px;color:var(--text-primary);
  display:flex;align-items:center;gap:8px;
}
.nav-logo .dot{
  width:8px;height:8px;border-radius:50%;background:var(--accent-coral);
}
.nav-links{display:flex;align-items:center;gap:32px}
.nav-links a{
  font-size:14px;color:var(--text-secondary);transition:color .2s;position:relative;padding:4px 0;
}
.nav-links a:hover,.nav-links a.active{color:var(--text-primary)}
.nav-links a.active::after{
  content:'';position:absolute;bottom:-4px;left:0;right:0;height:2px;
  background:var(--accent-dark);border-radius:1px;
}
.nav-actions{display:flex;align-items:center;gap:12px}
.nav-cart-btn{
  width:40px;height:40px;border-radius:50%;background:var(--bg-tertiary);
  display:flex;align-items:center;justify-content:center;position:relative;
  transition:background .2s;
}
.nav-cart-btn:hover{background:var(--bg-secondary)}
.nav-cart-btn svg{width:20px;height:20px;color:var(--text-primary)}
.nav-cart-badge{
  position:absolute;top:-2px;right:-2px;min-width:18px;height:18px;
  border-radius:9px;background:var(--accent-coral);color:#fff;
  font-size:11px;font-weight:600;display:flex;align-items:center;justify-content:center;
  padding:0 5px;
}
.nav-cart-badge:empty{display:none}

/* 汉堡菜单按钮 */
.nav-hamburger{display:none;flex-direction:column;gap:4px;padding:8px}
.nav-hamburger span{
  width:22px;height:2px;background:var(--text-primary);border-radius:1px;transition:.3s;
}
.nav-hamburger.open span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.nav-hamburger.open span:nth-child(2){opacity:0}
.nav-hamburger.open span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}

/* 移动端抽屉菜单 */
.drawer-overlay{
  position:fixed;inset:0;z-index:200;background:var(--bg-overlay);
  opacity:0;pointer-events:none;transition:opacity .3s;
}
.drawer-overlay.open{opacity:1;pointer-events:auto}
.drawer{
  position:fixed;top:0;right:0;bottom:0;z-index:201;
  width:280px;background:#FFFFFF;transform:translateX(100%);
  transition:transform .3s ease;overflow-y:auto;padding:20px 0;
}
.drawer.open{transform:translateX(0)}
.drawer-header{
  padding:12px 24px 20px;border-bottom:0.5px solid var(--border-light);
  display:flex;align-items:center;justify-content:space-between;
}
.drawer-header .logo{font-size:16px;font-weight:700;color:var(--text-primary)}
.drawer-close{
  width:32px;height:32px;border-radius:50%;background:var(--bg-tertiary);
  display:flex;align-items:center;justify-content:center;font-size:18px;color:var(--text-secondary);
}
.drawer-section{padding:8px 0}
.drawer-section-title{
  font-size:11px;color:var(--text-muted);letter-spacing:1px;
  text-transform:uppercase;padding:8px 24px 4px;
}
.drawer-item{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 24px;font-size:15px;color:var(--text-primary);
  transition:background .15s;
}
.drawer-item:hover{background:var(--bg-tertiary)}
.drawer-item .arrow{font-size:14px;color:var(--text-muted)}
.drawer-divider{height:0.5px;background:var(--border-light);margin:4px 0}

/* ===== LAYOUT UTILITIES ===== */
section{position:relative}
.container{max-width:var(--max-width);margin:0 auto;padding:0 24px}
.section-pad{padding:80px 0}
.section-pad-sm{padding:48px 0}
.section-title{font-size:28px;font-weight:700;line-height:1.3;margin-bottom:8px}
.section-sub{font-size:15px;color:var(--text-secondary);max-width:560px}
.section-center{text-align:center}
.section-center .section-sub{margin:0 auto}

/* ===== BUTTONS ===== */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 28px;border-radius:var(--radius-sm);font-size:14px;font-weight:500;
  transition:all .2s;cursor:pointer;border:none;
}
.btn-dark{background:var(--accent-dark);color:var(--text-on-dark)}
.btn-dark:hover{opacity:0.85;transform:translateY(-1px)}
.btn-outline{background:transparent;border:1px solid var(--accent-dark);color:var(--text-primary)}
.btn-outline:hover{background:var(--accent-dark);color:var(--text-on-dark)}
.btn-coral{background:var(--accent-coral);color:#fff}
.btn-coral:hover{opacity:0.85}
.btn-sm{padding:8px 18px;font-size:13px}
.btn-block{width:100%}

/* ===== HERO SECTION ===== */
.hero{
  min-height:60vh;display:flex;align-items:center;position:relative;overflow:hidden;
  background:var(--bg-secondary);
}
.hero-inner{
  max-width:var(--max-width);margin:0 auto;padding:80px 24px;width:100%;position:relative;z-index:1;
}
.hero-tag{
  display:inline-flex;align-items:center;gap:8px;padding:6px 16px;
  background:rgba(216,90,48,0.08);border:0.5px solid rgba(216,90,48,0.2);
  border-radius:var(--radius-full);font-size:12px;color:var(--accent-coral);
  letter-spacing:1px;margin-bottom:24px;
}
.hero-tag .dot{width:6px;height:6px;border-radius:50%;background:var(--accent-coral);animation:pulse 2s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}
.hero h1{font-size:48px;font-weight:700;line-height:1.2;letter-spacing:1px;margin-bottom:16px}
.hero-sub{font-size:17px;color:var(--text-secondary);max-width:520px;margin-bottom:32px}
.hero-cta{display:flex;gap:12px;flex-wrap:wrap}

/* Hero stats */
.hero-stats{display:flex;gap:40px;margin-top:48px;padding-top:32px;border-top:0.5px solid var(--border-light)}
.hero-stat .num{font-size:32px;font-weight:700;color:var(--text-primary);line-height:1}
.hero-stat .num .unit{font-size:14px;color:var(--accent-coral);margin-left:2px}
.hero-stat .label{font-size:12px;color:var(--text-muted);margin-top:4px}

/* ===== BRAND INTRO ===== */
.intro-section{padding:64px 0;text-align:center}
.intro-text{font-size:16px;color:var(--text-secondary);line-height:1.8;max-width:680px;margin:0 auto 20px}
.intro-link{font-size:14px;color:var(--accent-purple);font-weight:500;transition:opacity .2s}
.intro-link:hover{opacity:0.7}

/* ===== PRODUCT CARDS (shared) ===== */
.products-grid{display:grid;gap:20px;margin-top:40px}
.products-grid-3{grid-template-columns:repeat(3,1fr)}
.products-grid-4{grid-template-columns:repeat(4,1fr)}
.products-grid-2{grid-template-columns:repeat(2,1fr)}
.product-card{
  background:#FFFFFF;border:0.5px solid var(--border-light);border-radius:var(--radius-md);
  overflow:hidden;cursor:pointer;transition:all .25s;
}
.product-card:hover{
  border-color:var(--border-medium);transform:translateY(-3px);
  box-shadow:0 8px 24px rgba(0,0,0,0.06);
}
.product-img-wrap{aspect-ratio:1/1;background:var(--bg-secondary);overflow:hidden;position:relative}
.product-img-wrap img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.product-card:hover .product-img-wrap img{transform:scale(1.04)}
.product-img-placeholder{
  width:100%;height:100%;display:flex;align-items:center;justify-content:center;
  font-size:40px;color:var(--text-muted);font-weight:700;
}
.product-tags{position:absolute;top:8px;left:8px;display:flex;gap:4px}
.tag{
  padding:2px 8px;border-radius:var(--radius-full);font-size:10px;font-weight:600;
  letter-spacing:.3px;
}
.tag-same{background:rgba(184,120,76,0.12);color:var(--accent-gold);border:0.5px solid rgba(184,120,76,0.2)}
.tag-new{background:rgba(83,74,183,0.1);color:var(--accent-purple)}
.product-info{padding:12px 14px}
.product-series{font-size:11px;color:var(--text-muted);margin-bottom:2px}
.product-name{font-size:14px;font-weight:600;line-height:1.4;margin-bottom:4px;
  display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.product-tagline{font-size:12px;color:var(--text-secondary);margin-bottom:8px;
  display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.product-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px}
.product-price{font-size:18px;font-weight:700;color:var(--accent-coral)}
.product-price .currency{font-size:12px;margin-right:1px}
.product-spec{font-size:11px;color:var(--text-muted)}
.product-btns{display:flex;gap:6px;margin-top:8px}
.product-btn-buy{
  flex:1;padding:7px 0;background:var(--accent-dark);color:#fff;
  border-radius:6px;font-size:12px;font-weight:500;text-align:center;
}
.product-btn-buy:hover{opacity:0.85}
.product-btn-cart{
  padding:7px 12px;background:var(--bg-tertiary);color:var(--text-primary);
  border:0.5px solid var(--border-light);border-radius:6px;font-size:12px;font-weight:500;
}
.product-btn-cart:hover{border-color:var(--accent-dark)}

/* ===== MINI CAROUSEL (product card) ===== */
.mini-carousel{
  width:100%;height:100%;overflow-x:auto;overflow-y:hidden;
  scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none;
  cursor:grab;
}
.mini-carousel::-webkit-scrollbar{display:none}
.mini-carousel.dragging{cursor:grabbing;scroll-snap-type:none}
.mini-carousel-track{display:flex;height:100%}
.mini-carousel-track>img{
  flex:0 0 100%;width:100%;height:100%;object-fit:cover;
  scroll-snap-align:start;pointer-events:none;user-select:none;
  -webkit-user-drag:none;
}
.mini-carousel-dots{
  position:absolute;bottom:8px;left:50%;transform:translateX(-50%);
  display:flex;gap:5px;z-index:2;
}
.mini-carousel-dots .dot{
  width:6px;height:6px;border-radius:3px;
  background:rgba(255,255,255,0.7);box-shadow:0 0 3px rgba(0,0,0,0.3);
  transition:all .25s;cursor:pointer;
}
.mini-carousel-dots .dot.active{width:16px;background:rgba(255,255,255,0.95)}

/* ===== CERT PREVIEW CARD ===== */
.cert-preview{
  display:flex;align-items:center;gap:16px;padding:20px 24px;
  background:var(--bg-secondary);border:0.5px solid var(--border-light);
  border-radius:var(--radius-md);transition:all .2s;cursor:pointer;
}
.cert-preview:hover{border-color:var(--border-medium);box-shadow:0 4px 16px rgba(0,0,0,0.04)}
.cert-preview-icon{
  width:56px;height:56px;border-radius:var(--radius-sm);background:var(--border-medium);
  flex-shrink:0;display:flex;align-items:center;justify-content:center;
}
.cert-preview-text{flex:1}
.cert-preview-title{font-size:15px;font-weight:600;color:var(--text-primary);margin-bottom:2px}
.cert-preview-desc{font-size:13px;color:var(--text-muted)}
.cert-preview-link{font-size:13px;color:var(--accent-purple);font-weight:500;white-space:nowrap}

/* ===== QUICK LINKS ===== */
.quick-links{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.quick-link-card{
  display:flex;align-items:center;gap:14px;padding:18px 20px;
  background:var(--bg-secondary);border:0.5px solid var(--border-light);
  border-radius:var(--radius-md);transition:all .2s;
}
.quick-link-card:hover{border-color:var(--accent-dark);transform:translateY(-2px)}
.quick-link-icon{
  width:40px;height:40px;border-radius:var(--radius-sm);background:var(--border-medium);
  flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:18px;
}
.quick-link-title{font-size:14px;font-weight:600;color:var(--text-primary)}
.quick-link-desc{font-size:12px;color:var(--text-muted)}

/* ===== FOOTER ===== */
.footer{
  background:var(--bg-secondary);border-top:0.5px solid var(--border-light);
  padding:48px 0 24px;position:relative;
}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1.5fr;gap:40px;margin-bottom:32px}
.footer-brand .logo{font-size:18px;font-weight:700;letter-spacing:1px;margin-bottom:8px;color:var(--text-primary)}
.footer-brand .logo .dot{color:var(--accent-coral)}
.footer-brand .slogan{font-size:13px;color:var(--text-secondary);line-height:1.8}
.footer-col h4{font-size:12px;color:var(--text-muted);letter-spacing:1px;margin-bottom:12px;text-transform:uppercase;font-weight:600}
.footer-col a{display:block;font-size:13px;color:var(--text-secondary);padding:4px 0;transition:color .15s}
.footer-col a:hover{color:var(--accent-coral)}
.footer-bottom{border-top:0.5px solid var(--border-light);padding-top:20px}
.footer-disclaimer{font-size:11px;color:var(--text-muted);line-height:1.7;margin-bottom:8px}
.footer-copyright{font-size:11px;color:var(--text-muted)}

/* ===== FLOAT CART ===== */
.float-cart{
  position:fixed;bottom:24px;right:24px;width:48px;height:48px;border-radius:50%;
  background:var(--accent-dark);display:flex;align-items:center;justify-content:center;
  z-index:90;transition:transform .2s;box-shadow:0 4px 16px rgba(0,0,0,0.15);
}
.float-cart:hover{transform:scale(1.08)}
.float-cart svg{width:22px;height:22px;color:#fff}
.float-cart-badge{
  position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;border-radius:10px;
  background:var(--accent-coral);color:#fff;font-size:11px;font-weight:700;
  display:flex;align-items:center;justify-content:center;padding:0 6px;
}
.float-cart-badge:empty{display:none}

/* ===== BACK TO TOP ===== */
.back-top{
  position:fixed;bottom:24px;left:24px;width:40px;height:40px;border-radius:50%;
  background:#FFFFFF;border:0.5px solid var(--border-light);
  display:flex;align-items:center;justify-content:center;
  font-size:18px;color:var(--text-secondary);opacity:0;pointer-events:none;
  transition:.3s;z-index:90;box-shadow:0 2px 8px rgba(0,0,0,0.08);
}
.back-top.show{opacity:1;pointer-events:auto}
.back-top:hover{border-color:var(--accent-dark);color:var(--accent-dark)}

/* ===== ANIMATIONS ===== */
.fade-in{opacity:0;transform:translateY(16px);transition:opacity .5s,transform .5s}
.fade-in.visible{opacity:1;transform:translateY(0)}

/* ===== TOAST ===== */
.toast{
  position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);
  background:rgba(44,44,42,0.95);color:#fff;padding:14px 28px;
  border-radius:var(--radius-md);font-size:14px;z-index:9999;
  animation:toastIn .3s;
}
@keyframes toastIn{from{opacity:0;transform:translate(-50%,-45%) scale(0.95)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}

/* ===== ORDER FORM MODAL ===== */
.order-modal-overlay{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,0.45);backdrop-filter:blur(6px);display:none;align-items:center;justify-content:center;padding:20px}
.order-modal-overlay.open{display:flex}
.order-modal{background:#FFFFFF;border-radius:var(--radius-lg);max-width:460px;width:100%;max-height:90vh;overflow-y:auto;position:relative}
.order-modal-close{position:absolute;top:12px;right:16px;background:var(--bg-tertiary);border:none;width:32px;height:32px;border-radius:50%;color:var(--text-muted);font-size:18px;cursor:pointer;z-index:1}
.order-modal-close:hover{color:var(--text-primary)}
.order-modal-body{padding:28px 24px}
.order-modal-body h3{font-size:20px;font-weight:600;color:var(--text-primary);margin-bottom:4px}
.order-modal-body .order-sub{font-size:13px;color:var(--text-muted);margin-bottom:20px}
.order-product-info{display:flex;align-items:center;gap:12px;padding:12px;background:var(--bg-secondary);border-radius:var(--radius-sm);margin-bottom:20px}
.order-product-info img{width:48px;height:48px;border-radius:6px;object-fit:cover}
.order-product-info .opi-name{font-size:14px;font-weight:500;color:var(--text-primary)}
.order-product-info .opi-price{font-size:13px;color:var(--accent-coral)}
.order-field{margin-bottom:14px}
.order-field label{display:block;font-size:13px;color:var(--text-secondary);margin-bottom:6px}
.order-field input,.order-field textarea,.order-field select{width:100%;padding:10px 14px;background:var(--bg-tertiary);border:0.5px solid var(--border-light);border-radius:var(--radius-sm);color:var(--text-primary);font-size:14px;font-family:inherit;box-sizing:border-box}
.order-field input:focus,.order-field textarea:focus,.order-field select:focus{outline:none;border-color:var(--accent-dark)}
.order-field textarea{resize:vertical;min-height:60px}
.order-field-row{display:flex;gap:12px}
.order-field-row .order-field{flex:1}
.order-submit-btn{width:100%;padding:14px;background:var(--accent-dark);color:#fff;border:none;border-radius:var(--radius-sm);font-size:15px;font-weight:500;cursor:pointer;transition:opacity .2s}
.order-submit-btn:hover{opacity:0.85}
.order-submit-btn:disabled{opacity:0.5;cursor:not-allowed}
.order-success{text-align:center;padding:20px 0}
.order-success .check{width:56px;height:56px;border-radius:50%;background:rgba(184,120,76,0.12);display:flex;align-items:center;justify-content:center;margin:0 auto 16px;font-size:28px;color:var(--accent-gold)}
.order-success h4{font-size:18px;color:var(--text-primary);margin-bottom:8px}
.order-success p{font-size:13px;color:var(--text-muted);line-height:1.6}
.honeypot{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* ===== REFERRAL BANNER ===== */
.referral-banner{
  position:fixed;bottom:0;left:0;right:0;background:var(--accent-dark);color:#fff;
  padding:10px 20px;display:none;align-items:center;justify-content:center;
  gap:10px;font-size:13px;z-index:9000;box-shadow:0 -4px 16px rgba(0,0,0,0.1);
}
.referral-banner.show{display:flex}
.referral-banner .rb-close{margin-left:12px;color:#fff;opacity:0.6;cursor:pointer;font-size:18px;line-height:1}
.referral-banner .rb-close:hover{opacity:1}

/* ===== RESPONSIVE ===== */
@media(max-width:1024px){
  .hero h1{font-size:40px}
  .products-grid-4{grid-template-columns:repeat(3,1fr)}
  .products-grid-3{grid-template-columns:repeat(2,1fr)}
  .footer-grid{grid-template-columns:1fr 1fr;gap:32px}
}
@media(max-width:768px){
  .nav-links{display:none}
  .nav-hamburger{display:flex}
  .hero{min-height:50vh}
  .hero h1{font-size:32px}
  .hero-sub{font-size:15px}
  .hero-stats{flex-wrap:wrap;gap:20px}
  .hero-stat .num{font-size:26px}
  .products-grid-4,.products-grid-3{grid-template-columns:repeat(2,1fr)}
  .quick-links{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr;gap:24px}
  .section-pad{padding:48px 0}
  .section-title{font-size:22px}
  .hero-inner{padding:48px 20px}
  .container{padding:0 16px}
}
@media(max-width:480px){
  .products-grid-4,.products-grid-3,.products-grid-2{grid-template-columns:1fr}
  .hero h1{font-size:28px}
  .hero-cta{flex-direction:column}
  .hero-cta .btn{width:100%}
}
