/* Product Detail Page - Amazon Style */

/* Import Amazon base styles */
@import url('amazon-style.css');

/* Product Detail Specific Styles */
.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin: var(--spacing-lg) 0;
    background: white;
    padding: var(--spacing-lg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

/* Product Images Section */
.product-images {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.main-image-container {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    position: relative;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: scale(1.1);
}

.image-gallery {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    padding: var(--spacing-sm) 0;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    object-fit: contain;
    background: white;
    transition: border-color 0.2s ease;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--amazon-orange);
}

/* Product Info Section */
.product-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.brand {
    font-size: var(--font-size-sm);
    color: var(--text-link);
    text-decoration: none;
    font-weight: 400;
}

.brand:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

.product-info h1 {
    font-size: var(--font-size-xl);
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-primary);
    margin: 0;
}

.price {
    font-size: var(--font-size-xxl);
    font-weight: 400;
    color: var(--color-warning);
    margin: var(--spacing-md) 0;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-sm);
}

.price-original {
    font-size: var(--font-size-md);
    color: var(--text-secondary);
    text-decoration: line-through;
}

.price-discount {
    font-size: var(--font-size-sm);
    color: var(--color-warning);
    background: var(--amazon-yellow);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* Key Features */
.bullet-points {
    margin: var(--spacing-lg) 0;
}

.bullet-points h3 {
    font-size: var(--font-size-md);
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.bullet-points ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bullet-points li {
    padding: var(--spacing-xs) 0;
    position: relative;
    padding-left: var(--spacing-lg);
    font-size: var(--font-size-sm);
    line-height: 1.4;
    color: var(--text-primary);
}

.bullet-points li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: bold;
    font-size: var(--font-size-md);
}

/* Call to Action Section */
.cta-section {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.btn-amazon {
    width: 100%;
    padding: var(--spacing-md);
    font-size: var(--font-size-md);
    font-weight: 500;
    text-align: center;
    background: var(--amazon-orange);
    color: white;
    border: 1px solid var(--amazon-orange);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.btn-amazon:hover {
    background: #fa8900;
    border-color: #fa8900;
}

/* Product Description Section */
.description-section {
    margin: var(--spacing-xl) 0;
    background: white;
    padding: var(--spacing-lg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.description-section h3 {
    font-size: var(--font-size-lg);
    font-weight: 500;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--spacing-md);
}

.description-content {
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
}

.rich-text-content {
    margin: 0;
}

.rich-text-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: var(--spacing-md) 0;
    border: 1px solid var(--border-light);
}

.rich-text-content h1,
.rich-text-content h2,
.rich-text-content h3 {
    font-weight: 500;
    color: var(--text-primary);
    margin: var(--spacing-lg) 0 var(--spacing-md);
}

.rich-text-content p {
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.rich-text-content ul,
.rich-text-content ol {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-lg);
}

.rich-text-content li {
    margin-bottom: var(--spacing-xs);
    line-height: 1.5;
}

/* Related Products Section */
.related-products {
    margin: var(--spacing-xl) 0;
    background: white;
    padding: var(--spacing-lg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.related-products h2 {
    font-size: var(--font-size-lg);
    font-weight: 500;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--spacing-md);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--spacing-md);
}

.related-item {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    transition: all 0.2s ease;
    background: white;
}

.related-item:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-sm);
}

.related-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
    background: var(--bg-secondary);
}

.related-item-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.related-item h3 {
    font-size: var(--font-size-sm);
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-primary);
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-item .price {
    font-size: var(--font-size-md);
    font-weight: 500;
    color: var(--color-warning);
    margin: var(--spacing-xs) 0;
}

.related-item a {
    font-size: var(--font-size-sm);
    color: var(--text-link);
    text-decoration: none;
    padding: var(--spacing-xs) 0;
    border-top: 1px solid var(--border-light);
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    text-align: center;
}

.related-item a:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

/* Image Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
}

.modal-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.close:hover {
    color: var(--amazon-orange);
}

/* Modal Navigation Arrows */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 2001;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.modal-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    color: var(--amazon-orange);
}

.modal-nav.prev {
    left: 30px;
}

.modal-nav.next {
    right: 30px;
}

.modal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.modal-nav:disabled:hover {
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

/* Modal Image Counter */
.modal-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 2001;
}

/* Amazon-style Image Zoom Effects */
.main-image-container {
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.main-image-container:hover .zoom-hint {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-lens {
    position: absolute;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    width: 100px;
    height: 100px;
    display: none;
    pointer-events: none;
    z-index: 10;
    background: rgba(255,255,255,0.1);
}

.zoom-preview {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 20px;
    width: 400px;
    height: 400px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: none;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 20;
}

.zoom-preview img {
    width: 800px;
    height: 800px;
    object-fit: cover;
    transform-origin: 0 0;
}

.zoom-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.zoom-hint i {
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .zoom-preview {
        left: -420px;
        width: 350px;
        height: 350px;
    }
    
    .zoom-preview img {
        width: 700px;
        height: 700px;
    }
}

@media (max-width: 768px) {
    .main-image-container {
        cursor: pointer;
    }
    
    .zoom-lens,
    .zoom-preview {
        display: none !important;
    }
    
    .zoom-hint span {
        display: none;
    }
    
    .zoom-hint {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        bottom: 15px;
        right: 15px;
        left: auto;
        transform: none;
    }
}

/* Amazon-style Image Zoom Effects */
.main-image-container:hover .zoom-hint {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-lens {
    position: absolute;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    width: 100px;
    height: 100px;
    display: none;
    pointer-events: none;
    z-index: 10;
    background: rgba(255,255,255,0.1);
}

.zoom-preview {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 20px;
    width: 400px;
    height: 400px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: none;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 20;
}

.zoom-preview img {
    width: 800px;
    height: 800px;
    object-fit: cover;
    transform-origin: 0 0;
}

.zoom-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.zoom-hint i {
    font-size: 14px;
}

/* Responsive Design for Product Detail */
@media (max-width: 1024px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .zoom-preview {
        left: -420px;
        width: 350px;
        height: 350px;
    }
    
    .zoom-preview img {
        width: 700px;
        height: 700px;
    }
}

@media (max-width: 768px) {
    .product-container {
        padding: var(--spacing-md);
        margin: var(--spacing-md) 0;
    }
    
    .main-image-container {
        max-width: 100%;
        cursor: pointer;
    }
    
    .image-gallery {
        justify-content: center;
    }
    
    .gallery-thumb {
        width: 50px;
        height: 50px;
    }
    
    .product-info h1 {
        font-size: var(--font-size-lg);
    }
    
    .price {
        font-size: var(--font-size-xl);
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .description-section,
    .related-products {
        padding: var(--spacing-md);
    }
    
    .zoom-lens,
    .zoom-preview {
        display: none !important;
    }
    
    .zoom-hint span {
        display: none;
    }
    
    .zoom-hint {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        bottom: 15px;
        right: 15px;
        left: auto;
        transform: none;
    }
}

@media (max-width: 480px) {
    .product-container {
        padding: var(--spacing-sm);
    }
    
    .gallery-thumb {
        width: 40px;
        height: 40px;
    }
    
    .bullet-points li {
        font-size: var(--font-size-xs);
    }
    
    .related-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .related-item {
        padding: var(--spacing-sm);
    }
}

/* Rating & Reviews (if you add this feature) */
.product-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.rating-stars {
    color: var(--amazon-orange);
    font-size: var(--font-size-md);
    letter-spacing: 2px;
}

.rating-text {
    font-size: var(--font-size-sm);
    color: var(--text-link);
    text-decoration: none;
}

.rating-text:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

.rating-count {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Additional Product Info */
.product-details {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.product-details h4 {
    font-size: var(--font-size-md);
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.product-specs {
    display: grid;
    gap: var(--spacing-sm);
}

.spec-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    padding: var(--spacing-sm);
    border-bottom: 1px solid var(--border-light);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.spec-value {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
} 