/**
 * DealsRain Product Customizer - Frontend Styles
 */

/* ========================================
   隐藏元素
   ======================================== */
.single-product .product-after-images-element,
.single-product .product-onsale,
.single-product .check-incart-sold,
.single-product form.cart,
.single-product .wrap_after_button,
.single-product #tmcore-live-viewing-visitors,
.single-product .single-product-payments,
.single-product .single-product-extras > *:not(.dpc-discount-details-section),
.single-product .woocommerce-product-gallery {
    display: none !important;
}

/* ========================================
   商品缩略图
   ======================================== */
.dpc-product-thumbnail-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
}

.dpc-product-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dpc-publish-time-below {
    text-align: right;
    font-size: 13px;
    color: #888;
    margin-top: 8px;
    padding-right: 5px;
}

/* ========================================
   商品标签
   ======================================== */
.dpc-product-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dpc-loop-tags {
    top: 8px;
    left: 8px;
}

.dpc-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.dpc-tag svg {
    flex-shrink: 0;
}

.dpc-tag-hot {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.dpc-tag-discount {
    background: linear-gradient(135deg, #00b894, #00a085);
}

/* ========================================
   优惠码区域
   ======================================== */
.dpc-coupon-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.dpc-coupon-code-wrapper {
    margin-bottom: 15px;
}

.dpc-coupon-code-wrapper label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.dpc-coupon-input-group {
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.dpc-coupon-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 8px 0 0 8px;
    background: #fff;
    color: #333;
    cursor: default;
}

.dpc-coupon-input:focus {
    outline: none;
    border-color: #007bff;
}

.dpc-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: #007bff;
    border: none;
    border-radius: 0 8px 8px 0;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dpc-copy-btn:hover {
    background: #0056b3;
}

.dpc-copy-btn.copied {
    background: #28a745;
}

.dpc-amazon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--global-palette-btn-bg);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.dpc-amazon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 153, 0, 0.4);
    color: #fff;
}

.dpc-amazon-btn svg {
    flex-shrink: 0;
}

/* ========================================
   折扣使用详情
   ======================================== */
.dpc-discount-details-section {
    margin: 5px 0;
    padding: 0;
    background: #fff;
    border-radius: 0;
    border: none;
}

.dpc-discount-block {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.dpc-discount-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.dpc-discount-title svg {
    color: #1890ff;
    flex-shrink: 0;
}

.dpc-discount-list {
    margin: 0;
    padding: 0 0 0 24px;
    list-style: none;
}

.dpc-discount-list li {
    position: relative;
    padding: 4px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.dpc-discount-list li::before {
    content: '•';
    position: absolute;
    left: -16px;
    color: #999;
}

.dpc-discount-list li strong {
    color: #333;
}

/* 如何使用代码 */
.dpc-how-to-use {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease;
}

.dpc-how-to-use:hover {
    color: #1890ff;
}

.dpc-how-to-use-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}

.dpc-how-to-use-left svg {
    color: #1890ff;
    flex-shrink: 0;
}

.dpc-how-to-use-arrow {
    color: #999;
}

.dpc-how-to-use:hover .dpc-how-to-use-arrow {
    color: #1890ff;
}

/* 折扣详情小贴士 */
.dpc-discount-tips {
    padding: 12px 0 15px 24px;
    border-bottom: 1px solid #eee;
}

.dpc-discount-tips a {
    color: #ff6600;
    font-size: 14px;
    text-decoration: none;
}

.dpc-discount-tips a:hover {
    text-decoration: underline;
}

/* 固定提示语 */
.dpc-discount-notice {
    margin: 15px 0 0;
    padding: 0;
    background: none;
    border-radius: 0;
    font-size: 13px;
    color: #999;
    line-height: 1.5;
}

/* ========================================
   Amazon搜索按钮
   ======================================== */
.dpc-amazon-search-wrapper {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.dpc-amazon-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background: var(--global-palette-btn-bg);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.35);
}

.dpc-amazon-search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 153, 0, 0.45);
    color: #fff;
}

/* ========================================
   微信浮动图标
   ======================================== */
.dpc-wechat-float {
    position: fixed;
    bottom: 200px;
    right: 20px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #07C160;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.4);
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dpc-wechat-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(7, 193, 96, 0.5);
}

.dpc-wechat-float svg {
    color: #fff;
}

/* ========================================
   微信弹窗
   ======================================== */
.dpc-wechat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.dpc-wechat-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dpc-wechat-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.dpc-wechat-modal-content {
    position: relative;
    width: 90%;
    max-width: 360px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: dpc-modal-in 0.3s ease;
}

@keyframes dpc-modal-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dpc-wechat-modal-body {
    padding: 30px 25px 20px;
    text-align: center;
}

.dpc-wechat-icon {
    margin-bottom: 15px;
}

.dpc-wechat-text {
    margin: 0 0 8px;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

.dpc-wechat-text strong {
    display: block;
    font-size: 20px;
    color: #07C160;
    margin-top: 5px;
}

.dpc-wechat-subtext {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.dpc-wechat-modal-footer {
    display: flex;
    border-top: 1px solid #eee;
}

.dpc-btn {
    flex: 1;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dpc-btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.dpc-btn-secondary:hover {
    background: #eee;
}

.dpc-btn-primary {
    background: #07C160;
    color: #fff;
}

.dpc-btn-primary:hover {
    background: #06ae56;
}

.dpc-btn-primary.copied {
    background: #28a745;
}

/* ========================================
   复制成功提示
   ======================================== */
.dpc-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 14px;
    border-radius: 8px;
    z-index: 999999;
    animation: dpc-toast-in 0.3s ease;
}

@keyframes dpc-toast-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .dpc-product-thumbnail-wrapper {
        max-width: 100%;
    }
    
    .dpc-coupon-section {
        padding: 15px;
    }
    
    .dpc-coupon-input {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .dpc-amazon-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .dpc-wechat-float {
        bottom: 120px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    .dpc-wechat-float svg {
        width: 24px;
        height: 24px;
    }
    
    .dpc-wechat-modal-content {
        width: 85%;
    }
    
    .dpc-amazon-search-btn {
        font-size: 16px;
        padding: 14px 24px;
    }
}
