/* ============================================================
   逐岸潜水服商城 - WooCommerce 商城页统一演示站视觉
   配合 wsm-shop-shell.php 使用，套在 B2B008 演示站外壳下
   ============================================================ */

/* 强制使用演示站字体 */
body, button, input, textarea, select {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* 顶条文字间距（演示站头部在静态页靠 CSS 控制，这里补全） */
.ct-header [data-row="top"] .ct-container {
    min-height: 30px;
}
.ct-header [data-id="text"] .entry-content {
    font-size: 11px;
    color: #fff;
}

/* 隐藏 WooCommerce 原生排序/视图控件（保留排序功能但美化） */
.shop-shell-content .woocommerce-result-count,
.shop-shell-content .woocommerce-ordering,
.shop-shell-content .woocommerce-view,
.shop-shell-content ul.result-count,
.shop-shell-content .result-count,
.shop-shell-content form.woocommerce-ordering {
    display: none !important;
}

/* 页面背景：演示站商品区米色 */
body.woocommerce-page,
body.woocommerce,
body.woocommerce-cart,
body.woocommerce-checkout {
    background: #faf7f2 !important;
    color: #333 !important;
}

/* 隐藏主题自带 header / footer / 标题区（外壳已提供） */
body.woocommerce-page .site-header,
body.woocommerce-page #masthead,
body.woocommerce-page .header-img,
body.woocommerce-page .page-title-text,
body.woocommerce-page .entry-header,
body.woocommerce-page .entry-hero,
body.woocommerce-page h1.entry-title,
body.woocommerce-page .page-header,
body.woocommerce-page .site-footer,
body.woocommerce-page #colophon,
body.woocommerce-cart .site-header,
body.woocommerce-cart #masthead,
body.woocommerce-cart .site-footer,
body.woocommerce-cart #colophon,
body.woocommerce-checkout .site-header,
body.woocommerce-checkout #masthead,
body.woocommerce-checkout .site-footer,
body.woocommerce-checkout #colophon {
    display: none !important;
}

/* 内容区容器 */
.shop-shell-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 20px 80px;
    min-height: 500px;
}

/* 页面标题 */
.shop-shell-content h1,
.shop-shell-content .woocommerce-page-title {
    font-size: 34px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px;
    letter-spacing: -.5px;
}

/* WooCommerce 面包屑 */
.shop-shell-content .woocommerce-breadcrumb {
    font-size: 12px;
    color: #888;
    margin-bottom: 28px;
}
.shop-shell-content .woocommerce-breadcrumb a {
    color: #f47b4d;
    text-decoration: none;
}

/* 商品网格 - 4列，对齐演示站 */
.shop-shell-content ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 28px 20px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.shop-shell-content ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
    background: #fff;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(0,0,0,.05);
    transition: transform .25s, box-shadow .25s;
    text-align: center;
}
.shop-shell-content ul.products li.product:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.shop-shell-content ul.products li.product img {
    width: 100% !important;
    height: 300px !important;
    object-fit: cover !important;
    margin: 0 !important;
}
.shop-shell-content ul.products li.product h2,
.shop-shell-content ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #222 !important;
    padding: 14px 12px 6px !important;
    margin: 0 !important;
    line-height: 1.4;
}
.shop-shell-content ul.products li.product .price {
    color: #f47b4d !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    display: block;
    padding: 0 12px 12px;
}
.shop-shell-content ul.products li.product .price del {
    color: #aaa;
    font-weight: 400;
    margin-right: 6px;
}
.shop-shell-content ul.products li.product ins {
    text-decoration: none;
}

/* 加入购物车按钮 - 演示站橙色胶囊 */
.shop-shell-content .button,
.shop-shell-content button.button,
.shop-shell-content a.button,
.shop-shell-content .woocommerce .button,
.shop-shell-content .woocommerce-page .button,
.shop-shell-content button[type=submit] {
    background: #f47b4d !important;
    color: #fff !important;
    border: none !important;
    border-radius: 30px !important;
    padding: 11px 24px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: .5px !important;
    cursor: pointer;
    text-transform: uppercase;
    transition: background .2s;
}
.shop-shell-content .button:hover,
.shop-shell-content button.button:hover,
.shop-shell-content a.button:hover,
.shop-shell-content button[type=submit]:hover {
    background: #e5663a !important;
    color: #fff !important;
}

/* 商品详情页 */
.shop-shell-content .product {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}
.shop-shell-content .product .images {
    flex: 0 0 48%;
    max-width: 48%;
}
.shop-shell-content .product .images img {
    border-radius: 3px;
}
.shop-shell-content .product .summary {
    flex: 1;
    min-width: 300px;
}
.shop-shell-content .product .product_title {
    font-size: 30px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}
.shop-shell-content .product .price {
    font-size: 24px;
    color: #f47b4d;
    font-weight: 700;
    margin: 16px 0;
}
.shop-shell-content .product .woocommerce-product-details__short-description {
    color: #666;
    line-height: 1.7;
    font-size: 14px;
}
.shop-shell-content .product .cart {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
}
.shop-shell-content .product .quantity input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    width: 70px;
}

/* 购物车 / 结算表格 */
.shop-shell-content table.cart,
.shop-shell-content table.checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 3px;
}
.shop-shell-content table.cart th,
.shop-shell-content table.cart td,
.shop-shell-content table.checkout-review-order-table th,
.shop-shell-content table.checkout-review-order-table td {
    padding: 16px;
    border-bottom: 1px solid #f0ebe4;
    text-align: left;
    font-size: 14px;
}
.shop-shell-content table.cart th {
    background: #faf7f2;
    font-weight: 600;
    color: #555;
}
.shop-shell-content .cart-collaterals .cart_totals {
    background: #fff;
    padding: 24px;
    border-radius: 3px;
    margin-top: 24px;
}

/* 分页 */
.shop-shell-content .woocommerce-pagination .page-numbers {
    display: flex;
    gap: 8px;
    justify-content: center;
    list-style: none;
    margin-top: 40px;
}
.shop-shell-content .woocommerce-pagination .page-numbers li a,
.shop-shell-content .woocommerce-pagination .page-numbers span.current {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 30px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 13px;
}
.shop-shell-content .woocommerce-pagination .page-numbers span.current {
    background: #f47b4d;
    color: #fff;
}

/* ============================================================
   天猫式商品详情页（wsm-pdp）
   ============================================================ */
.wsm-breadcrumb { font-size: 12px; color: #999; margin-bottom: 22px; }
.wsm-breadcrumb a { color: #666; text-decoration: none; }
.wsm-breadcrumb a:hover { color: #f47b4d; }
.wsm-breadcrumb span { margin: 0 8px; color: #ccc; }
.wsm-breadcrumb .cur { color: #f47b4d; margin: 0; }

.wsm-pdp { display: flex; gap: 40px; background: #fff; padding: 32px; border-radius: 4px; box-shadow: 0 2px 16px rgba(0,0,0,.04); }
.wsm-pdp-gallery { flex: 0 0 50%; max-width: 50%; }
.wsm-pdp-mainimg { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 3px; background: #f7f4ef; }
.wsm-pdp-mainimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wsm-pdp-thumbs { display: flex; gap: 10px; margin-top: 14px; }
.wsm-pdp-thumbs img { width: 74px; height: 74px; object-fit: cover; border: 2px solid transparent; border-radius: 3px; cursor: pointer; }
.wsm-pdp-thumbs img.active { border-color: #f47b4d; }

.wsm-pdp-info { flex: 1; min-width: 320px; }
.wsm-pdp-title { font-size: 26px !important; font-weight: 600 !important; color: #1a1a1a !important; margin: 0 0 8px !important; line-height: 1.35; }
.wsm-pdp-subtitle { font-size: 13px; color: #999; margin: 0 0 18px; }
.wsm-pdp-pricebox { display: flex; align-items: baseline; gap: 12px; background: linear-gradient(90deg,#fff5f0,transparent); padding: 14px 16px; border-radius: 3px; margin-bottom: 16px; }
.wsm-pdp-price { font-size: 34px; font-weight: 700; color: #f47b4d; letter-spacing: -.5px; }
.wsm-pdp-oldprice { font-size: 14px; color: #bbb; text-decoration: line-through; }
.wsm-pdp-sales { margin-left: auto; font-size: 12px; color: #999; }
.wsm-pdp-promos { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12px; color: #666; margin-bottom: 22px; }
.wsm-promo-tag { background: #fff0e9; color: #f47b4d; border: 1px solid #ffd9c7; padding: 3px 9px; border-radius: 3px; font-size: 11px; }

.wsm-pdp-form { margin: 0; }
.wsm-pdp-attr { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.wsm-attr-label { flex: 0 0 44px; font-size: 13px; color: #888; padding-top: 8px; }
.wsm-attr-vals { display: flex; flex-wrap: wrap; gap: 10px; }
.wsm-attr-val { display: inline-block; padding: 7px 16px; border: 1px solid #ddd; border-radius: 3px; font-size: 13px; color: #555; cursor: pointer; background: #fff; transition: all .15s; }
.wsm-attr-val:hover { border-color: #f47b4d; }
.wsm-attr-val.selected { border-color: #f47b4d; color: #f47b4d; background: #fff5f0; font-weight: 600; }
.wsm-qty { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 3px; overflow: hidden; }
.wsm-qty button { border: none; background: #f7f4ef; width: 34px; height: 36px; font-size: 16px; cursor: pointer; color: #555; }
.wsm-qty input { border: none; width: 54px; height: 36px; text-align: center; font-size: 14px; outline: none; }
.wsm-stock { font-size: 12px; color: #4caf7d; align-self: center; }
.wsm-pdp-actions { display: flex; gap: 14px; margin-top: 26px; }
.wsm-btn-add, .wsm-btn-buy { flex: 1; padding: 15px 0 !important; border: none; border-radius: 3px !important; font-size: 15px !important; font-weight: 600 !important; cursor: pointer; text-transform: none !important; }
.wsm-btn-add { background: #f47b4d !important; color: #fff !important; }
.wsm-btn-add:hover { background: #e5663a !important; }
.wsm-btn-buy { background: #1a1a1a !important; color: #fff !important; }
.wsm-btn-buy:hover { background: #333 !important; }
.wsm-pdp-service { margin-top: 22px; padding-top: 18px; border-top: 1px solid #f0ebe4; font-size: 12px; color: #888; line-height: 2; }
.wsm-pdp-service strong { color: #f47b4d; margin-right: 10px; font-weight: 600; }

/* Tab 区 */
.wsm-pdp-tabs { background: #fff; margin-top: 28px; border-radius: 4px; box-shadow: 0 2px 16px rgba(0,0,0,.04); overflow: hidden; }
.wsm-tabs-nav { display: flex; border-bottom: 2px solid #f0ebe4; }
.wsm-tabs-nav span { padding: 18px 36px; font-size: 15px; font-weight: 600; color: #666; cursor: pointer; position: relative; }
.wsm-tabs-nav span.active { color: #f47b4d; }
.wsm-tabs-nav span.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: #f47b4d; }
.wsm-tabs-nav em { font-style: normal; font-size: 12px; color: #aaa; font-weight: 400; }
.wsm-tab-panel { display: none; padding: 32px 40px; }
.wsm-tab-panel.active { display: block; }
.wsm-detail-content { max-width: 860px; margin: 0 auto; font-size: 14px; line-height: 1.9; color: #444; }
.wsm-detail-content h2 { font-size: 20px; color: #1a1a1a; margin: 30px 0 12px; padding-left: 12px; border-left: 3px solid #f47b4d; }
.wsm-detail-content h2:first-child { margin-top: 0; }
.wsm-detail-content ul { padding-left: 22px; }
.wsm-detail-content li { margin: 6px 0; }
.wsm-param-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wsm-param-table th, .wsm-param-table td { border: 1px solid #f0ebe4; padding: 13px 18px; text-align: left; }
.wsm-param-table th { background: #faf7f2; color: #555; font-weight: 600; width: 24%; }
.wsm-param-table td { color: #444; }

/* 评价 */
.wsm-reviews-summary { display: flex; gap: 40px; align-items: center; padding-bottom: 24px; border-bottom: 1px solid #f0ebe4; }
.wsm-score { text-align: center; }
.wsm-score strong { display: block; font-size: 46px; color: #f47b4d; line-height: 1; }
.wsm-score span { font-size: 12px; color: #999; }
.wsm-score-bars { flex: 1; max-width: 400px; }
.wsm-score-bars div { display: flex; align-items: center; gap: 12px; margin: 6px 0; font-size: 12px; color: #888; }
.wsm-score-bars i { flex: 1; height: 8px; background: #f0ebe4; border-radius: 4px; overflow: hidden; }
.wsm-score-bars b { display: block; height: 100%; background: #f47b4d; border-radius: 4px; }
.wsm-score-bars em { font-style: normal; width: 36px; text-align: right; }
.wsm-review-list { margin-top: 8px; }
.wsm-review { padding: 20px 0; border-bottom: 1px solid #f5f1eb; }
.wsm-review-hd { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.wsm-stars { color: #f5a623; letter-spacing: 2px; }
.wsm-review-hd b { color: #555; font-weight: 600; }
.wsm-review-hd time { color: #bbb; font-size: 12px; }
.wsm-review p { font-size: 14px; color: #555; line-height: 1.7; margin: 10px 0 0; }

/* 相关推荐 */
.wsm-related { margin-top: 28px; }
.wsm-related h2 { font-size: 22px; color: #1a1a1a; margin: 0 0 20px; padding-left: 12px; border-left: 3px solid #f47b4d; }
.wsm-related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.wsm-related-card { background: #fff; border-radius: 3px; overflow: hidden; text-decoration: none; box-shadow: 0 2px 14px rgba(0,0,0,.05); transition: transform .25s; }
.wsm-related-card:hover { transform: translateY(-4px); }
.wsm-related-card img { width: 100%; height: 200px; object-fit: cover; }
.wsm-related-card h3 { font-size: 13px; color: #222; padding: 12px 12px 4px; margin: 0; font-weight: 600; }
.wsm-related-price { display: block; color: #f47b4d; font-size: 15px; font-weight: 700; padding: 0 12px 14px; }

/* 响应式 */
@media (max-width: 900px) {
    .shop-shell-content ul.products { grid-template-columns: repeat(2, 1fr) !important; }
    .shop-shell-content .product .images,
    .shop-shell-content .product .summary { flex: 0 0 100%; max-width: 100%; }
    .wsm-pdp { flex-direction: column; padding: 20px; }
    .wsm-pdp-gallery { flex: 0 0 100%; max-width: 100%; }
    .wsm-related-grid { grid-template-columns: repeat(2, 1fr); }
    .wsm-tabs-nav span { padding: 14px 18px; }
    .wsm-tab-panel { padding: 20px; }
}
@media (max-width: 560px) {
    .shop-shell-content ul.products { grid-template-columns: repeat(1, 1fr) !important; }
    .wsm-related-grid { grid-template-columns: repeat(1, 1fr); }
}

/* ============================================================
   头部购物车角标 + 加购成功提示
   ============================================================ */
.wsm-header-cart { display: inline-flex; align-items: center; margin-left: 14px; }
.wsm-cart-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; color: #333; text-decoration: none; transition: color .2s; }
.wsm-cart-link:hover { color: #f47b4d; }
.wsm-cart-link svg { display: block; }
.wsm-cart-count { position: absolute; top: 0; right: -2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #f47b4d; color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; box-sizing: border-box; display: none; box-shadow: 0 0 0 2px #fff; }
.wsm-header-cart-mobile { margin-left: 6px; }
.wsm-header-cart-mobile .wsm-cart-link { width: 30px; height: 30px; }

.wsm-toast { position: fixed; right: 26px; bottom: 26px; z-index: 9999; display: flex; align-items: center; gap: 16px; min-width: 220px; padding: 14px 20px; border-radius: 4px; background: rgba(26,26,26,.94); color: #fff; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.22); opacity: 0; transform: translateY(16px); transition: opacity .25s, transform .25s; }
.wsm-toast.show { opacity: 1; transform: translateY(0); }
.wsm-toast a { color: #ff9e77; text-decoration: none; font-weight: 600; white-space: nowrap; }
.wsm-toast a:hover { color: #fff; }
@media (max-width: 560px) {
    .wsm-toast { right: 12px; bottom: 12px; left: 12px; min-width: 0; justify-content: space-between; }
}

/* 商城外壳已自带备案号，隐藏 wp_footer 注入的重复备案条 */
body.shop-shell > div[style*="margin:0 8px"] { display: none !important; }
