/**
 * 产品详情页样式
 * 
 * @package Connectors
 */

/* Product Hero */
.product-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Product Gallery */
.product-gallery__main {
    position: relative;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 12px;
}

.product-gallery__main-image {
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    display: block;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-light);
}

/* 导航按钮容器 - 添加渐变背景 */
.product-gallery__main::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 80px;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    border-radius: 12px 0 0 12px;
}

.product-gallery__main::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 80px;
    height: 100%;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.3), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    border-radius: 0 12px 12px 0;
}

.product-gallery__main:hover::before,
.product-gallery__main:hover::after {
    opacity: 1;
}

.product-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    color: var(--primary);
    box-shadow: 0 4px 16px rgba(11, 94, 215, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
}

.product-gallery__main:hover .product-gallery__nav {
    opacity: 1;
}

.product-gallery__nav:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(11, 94, 215, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.15);
}

.product-gallery__nav:active {
    transform: translateY(-50%) scale(1.05);
}

.product-gallery__nav--prev {
    left: 20px;
}

.product-gallery__nav--next {
    right: 20px;
}

.product-gallery__nav svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

.product-gallery__nav--prev:hover svg {
    transform: translateX(-2px);
}

.product-gallery__nav--next:hover svg {
    transform: translateX(2px);
}

/* 移动端始终显示导航按钮 */
@media (max-width: 900px) {
    .product-gallery__nav {
        opacity: 1;
        background: rgba(255, 255, 255, 0.9);
    }
    
    .product-gallery__main::before,
    .product-gallery__main::after {
        opacity: 0.5;
    }
}

.product-gallery__thumbs {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.product-gallery__thumb-wrapper {
    position: relative;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.product-gallery__thumb-wrapper:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-gallery__thumb-wrapper.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(11, 94, 215, 0.2);
}

.product-gallery__thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    transition: opacity 0.3s ease;
}

.product-gallery__thumb-wrapper:hover .product-gallery__thumb {
    opacity: 0.8;
}

.product-gallery__thumb-wrapper.active .product-gallery__thumb {
    opacity: 1;
}

/* 单张图片时隐藏导航按钮 */
.product-gallery__main:has(.product-gallery__main-image:only-child) .product-gallery__nav {
    display: none;
}

.product-info h1 {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--text);
}

.product-info p {
    margin-bottom: 16px;
    color: var(--muted);
    line-height: 1.6;
}

/* Social Share Icons */
.social-share-icons {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.social-share-label {
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
    margin-right: 8px;
}

.social-share-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text);
    transition: all 0.3s ease;
    border-radius: 50%;
    background: var(--bg-light);
    border: 1px solid var(--border);
    text-decoration: none;
}

.social-share-link:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-share-link svg {
    width: 20px;
    height: 20px;
    display: block;
}

.social-share-link--facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.social-share-link--twitter:hover {
    background: #1DA1F2;
    border-color: #1DA1F2;
}

.social-share-link--linkedin:hover {
    background: #0077B5;
    border-color: #0077B5;
}

.social-share-link--pinterest:hover {
    background: #BD081C;
    border-color: #BD081C;
}

.key-features {
    margin-bottom: 24px;
}

.key-features h3 {
    margin-bottom: 12px;
    font-size: 20px;
    color: var(--text);
}

.key-features ul {
    list-style: disc;
    padding-left: 20px;
    color: var(--text);
}

.key-features li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.cta-box {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Product Sections */
.product-section {
    padding: 60px 0;
    border-top: 1px solid var(--border);
}

.product-section:first-of-type {
    border-top: none;
}

.product-section h2 {
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--text);
}

.product-section p {
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 16px;
}

/* Specifications Table */
.product-specs {
    width: 100%;
    border-collapse: collapse;
}

.product-specs th,
.product-specs td {
    border: 1px solid var(--border);
    padding: 12px;
    text-align: left;
}

.product-specs th {
    background-color: var(--bg-light);
    width: 30%;
    font-weight: 600;
    color: var(--text);
}

.product-specs td {
    color: var(--text);
}

/* Applications Grid */
.applications {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.app-box {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: block;
}

.app-box:hover {
    background-color: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}

/* FAQ */
.faq-item {
    margin-bottom: 16px;
}

.faq-item h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text);
}

.faq-item p {
    color: var(--muted);
    line-height: 1.6;
}

/* Final CTA */
.final-cta {
    background-color: var(--primary);
    color: #ffffff;
    text-align: center;
    padding: 60px 20px;
    border-radius: 12px;
}

.final-cta h2 {
    margin-bottom: 16px;
    color: #ffffff;
}

.final-cta p {
    color: #ffffff;
    margin-bottom: 0;
}

.btn-white-border {
    color: #ffffff;
    border-color: #ffffff;
    background: transparent;
}

.btn-white-border:hover {
    background: #ffffff;
    color: var(--primary);
}

/* Quote Modal */
.quote-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.quote-modal-content {
    background-color: #ffffff;
    padding: 0;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.3s ease;
    display: flex;
    flex-direction: column;
}

.quote-modal-header {
    padding: 24px 40px 20px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.quote-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    color: var(--muted);
    line-height: 1;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
}

.quote-modal-close:hover {
    color: var(--text);
    background: var(--bg-light);
    transform: rotate(90deg);
}

.quote-modal-content h2 {
    margin: 0;
    color: var(--text);
    font-size: 24px;
    font-weight: 600;
    padding-right: 50px;
}

.quote-modal-body {
    padding: 30px 40px 40px;
    overflow-y: auto;
    flex: 1;
}

.quote-modal-content .form-group {
    margin-bottom: 24px;
}

.quote-modal-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
    font-size: 15px;
}

.quote-modal-content .required {
    color: #e74c3c;
    margin-left: 2px;
}

.quote-modal-content input,
.quote-modal-content textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #ffffff;
    color: var(--text);
}

.quote-modal-content input:hover,
.quote-modal-content textarea:hover {
    border-color: var(--primary);
}

.quote-modal-content input:focus,
.quote-modal-content textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(11, 94, 215, 0.1);
    background: #ffffff;
}

.quote-modal-content input::placeholder,
.quote-modal-content textarea::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

.quote-modal-content textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.quote-modal-content .btn {
    width: 100%;
    margin-top: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
}

.form-privacy {
    margin-top: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.quote-message {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
    border-left: 4px solid;
}

.quote-message--success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.quote-message--error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Success Message Modal */
.quote-success-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.quote-success-modal-content {
    background-color: #ffffff;
    padding: 50px 40px;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.3s ease;
}

.quote-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    animation: scaleIn 0.5s ease;
}

.quote-success-icon svg {
    width: 48px;
    height: 48px;
}

.quote-success-modal-content h2 {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 28px;
    font-weight: 600;
}

.quote-success-modal-content p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .product-hero {
        grid-template-columns: 1fr;
    }
    
    .product-gallery__main::before,
    .product-gallery__main::after {
        width: 60px;
    }
    
    .product-gallery__nav {
        width: 42px;
        height: 42px;
        opacity: 1;
        background: rgba(255, 255, 255, 0.95);
    }
    
    .product-gallery__nav svg {
        width: 20px;
        height: 20px;
    }
    
    .product-gallery__nav--prev {
        left: 12px;
    }
    
    .product-gallery__nav--next {
        right: 12px;
    }
    
    .product-gallery__thumb {
        width: 60px;
        height: 60px;
    }
    
    .product-section {
        padding: 40px 0;
    }
    
    .product-section h2 {
        font-size: 24px;
    }
    
    .applications {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 600px) {
    .product-info h1 {
        font-size: 24px;
    }
    
    .product-gallery__main::before,
    .product-gallery__main::after {
        width: 50px;
    }
    
    .product-gallery__nav {
        width: 38px;
        height: 38px;
    }
    
    .product-gallery__nav svg {
        width: 18px;
        height: 18px;
    }
    
    .product-gallery__nav--prev {
        left: 8px;
    }
    
    .product-gallery__nav--next {
        right: 8px;
    }
    
    .social-share-icons {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .social-share-label {
        margin-right: 0;
        margin-bottom: 4px;
    }
    
    .social-share-link {
        width: 36px;
        height: 36px;
    }
    
    .social-share-link svg {
        width: 18px;
        height: 18px;
    }
    
    .cta-box {
        flex-direction: column;
    }
    
    .cta-box .btn {
        width: 100%;
    }
    
    .quote-modal {
        padding: 10px;
    }
    
    .quote-modal-content {
        width: 100%;
        max-height: 95vh;
    }
    
    .quote-modal-header {
        padding: 20px 20px 16px;
    }
    
    .quote-modal-content h2 {
        font-size: 20px;
        padding-right: 40px;
    }
    
    .quote-modal-body {
        padding: 20px;
    }
    
    .quote-modal-close {
        top: 16px;
        right: 16px;
        font-size: 24px;
        width: 32px;
        height: 32px;
    }
    
    .quote-modal-content .form-group {
        margin-bottom: 20px;
    }
    
    .quote-modal-content input,
    .quote-modal-content textarea {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .quote-modal-content textarea {
        min-height: 120px;
    }
    
    .quote-success-modal-content {
        padding: 40px 30px;
        max-width: 90%;
    }
    
    .quote-success-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    
    .quote-success-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .quote-success-modal-content h2 {
        font-size: 24px;
    }
    
    .quote-success-modal-content p {
        font-size: 15px;
    }
    
    .final-cta {
        padding: 40px 20px;
    }
}
