/* ================= 可可虎电子展厅 · 高端主题样式 ================= */
/* 默认变量与 themes.py 的 gold 主题保持一致；页面内联的主题变量会覆盖此处 */
:root{
  --background:42 44% 97%; --foreground:26 40% 12%; --card:0 0% 100%;
  --primary:38 80% 35%; --primary-foreground:42 44% 99%; --border:38 45% 74%;
  --muted-foreground:28 22% 30%; --muted:40 32% 93%;
  --primary-deep:38 88% 26%; --gradient-solid:linear-gradient(135deg,hsl(38 88% 26%) 0%,hsl(38 80% 35%) 55%,hsl(38 88% 26%) 100%);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body.theme-body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  background:hsl(var(--background));color:hsl(var(--foreground));
  min-height:100vh;line-height:1.6;-webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,.serif{font-family:"Songti SC","STSong","SimSun",Georgia,serif}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
button,input,textarea,select{font-family:inherit}
::selection{background:hsl(var(--primary)/.3)}

/* 金色文字与装饰 */
.gradient-text{
  background:var(--gradient-solid,linear-gradient(135deg,hsl(var(--primary)) 0%,hsl(var(--primary-deep,hsl(var(--primary)))) 100%));
  -webkit-background-clip:text;background-clip:text;color:transparent;
  -webkit-text-fill-color:transparent;
}
.gold-divider{height:1px;border:0;flex:1;min-width:24px;background:linear-gradient(90deg,transparent,hsl(var(--primary)/.7),transparent)}
.gold-divider.center{margin:0 auto}

/* 卡片 */
.glass-card{
  background:linear-gradient(160deg,hsl(var(--card)/.92),hsl(var(--card)/.75));
  border:1px solid hsl(var(--border)/.5);backdrop-filter:blur(8px);
  border-radius:2px;transition:all .4s cubic-bezier(.2,.8,.2,1);
}
.hover-glow:hover{border-color:hsl(var(--primary)/.6);box-shadow:0 8px 40px hsl(var(--primary)/.12),0 0 0 1px hsl(var(--primary)/.1);transform:translateY(-4px)}
.corner-decor{position:relative}
.corner-decor::before,.corner-decor::after{content:"";position:absolute;width:12px;height:12px;border:1px solid hsl(var(--primary)/.5)}
.corner-decor::before{top:-4px;left:-4px;border-right:0;border-bottom:0}
.corner-decor::after{bottom:-4px;right:-4px;border-left:0;border-top:0}

/* 按钮 */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.6rem 1.2rem;border:1px solid transparent;border-radius:2px;font-size:.9rem;cursor:pointer;transition:all .25s;background:transparent;color:hsl(var(--foreground))}
.btn-primary{background:hsl(var(--primary));color:hsl(var(--primary-foreground));font-weight:600;letter-spacing:.05em}
.btn-primary:hover{filter:brightness(1.1);box-shadow:0 4px 20px hsl(var(--primary)/.3)}
.btn-outline{border-color:hsl(var(--border));color:hsl(var(--foreground))}
.btn-outline:hover{border-color:hsl(var(--primary));color:hsl(var(--primary))}
.btn-ghost{color:hsl(var(--muted-foreground))}
.btn-ghost:hover{color:hsl(var(--primary))}
.btn-sm{padding:.35rem .7rem;font-size:.8rem}
.btn-block{width:100%}
.btn:disabled{opacity:.4;cursor:not-allowed}
.icon-btn{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border:1px solid hsl(var(--border));border-radius:2px;background:transparent;color:hsl(var(--foreground));cursor:pointer;transition:.25s}
.icon-btn:hover{border-color:hsl(var(--primary));color:hsl(var(--primary))}

/* 输入框 */
.input,.textarea,.select{
  width:100%;padding:.6rem .8rem;background:hsl(var(--background));color:hsl(var(--foreground));
  border:1px solid hsl(var(--border));border-radius:2px;font-size:.9rem;outline:none;transition:.25s;
}
.input:focus,.textarea:focus,.select:focus{border-color:hsl(var(--primary));box-shadow:0 0 0 2px hsl(var(--primary)/.12)}
.input::placeholder,.textarea::placeholder{color:hsl(var(--muted-foreground))}
.label{display:block;font-size:.8rem;color:hsl(var(--muted-foreground));margin-bottom:.4rem;letter-spacing:.05em}
.field{margin-bottom:1rem}

/* 顶部导航 */
.site-header{position:fixed;top:0;left:0;right:0;z-index:50;height:64px;display:flex;align-items:center;padding:0 clamp(1rem,4vw,3rem);
  border-bottom:1px solid hsl(var(--border)/.5);background:hsl(var(--background)/.85);backdrop-filter:blur(14px)}
.site-header .brand{display:flex;align-items:center;gap:.7rem;font-weight:700;letter-spacing:.2em;flex:1;min-width:0}
.site-header .brand .diamond{color:hsl(var(--primary));font-size:1.2rem;animation:shimmer 3s ease-in-out infinite}
.brand-name{font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav-links{display:flex;gap:.2rem}
.nav-links a{font-size:.8rem;color:hsl(var(--muted-foreground));padding:.4rem .7rem;border:1px solid transparent;letter-spacing:.05em;transition:.25s}
.nav-links a:hover,.nav-links a.active{color:hsl(var(--primary));border-color:hsl(var(--border))}
.header-actions{display:flex;align-items:center;gap:.8rem;margin-left:1rem}
.cart-wrap{position:relative}
.cart-badge{position:absolute;top:-6px;right:-8px;min-width:16px;height:16px;padding:0 4px;background:hsl(var(--primary));color:hsl(var(--primary-foreground));
  border-radius:10px;font-size:.65rem;font-weight:700;display:flex;align-items:center;justify-content:center}
.user-avatar{width:34px;height:34px;border-radius:50%;background:hsl(var(--primary)/.12);border:1px solid hsl(var(--primary)/.3);
  display:flex;align-items:center;justify-content:center;color:hsl(var(--primary));cursor:pointer;font-size:.85rem;
  transition:background .25s,border-color .25s,transform .25s}
.user-avatar:hover{background:hsl(var(--primary)/.2);border-color:hsl(var(--primary));transform:translateY(-1px)}
/* 顶部图标：统一线性 SVG 风格 */
.hdr-ico{width:19px;height:19px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;transition:stroke .25s,transform .25s}
.user-avatar .hdr-ico{width:18px;height:18px}
.icon-btn:hover .hdr-ico{transform:scale(1.12)}
.menu-ico{width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round}
.menu-toggle{display:none;background:transparent;border:0;color:hsl(var(--foreground));font-size:1.3rem;cursor:pointer}

/* 下拉菜单 */
.dropdown{position:relative}
.dropdown-menu{position:absolute;right:0;top:calc(100% + 8px);min-width:180px;background:hsl(var(--card));border:1px solid hsl(var(--border));
  border-radius:2px;padding:.4rem;z-index:60;box-shadow:0 12px 40px rgba(46,36,25,.15);display:none}
.dropdown.open .dropdown-menu{display:block}
.dropdown-menu a,.dropdown-menu button{display:flex;align-items:center;gap:.5rem;width:100%;padding:.55rem .7rem;font-size:.82rem;background:transparent;border:0;color:hsl(var(--foreground));cursor:pointer;text-align:left}
.dropdown-menu a:hover,.dropdown-menu button:hover{background:hsl(var(--primary)/.1);color:hsl(var(--primary))}
.dropdown-menu .sep{height:1px;background:hsl(var(--border));margin:.35rem 0}
.dropdown-menu .who{padding:.6rem .7rem;font-size:.75rem;color:hsl(var(--muted-foreground));border-bottom:1px solid hsl(var(--border))}

/* 英雄区 */
.hero{position:relative;min-height:100vh;display:flex;align-items:center;justify-content:center;overflow:hidden;padding-top:64px;text-align:center;
  background:#FBF8F1}
.hero .hero-bg{position:absolute;inset:0;background-image:url('/static/images/real/room_2.jpg');background-size:cover;background-position:center;opacity:.42;filter:saturate(1.15) contrast(1.06)}
.hero .hero-veil{position:absolute;inset:0;background:linear-gradient(180deg,hsl(var(--background)/.55),hsl(var(--background)/.72) 55%,hsl(var(--background)/.94))}
.hero .rings{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;opacity:.16}
.hero .rings i{position:absolute;border:1px solid hsl(var(--primary));border-radius:50%}
.hero .rings i:nth-child(1){width:820px;height:820px}.hero .rings i:nth-child(2){width:620px;height:620px}
.hero .rings i:nth-child(3){width:420px;height:420px}.hero .rings i:nth-child(4){width:220px;height:220px}
.hero .radial{position:absolute;inset:0;background:radial-gradient(circle at 50% 45%,hsl(var(--primary)/.06),transparent 60%);pointer-events:none}
.hero-inner{position:relative;z-index:2;padding:2rem;max-width:820px;animation:fadeUp .9s ease-out}
.hero .mark{width:88px;height:88px;margin:0 auto 1.6rem;display:flex;align-items:center;justify-content:center;font-size:2.4rem;color:hsl(var(--primary));
  background:hsl(0 0% 100%/.7);border:1px solid hsl(var(--primary)/.3);border-radius:50%;box-shadow:0 8px 30px hsl(var(--primary)/.12)}
.hero h1{font-size:clamp(2.4rem,6vw,4.5rem);letter-spacing:.14em;margin:1.4rem 0;font-weight:700;line-height:1.25;
  filter:drop-shadow(0 2px 10px hsl(var(--background)/.9))}
.hero .desc{color:hsl(var(--foreground));font-size:clamp(.98rem,2vw,1.15rem);max-width:620px;margin:0 auto;line-height:2;font-weight:600;
  text-shadow:0 1px 8px hsl(var(--background)),0 0 18px hsl(var(--background))}
.hero .scroll{margin-top:3rem;font-size:.7rem;letter-spacing:.3em;color:hsl(var(--primary));text-transform:uppercase;opacity:.9}

/* 通用区块 */
.section{padding:5rem 1.5rem;max-width:1280px;margin:0 auto}
.section-title{text-align:center;margin-bottom:3rem}
.section-title h2{font-size:clamp(1.6rem,3.5vw,2.4rem);letter-spacing:.15em;margin:1rem 0 .6rem;font-weight:700}
.section-title p{color:hsl(var(--muted-foreground));font-size:.9rem}
main{padding-top:64px;min-height:100vh}

/* 模块卡片网格 */
.module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1.2rem}
.module-card{padding:2rem;display:block;position:relative;overflow:hidden}
.module-card .top{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1.5rem}
.module-card .ico{width:56px;height:56px;display:flex;align-items:center;justify-content:center;font-size:1.8rem;color:hsl(var(--primary-deep,hsl(var(--primary))));
  background:hsl(var(--primary)/.1);border:1px solid hsl(var(--primary)/.35);border-radius:50%;transition:.3s}
.module-card:hover .ico{transform:scale(1.12);background:hsl(var(--primary));color:hsl(var(--primary-foreground))}
.module-card h3{font-size:1.3rem;letter-spacing:.12em;margin-bottom:.5rem;font-weight:700;color:hsl(var(--foreground))}
.module-card p{color:hsl(var(--foreground));font-size:.88rem;opacity:.86}
.module-card .line{width:32px;height:1px;background:hsl(var(--primary)/.5);margin-top:1rem;transition:width .5s}
.module-card:hover .line{width:72px}

/* 产品卡片 */
.grid-4{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem}
.card{overflow:hidden;display:block}
.card .thumb{aspect-ratio:4/3;overflow:hidden;background:hsl(var(--card)/.5)}
.card .thumb img{width:100%;height:100%;object-fit:cover;transition:transform .6s}
.card:hover .thumb img{transform:scale(1.06)}
.card .info{padding:.9rem}
.card .info h3{font-size:.9rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:.3rem}
.card .info .meta{font-size:.72rem;color:hsl(var(--muted-foreground))}
.card .info .price{color:hsl(var(--primary));font-weight:700;margin-top:.3rem}

/* 详情页 */
.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:2.5rem}
.detail-main-img{aspect-ratio:4/3;overflow:hidden;border:1px solid hsl(var(--border));border-radius:2px;cursor:zoom-in;position:relative;background:hsl(var(--card))}
.detail-main-img img{width:100%;height:100%;object-fit:cover}
.thumbs{display:flex;gap:.5rem;overflow-x:auto;padding-bottom:.4rem;margin-top:.8rem}
.thumbs img{width:64px;height:64px;object-fit:cover;border:2px solid hsl(var(--border));cursor:pointer;border-radius:2px;flex-shrink:0;transition:.2s}
.thumbs img.active,.thumbs img:hover{border-color:hsl(var(--primary))}
.qty-ctrl{display:inline-flex;align-items:center;gap:.8rem}
.qty-ctrl button{width:36px;height:36px;border:1px solid hsl(var(--border));background:transparent;color:hsl(var(--foreground));cursor:pointer;font-size:1.1rem}
.qty-ctrl button:hover{border-color:hsl(var(--primary));color:hsl(var(--primary))}
.qty-ctrl span{min-width:32px;text-align:center;font-weight:700;font-size:1.1rem}
.spec-grid{display:grid;grid-template-columns:1fr 1fr;gap:.6rem;font-size:.8rem}
.spec-grid div{display:flex;gap:.6rem}
.spec-grid .k{color:hsl(var(--muted-foreground));flex-shrink:0}

/* 侧栏分类 */
.layout-with-side{display:flex;gap:1.5rem;align-items:flex-start}
.sidebar{width:190px;flex-shrink:0;position:sticky;top:84px}
.sidebar .cap{font-size:.72rem;color:hsl(var(--muted-foreground));letter-spacing:.1em;padding-bottom:.6rem;border-bottom:1px solid hsl(var(--border));margin-bottom:.6rem}
.cat-btn{display:block;width:100%;text-align:left;padding:.5rem .7rem;font-size:.85rem;background:transparent;border:1px solid transparent;color:hsl(var(--muted-foreground));cursor:pointer;border-radius:2px;transition:.2s}
.cat-btn:hover{color:hsl(var(--foreground));background:hsl(var(--muted)/.3)}
.cat-btn.active{color:hsl(var(--primary));background:hsl(var(--primary)/.1);border-color:hsl(var(--primary)/.25);font-weight:600}
.cat-sub{display:block;width:100%;text-align:left;padding:.3rem .7rem .3rem 1.6rem;font-size:.76rem;background:transparent;border:0;color:hsl(var(--muted-foreground));cursor:pointer}
.cat-sub:hover,.cat-sub.active{color:hsl(var(--primary))}
.content-area{flex:1;min-width:0}

/* 搜索栏 */
.searchbar{display:flex;gap:.6rem;margin-bottom:1.5rem}
.searchbar .input-wrap{position:relative;flex:1}
.searchbar .input-wrap .ico{position:absolute;left:.8rem;top:50%;transform:translateY(-50%);color:hsl(var(--muted-foreground))}
.searchbar .input-wrap input{padding-left:2.2rem}
.filter-tags{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center;margin-bottom:1rem;font-size:.78rem;color:hsl(var(--muted-foreground))}
.tag{padding:.2rem .6rem;border:1px solid hsl(var(--primary)/.3);background:hsl(var(--primary)/.08);color:hsl(var(--primary));border-radius:2px}

/* 分页 */
.pagination{display:flex;gap:.4rem;justify-content:center;align-items:center;margin-top:2rem;flex-wrap:wrap}
.pagination a,.pagination span{min-width:34px;height:34px;padding:0 .6rem;display:flex;align-items:center;justify-content:center;border:1px solid hsl(var(--border));font-size:.82rem;color:hsl(var(--muted-foreground));border-radius:2px}
.pagination a:hover{border-color:hsl(var(--primary));color:hsl(var(--primary))}
.pagination .cur{background:hsl(var(--primary));color:hsl(var(--primary-foreground));border-color:hsl(var(--primary));font-weight:700}

/* 购物车 */
.cart-item{display:flex;align-items:center;gap:1rem;padding:1rem}
.cart-item img{width:64px;height:64px;object-fit:cover;border:1px solid hsl(var(--border));border-radius:2px;flex-shrink:0}
.cart-item .grow{flex:1;min-width:0}
.cart-item .grow h4{font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cart-item .grow .price{color:hsl(var(--primary));font-weight:700;font-size:.9rem}
.cart-summary{padding:1.5rem;margin-top:1.5rem}
.cart-summary .row{display:flex;justify-content:space-between;align-items:center}

/* 空状态 */
.empty{text-align:center;padding:5rem 1rem;color:hsl(var(--muted-foreground))}
.empty .big{font-size:3rem;opacity:.3;margin-bottom:1rem}

/* 页脚 */
.site-footer{border-top:1px solid hsl(var(--border)/.4);padding:2.5rem 1rem;text-align:center;color:hsl(var(--muted-foreground));font-size:.85rem}
.site-footer a:hover{color:hsl(var(--primary))}
.site-footer .sep{margin:0 .6rem;opacity:.5}

/* Toast */
.toast-wrap{position:fixed;top:80px;right:20px;z-index:200;display:flex;flex-direction:column;gap:.6rem}
.toast{padding:.8rem 1.2rem;background:hsl(var(--card));border:1px solid hsl(var(--border));border-left:3px solid hsl(var(--primary));
  border-radius:2px;box-shadow:0 8px 30px rgba(46,36,25,.14);font-size:.85rem;min-width:220px;animation:slideIn .3s ease-out}
.toast.error{border-left-color:#e05a5a}.toast.success{border-left-color:hsl(var(--primary))}

/* 灯箱 */
.lightbox{position:fixed;inset:0;z-index:300;background:rgba(0,0,0,.92);display:none;align-items:center;justify-content:center}
.lightbox.open{display:flex}
.lightbox img{max-width:90vw;max-height:85vh;object-fit:contain}
.lb-close{position:absolute;top:20px;right:28px;background:transparent;border:0;color:#fff;font-size:2.2rem;cursor:pointer}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);background:rgba(255,255,255,.1);border:0;color:#fff;font-size:2rem;width:48px;height:64px;cursor:pointer}
.lb-prev{left:20px}.lb-next{right:20px}.lb-nav:hover{background:rgba(255,255,255,.2)}
.lb-count{position:absolute;bottom:24px;color:#ccc;font-size:.85rem;letter-spacing:.1em}

/* 动画 */
@keyframes shimmer{0%,100%{opacity:1}50%{opacity:.5;transform:rotate(15deg)}}
@keyframes fadeUp{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
@keyframes slideIn{from{opacity:0;transform:translateX(30px)}to{opacity:1;transform:translateX(0)}}
.reveal{opacity:0;transform:translateY(20px);transition:opacity .7s ease,transform .7s ease}
.reveal.in{opacity:1;transform:none}
.spin{width:32px;height:32px;border:2px solid hsl(var(--primary));border-top-color:transparent;border-radius:50%;animation:spin .8s linear infinite;margin:0 auto}
@keyframes spin{to{transform:rotate(360deg)}}

/* 移动端菜单 */
.mobile-nav{display:none}
@media(max-width:860px){
  .nav-links{display:none}
  .menu-toggle{display:block}
  .detail-grid{grid-template-columns:1fr}
  .sidebar{display:none}
  .mobile-nav.open{display:block;position:fixed;top:64px;left:0;right:0;z-index:45;background:hsl(var(--card));border-bottom:1px solid hsl(var(--border));padding:1rem}
  .mobile-nav a{display:block;padding:.8rem;color:hsl(var(--foreground));border-bottom:1px solid hsl(var(--border)/.4)}
}
