/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/
/* Fixed the size of the featured image in blog archives */
.blog-post-loop .entry-thumbnail,
.blog-post-loop .post-image,
.blog-post-loop .wd-post-img,
.blog-post-loop figure {
  aspect-ratio: 5 / 3;
  height: auto !important;
  padding: 0 !important;
  overflow: hidden;
  background: #faf4f0;
}

.blog-post-loop .entry-thumbnail img,
.blog-post-loop .post-image img,
.blog-post-loop .wd-post-img img,
.blog-post-loop figure img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block;
}

/* Fixed the blog breadcrumbs */
body.single-post .breadcrumb-item.active {
    display: none !important;
}

body.single-post .breadcrumb-item:nth-last-child(2)::after {
    content: none !important;
}

/* Fix the distance between rev containers */
.rev-campaign-container{
	--campaign-width-base:100% !important;
}

.rev-campaign-viewport{
	margin-block-end: 0 !important;
}

@media (max-width: 767px) {
	.rev-campaign-viewport{
	margin-block-end: 3rem !important;
	}
}

/* Custom title */
.wcps-loop-title {
/*    font-family: 'Your-Custom-Font', sans-serif; */
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #333333 !important;
    letter-spacing: 1px;
/*    text-transform: uppercase; */
}

.wcps-loop-subtitle-text, 
.wcps-subtitle-text {
	font-size: 13px;
   /* color: #777777;*/
	text-transform: none !important;
   font-weight: 300; /* 更细的字体 */
   letter-spacing: 1px;
}

.wcps-cart-subtitle {
    font-size: 11px;
    color: #999999;
}

/*修复产品页面表格*/
/* 1. 锁死外层滚动：Woodmart 的 .wd-scroll 容器 */
#tab-wd_custom_tab.wd-scroll,
#tab-wd_custom_tab .wd-scroll-content {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* 2. 只让表格自己横向滚动 */
#tab-wd_custom_tab .wd-scroll-content table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 0 !important;
    scrollbar-width: thin !important;
    scrollbar-color: #d1d1d1 #f5f5f5 !important;
}

/* 3. 单元格 */
#tab-wd_custom_tab .wd-scroll-content table th,
#tab-wd_custom_tab .wd-scroll-content table td {
    padding: 12px 15px !important;
    text-align: center !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #eee !important;
    white-space: nowrap !important;
    min-width: 80px !important;
}

/* 4. 表头 */
#tab-wd_custom_tab .wd-scroll-content table th {
    font-weight: 600 !important;
    color: #333 !important;
    border-bottom: 2px solid #ddd !important;
    background-color: #f9f9f9 !important;
}

/* 5. 第一列固定 */
#tab-wd_custom_tab .wd-scroll-content table th:first-child,
#tab-wd_custom_tab .wd-scroll-content table td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 2 !important;
    font-weight: bold !important;
    border-right: 1px solid #eee !important;
    background-color: #fff !important;
}
#tab-wd_custom_tab .wd-scroll-content table th:first-child {
    background-color: #f9f9f9 !important;
    z-index: 3 !important;
}

/* 6. 斑马线 */
#tab-wd_custom_tab .wd-scroll-content table tbody tr:nth-child(even) td {
    background-color: #fafafa !important;
}

/* 7. 滚动条美化 */
#tab-wd_custom_tab .wd-scroll-content table::-webkit-scrollbar { height: 5px !important; }
#tab-wd_custom_tab .wd-scroll-content table::-webkit-scrollbar-track {
    background: #f5f5f5 !important; border-radius: 10px !important;
}
#tab-wd_custom_tab .wd-scroll-content table::-webkit-scrollbar-thumb {
    background: #d1d1d1 !important; border-radius: 10px !important;
}

/* 仅 single‑product 页面，不污染其他页面 */
body.single-product {
}

/* ========== 可变产品：真正放按钮的内层容器 ========== */
body.single-product .woocommerce-variation-add-to-cart {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

/* ========== 简单无变量产品：form.cart 直接子元素 ========== */
body.single-product .wd-single-add-cart > .elementor-widget-container > form.cart {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

/* 数量组件占满整行 */
body.single-product .quantity {
    width: 100% !important;
}

/* 两个按钮强制100%宽度，各占一行 */
body.single-product .woocommerce-variation-add-to-cart .button,
body.single-product .wd-single-add-cart form.cart .button {
    width: 100% !important;
    display: block !important;
    flex: none !important;
}