/* ============================================================
   漆錄 LACQUER CHRONICLE · 品牌视觉层
   适用：Astra 4.9.x + WooCommerce 9.7.x 子主题
   设计基调：宣纸 / 墨褐 / 朱砂 / 描金 / 大漆栗 —— 非遗髹饰
   只覆盖外观，不改动任何模板文件与 WooCommerce 结构。
   ============================================================ */

:root{
  /* 基础色板 —— 改这里就能整站换调 */
  --lac-paper:      #EFE6D4;  /* 宣纸 / 绢本，主背景 */
  --lac-paper-2:    #F8F2E6;  /* 浮起层：卡片、输入框 */
  --lac-paper-3:    #E6DAC2;  /* 压暗层：表头、分隔 */
  --lac-ink:        #26201A;  /* 浓墨，正文标题 */
  --lac-ink-2:      #5B4C3E;  /* 淡墨，正文 */
  --lac-ink-3:      #8A7A66;  /* 飞白，辅助文字 */
  --lac-red:        #9B2C20;  /* 朱砂 / 大漆红，主强调 */
  --lac-red-deep:   #771E15;  /* 深漆红，hover */
  --lac-lacquer:    #33201A;  /* 大漆栗，页头页脚 */
  --lac-gold:       #AE8748;  /* 描金 / 螺钿 */
  --lac-line:       #D6C5A6;  /* 边框 */
  --lac-line-soft:  #E5D8BF;  /* 细分隔线 */
  --lac-serif: "Noto Serif CJK SC","Noto Serif TC","Noto Serif JP","Songti SC","PMingLiU","Yu Mincho","Hiragino Mincho ProN",serif;
  --lac-sans: "Noto Sans CJK SC","PingFang SC","Hiragino Sans","Microsoft JhengHei","Noto Sans JP",sans-serif;
}

/* Astra 全局色变量同步覆盖（保险，父主题用变量着色时一并生效） */
:root{
  --ast-global-color-0: var(--lac-red);
  --ast-global-color-1: var(--lac-ink);
  --ast-global-color-2: var(--lac-ink);
  --ast-global-color-3: var(--lac-ink-2);
  --ast-global-color-4: var(--lac-paper-3);
  --ast-global-color-5: var(--lac-paper);
  --ast-global-color-6: var(--lac-paper-2);
  --ast-global-color-7: var(--lac-paper-3);
  --ast-global-color-8: var(--lac-ink);
}

/* ---------- 纸底：极淡的纤维颗粒 + 上缘泛光 ---------- */
html{background:var(--lac-paper)}
body,
body.ast-plain-container,
.site,
#content,
.site-content,
body.ast-plain-container .site-content > .ast-container{
  background-color:var(--lac-paper);
  background-image:
    radial-gradient(rgba(88,62,38,.045) 1px, transparent 1px),
    radial-gradient(rgba(88,62,38,.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.34) 0, rgba(255,255,255,0) 360px);
  background-size: 7px 7px, 13px 13px, 100% 360px;
  background-position: 0 0, 4px 7px, 0 0;
  color:var(--lac-ink-2);
  font-family:var(--lac-sans);
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,h5,h6,.entry-title,.widget-title{font-family:var(--lac-serif);color:var(--lac-ink);letter-spacing:.06em}
a{color:var(--lac-red)}
a:hover{color:var(--lac-red-deep)}
::selection{background:var(--lac-red);color:#FBF3E5}

/* ---------- 页头：大漆栗底 + 朱砂印 + 描金双线 ---------- */
#masthead,
.ast-primary-header-bar,
.main-header-bar-wrap,
#ast-desktop-header,
.ast-mobile-header-wrap,
.site-primary-header-wrap{
  background:var(--lac-lacquer) !important;
  border-bottom:3px double var(--lac-gold) !important;
  box-shadow:none !important;
}
#masthead .site-title a{
  color:#F3E7D3 !important;
  font-family:var(--lac-serif);
  font-size:21px;
  font-weight:500;
  letter-spacing:.26em;
  line-height:1.3;
  text-decoration:none;
}
#masthead .site-title a::before{
  content:"漆";
  display:inline-grid;
  place-items:center;
  width:29px;height:29px;
  margin-right:12px;
  background:var(--lac-red);
  color:#F7EFE0;
  border:1px solid rgba(247,239,224,.35);
  font-size:15px;
  letter-spacing:0;
  vertical-align:middle;
  box-shadow:0 0 0 1px rgba(155,44,32,.25);
}
#masthead .site-title a::after{
  content:"非遺大漆 · 一物一圖";
  display:block;
  font-family:var(--lac-sans);
  font-size:9px;
  font-weight:400;
  letter-spacing:.34em;
  color:var(--lac-gold);
  margin:2px 0 0 41px;
}
#masthead .site-header a,
#masthead .menu-link,
#masthead .ast-builder-menu a,
#masthead .ast-site-identity p{color:#E8DCC7 !important}
#masthead .menu-link:hover,
#masthead .ast-builder-menu a:hover{color:var(--lac-gold) !important}
#masthead .ast-menu-toggle,
#masthead .ast-cart-menu-wrap,
#masthead .ast-site-header-cart a{color:#E8DCC7 !important}
#masthead .ast-site-header-cart .count,
#masthead .ast-cart-count{background:var(--lac-red) !important;color:#FBF3E5 !important}
#masthead .ast-search-field,
#masthead input[type="search"]{background:#4A3228 !important;border:1px solid var(--lac-gold) !important;color:#F3E7D3 !important}

/* ---------- 面包屑 / 内容容器 ---------- */
.ast-breadcrumbs, .ast-breadcrumbs a{color:var(--lac-ink-3);font-size:12px}
.ast-woocommerce-container{background:transparent !important}
.woocommerce-result-count{color:var(--lac-ink-3);font-size:12px;letter-spacing:.12em}

/* ---------- 首页非遗品牌横幅 ---------- */
.lac-hero{
  position:relative;
  margin:0 0 46px;
  padding:54px 0 0;
  border-bottom:1px solid var(--lac-line);
}
.lac-hero-inner{
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:56px;
  align-items:center;
}
.lac-kicker{
  font-size:11px;
  letter-spacing:.34em;
  color:var(--lac-red);
  padding-left:14px;
  border-left:2px solid var(--lac-red);
  margin-bottom:24px;
}
.lac-hero h1{
  font-family:var(--lac-serif);
  font-size:clamp(34px,4.4vw,54px);
  font-weight:500;
  line-height:1.42;
  letter-spacing:.08em;
  color:var(--lac-ink);
  margin:0 0 20px;
}
.lac-hero h1 em{font-style:normal;color:var(--lac-red)}
.lac-hero p{
  color:var(--lac-ink-2);
  font-size:14px;
  line-height:2.1;
  max-width:560px;
  margin:0 0 26px;
}
.lac-hero-meta{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:30px}
.lac-hero-meta span{
  font-size:11px;
  letter-spacing:.16em;
  color:var(--lac-ink-2);
  border:1px solid var(--lac-line);
  background:rgba(248,242,230,.62);
  padding:7px 13px;
}
.lac-hero-btn{
  display:inline-block;
  font-family:var(--lac-serif);
  font-size:13px;
  letter-spacing:.18em;
  color:#FBF3E5 !important;
  background:var(--lac-red);
  border:1px solid var(--lac-red-deep);
  padding:12px 26px;
  text-decoration:none;
  transition:.2s;
}
.lac-hero-btn:hover{background:var(--lac-red-deep);color:#FBF3E5;border-color:var(--lac-gold)}
.lac-hero-art{position:relative;aspect-ratio:1;display:grid;place-items:center}
.lac-hero-art::before{
  content:"";
  position:absolute;inset:0;
  border:1px solid var(--lac-line);
  background:linear-gradient(145deg,rgba(255,255,255,.4),rgba(174,135,72,.08));
}
.lac-bead{
  position:relative;
  width:72%;aspect-ratio:1;
  border-radius:50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,.62) 0 4%, rgba(255,255,255,0) 20%),
    radial-gradient(circle at 70% 78%, rgba(0,0,0,.5), rgba(0,0,0,0) 46%),
    conic-gradient(from 205deg,#5E1710,#A8401E,#D2973C,#3E6F63,#264A62,#5B2A4C,#8A2418,#5E1710);
  box-shadow:inset 0 0 0 2px rgba(255,235,200,.2),inset -12px -18px 34px rgba(0,0,0,.55),0 22px 44px rgba(51,32,26,.28);
}
.lac-bead::before{
  content:"";
  position:absolute;inset:9%;
  border-radius:50%;
  border:1px solid rgba(247,224,180,.42);
  box-shadow:inset 0 0 22px rgba(0,0,0,.3);
}
.lac-bead::after{
  content:"";
  position:absolute;inset:24%;
  border-radius:50%;
  background:radial-gradient(circle at 36% 30%,rgba(255,240,210,.5),rgba(255,240,210,0) 55%);
  border:1px solid rgba(255,235,200,.18);
}
.lac-vertical{
  position:absolute;top:14px;right:-6px;
  writing-mode:vertical-rl;
  font-family:var(--lac-serif);
  font-size:15px;
  letter-spacing:.42em;
  color:var(--lac-ink);
  background:rgba(248,242,230,.9);
  padding:12px 6px;
  border-left:1px solid var(--lac-line);
}
.lac-seal{
  position:absolute;left:-8px;bottom:8px;
  writing-mode:vertical-rl;
  font-family:var(--lac-serif);
  font-size:13px;
  letter-spacing:.18em;
  color:#FBF3E5;
  background:var(--lac-red);
  border:2px solid var(--lac-red);
  outline:1px solid rgba(251,243,229,.7);
  outline-offset:2px;
  padding:11px 7px;
}
/* 雷纹带 */
.lac-fret{
  height:16px;
  margin-top:42px;
  opacity:.62;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='16' viewBox='0 0 48 16'%3E%3Cpath d='M0 1h48M0 15h48M4 1v10h10V5h6M28 1v10h10V5h6' fill='none' stroke='%23AE8748' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat:repeat-x;
  background-position:center;
}
body.home .woocommerce-products-header{display:none}

/* ---------- 商品网格：宣纸卡片 + 孤品朱砂印 ---------- */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.wc-block-grid__product{
  position:relative !important;
  background:var(--lac-paper-2) !important;
  border:1px solid var(--lac-line) !important;
  border-radius:2px !important;
  padding:12px 12px 18px !important;
  box-shadow:none !important;
  transition:transform .22s,border-color .22s,box-shadow .22s;
}
.woocommerce ul.products li.product::before{
  content:"";
  position:absolute;top:0;left:0;right:0;height:2px;
  background:linear-gradient(90deg,var(--lac-red),var(--lac-gold));
  opacity:.85;
}
.woocommerce ul.products li.product::after{
  content:"孤 品";
  position:absolute;top:16px;right:16px;z-index:3;
  writing-mode:vertical-rl;
  font-family:var(--lac-serif);
  font-size:10px;
  letter-spacing:.16em;
  color:#FBF3E5;
  background:var(--lac-red);
  padding:8px 5px;
  border:1px solid rgba(251,243,229,.5);
}
.woocommerce ul.products li.product:hover{
  transform:translateY(-3px);
  border-color:var(--lac-gold) !important;
  box-shadow:0 14px 32px rgba(51,32,26,.14) !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2{
  font-family:var(--lac-serif);
  font-size:15px;
  font-weight:500;
  color:var(--lac-ink);
  letter-spacing:.06em;
  line-height:1.65;
}
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .price .woocommerce-Price-amount,
.woocommerce div.product .price{
  color:var(--lac-red) !important;
  font-family:var(--lac-serif);
  font-size:16px;
  letter-spacing:.04em;
}
.woocommerce ul.products li.product img,
.woocommerce div.product .woocommerce-product-gallery img{
  border:1px solid var(--lac-line-soft);
  background:#1B1410;
}
.woocommerce .star-rating span::before,
.woocommerce p.stars a::before{color:var(--lac-gold)}
.woocommerce span.onsale,
.woocommerce .onsale{
  background:var(--lac-red) !important;
  color:#FBF3E5 !important;
  border-radius:1px !important;
  font-family:var(--lac-serif);
  letter-spacing:.14em;
  min-height:0;line-height:1.5;padding:6px 10px;
}

/* ---------- 按钮 / 表单 ---------- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .add_to_cart_button,
.woocommerce .single_add_to_cart_button,
.woocommerce button.single_add_to_cart_button,
.wp-block-button__link,
.button:not(.menu-toggle){
  background:var(--lac-red) !important;
  color:#FBF3E5 !important;
  border:1px solid var(--lac-red-deep) !important;
  border-radius:2px !important;
  font-family:var(--lac-serif);
  font-weight:500;
  letter-spacing:.14em;
  text-transform:none;
  box-shadow:none !important;
  transition:.2s;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce .add_to_cart_button:hover,
.woocommerce .single_add_to_cart_button:hover,
.wp-block-button__link:hover{
  background:var(--lac-red-deep) !important;
  border-color:var(--lac-gold) !important;
  color:#FBF3E5 !important;
}
.woocommerce a.button.alt,
.woocommerce button.button.alt{background:var(--lac-red) !important}
.woocommerce-ordering select,
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="tel"],
.woocommerce input[type="number"],
.woocommerce textarea,
.woocommerce select,
.woocommerce .quantity .qty,
input[type="search"],input[type="text"],input[type="email"],textarea{
  background:var(--lac-paper-2);
  border:1px solid var(--lac-line);
  border-radius:2px;
  color:var(--lac-ink);
  padding:9px 11px;
}
.woocommerce-ordering select:focus,
.woocommerce input:focus,
.woocommerce textarea:focus{outline:1px solid var(--lac-gold);border-color:var(--lac-gold)}
label{color:var(--lac-ink-2);letter-spacing:.04em}

/* ---------- 商品详情页 ---------- */
.single-product .product_title,
.woocommerce div.product .product_title{
  font-family:var(--lac-serif);
  font-size:29px;
  color:var(--lac-ink);
  letter-spacing:.08em;
  border-bottom:1px solid var(--lac-line);
  padding-bottom:16px;
  margin-bottom:20px;
}
.woocommerce div.product .summary,
.woocommerce div.product .woocommerce-product-details__short-description{color:var(--lac-ink-2);line-height:1.95}
.woocommerce table.shop_attributes,
.woocommerce table.shop_attributes th,
.woocommerce table.shop_attributes td{
  background:var(--lac-paper-2) !important;
  border-color:var(--lac-line-soft) !important;
  font-family:var(--lac-sans);
}
.woocommerce table.shop_attributes th{font-family:var(--lac-serif);color:var(--lac-ink)}
.woocommerce .woocommerce-tabs .tabs{
  border-bottom:1px solid var(--lac-line) !important;
}
.woocommerce .woocommerce-tabs .tabs li{
  background:var(--lac-paper-3) !important;
  border:1px solid var(--lac-line) !important;
  border-bottom:0 !important;
  border-radius:2px 2px 0 0 !important;
  margin-right:4px;
}
.woocommerce .woocommerce-tabs .tabs li.active{background:var(--lac-paper-2) !important}
.woocommerce .woocommerce-tabs .tabs li a{font-family:var(--lac-serif);color:var(--lac-ink-2)}
.woocommerce .woocommerce-tabs .panel{background:var(--lac-paper-2);border:1px solid var(--lac-line);border-top:0;padding:22px}
.related.products > h2,
.upsells.products > h2,
.cross-sells > h2{
  font-family:var(--lac-serif);
  font-size:23px;
  letter-spacing:.14em;
  color:var(--lac-ink);
  border-left:2px solid var(--lac-red);
  padding-left:14px;
}

/* ---------- 购物车 / 结账 / 我的账户 ---------- */
.woocommerce table.shop_table,
.woocommerce table.shop_table th,
.woocommerce table.shop_table td{
  background:var(--lac-paper-2);
  border-color:var(--lac-line-soft);
}
.woocommerce table.shop_table th{font-family:var(--lac-serif);color:var(--lac-ink)}
.woocommerce .cart_totals,
.woocommerce .woocommerce-checkout-review-order,
.woocommerce-MyAccount-content{
  background:var(--lac-paper-2);
  border:1px solid var(--lac-line);
  padding:22px;
}
.woocommerce .woocommerce-checkout #payment{
  background:var(--lac-paper-2);
  border:1px solid var(--lac-line);
}
.woocommerce .woocommerce-checkout #payment div.payment_box{background:var(--lac-paper-3) !important;color:var(--lac-ink)}
.woocommerce .woocommerce-checkout #payment div.payment_box::before{border-bottom-color:var(--lac-paper-3) !important}
.woocommerce form.checkout_coupon,
.woocommerce form.login{border:1px dashed var(--lac-line) !important;background:var(--lac-paper-2) !important}

/* ---------- 通知、分页、侧栏 ---------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error{
  background:var(--lac-paper-2) !important;
  border-top:2px solid var(--lac-red) !important;
  color:var(--lac-ink-2) !important;
  font-family:var(--lac-sans);
}
.woocommerce-message::before,
.woocommerce-info::before{color:var(--lac-red) !important}
.woocommerce-pagination .page-numbers li a,
.woocommerce-pagination .page-numbers li span{
  background:var(--lac-paper-2);
  border:1px solid var(--lac-line);
  color:var(--lac-ink-2);
  border-radius:2px;
}
.woocommerce-pagination .page-numbers li span.current,
.woocommerce-pagination .page-numbers li a:hover{
  background:var(--lac-red);
  border-color:var(--lac-red-deep);
  color:#FBF3E5;
}
.widget,
.sidebar .widget,
#secondary .widget{
  background:var(--lac-paper-2);
  border:1px solid var(--lac-line);
  padding:20px;
}
.widget-title{font-size:16px;letter-spacing:.12em;border-bottom:1px solid var(--lac-line);padding-bottom:10px}
.widget a{color:var(--lac-ink-2)}
.widget a:hover{color:var(--lac-red)}

/* ---------- 页脚：大漆栗 + 描金雷纹 ---------- */
.site-footer,
.site-below-footer-wrap,
.site-above-footer-wrap,
.ast-builder-footer-grid-columns{
  background:var(--lac-lacquer) !important;
  color:#DCCBB0 !important;
  border-top:3px double var(--lac-gold) !important;
}
.site-footer{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='16' viewBox='0 0 48 16'%3E%3Cpath d='M0 1h48M0 15h48M4 1v10h10V5h6M28 1v10h10V5h6' fill='none' stroke='%23AE8748' stroke-width='1'/%3E%3C/svg%3E") !important;
  background-repeat:repeat-x !important;
  background-position:top center !important;
  padding-top:22px;
}
.site-footer a,
.site-footer .widget a,
.site-footer p,
.site-footer .site-footer-section{color:#E4D3B8 !important}
.site-footer a:hover{color:var(--lac-gold) !important}

/* ---------- 窄屏 ---------- */
@media (max-width:921px){
  .lac-hero{padding-top:34px;margin-bottom:34px}
  .lac-hero-inner{grid-template-columns:1fr;gap:34px}
  .lac-hero-art{max-width:300px;margin:0 auto;width:100%}
  .lac-vertical{right:0}
  .lac-seal{left:0}
  .lac-hero h1{font-size:34px}
}
@media (max-width:544px){
  .lac-hero-meta{gap:6px}
  .lac-hero-meta span{font-size:10px;padding:6px 9px}
  #masthead .site-title a{font-size:17px;letter-spacing:.16em}
  #masthead .site-title a::after{font-size:8px;margin-left:39px}
  .woocommerce ul.products li.product::after{top:10px;right:10px;font-size:9px;padding:6px 4px}
}

/* ---------- 兜底：覆盖 Astra 内联样式里残留的白底 ---------- */
#masthead a{color:#E8DCC7 !important}
#masthead .site-title a{color:#F3E7D3 !important}
.ast-mobile-header-wrap .ast-mobile-header-content,
.ast-desktop-header-content{background-color:var(--lac-lacquer) !important}
.ast-mobile-popup-drawer .ast-mobile-popup-inner,
.ast-mobile-popup-drawer.active .ast-mobile-popup-inner{
  background-color:var(--lac-lacquer) !important;
  color:#E8DCC7 !important;
}
.ast-mobile-popup-drawer .ast-mobile-popup-inner a,
.ast-mobile-popup-drawer .menu-link{color:#E8DCC7 !important}
:root{--ast-comment-inputs-background:var(--lac-paper-2)}
.ast-comment-formwrap input,
.comments-area textarea{background:var(--lac-paper-2) !important;color:var(--lac-ink) !important;border:1px solid var(--lac-line) !important}

/* ---------- 页脚品牌落款 ---------- */
.site-footer::before{
  content:"漆錄 · 大漆髹飾技藝 · 一物一圖 · 售罄不補";
  display:block;
  width:100%;
  text-align:center;
  font-family:var(--lac-serif);
  font-size:12px;
  letter-spacing:.28em;
  color:var(--lac-gold) !important;
  padding:8px 0 20px;
}
