/**
 * PRODUCTS Page Styles
 * 根据设计稿精确还原
 * 
 * @package Milestrong
 * @since 2.0.0
 */

/* ========================================
   MILESTRONG LED PRODUCTS 区
   ======================================== */

.products-led-section {
    padding: 80px 0 50px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.products-led-container {
    max-width: 1440px;
    margin: 0 auto;
    text-align: center;
}

/* 标题 - MILESTRONG LED PRODUCTS */
.products-led-title {
    font-size: 56px;
    font-weight: 700;
    margin: 0 0 30px 0;
    letter-spacing: 3px;
    line-height: 1.2;
    text-transform: uppercase;
}

.products-led-title .title-left {
    margin-right: 16px;
}

.products-led-title .title-right {
    /* 右侧文字颜色由后台设置控制 */
}

/* ========================================
   富文本描述区
   ======================================== */

.products-description-section {
    background: #0c131b;
    padding: 0 0 60px 0;
}

.products-description-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
}

.products-description-content {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    line-height: 1.8;
}

.products-description-content p {
    margin: 0 0 12px 0;
}

.products-description-content p:last-child {
    margin-bottom: 0;
}

/* ========================================
   分类筛选区 (TAB 标签)
   ======================================== */

.products-filter-section {
    background: #0c131b;
    padding: 0 0 60px 0;
}

.products-filter-container {
    max-width: 1440px;
    margin: 0 auto;
}

.products-filter-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* TAB 按钮样式 - 根据设计稿 */
.filter-tab {
    padding: 10px 12px;
    background: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: #0f1419;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: 18%;
}

.filter-tab:hover {
    background: #017fff;
    border-color: #017fff;
    color: #ffffff;
}

/* 激活状态 - 蓝色填充 */
.filter-tab.active {
    background: #017fff;
    border-color: #017fff;
    color: #ffffff;
}

/* ========================================
   产品卡片列表区
   ======================================== */

.products-list-section {
    background: #0f1419;
    padding: 80px 0 100px;
    position: relative;
}

.products-list-container {
    max-width: 1440px;
    margin: 0 auto;
}

/* 产品网格 - 2列布局 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* 产品卡片 */
.product-card {
    background: #16161e;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.product-card:hover {
    background: var(--hover-color, #017fff);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(1, 127, 255, 0.3);
    border-color: transparent;
}

.product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* 卡片图片区 - 左侧50%宽，靠左，右侧留给图标 */
.product-card-image {
    width: 50%;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.product-card-image img {
    position: absolute;
    top: 20px;
    left: 30px;
    width: 80%;
    height: 80%;
    /* object-fit: cover; */
    transition: transform 0.4s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.08);
}

/* 右上角图标 - 默认隐藏，hover 时显示 */
.product-card-icon {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2;
}

.product-card-icon img {
    display: block;
    /* 原图尺寸，不限制宽高 */
}

/* hover 时图标显示 */
.product-card:hover .product-card-icon {
    opacity: 1;
    visibility: visible;
}

/* 卡片内容 */
.product-card-content {
    padding: 24px;
}

/* 卡片标题 - 2行显示，超出隐藏 */
.product-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 卡片描述 - 2行显示，超出隐藏 */
.product-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #ffffff;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

/* 卡片规格参数行 */
.product-card-spec {
    font-size: 13px;
    color: rgb(255, 255, 255);
    margin: 12px 0 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    line-height: 1.5;
}
.products-loading {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(1, 127, 255, 0.2);
    border-top-color: #017fff;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 无产品提示 */
.no-products-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #718096;
    font-size: 18px;
}

/* 错误信息 */
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #e53e3e;
    font-size: 18px;
}

/* ========================================
   分页导航
   ======================================== */

.products-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-top: 60px;
}

.pagination-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: #ffffff;
    color: #1a1a2e;
    border: none;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-button:hover:not(:disabled) {
    background: #017fff;
    color: #ffffff;
}

.pagination-button.active {
    background: #017fff;
    color: #ffffff;
}

.pagination-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: #ffffff;
    padding: 0 4px;
}

.pagination-prev,
.pagination-next {
    font-size: 16px;
}

/* ========================================
   Contact Us 区块
   ======================================== */

.products-contact-section {
    background: #ffffff;
    padding: 80px 0;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.products-contact-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
}

/* 标题区 */
.products-contact-header {
    text-align: center;
    margin-bottom: 50px;
}

.products-contact-title {
    font-size: 56px;
    font-weight: 700;
    margin: 0 0 16px 0;
    letter-spacing: 1px;
    line-height: 1.2;
}

.products-contact-title .title-contact {
    color: #017fff;
}

.products-contact-title .title-us {
    color: #ffffff;
}

.products-contact-subtitle {
    font-size: 18px;
    color: #ffffff;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.products-contact-desc {
    font-size: 15px;
    color: #ffffff;
    margin: 0;
    opacity: 0.85;
}

/* 联系表单 - 与首页保持一致的深色风格 */
.products-contact-form {
    background: transparent;
    padding: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 0;
    align-items: stretch;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 右列需要撑满高度让 Message 延伸到底 */
.form-column-right {
    height: 100%;
}

/* 表单字段 */
.form-field {
    position: relative;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 16px 24px;
    background: #1b1a22;
    border: none;
    border-radius: 50px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #6b7280;
}

.form-field input:focus,
.form-field textarea:focus {
    background: #252430;
    box-shadow: 0 0 0 2px rgba(1, 127, 255, 0.2);
}

/* textarea 圆角矩形 */
.form-field textarea {
    border-radius: 20px;
    resize: vertical;
    min-height: 120px;
    padding: 16px 24px;
}

/* Message 字段占满右列 */
.form-field-message {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.form-field-message textarea {
    flex: 1;
    min-height: 120px;
    height: 100%;
}

/* 验证码字段 */
.form-field-captcha {
    position: relative;
}

.form-field-captcha input {
    padding-right: 140px;
}

.captcha-wrapper {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 120px;
    background: #1b1a22;
    border-radius: 0 50px 50px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #2d2c36;
}

/* 提交按钮 */
.form-submit {
    text-align: center;
    margin-top: 30px;
}

.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px 60px;
    background: linear-gradient(90deg, #007BFF 0%, #0056CC 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    border: 2px solid #fff;
    min-width: 400px;
    gap: 0;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 箭头 - 斜向右上，绝对定位靠右 */
.submit-button .btn-arrow {
    display: inline-block;
    width: 20px;
    height: 20px;
    position: absolute;
    right: 30px;
    transform: rotate(-45deg);
}

.submit-button .btn-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border-top: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    transform: translate(-30%, -40%) rotate(45deg);
}

.submit-button .btn-arrow::after {
    content: '';
    position: absolute;
    top: 54%;
    left: 0;
    width: 28px;
    height: 2px;
    background-color: #ffffff;
    transform: translateY(50%);
}

/* 隐私声明 */
.form-privacy {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 20px 0 0 0;
    line-height: 1.6;
}

/* 表单消息 */
.form-message {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 15px;
    line-height: 1.6;
}

.form-message.success {
    background: rgba(198, 246, 213, 0.15);
    color: #68d391;
    border: 1px solid rgba(104, 211, 145, 0.3);
}

.form-message.error {
    background: rgba(254, 215, 215, 0.15);
    color: #fc8181;
    border: 1px solid rgba(252, 129, 129, 0.3);
}

/* 提交中状态 */
.products-contact-form.submitting {
    opacity: 0.7;
    pointer-events: none;
}

/* ========================================
   响应式设计 - 平板端（768px-1199px）
   ======================================== */

@media (max-width: 1199px) {
    /* LED PRODUCTS 区 */
    .products-led-section {
        padding: 60px 0 40px;
    }
    
    .products-led-container {
        padding: 0 30px;
    }
    
    .products-led-title {
        font-size: 44px;
        letter-spacing: 2px;
    }
    
    /* 描述区 */
    .products-description-section {
        padding: 0 0 50px 0;
    }
    
    .products-description-container {
        padding: 0 30px;
    }
    
    /* 筛选区 */
    .products-filter-section {
        padding: 0 0 50px 0;
    }
    
    .products-filter-container {
        padding: 0 30px;
    }
    
    .filter-tab {
        padding: 12px 28px;
        font-size: 14px;
    }
    
    /* 产品列表区 */
    .products-list-section {
        padding: 60px 0 80px;
    }
    
    .products-list-container {
        padding: 0 30px;
    }
    
    .products-grid {
        gap: 25px;
    }
    
    .product-card-title {
        font-size: 18px;
    }
    
    .product-card-excerpt {
        font-size: 14px;
    }
    
    /* Contact Us 区 */
    .products-contact-section {
        padding: 60px 0;
    }
    
    .products-contact-container {
        padding: 0 30px;
    }
    
    .products-contact-title {
        font-size: 36px;
    }
    
    .products-contact-subtitle {
        font-size: 16px;
    }
}

/* ========================================
   响应式设计 - 移动端（<768px）
   ======================================== */

@media (max-width: 767px) {
    /* LED PRODUCTS 区 */
    .products-led-section {
        padding: 50px 0 30px;
    }
    
    .products-led-container {
        padding: 0 20px;
    }
    
    .products-led-title {
        font-size: 32px;
        letter-spacing: 1px;
        margin-bottom: 20px;
    }
    
    .products-led-title .title-left {
        margin-right: 8px;
    }
    
    /* 描述区 */
    .products-description-section {
        padding: 0 0 40px 0;
    }
    
    .products-description-container {
        padding: 0 20px;
    }
    
    .products-description-content {
        font-size: 14px;
    }
    
    /* 筛选区 - 横向滑动 */
    .products-filter-section {
        padding: 0 0 40px 0;
    }
    
    .products-filter-container {
        padding: 0 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .products-filter-tabs {
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .filter-tab {
        padding: 10px 24px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    /* 产品列表区 - 单列布局 */
    .products-list-section {
        padding: 50px 0 70px;
    }
    
    .products-list-container {
        padding: 0 20px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .product-card-image {
        width: 50%;
    }
    
    .product-card-content {
        padding: 20px;
    }
    
    .product-card-title {
        font-size: 17px;
    }
    
    .product-card-excerpt {
        font-size: 14px;
    }
    
    /* 分页 */
    .products-pagination {
        margin-top: 40px;
        gap: 6px;
    }
    
    .pagination-button {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    /* Contact Us 区 - 单列布局 */
    .products-contact-section {
        padding: 50px 0;
    }
    
    .products-contact-container {
        padding: 0 20px;
    }
    
    .products-contact-header {
        margin-bottom: 40px;
    }
    
    .products-contact-title {
        font-size: 28px;
    }
    
    .products-contact-subtitle {
        font-size: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-field-message textarea {
        min-height: 150px;
    }
    
    .form-field-captcha input {
        padding-right: 110px;
    }
    
    .captcha-wrapper {
        width: 100px;
    }
    
    .submit-button {
        width: 100%;
        padding: 14px 30px;
        font-size: 16px;
    }
}

/* ========================================
   动画效果
   ======================================== */

/* 卡片进入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }
.product-card:nth-child(7) { animation-delay: 0.35s; }
.product-card:nth-child(8) { animation-delay: 0.4s; }
.product-card:nth-child(9) { animation-delay: 0.45s; }
.product-card:nth-child(10) { animation-delay: 0.5s; }
.product-card:nth-child(11) { animation-delay: 0.55s; }
.product-card:nth-child(12) { animation-delay: 0.6s; }