/**
 * Product Reviews Enhanced Styles v1.3.6
 * สำหรับฟีเจอร์ใหม่:
 * - Product Gallery with Lightbox
 * - Trust Indicators
 * - Table of Contents
 * - Price Comparison
 * - FAQ Section
 * - Author Bio
 * - Social Proof
 * - Urgency Elements
 */

/* ========================================
   Product Gallery (v1.3.6)
   ======================================== */
.product-gallery {
    position: relative;
    width: 100%;
}

/* Main Image Display */
.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8f9fa;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.gallery-main:hover img {
    transform: scale(1.05);
}

/* Navigation Arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.95);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gallery-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.gallery-prev {
    left: 16px;
}

.gallery-next {
    right: 16px;
}

.gallery-nav svg {
    color: #2c3e50;
}

/* Image Counter */
.gallery-counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Zoom Button */
.gallery-zoom-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.95);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gallery-zoom-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.gallery-zoom-btn svg {
    color: #2c3e50;
}

/* Thumbnails */
.gallery-thumbnails {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f1f5f9;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.gallery-thumb:hover {
    border-color: #cbd5e0;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.gallery-thumb.active {
    border-color: #27AE60;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.gallery-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg) scale(1.1);
}

.lightbox-close svg {
    color: white;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 32px;
}

.lightbox-next {
    right: 32px;
}

.lightbox-nav svg {
    color: white;
}

.lightbox-counter {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.15);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
}

/* ========================================
   HIDE ZOOM/LIGHTBOX ON MOBILE & TABLET
   Only show on Desktop (1025px+)
   ======================================== */
@media (max-width: 1024px) {
    /* ซ่อนปุ่ม Zoom ในมือถือและแท็บเล็ต */
    .gallery-zoom-btn {
        display: none !important;
    }
    
    /* ปิดการใช้งาน Lightbox ในมือถือและแท็บเล็ต */
    .gallery-lightbox {
        display: none !important;
    }
    
    /* ซ่อนปุ่ม Navigation ในแกลเลอรี่หลัก (ถ้าไม่ต้องการ) */
    .gallery-nav {
        /* เก็บไว้ - ยังให้เปลี่ยนรูปได้ */
    }
}

/* Responsive: Product Gallery */
@media (max-width: 991px) {
    .gallery-main {
        border-radius: 12px;
    }
    
    .gallery-nav {
        width: 48px;
        height: 48px;
    }
    
    .gallery-nav svg {
        width: 24px;
        height: 24px;
    }
    
    .gallery-prev {
        left: 12px;
    }
    
    .gallery-next {
        right: 12px;
    }
    
    .gallery-zoom-btn {
        width: 48px;
        height: 48px;
        top: 12px;
        right: 12px;
    }
    
    .gallery-zoom-btn svg {
        width: 24px;
        height: 24px;
    }
    
    /* Touch feedback for mobile */
    .gallery-nav:active,
    .gallery-zoom-btn:active {
        transform: translateY(-50%) scale(0.95);
        background: rgba(255,255,255,1);
    }
    
    .gallery-zoom-btn:active {
        transform: scale(0.95);
    }
    
    .gallery-counter {
        bottom: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .gallery-thumbnails {
        gap: 8px;
        margin-top: 12px;
    }
    
    .gallery-thumb {
        width: 64px;
        height: 64px;
        border-radius: 8px;
    }
    
    .lightbox-close {
        top: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }
    
    .lightbox-nav {
        width: 48px;
        height: 48px;
    }
    
    .lightbox-prev {
        left: 16px;
    }
    
    .lightbox-next {
        right: 16px;
    }
    
    .lightbox-counter {
        bottom: 16px;
        padding: 8px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gallery-nav {
        width: 48px;
        height: 48px;
    }
    
    .gallery-nav svg {
        width: 24px;
        height: 24px;
    }
    
    .gallery-zoom-btn {
        width: 48px;
        height: 48px;
    }
    
    .gallery-zoom-btn svg {
        width: 24px;
        height: 24px;
    }
    
    /* Extended touch area for easier tapping */
    .gallery-nav::before,
    .gallery-zoom-btn::before {
        content: '';
        position: absolute;
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
        border-radius: 50%;
    }
    
    .gallery-thumb {
        width: 56px;
        height: 56px;
    }
}

/* Landscape mode on mobile */
@media (max-width: 991px) and (orientation: landscape) {
    .gallery-nav,
    .gallery-zoom-btn {
        width: 44px;
        height: 44px;
    }
    
    .gallery-nav svg,
    .gallery-zoom-btn svg {
        width: 22px;
        height: 22px;
    }
}

/* Touch device detection - disable hover, use active instead */
@media (hover: none) and (pointer: coarse) {
    .gallery-nav:hover,
    .gallery-zoom-btn:hover {
        transform: translateY(-50%);
    }
    
    .gallery-zoom-btn:hover {
        transform: none;
    }
    
    .gallery-nav:active,
    .gallery-zoom-btn:active {
        opacity: 0.9;
    }
}

/* ========================================
   Trust Indicators
   ======================================== */
.trust-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #495057;
    padding: 6px 12px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.trust-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.trust-item svg {
    flex-shrink: 0;
    color: #28a745;
}

.trust-item.live {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    font-weight: 500;
    animation: pulse 2s ease-in-out infinite;
}

.trust-item.live strong {
    font-weight: 700;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ========================================
   Table of Contents
   ======================================== */
.table-of-contents {
    padding: 32px 0;
    background: #f8f9fa;
}

.toc-box {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 2px solid #e9ecef;
    position: relative;
}

.toc-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
}

.toc-title svg {
    color: #27AE60;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 12px;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.toc-link:hover {
    background: #e7f5ff;
    border-left-color: #27AE60;
    color: #2c3e50;
    transform: translateX(4px);
}

.toc-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    background: #f8f9fa;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toc-toggle:hover {
    background: #e9ecef;
}

/* หุบเป็นค่าเริ่มต้น */
.toc-box.collapsed .toc-list {
    display: none;
}

.toc-box.collapsed .toc-toggle svg {
    transform: rotate(180deg);
}

/* ========================================
   Price Comparison
   ======================================== */
.price-comparison {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    border-radius: 12px;
    border: 2px solid #ffd699;
}

.comparison-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 16px 0;
}

.comparison-title svg {
    color: #ff9900;
}

.comparison-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comparison-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.platform {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.platform svg {
    width: 20px;
    height: 20px;
}

.price-tag {
    font-size: 18px;
    font-weight: 700;
    color: #27AE60;
}

.badge-best,
.badge-shipping,
.badge-coins {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-best {
    background: #d4edda;
    color: #155724;
}

.badge-shipping {
    background: #cce5ff;
    color: #004085;
}

.badge-coins {
    background: #fff3cd;
    color: #856404;
}

.comparison-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: #6c757d;
    font-style: italic;
}

.comparison-note svg {
    flex-shrink: 0;
    color: #ffc107;
}

/* ========================================
   Urgency Elements
   ======================================== */
.urgency-box {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border-radius: 10px;
    border: 2px solid #ffcccc;
}

.urgency-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 14px;
    color: #721c24;
}

.urgency-item:not(:last-child) {
    border-bottom: 1px solid #f8d7da;
}

.urgency-icon {
    font-size: 20px;
}

.urgency-text strong {
    color: #dc3545;
    font-weight: 700;
}

/* ========================================
   FAQ Section
   ======================================== */
.faq-section {
    padding: 48px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.faq-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: white;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.question-text {
    flex: 1;
}

.toggle-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item.active .toggle-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 24px 20px 60px;
    margin: 0;
    color: #495057;
    line-height: 1.7;
}

/* ========================================
   Related Articles (บทความที่เกี่ยวข้อง)
   ======================================== */
.related-articles-section {
    padding: 48px 0;
    background: #f8f9fa;
}

.related-articles-section .section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.related-articles-section .section-title svg {
    color: #27AE60;
}

.related-articles-section .section-subtitle {
    color: #6c757d;
    font-size: 15px;
    margin: 0 0 32px 0;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.related-article-card {
    display: block;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.related-article-card .article-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #e9ecef;
}

.related-article-card .article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-article-card:hover .article-thumb img {
    transform: scale(1.05);
}

.related-article-card .no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #adb5bd;
}

.related-article-card .article-info {
    padding: 16px;
}

.related-article-card .article-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #27AE60;
    background: #e8f5e9;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.related-article-card .article-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-card:hover .article-title {
    color: #27AE60;
}

.related-article-card .article-date {
    font-size: 12px;
    color: #6c757d;
}

.view-all-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #27AE60;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: #219150;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .related-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .related-articles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .related-article-card {
        display: flex;
        flex-direction: row;
    }
    
    .related-article-card .article-thumb {
        width: 120px;
        flex-shrink: 0;
        aspect-ratio: 1;
    }
    
    .related-article-card .article-info {
        padding: 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* ========================================
   Author Bio
   ======================================== */
.author-bio-section {
    padding: 48px 0;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.author-bio-box {
    display: flex;
    gap: 24px;
    padding: 32px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border: 2px solid #a5d6a7;
}

.author-avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #27AE60 0%, #2ECC40 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.author-info {
    flex: 1;
}

.author-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px 0;
}

.author-name svg {
    color: #27AE60;
}

.author-description {
    color: #495057;
    line-height: 1.7;
    margin: 0 0 16px 0;
}

.author-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.author-badges .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    border: 1px solid #dee2e6;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 991px) {
    .trust-indicators {
        gap: 8px;
        padding: 12px;
    }
    
    .trust-item {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .comparison-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .price-tag {
        font-size: 16px;
    }
    
    .platform {
        margin-bottom: 4px;
    }
    
    .badge-best,
    .badge-shipping,
    .badge-coins {
        justify-self: start;
    }
    
    .toc-box {
        padding: 20px;
    }
    
    .toc-toggle {
        top: 20px;
        right: 20px;
    }
    
    .faq-question {
        padding: 16px;
        font-size: 15px;
    }
    
    .faq-answer p {
        padding: 0 16px 16px 48px;
    }
    
    .author-bio-box {
        flex-direction: column;
        padding: 24px;
        text-align: center;
        align-items: center;
    }
    
    .author-avatar {
        width: 64px;
        height: 64px;
    }
    
    .author-name {
        justify-content: center;
        font-size: 20px;
    }
    
    .author-badges {
        justify-content: center;
    }
    
    .urgency-box {
        padding: 12px;
    }
    
    .urgency-item {
        font-size: 13px;
        padding: 8px 0;
    }
}

@media (max-width: 480px) {
    .trust-item {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .trust-item svg {
        width: 14px;
        height: 14px;
    }
    
    .toc-link {
        font-size: 14px;
        padding: 12px 14px;
    }
    
    .comparison-title {
        font-size: 16px;
    }
    
    .faq-icon {
        font-size: 20px;
    }
    
    .author-name {
        font-size: 18px;
    }
}

/* ========================================
   Smooth Scrolling
   ======================================== */
html {
    scroll-behavior: smooth;
}

/* Highlight animation when scrolling to section */
section[id]:target {
    animation: highlight 1s ease-in-out;
}

@keyframes highlight {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(39, 174, 96, 0.1);
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .trust-indicators,
    .toc-box,
    .urgency-box,
    .author-bio-section,
    .cta-buttons {
        display: none;
    }
}

/* ========================================
   Technical Specs Cards Layout (v1.3.5+)
   ======================================== */
.technical-specs-cards {
    padding: 48px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.technical-specs-cards .section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 32px 0;
    text-align: center;
    justify-content: center;
}

.technical-specs-cards .section-title svg {
    color: #27AE60;
}

.specs-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Spec Card Design */
.spec-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 3px solid transparent;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.spec-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.spec-card:hover::before {
    transform: scaleX(1);
}

.spec-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

/* Icon Container */
.spec-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: all 0.4s ease;
    position: relative;
}

.spec-card:hover .spec-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Color Themes */
.card-green {
    border-color: #a5d6a7;
}

.card-green .spec-icon {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(102, 187, 106, 0.4);
}

.card-purple {
    border-color: #ce93d8;
}

.card-purple .spec-icon {
    background: linear-gradient(135deg, #ab47bc 0%, #8e24aa 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(171, 71, 188, 0.4);
}

.card-blue {
    border-color: #90caf9;
}

.card-blue .spec-icon {
    background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(66, 165, 245, 0.4);
}

.card-orange {
    border-color: #ffcc80;
}

.card-orange .spec-icon {
    background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 167, 38, 0.4);
}

.card-red {
    border-color: #ef9a9a;
}

.card-red .spec-icon {
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(239, 83, 80, 0.4);
}

/* Card 6 - Teal/Cyan Theme */
.card-teal {
    border-color: #80deea;
}

.card-teal .spec-icon {
    background: linear-gradient(135deg, #26c6da 0%, #00acc1 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(38, 198, 218, 0.4);
}

/* Content */
.spec-content {
    position: relative;
}

.spec-label {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
}

.spec-value {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.4;
}

.spec-value.important {
    font-size: 20px;
    color: #ab47bc;
}

.spec-value.target-pests {
    font-size: 16px;
    line-height: 1.5;
}

/* Badge */
.spec-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #ab47bc 0%, #8e24aa 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(171, 71, 188, 0.3);
}

/* Hover Effects per Card */
.card-green:hover {
    border-color: #66bb6a;
    box-shadow: 0 12px 32px rgba(102, 187, 106, 0.25);
}

.card-purple:hover {
    border-color: #ab47bc;
    box-shadow: 0 12px 32px rgba(171, 71, 188, 0.25);
}

.card-blue:hover {
    border-color: #42a5f5;
    box-shadow: 0 12px 32px rgba(66, 165, 245, 0.25);
}

.card-orange:hover {
    border-color: #ffa726;
    box-shadow: 0 12px 32px rgba(255, 167, 38, 0.25);
}

.card-red:hover {
    border-color: #ef5350;
    box-shadow: 0 12px 32px rgba(239, 83, 80, 0.25);
}

.card-teal:hover {
    border-color: #26c6da;
    box-shadow: 0 12px 32px rgba(38, 198, 218, 0.25);
}

/* Animation on Load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spec-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.spec-card:nth-child(1) { animation-delay: 0.1s; }
.spec-card:nth-child(2) { animation-delay: 0.2s; }
.spec-card:nth-child(3) { animation-delay: 0.3s; }
.spec-card:nth-child(4) { animation-delay: 0.4s; }
.spec-card:nth-child(5) { animation-delay: 0.5s; }
.spec-card:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   Responsive Design for Spec Cards
   ======================================== */
@media (max-width: 1024px) {
    .specs-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 991px) {
    .technical-specs-cards {
        padding: 32px 0;
    }
    
    .technical-specs-cards .section-title {
        font-size: 24px;
    }
    
    .specs-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 14px;
    }
    
    .spec-card {
        padding: 20px;
    }
    
    .spec-icon {
        width: 56px;
        height: 56px;
    }
    
    .spec-value {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .specs-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .spec-card {
        padding: 18px;
    }
    
    .spec-icon {
        width: 52px;
        height: 52px;
    }
    
    .spec-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .spec-label {
        font-size: 13px;
    }
    
    .spec-value {
        font-size: 15px;
    }
}

/* ========================================
   Enhanced Taxonomy Section (v1.3.5+)
   ======================================== */
.product-taxonomy-section {
    padding: 48px 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.taxonomy-wrapper-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* Taxonomy Card Design */
.taxonomy-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.taxonomy-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

/* Category Card - Green Theme */
.category-card {
    border-color: #a5d6a7;
    background: linear-gradient(135deg, #ffffff 0%, #f1f8f4 100%);
}

.category-card:hover {
    border-color: #27AE60;
}

/* Tag Card - Blue Theme */
.tag-card {
    border-color: #90caf9;
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
}

.tag-card:hover {
    border-color: #2196f3;
}

/* Taxonomy Header */
.taxonomy-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.taxonomy-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.category-card .taxonomy-icon {
    background: linear-gradient(135deg, #27AE60 0%, #2ECC40 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.tag-card .taxonomy-icon {
    background: linear-gradient(135deg, #2196f3 0%, #42a5f5 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.taxonomy-card:hover .taxonomy-icon {
    transform: scale(1.1) rotate(5deg);
}

.taxonomy-title {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.taxonomy-count {
    background: #f8f9fa;
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    min-width: 32px;
    text-align: center;
}

/* Category Chips - Grid Layout */
.taxonomy-items-grid {
    display: grid;
    gap: 12px;
}

.taxonomy-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.taxonomy-chip::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #27AE60;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.taxonomy-chip:hover::before {
    transform: scaleY(1);
}

.taxonomy-chip:hover {
    border-color: #27AE60;
    background: #f8fdf9;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.15);
}

.chip-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #27AE60;
    flex-shrink: 0;
}

.chip-text {
    flex: 1;
    font-size: 15px;
}

.chip-count {
    background: #e8f5e9;
    color: #27AE60;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 16px;
    min-width: 28px;
    text-align: center;
}

/* Tag Chips - Flex Layout */
.taxonomy-items-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.taxonomy-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: white;
    border: 2px solid #bbdefb;
    border-radius: 24px;
    color: #1976d2;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.taxonomy-tag:hover {
    background: linear-gradient(135deg, #2196f3 0%, #42a5f5 100%);
    border-color: #2196f3;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.tag-hash {
    font-size: 16px;
    font-weight: 700;
    opacity: 0.7;
}

.tag-name {
    font-size: 14px;
}

/* Hover Animation */
@keyframes tagWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

.taxonomy-tag:hover {
    animation: tagWiggle 0.5s ease;
}

/* Empty State */
.taxonomy-card:empty::after {
    content: 'ยังไม่มีข้อมูล';
    display: block;
    text-align: center;
    padding: 20px;
    color: #adb5bd;
    font-style: italic;
}

/* ========================================
   Responsive Design for Taxonomy
   ======================================== */
@media (max-width: 991px) {
    .taxonomy-wrapper-enhanced {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .taxonomy-card {
        padding: 20px;
    }
    
    .taxonomy-header {
        gap: 10px;
    }
    
    .taxonomy-icon {
        width: 40px;
        height: 40px;
    }
    
    .taxonomy-title {
        font-size: 16px;
    }
    
    .taxonomy-chip {
        padding: 10px 14px;
    }
    
    .chip-text {
        font-size: 14px;
    }
    
    .taxonomy-tag {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .product-taxonomy-section {
        padding: 32px 0;
    }
    
    .taxonomy-card {
        padding: 16px;
    }
    
    .taxonomy-icon {
        width: 36px;
        height: 36px;
    }
    
    .taxonomy-title {
        font-size: 15px;
    }
    
    .chip-icon {
        width: 28px;
        height: 28px;
    }
    
    .taxonomy-items-flex {
        gap: 8px;
    }
}

/* ========================================
   Technical Specs Grid (v1.3.8)
   ======================================== */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.spec-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.spec-item:hover {
    border-color: #2ECC40;
    background: #f0fdf4;
}

.spec-icon-wrap {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    font-size: 1.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.spec-content {
    flex: 1;
    min-width: 0;
}

.spec-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.spec-value {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    word-break: break-word;
}

.spec-value-badge {
    margin-top: 4px;
}

/* Full width items */
.spec-item-full {
    grid-column: 1 / -1;
}

/* Highlight Yellow */
.spec-item-highlight-yellow {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border-color: #fcd34d;
}

.spec-item-highlight-yellow:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fef3c7 100%);
    border-color: #f59e0b;
}

.spec-item-highlight-yellow .spec-icon-wrap {
    background: #fff;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.spec-item-highlight-yellow .spec-label {
    color: #92400e;
}

.spec-item-highlight-yellow .spec-value {
    color: #78350f;
}

/* Highlight Green */
.spec-item-highlight-green {
    background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
    border-color: #86efac;
}

.spec-item-highlight-green:hover {
    background: linear-gradient(135deg, #bbf7d0 0%, #dcfce7 100%);
    border-color: #22c55e;
}

.spec-item-highlight-green .spec-icon-wrap {
    background: #fff;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

.spec-item-highlight-green .spec-label {
    color: #166534;
}

.spec-item-highlight-green .spec-value {
    color: #14532d;
}

/* Badge Important */
.spec-badge-important {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #ef4444;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Link Style */
.spec-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.spec-link:hover {
    color: #1d4ed8;
}

/* Responsive - Desktop */
@media (min-width: 1024px) {
    .specs-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        padding: 24px;
    }
    
    .spec-item-full {
        grid-column: span 2;
    }
}

/* Responsive - Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 20px;
    }
}

/* Responsive - Mobile */
@media (max-width: 767px) {
    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px;
        border-radius: 12px;
    }
    
    .spec-item {
        padding: 12px;
        gap: 10px;
        border-radius: 10px;
    }
    
    .spec-icon-wrap {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
        border-radius: 8px;
    }
    
    .spec-label {
        font-size: 0.6875rem;
    }
    
    .spec-value {
        font-size: 0.875rem;
    }
    
    .spec-badge-important {
        font-size: 0.5625rem;
        padding: 2px 6px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 374px) {
    .specs-grid {
        gap: 8px;
        padding: 10px;
    }
    
    .spec-item {
        padding: 10px;
        gap: 8px;
    }
    
    .spec-icon-wrap {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .spec-label {
        font-size: 0.625rem;
    }
    
    .spec-value {
        font-size: 0.8125rem;
    }
}
