/* Content Page Styles */

.content-title-section {
    padding: 120px 20px 40px 20px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.content-title-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border: 3px solid transparent;
    background-image:
        linear-gradient(white, white),
        linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #ec4899 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15);
    transition: all 0.3s ease;
}

.content-title-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.25);
}

.product-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.product-brand {
    color: #8b5cf6;
    font-weight: 600;
}

.product-model {
    color: #6b7280;
}

.content-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.content-description {
    font-size: 18px;
    color: #4b5563;
    line-height: 1.6;
}

/* Sale Button Section */
.content-sale-section {
    padding: 30px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.sale-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-label {
    font-size: 16px;
    color: #6b7280;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: #8b5cf6;
}

.sale-button {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
}

.sale-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5);
}

.sale-button:active {
    transform: translateY(0);
}

.button-icon {
    transition: transform 0.3s ease;
}

.sale-button:hover .button-icon {
    transform: translateX(4px);
}

/* Price Comparison Section */
.price-comparison-section {
    padding: 40px 20px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.price-comparison-container {
    max-width: 1200px;
    margin: 0 auto;
}

.price-comparison-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px 0;
    text-align: center;
}

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

.price-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.price-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.price-card--best {
    border: 2px solid #e5e7eb;
}

.price-sequence-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.best-price-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.price-card-seller {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    text-align: center;
}

.price-card-price {
    font-size: 28px;
    font-weight: 700;
    color: #8b5cf6;
    text-align: center;
}

.price-card-button {
    background: #8856F4;
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(136, 86, 244, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    margin-top: 8px;
}

.price-card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(136, 86, 244, 0.5);
    color: white;
}

.price-card-button--shopee {
    background: #EE4D2D;
    box-shadow: 0 4px 12px rgba(238, 77, 45, 0.4);
}

.price-card-button--shopee:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(238, 77, 45, 0.5);
    color: white;
}

.price-card-button--lazada {
    background: #272668;
    box-shadow: 0 4px 12px rgba(39, 38, 104, 0.4);
}

.price-card-button--lazada:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 38, 104, 0.5);
    color: white;
}

.price-card-button svg {
    transition: transform 0.3s ease;
}

.price-card-button:hover svg {
    transform: translateX(4px);
}

/* Table of Contents */
.content-toc-section {
    padding: 40px 20px;
    background: white;
}

.toc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.toc-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
}

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

.toc-item {
    margin-bottom: 8px;
}

.toc-link {
    display: block;
    padding: 8px 12px;
    color: #4b5563;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.toc-link:hover {
    background: white;
    color: #8b5cf6;
    padding-left: 16px;
}

/* Content Section */
.content-section {
    padding: 60px 20px;
    background: white;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #8b5cf6;
}

.section-image {
    margin-bottom: 24px;
}

.section-image > img,
.section-image img:not(.gallery-thumbnail):not(.gallery-main-image) {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Gallery Styles */
.section-gallery {
    position: relative;
}

.gallery-main {
    position: relative;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    touch-action: pan-y;
}

.gallery-main-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 #f3f4f6;
    max-width: 100%;
}

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

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

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

.gallery-thumbnail {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.gallery-thumbnail:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.gallery-thumbnail.active {
    border-color: #fbbf24;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

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

.gallery-nav:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-nav svg {
    color: #374151;
}

.gallery-nav-prev {
    left: 16px;
}

.gallery-nav-next {
    right: 16px;
}

.content-with-side-image {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

.section-image-side {
    margin-bottom: 0;
}

.section-image-side img {
    max-width: 100%;
}

.section-text {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}

.offer-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    text-decoration: none;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.offer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
    color: white;
}

/* Product Specifications */
.product-specs-section {
    padding: 60px 20px;
    background: white;
}

.specs-container {
    max-width: 1200px;
    margin: 0 auto;
}

.specs-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px 0;
}

.specs-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.specs-table table {
    width: 100%;
    border-collapse: collapse;
}

.spec-row {
    border-bottom: 1px solid #e5e7eb;
}

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

.spec-label {
    padding: 16px 24px;
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
    width: 30%;
}

.spec-value {
    padding: 16px 24px;
    color: #6b7280;
}

/* Rank Item (Top 5 ranking pages) */
.rank-item {
    padding: 60px 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.rank-item-container {
    max-width: 1200px;
    margin: 0 auto;
}

.rank-item-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.rank-badge {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.rank-item-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.rank-item-image {
    margin-bottom: 24px;
}

.rank-item-image img:not(.gallery-thumbnail):not(.gallery-main-image) {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rank-item-content {
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
}

/* Price Summary (all ranked items x affiliate platforms) */
.price-summary-section {
    padding: 40px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.price-summary-container {
    max-width: 1200px;
    margin: 0 auto;
}

.price-summary-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 20px 0;
    text-align: center;
}

.price-summary-scroll {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: white;
}

.price-summary-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.price-summary-table th,
.price-summary-table td {
    padding: 14px 16px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.price-summary-table th {
    background: #f3f4f6;
    font-weight: 600;
    color: #374151;
}

.price-summary-table tr:last-child td {
    border-bottom: none;
}

.price-summary-col-product {
    text-align: left;
    white-space: normal;
}

.price-summary-product-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #111827;
    font-weight: 600;
    text-decoration: none;
}

.price-summary-product-link:hover {
    color: #8b5cf6;
}

.price-summary-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 50%;
    background: #8b5cf6;
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.price-summary-price {
    font-weight: 600;
    color: #8b5cf6;
    margin-bottom: 6px;
}

.price-summary-buy-btn {
    display: inline-block;
    padding: 6px 16px;
    background: #8856F4;
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.price-summary-buy-btn:hover {
    transform: translateY(-2px);
    color: white;
}

.price-summary-empty {
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-title {
        font-size: 24px;
    }

    .content-description {
        font-size: 16px;
    }

    .section-title,
    .specs-title {
        font-size: 22px;
    }

    .content-with-side-image {
        grid-template-columns: 1fr;
    }

    .sale-container {
        flex-direction: column;
        align-items: stretch;
    }

    .sale-button {
        justify-content: center;
    }

    .price-comparison-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .price-card {
        padding: 20px;
    }

    .price-card-button {
        width: 100%;
        justify-content: center;
    }

    .rank-item-header {
        gap: 12px;
    }

    .rank-badge {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .rank-item-title {
        font-size: 22px;
    }

    .price-summary-title {
        font-size: 18px;
    }

    .spec-label,
    .spec-value {
        padding: 12px 16px;
        display: block;
        width: 100%;
    }

    .spec-label {
        padding-bottom: 4px;
    }

    .spec-value {
        padding-top: 4px;
    }

    .gallery-thumbnail {
        flex: 0 0 60px;
        width: 60px;
        height: 60px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
    }

    .gallery-nav-prev {
        left: 8px;
    }

    .gallery-nav-next {
        right: 8px;
    }

    .related-pages-container {
        padding: 30px 20px;
    }

    .related-pages-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
}

/* ============================================================================
   Related Pages Section
   ============================================================================ */
.related-pages-section {
    background: white;
    padding: 60px 20px;
    margin: 0 !important;
    width: 100%;
    box-sizing: border-box;
}

.related-pages-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.related-pages-title {
    font-size: 32px;
    font-weight: 700;
    color: #8B5CFC;
    margin: 0 0 40px 0;
    text-align: center;
}

.related-pages-section .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 0 auto;
}

.related-pages-section .category-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.related-pages-section .category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
}

.related-pages-section .category-card--post {
    flex-direction: column;
    padding: 0;
    border: 2px solid #e5e7eb;
}

.related-pages-section .category-card--post:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.02);
}

.related-pages-section .category-card--post .category-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.related-pages-section .card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f3f4f6;
}

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

.related-pages-section .category-card--post:hover .card-image img {
    transform: scale(1.05);
}

.related-pages-section .post-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.related-pages-section .post-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.related-pages-section .category-card--subcategory {
    border: 2px solid #e5e7eb;
    min-height: 140px;
    padding: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-pages-section .category-card--subcategory:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.02);
}

.related-pages-section .category-name {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.related-pages-section .category-name-th {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.related-pages-section .category-description {
    font-size: 13px;
    color: #9ca3af;
    margin: 8px 0 0 0;
    line-height: 1.5;
}
