/* Category Products Widget - Table Layout */
.bj-category-products-wrapper {
    width: 100%;
    max-width: 100%;
}

/* 表头容器 */
.inline-products-header-hold {
    position: relative;
    width: 100%;
    margin-bottom: 0;
}

.inline-products-header {
    display: grid;
    grid-template-columns: 120px 1fr 100px 120px 120px 160px;
    gap: 20px;
    align-items: center;
    padding: 15px 20px;
    background-color: transparent;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 分类页面 - 4列布局（无OUTPUT CURRENT） */
.bj-product-main .inline-products-header {
    grid-template-columns: 120px 1fr 100px 120px 160px;
}

/* 产品列表 */
.inline-products-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 产品项 */
.ip-item {
    border-bottom: 0px solid #e0e0e0;
    transition: background-color 0.3s ease;
    background-color: transparent;
}

/* 奇偶行背景色 */
.ip-item:nth-child(odd) {
    background-color: #f1f1f1;
}

.ip-item:nth-child(even) {
    background-color: #f8f8f8;
}

/* 悬停蓝色背景 */
.ip-item:hover {
    background-color: #0055B8 !important;
}

.ip-item:hover,
.ip-item:hover * {
    color: #fff !important;
}

.ip-item > a {
    display: grid;
    grid-template-columns: 120px 1fr 100px 120px 120px 160px;
    gap: 20px;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

/* 分类页面 - 4列布局（无OUTPUT CURRENT） */
.bj-product-main .ip-item > a {
    grid-template-columns: 120px 1fr 100px 120px 160px;
}

/* Grid 列定义 */
.ip-item-grid-1 {
    grid-column: 1;
}

.ip-item-grid-2 {
    grid-column: 2;
}

.ip-item-grid-sm {
    text-align: center;
}

.ip-item-grid-3 {
    grid-column: 6;
}

/* 分类页面 - 按钮在第5列 */
.bj-product-main .ip-item-grid-3 {
    grid-column: 5;
}

/* 图片 */
.ip-item-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    
    border-radius: 8px;
}

.ip-item-image img {
    width: 100%;
    max-width: 100px;
    height: auto;
    object-fit: contain;
}

/* 标题 */
.ip-item-title {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.ip-item-title span {
    font-size: 12px;
    font-weight: 400;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 参数详情 */
.ip-item-detail {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* 按钮 */
.ip-item-button {
    display: flex;
    justify-content: center;
}

.btn-trans-blue-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid #cccccc;
    border-radius: 0;
    background: transparent;
    color: #2563EB;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.btn-trans-blue-arrow span {
    position: relative;
    z-index: 1;
}

.btn-trans-blue-arrow::after {
    content: '→';
    margin-left: 8px;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.ip-item:hover .btn-trans-blue-arrow {
    background-color: #2563EB;
    color: #ffffff;
    transform: translateX(4px);
}

.ip-item:hover .btn-trans-blue-arrow::after {
    transform: translateX(4px);
}

/* 新按钮样式 - 参考 button-demo.html */
.btn-trans-white-arrow {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    overflow: hidden;
    text-decoration: none;
    color: #06101C;
    font-size: 14px;
    font-weight: 500;

    text-transform: uppercase;
    line-height: 16px;
    padding: 9px 16px;
    padding-right: 13px;
    transition: 0.2s;
}

/* Arrow icon container (左侧) */
.btn-trans-white-arrow span {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* 黑色箭头 (默认状态) */
.btn-trans-white-arrow span:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/wp-content/themes/astra-child/html/static/image/arrow-up-right-black.svg') no-repeat center center;
    background-size: contain;
    transform: translate(0, 0);
    transition: 0.2s;
}

/* 白色箭头 (hover状态) */
.btn-trans-white-arrow span:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/wp-content/themes/astra-child/html/static/image/arrow-up-right-white.svg') no-repeat center center;
    background-size: contain;
    transform: translate(-100%, 100%);
    transition: 0.2s;
}

/* Background overlay */
.btn-trans-white-arrow:after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(100%);
    z-index: -1;
    transition: 0.2s;
}

/* Hover effects */
.ip-item:hover .btn-trans-white-arrow:after {
    transform: translateY(0);
}

.ip-item:hover .btn-trans-white-arrow {
    color: #ffffff !important;
    border-color: #003879 !important;
    background: rgba(0, 0, 0, 0.2);
}

/* Arrow animation on hover */
.ip-item:hover .btn-trans-white-arrow span:before {
    transform: translate(100%, -100%);
}

.ip-item:hover .btn-trans-white-arrow span:after {
    transform: translate(0, 0);
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
    .inline-products-header {
        grid-template-columns: 100px 1fr 80px 100px 100px 140px;
        gap: 15px;
        padding: 12px 15px;
        font-size: 12px;
    }
    
    .bj-product-main .inline-products-header {
        grid-template-columns: 100px 1fr 80px 100px 140px;
    }
    
    .ip-item > a {
        grid-template-columns: 100px 1fr 80px 100px 100px 140px;
        gap: 15px;
        padding: 15px;
    }
    
    .bj-product-main .ip-item > a {
        grid-template-columns: 100px 1fr 80px 100px 140px;
    }
    
    .ip-item-image img {
        max-width: 80px;
    }
    
    .ip-item-title {
        font-size: 14px;
    }
    
    .ip-item-detail {
        font-size: 13px;
    }
    
    .btn-trans-blue-arrow {
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* 响应式设计 - 手机 */
@media (max-width: 768px) {
    /* 隐藏表头 */
    .inline-products-header-hold {
        display: none;
    }
    
    /* 改为自定义布局 */
    .ip-item > a {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
        padding: 20px 15px;
        align-items: flex-start;
    }
    
    /* 图片 - 大尺寸 */
    .ip-item-image {
        width: 100%;
        justify-content: flex-start;
        padding: 0;
        margin-bottom: 20px;
        background-color: transparent;
        flex: 0 0 100%;
    }
    
    .ip-item-image img {
        max-width: 100%;
        width: 100%;
        max-height: 250px;
        object-fit: contain;
    }
    
    /* 标题区域 - 靠左 */
    .ip-item-title {
        text-align: left;
        font-size: 18px;
        margin-bottom: 15px;
        flex: 0 0 100%;
    }
    
    .ip-item-title span {
        display: block;
        margin-bottom: 8px;
        font-size: 12px;
    }
    
    /* 参数区域 - 横向并排显示 */
    .ip-item-detail {
        display: inline-block;
        text-align: left;
        margin-right: 20px;
        margin-bottom: 0;
        font-size: 16px;
        font-weight: 600;
        color: #333;
        flex: 0 0 auto;
    }
    
    /* 按钮 - 最右边，与参数同一行 */
    .ip-item-button {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        margin: 0;
        flex: 1 1 auto;
    }
    
    .btn-trans-blue-arrow {
        width: 40px;
        height: 40px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background-color: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn-trans-blue-arrow span {
        display: none;
    }
    
    .btn-trans-blue-arrow::after {
        content: '→';
        font-size: 24px;
        color: #2563EB;
        margin: 0;
    }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
    .ip-item > a {
        padding: 15px 10px;
    }
    
    .ip-item-image {
        margin-bottom: 15px;
    }
    
    .ip-item-image img {
        max-height: 200px;
    }
    
    .ip-item-title {
        font-size: 16px;
    }
    
    .ip-item-detail {
        font-size: 14px;
        margin-right: 15px;
    }
    
    .btn-trans-blue-arrow {
        width: 36px;
        height: 36px;
    }
    
    .btn-trans-blue-arrow::after {
        font-size: 20px;
    }
}

/* Elementor 编辑器样式 */
.elementor-editor-active .bj-category-products-wrapper {
    min-height: 200px;
}

/* 表头样式优化 */
.ip-item-header-grid {
    font-weight: 600;
    color: #333;
}

.ip-item-header-title {
    text-align: left;
}

/* 悬停效果优化 */
.ip-item > a {
    position: relative;
}

/* 加载状态 */
.bj-category-products-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 空状态 */
.bj-category-products-wrapper .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}
