/*
Theme Name: Yaktrax Replica
Theme URI: https://yaktraxx.shop
Author: WorkBuddy Clone Tool
Description: 1:1 replica theme (WooCommerce driven)
Version: 1.0.0
Text Domain: yaktrax-replica
*/

/* ----------------------------------------------------------
   站点自身的最小兜底样式（源站 CSS 之外的补充）
   仅用于 WooCommerce 原生流程页与自写组件，不覆盖源站版面
---------------------------------------------------------- */
.yt-wc-wrapper { padding: 40px 0; }
.yt-wc-wrapper h1, .yt-wc-wrapper h2, .yt-wc-wrapper h3 { margin: 0 0 12px; }
.yt-wc-wrapper table.shop_table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.yt-wc-wrapper table.shop_table th,
.yt-wc-wrapper table.shop_table td { padding: 12px 8px; border-bottom: 1px solid #e5e5e5; text-align: left; }
.yt-wc-wrapper table.shop_table th { font-weight: 600; }
.yt-wc-wrapper .quantity input.qty { width: 64px; padding: 8px; border: 1px solid #ddd; text-align: center; }
.yt-wc-wrapper input.input-text,
.yt-wc-wrapper textarea,
.yt-wc-wrapper select { padding: 10px 12px; border: 1px solid #ddd; width: 100%; max-width: 420px; }
.yt-wc-wrapper .button,
.yt-wc-wrapper button.button,
.yt-wc-wrapper a.button {
    display: inline-block; padding: 12px 28px; border: 1px solid #111; background: #111; color: #fff;
    text-decoration: none; text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
}
.yt-wc-wrapper .button:hover { background: #fff; color: #111; }
.yt-wc-wrapper .woocommerce-error,
.yt-wc-wrapper .woocommerce-info,
.yt-wc-wrapper .woocommerce-message { padding: 12px 16px; margin-bottom: 18px; border-left: 3px solid #111; background: #f6f6f6; }
.yt-wc-wrapper .woocommerce-error { border-color: #c00; }
.yt-wc-wrapper .woocommerce-message { border-color: #2a7; }
.yt-wc-wrapper #customer_details .col-1,
.yt-wc-wrapper #customer_details .col-2 { margin-bottom: 20px; }
.yt-wc-wrapper .form-row { margin-bottom: 14px; }
.yt-wc-wrapper .form-row label { display: block; margin-bottom: 5px; font-weight: 600; }

/* 购物车抽屉 */
.cart-drawer .side-panel-inner { display: flex; flex-direction: column; height: 100%; }
.cart-drawer .side-panel-content { flex: 1 1 auto; overflow-y: auto; }
.yt-cart-items { list-style: none; margin: 0; padding: 0; }
.yt-cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eee; }
.yt-cart-item--image img { width: 80px; height: 80px; object-fit: cover; }
.yt-cart-item--title { font-weight: 600; display: block; margin-bottom: 4px; color: inherit; text-decoration: none; }
.yt-cart-item--variation, .yt-cart-item--qty { font-size: 13px; opacity: .8; }
.cart-drawer--footer { padding: 16px 0; border-top: 1px solid #eee; }
.cart-drawer--footer .button { display: block; text-align: center; margin-bottom: 8px; }
.yt-cart-subtotal { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 12px; }

/* 抽屉开合 */
.side-panel { position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 92vw;
    background: #fff; z-index: 999; transform: translateX(100%); transition: transform .3s ease; }
.side-panel.side-panel--open { transform: translateX(0); }
.side-panel .side-panel-header { display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid #eee; }
.side-panel .side-panel-content { padding: 18px 20px; }
.side-panel-close { cursor: pointer; width: 24px; height: 24px; position: relative; }
.side-panel-close span, .side-panel-close span::after {
    content: ""; position: absolute; left: 0; top: 11px; width: 24px; height: 2px; background: #111; }
.side-panel-close span::after { transform: rotate(90deg); }
.click-capture { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 998; display: none; }
body.side-panel-open .click-capture { display: block; }
.back-to-top { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%;
    background: #111; color: #fff; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 90; }
.back-to-top span::before { content: "\2191"; }

/* 商品图册：滑块布局交给复制自源站的 product.css（--list 布局全部堆叠展示） */

/* 手风琴（原生 details 增强） */
.product__accordion details { border-top: 1px solid #eee; }
.product__accordion summary { padding: 14px 0; cursor: pointer; font-weight: 600; }
.product__accordion .collapsible__content { padding: 0 0 16px; }

/* 评分星星：由 parts/jdgm-styles.html 提供字体与 glyph（与源站一致） */
.jdgm-preview-badge .jdgm-prev-badge { display: block !important; }

/* 移动端 */
@media (max-width: 768px) {
    .side-panel { width: 100%; }
}
