/**
 * Item Detail Page Styles
 * Additional styles for product pages
 */

/* ============================================
   CLS PREVENTION - CRITICAL: Reserve exact space
   All values are FIXED to prevent layout shifts
   ============================================ */

/* Main section - fixed padding */
.item-detail {
    padding: 2rem 0 !important;
    contain: layout style;
}

/* Row structure */
.item-detail .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.item-detail .col-lg-8 {
    flex: 0 0 66.666%;
    max-width: 66.666%;
    padding: 0 0.75rem;
    min-height: 1200px;
}

.item-detail .col-lg-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 0.75rem;
}

/* Main article container */
.item-main {
    contain: layout style;
    min-height: 1200px;
}

/* Header section - FIXED heights for CLS prevention */
.item-header {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    contain: layout style;
    overflow: hidden;
}

.item-category-badge {
    height: 36px;
    min-height: 36px;
    margin-bottom: 1rem;
    display: block;
    contain: layout;
}

.item-category-badge a {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 1.25rem;
    background: var(--primary-color, #6366f1);
    color: #fff;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
}

.item-title {
    height: 72px;
    min-height: 72px;
    max-height: 72px;
    margin-bottom: 1rem;
    overflow: hidden;
    line-height: 1.2;
}

/* Meta bar - CRITICAL for CLS - FIXED HEIGHT */
.item-meta-bar {
    height: 80px;
    min-height: 80px;
    max-height: 80px;
    padding: 1rem;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1rem;
    contain: layout style;
    overflow: hidden;
    background: #f9fafb;
    border-radius: 8px;
}

.item-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.stars {
    display: inline-flex;
    height: 20px;
    width: 90px;
    align-items: center;
    flex-shrink: 0;
}

.star {
    width: 16px;
    height: 16px;
    min-width: 16px;
    display: inline-block;
    flex-shrink: 0;
}

.rating-text {
    white-space: nowrap;
    flex-shrink: 0;
}

.item-stats {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1rem;
}

.stat-item {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* Hero image - FIXED HEIGHT, background-image approach for zero CLS */
.item-hero-image {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 450px;
    min-height: 450px;
    max-height: 450px;
    margin: 16px 0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #e5e7eb;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    contain: size layout style;
}

/* Download section - FIXED HEIGHT */
.download-section {
    height: 140px;
    min-height: 140px;
    max-height: 140px;
    padding: 1.5rem;
    margin: 1rem 0 2rem;
    contain: layout style;
    overflow: hidden;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
}

.btn-download-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    height: 56px;
    background: #fff;
    color: #059669;
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-download-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.download-note {
    margin-top: 0.75rem;
    color: rgba(255,255,255,0.9);
    font-size: 0.875rem;
    text-align: center;
}

/* Sidebar widgets - fixed heights */
.item-sidebar {
    min-height: 600px;
}

.widget {
    min-height: 100px;
    margin-bottom: 1.5rem;
    contain: layout;
}

.widget-download {
    min-height: 200px;
}

.widget-author {
    min-height: 180px;
}

.widget-info {
    min-height: 280px;
}

.widget-share {
    min-height: 100px;
}

.widget-tags {
    min-height: 80px;
}

/* Related section */
.related-section-compact {
    min-height: 400px;
    contain: layout;
}

.related-item-compact {
    min-height: 80px;
}

.related-item-thumb {
    width: 80px;
    height: 60px;
    min-width: 80px;
    min-height: 60px;
}

/* FAQ section */
.faq-section {
    min-height: 300px;
}

.faq-item {
    min-height: 52px;
}

/* Reviews section */
.reviews-section {
    min-height: 200px;
}

/* Mobile responsive */
@media (max-width: 991px) {
    .item-detail .col-lg-8,
    .item-detail .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .item-detail .col-lg-8 {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .item-hero-image {
        height: 250px;
        min-height: 250px;
        max-height: 250px;
    }

    .item-header {
        min-height: 120px;
    }

    .item-title {
        min-height: 40px;
    }

    .item-meta-bar {
        min-height: 100px;
    }

    body {
        padding-bottom: 70px !important;
    }

    .item-sidebar {
        min-height: auto;
    }
}

/* ============================================
   MOBILE DOWNLOAD BAR - Fixed position
   ============================================ */
.mobile-download-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 768px) {
    .mobile-download-bar {
        display: flex;
    }
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    background: var(--bg-secondary);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    color: var(--text-tertiary);
}

.breadcrumb li:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* ============================================
   ITEM HEADER
   ============================================ */
.item-detail {
    padding: var(--space-2xl) 0;
}

.item-header {
    margin-bottom: var(--space-2xl);
}

.item-category-badge {
    margin-bottom: var(--space-md);
}

.item-category-badge a {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.item-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
    align-items: center;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.item-rating {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.rating-text {
    font-size: 0.938rem;
    color: var(--text-secondary);
}

.item-stats {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-item svg {
    color: var(--primary);
}

.stat-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================
   ITEM THUMBNAIL
   ============================================ */
.item-thumbnail-large {
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.item-thumbnail-large img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   DOWNLOAD SECTION
   ============================================ */
.download-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.btn-download-large {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    background: white;
    color: var(--primary);
    padding: 1.25rem 3rem;
    border-radius: var(--radius-full);
    font-size: 1.125rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    margin-bottom: var(--space-md);
}

.btn-download-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: var(--primary-dark);
}

.download-note {
    color: white;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ============================================
   SCREENSHOTS GALLERY
   ============================================ */
.item-screenshots {
    margin-bottom: var(--space-2xl);
}

.item-screenshots h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.screenshot-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    cursor: pointer;
    background: var(--bg-secondary);
}

.screenshot-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-base);
}

.screenshot-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .screenshots-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ITEM DESCRIPTION
   ============================================ */
.item-description,
.item-features {
    margin-bottom: var(--space-2xl);
}

.item-description h2,
.item-features h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.item-description p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
    color: var(--text-secondary);
}

.item-description ul,
.item-description ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-xl);
    list-style: disc;
}

.item-description li {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
    margin: var(--space-lg) 0;
}

.features-list li {
    padding: var(--space-sm) 0;
    padding-left: var(--space-lg);
    position: relative;
    line-height: 1.6;
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: bold;
}

/* ============================================
   WHAT YOU GET SECTION
   ============================================ */
.what-you-get-section {
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-3xl);
    padding: var(--space-2xl);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius-lg);
}

.what-you-get-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-xl);
    text-align: center;
    color: var(--text-primary);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.benefit-item {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.benefit-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.benefit-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-success);
}

.benefit-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   INSTALLATION GUIDE
   ============================================ */
.installation-guide {
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.installation-guide h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-xl);
    color: var(--text-primary);
}

.installation-guide h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.install-steps {
    background: var(--bg-secondary);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
}

.steps-list {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
    margin-top: var(--space-lg);
}

.steps-list li {
    counter-increment: step-counter;
    padding: var(--space-md) 0;
    padding-left: var(--space-2xl);
    position: relative;
    line-height: 1.8;
    border-bottom: 1px solid var(--border-color);
}

.steps-list li:last-child {
    border-bottom: none;
}

.steps-list li:before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: var(--space-md);
    width: 30px;
    height: 30px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
}

.steps-list li strong {
    color: var(--color-primary);
}

.installation-note {
    background: #fff3cd;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid #ffc107;
}

.installation-note h3 {
    margin-top: 0;
    color: #856404;
}

.installation-note p {
    margin: var(--space-sm) 0 0;
    color: #856404;
}

/* ============================================
   REVIEWS
   ============================================ */
.reviews-section {
    margin-top: var(--space-3xl);
    padding-top: var(--space-3xl);
    border-top: 2px solid var(--border-color);
}

.reviews-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-xl);
}

.no-reviews {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--text-tertiary);
    font-size: 1.125rem;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.review-item {
    background: var(--bg-secondary);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
    gap: var(--space-md);
}

.review-author {
    flex: 1;
}

.review-author strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.review-rating {
    display: flex;
    gap: 0.25rem;
}

.review-date {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.review-content {
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */
.item-sidebar .widget {
    margin-bottom: var(--space-xl);
}

.widget-download {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border: 2px solid var(--primary);
}

.download-info {
    margin-bottom: var(--space-lg);
}

.download-info li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.download-info li:last-child {
    border-bottom: none;
}

.download-info .label {
    font-weight: 600;
    color: var(--text-secondary);
}

.download-info .value {
    font-weight: 600;
    color: var(--text-primary);
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.btn-download:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* ============================================
   SHARE WIDGET
   ============================================ */
.share-buttons {
    display: flex;
    gap: var(--space-sm);
}

.share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.whatsapp {
    background: #25d366;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   USER REVIEWS SECTION
   ============================================ */
.reviews-section {
    margin-top: var(--space-3xl);
    padding-top: var(--space-3xl);
    border-top: 2px solid var(--border-color);
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.reviews-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.reviews-summary {
    text-align: right;
}

.rating-big {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.rating-big .rating-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.rating-big .rating-stars {
    display: flex;
    gap: 2px;
}

.rating-big .rating-stars .star {
    font-size: 1.25rem;
    color: var(--gray-300);
}

.rating-big .rating-stars .star.filled {
    color: #fbbf24;
}

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

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.review-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
    gap: var(--space-md);
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.reviewer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.reviewer-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reviewer-name {
    font-weight: 600;
    color: var(--text-primary);
}

.reviewer-location {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 500;
}

.review-rating {
    display: flex;
    gap: 2px;
}

.review-rating .star {
    font-size: 1rem;
    color: var(--gray-300);
}

.review-rating .star.filled {
    color: #fbbf24;
}

.review-content {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.review-footer {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.review-date {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.helpful-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.helpful-count svg {
    color: var(--success);
}

/* ============================================
   RELATED ITEMS - SEO OPTIMIZED
   ============================================ */
.related-section-compact {
    margin-top: var(--space-2xl);
    padding: var(--space-xl);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
}

.related-section-compact h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.related-intro {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.5;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.related-item-compact {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}

.related-item-compact:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.related-item-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    text-decoration: none;
    color: inherit;
}

.related-item-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
}

.related-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-fast);
}

.related-item-compact:hover .related-item-thumb img {
    transform: scale(1.05);
}

.related-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.related-item-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    transition: color var(--transition-fast);
}

.related-item-compact:hover .related-item-title {
    color: var(--primary);
}

.related-item-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    font-size: 0.75rem;
}

.related-item-cat {
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.related-item-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--text-secondary);
}

.related-item-rating .star {
    color: #fbbf24;
    font-size: 0.8rem;
}

.related-item-downloads {
    color: var(--text-tertiary);
}

.related-item-price {
    margin-top: 2px;
}

.price-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-arrow {
    color: var(--text-tertiary);
    flex-shrink: 0;
    opacity: 0;
    transition: all var(--transition-fast);
    transform: translateX(-4px);
}

.related-item-compact:hover .related-arrow {
    opacity: 1;
    color: var(--primary);
    transform: translateX(0);
}

/* View More Button */
.related-view-more {
    margin-top: var(--space-lg);
    text-align: center;
}

.btn-view-more {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-view-more:hover {
    background: var(--primary);
    color: white;
}

.btn-view-more svg {
    transition: transform var(--transition-fast);
}

.btn-view-more:hover svg {
    transform: translateX(4px);
}

/* Legacy support */
.related-section {
    margin-top: var(--space-3xl);
    padding-top: var(--space-3xl);
    border-top: 2px solid var(--border-color);
}

.related-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-xl);
}

/* ============================================
   FAQ SECTION - Google Rich Results
   ============================================ */
.faq-section {
    margin-top: var(--space-3xl);
    padding-top: var(--space-2xl);
    border-top: 2px solid var(--border-color);
}

.faq-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xl);
    color: var(--text-primary);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.faq-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-item.active {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question span {
    flex: 1;
}

.faq-icon {
    flex-shrink: 0;
    color: var(--text-tertiary);
    transition: transform var(--transition-fast);
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 var(--space-lg) var(--space-lg);
}

.faq-answer div {
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-color);
}

.faq-answer p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer strong {
    color: var(--text-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .item-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .item-stats {
        width: 100%;
        flex-direction: column;
        gap: var(--space-md);
    }

    .review-header {
        flex-direction: column;
    }

    .share-buttons {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .item-title {
        font-size: 1.5rem;
    }

    .btn-download-large {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   PRICE SECTION
   ============================================ */
.price-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: var(--space-lg);
    color: white;
}

.price-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: var(--space-sm);
}

.price-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.price-note {
    font-size: 0.75rem;
    opacity: 0.8;
}

.download-note {
    text-align: center;
    margin-top: var(--space-md);
    color: var(--text-secondary);
}

.download-note small {
    font-size: 0.875rem;
}

/* ============================================
   AUTHOR WIDGET
   ============================================ */
.widget-author {
    background: var(--bg-primary);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-lg);
}

.widget-author h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.author-info {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-lg);
}

.author-avatar {
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.author-details {
    flex: 1;
}

.author-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.author-link {
    font-size: 0.875rem;
    color: var(--primary);
    transition: color var(--transition-fast);
}

.author-link:hover {
    color: var(--primary-dark);
}

.author-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ============================================
   ITEM INFO WIDGET
   ============================================ */
.widget-info {
    background: var(--bg-primary);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-lg);
}

.widget-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

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

.item-meta-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-color);
    gap: var(--space-md);
}

.item-meta-list li:last-child {
    border-bottom: none;
}

.meta-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.meta-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

.meta-link {
    color: var(--primary);
    transition: color var(--transition-fast);
}

.meta-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}


/* ============================================
   NULLED BADGE
   ============================================ */
.nulled-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF4757 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: var(--space-md);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 71, 87, 0.5);
    }
}

.nulled-badge::before {
    content: '🔓 ';
}

/* ============================================
   CORE WEB VITALS - LCP & CLS OPTIMIZATION
   Hero image uses background-image (no img tag)
   ============================================ */
.item-thumbnail-large img {
    content-visibility: auto;
    contain-intrinsic-size: 1200px 630px;
}

/* Prevent CLS for other elements */
.item-thumbnail-large,
.screenshot-item {
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);
}

.popular-item-thumb {
    aspect-ratio: 1;
}

/* ============================================
   MOBILE FIRST - GOOGLE DISCOVER MOBILE
   ============================================ */
@media (max-width: 768px) {
    /* Touch-friendly tap targets (min 48px) */
    .btn-download,
    .btn-download-large,
    .share-btn {
        min-height: 48px;
        min-width: 48px;
    }

    /* Optimize text for mobile reading */
    .item-title {
        font-size: 1.375rem;
        line-height: 1.3;
    }

    .item-description p,
    .review-content {
        font-size: 1rem;
        line-height: 1.75;
    }

    /* Full-width hero image on mobile - keep fixed height */
    .item-hero-image {
        height: 250px;
        min-height: 250px;
        max-height: 250px;
        margin-left: calc(var(--space-md) * -1);
        margin-right: calc(var(--space-md) * -1);
        border-radius: 0;
        width: calc(100% + var(--space-md) * 2);
    }

    /* Sticky download button on mobile */
    .mobile-download-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        padding: var(--space-md);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        z-index: 100;
        display: flex;
        gap: var(--space-md);
        align-items: center;
        border-top: 1px solid var(--border-color);
    }

    .mobile-download-bar .price-info {
        flex: 1;
    }

    .mobile-download-bar .price-original {
        font-size: 0.75rem;
        color: var(--text-tertiary);
        text-decoration: line-through;
    }

    .mobile-download-bar .price-free {
        font-size: 1.25rem;
        font-weight: 800;
        color: var(--success);
    }

    .mobile-download-bar .btn-download {
        flex: 1;
        margin: 0;
    }

    /* Add bottom padding to prevent content hidden by sticky bar */
    .item-detail {
        padding-bottom: 80px;
    }

    /* Optimize meta bar for mobile */
    .item-meta-bar {
        padding: var(--space-md);
        gap: var(--space-sm);
    }

    .stat-item {
        font-size: 0.8rem;
    }

    /* Better mobile cards */
    .benefit-item {
        padding: var(--space-md);
    }

    .install-steps {
        padding: var(--space-md);
    }

    .steps-list li {
        padding-left: var(--space-xl);
        font-size: 0.9rem;
    }

    .steps-list li:before {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    /* Reviews mobile */
    .reviews-header {
        flex-direction: column;
        text-align: center;
    }

    .reviews-summary {
        text-align: center;
    }

    .reviewer-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Related items scroll on mobile */
    .related-items-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: var(--space-md);
        padding-bottom: var(--space-md);
        -webkit-overflow-scrolling: touch;
    }

    .related-items-grid .item-card {
        flex: 0 0 280px;
        scroll-snap-align: start;
    }

    /* Hide scrollbar but keep functionality */
    .related-items-grid::-webkit-scrollbar {
        height: 4px;
    }

    .related-items-grid::-webkit-scrollbar-track {
        background: var(--bg-secondary);
        border-radius: 4px;
    }

    .related-items-grid::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 4px;
    }
}

/* ============================================
   TABLET OPTIMIZATIONS
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .item-hero-image {
        height: 350px;
        min-height: 350px;
        max-height: 350px;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
@media (prefers-color-scheme: dark) {
    .installation-note {
        background: rgba(255, 193, 7, 0.1);
        border-left-color: #ffc107;
    }

    .installation-note h3,
    .installation-note p {
        color: #ffd54f;
    }

    .what-you-get-section {
        background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    }

    .benefit-item {
        background: var(--bg-secondary);
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .mobile-download-bar,
    .share-buttons,
    .sidebar,
    .site-header,
    .site-footer,
    .ad-slot {
        display: none !important;
    }

    .item-hero-image {
        height: auto;
        min-height: 200px;
        max-height: 400px;
    }
}
