﻿/* Product Page Specific Styles */
.product-hero {
    padding: 30px 0;
}

.product-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: 190px;
}

.gallery-main {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    margin-bottom: 14px;
    position: relative;
    border: 1px solid var(--border-light);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

    .gallery-placeholder i {
        font-size: 44px;
        color: var(--primary);
    }

.gallery-placeholder-sm {
    min-height: 220px;
}

    .gallery-main img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: opacity 0.3s;
    }

.gallery-zoom-btn {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.gallery-thumb {
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    background: var(--card-bg);
}

    .gallery-thumb.active {
        border-color: var(--primary);
    }

    .gallery-thumb:hover {
        transform: translateY(-2px);
    }

    .gallery-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.product-details h1 {
    font-size: 26px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.product-intro {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-summary {
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 18px;
}

.product-meta-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.product-rating-big {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

    .product-rating-big .stars {
        color: var(--warning);
        font-size: 16px;
    }

.product-sku {
    color: var(--text-muted);
    font-size: 13px;
}

.viewing-now {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--success-light);
    color: var(--success);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

    .viewing-now::before {
        content: '';
        width: 8px;
        height: 8px;
        background: var(--success);
        border-radius: 50%;
        animation: pulse 2s infinite;
    }

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.product-price-box {
    background: linear-gradient(135deg, var(--primary-bg), white);
    border: 2px solid var(--primary-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.price-discount-badge {
    display: inline-block;
    background: var(--action);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.price-current {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

    .price-current small {
        font-size: 16px;
        color: var(--text-muted);
        font-weight: 500;
    }

.price-original {
    font-size: 16px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-top: 6px;
}

.price-savings {
    margin-top: 10px;
    font-size: 13px;
    color: var(--success);
    font-weight: 600;
}

.product-features {
    margin-bottom: 24px;
}

    .product-features li {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 0;
        font-size: 14px;
        border-bottom: 1px dashed var(--border-light);
    }

        .product-features li:last-child {
            border-bottom: none;
        }

    .product-features i {
        color: var(--success);
        font-size: 16px;
        width: 22px;
    }

.buy-section {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

    .buy-section .btn-main-buy {
        width: 100%;
        padding: 18px;
        font-size: 18px;
        margin-bottom: 12px;
    }

.buy-secondary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

.product-wishlist-btn {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .18s, border-color .18s, color .18s, opacity .18s;
}

.product-wishlist-btn i {
    font-size: 16px;
    transition: color .15s;
}

.product-wishlist-btn:not(.is-active):hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fff0f0;
}

.product-wishlist-btn.is-active {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.product-wishlist-btn.is-active:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.product-wishlist-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.purchase-note {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--primary-bg);
    color: var(--text);
    font-size: 13px;
    line-height: 1.9;
}

    .buy-secondary .btn {
        padding: 12px;
        font-size: 13px;
    }

.trust-signals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.trust-signal {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

    .trust-signal i {
        color: var(--primary);
        font-size: 18px;
        background: var(--primary-bg);
        width: 36px;
        height: 36px;
        border-radius: var(--radius-sm);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .trust-signal strong {
        display: block;
        font-size: 13px;
    }

    .trust-signal span {
        color: var(--text-muted);
        font-size: 11px;
    }

.file-info {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
}

    .file-info h3 {
        font-size: 15px;
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.file-info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.file-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px dashed var(--border);
}

    .file-info-item:last-child {
        border-bottom: none;
    }

    .file-info-item span:first-child {
        color: var(--text-muted);
    }

    .file-info-item span:last-child {
        font-weight: 600;
    }

/* Sticky Buy Bar */
.product-sticky-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 12px 0;
    z-index: 99;
    transform: translateY(-100%);
    transition: transform 0.3s;
}

    .product-sticky-bar.active {
        transform: translateY(0);
    }

.sticky-bar-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sticky-bar-product {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

    .sticky-bar-product img {
        width: 50px;
        height: 50px;
        border-radius: var(--radius-sm);
        object-fit: cover;
    }

.sticky-bar-info {
    flex: 1;
    min-width: 0;
}

    .sticky-bar-info h4 {
        font-size: 14px;
        margin-bottom: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.sticky-bar-price {
    font-weight: 800;
    color: var(--primary);
}

/* Tabs */
.product-tabs {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 30px;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    overflow-x: auto;
}

.tab-btn {
    padding: 18px 24px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .tab-btn:hover {
        color: var(--primary);
    }

    .tab-btn.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
    }

.tab-contents {
    padding: 30px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s;
}

    .tab-content.active {
        display: block;
    }

    .tab-content h3 {
        font-size: 18px;
        margin-bottom: 14px;
        margin-top: 20px;
    }

        .tab-content h3:first-child {
            margin-top: 0;
        }

    .tab-content p {
        color: var(--text);
        line-height: 1.9;
        margin-bottom: 14px;
    }

.seo-content {
    line-height: 1.95;
}

    .seo-content h2,
    .seo-content h3,
    .seo-content h4 {
        margin-top: 22px;
        margin-bottom: 12px;
    }

    .seo-content ul,
    .seo-content ol {
        padding-right: 20px;
        margin-bottom: 14px;
    }

    .seo-content li {
        margin-bottom: 8px;
    }

.product-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.highlight-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 18px;
    background: var(--card-bg);
}

    .highlight-card h3 {
        margin-top: 0;
    }

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
}

    .tab-content ul {
        padding-right: 20px;
        margin-bottom: 14px;
    }

        .tab-content ul li {
            position: relative;
            padding-right: 20px;
            margin-bottom: 8px;
            line-height: 1.8;
        }

            .tab-content ul li::before {
                content: '✓';
                position: absolute;
                right: 0;
                color: var(--success);
                font-weight: 700;
            }

/* Reviews */
.review-summary {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    padding: 24px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
}

.review-average {
    text-align: center;
}

.review-average-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.review-average-stars {
    color: var(--warning);
    font-size: 18px;
    margin: 8px 0;
}

.review-average-total {
    color: var(--text-muted);
    font-size: 13px;
}

.review-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.review-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.review-bar-label {
    width: 80px;
}

.review-bar-track {
    flex: 1;
    height: 8px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.review-bar-fill {
    height: 100%;
    background: var(--warning);
    border-radius: var(--radius-full);
}

.review-bar-count {
    width: 40px;
    text-align: left;
    color: var(--text-muted);
}

.review-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

    .review-item:last-child {
        border-bottom: none;
    }

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.review-author-name {
    font-weight: 700;
    font-size: 14px;
}

.review-date {
    color: var(--text-muted);
    font-size: 12px;
}

.review-verified {
    background: var(--success-light);
    color: var(--success);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.review-text {
    color: var(--text);
    line-height: 1.8;
    font-size: 14px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.review-empty {
    text-align: center;
    padding: 36px 20px;
    color: var(--text-muted);
}

    .review-empty i {
        font-size: 38px;
        margin-bottom: 12px;
        color: var(--primary);
    }

/* FAQ */
.faq-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    width: 100%;
    text-align: right;
    background: none;
    transition: var(--transition);
}

    .faq-question:hover {
        color: var(--primary);
    }

    .faq-question i {
        transition: var(--transition);
    }

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-item.active .faq-question {
    color: var(--primary);
    border-bottom: 1px solid var(--border-light);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    padding: 16px 20px;
    max-height: 500px;
}

.related-link {
    text-decoration: none;
}

.review-form-card {
    margin-bottom: 28px;
    padding: 24px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.04), rgba(255, 255, 255, 1));
}

.review-form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.review-form-head h2 {
    margin-bottom: 6px;
    font-size: 20px;
}

.review-form-head p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.9;
}

.review-author-badge,
.review-alert {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
}

.review-author-badge {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

.review-alert {
    margin-bottom: 16px;
}

.review-alert-success {
    background: var(--success-light);
    color: var(--success);
}

.review-validation {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    font-size: 13px;
}

.review-validation:empty {
    display: none;
}

.review-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.review-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.review-field label {
    font-size: 13px;
    font-weight: 700;
}

.review-field-full {
    grid-column: 1 / -1;
}

.review-form .form-control {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    padding: 12px 14px;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.review-form textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.review-form .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.review-form .text-danger {
    color: var(--danger);
    font-size: 12px;
}

/* Responsive */
@media (max-width: 991px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-gallery {
        position: relative;
        top: 0;
    }

    .review-summary {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .product-highlights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .product-details h1 {
        font-size: 20px;
    }

    .price-current {
        font-size: 26px;
    }

    .buy-secondary {
        grid-template-columns: 1fr;
    }

    .trust-signals {
        grid-template-columns: 1fr;
    }

    .tabs-header {
        padding: 0 10px;
    }

    .tab-btn {
        padding: 14px 16px;
        font-size: 13px;
    }

    .tab-contents {
        padding: 20px;
    }

    .review-form-head,
    .review-form-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .review-form-head {
        display: flex;
        flex-direction: column;
    }

    .sticky-bar-info h4 {
        font-size: 12px;
    }

    .sticky-bar-content .btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .file-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== شناسنامه فایل ===== */
.file-identity {
    background: var(--card-bg);
    border: 1px solid rgba(22, 163, 74, 0.35);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 20px;
}

.file-identity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.file-identity-header h2 {
    font-size: 16px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-identity-header h2 i {
    color: #16a34a;
}

.file-identity-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.file-identity-note {
    font-size: 12.5px;
    line-height: 2;
    color: var(--text-secondary, #6b7280);
    margin: 0 0 14px;
}

.file-identity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
}

.file-identity-hash {
    grid-column: 1 / -1;
}

.file-identity-hash code {
    display: block;
    font-family: Consolas, Monaco, monospace;
    font-size: 11.5px;
    background: rgba(148, 163, 184, 0.12);
    border-radius: 8px;
    padding: 8px 10px;
    margin-top: 6px;
    word-break: break-all;
    color: var(--text-secondary, #6b7280);
}

@media (max-width: 767px) {
    .file-identity-grid {
        grid-template-columns: 1fr;
    }
}

/* لیست ویژگی‌های کلیدی تولیدشده با AI */
.key-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
}

.key-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.9;
    padding: 10px 12px;
    background: var(--card-bg);
    border-radius: 12px;
}

.key-features-list li i {
    color: #16a34a;
    margin-top: 6px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .key-features-list {
        grid-template-columns: 1fr;
    }
}

/* گزیده متن واقعی داخل فایل — در تب توضیحات (تب پیش‌فرض باز) */
.file-excerpt {
    margin-top: 26px;
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--bg-soft, #f8fafc);
    border: 1px solid var(--border-light, #e2e8f0);
    border-right: 4px solid var(--primary);
}

    .file-excerpt h3 {
        margin: 0 0 12px;
        font-size: 16px;
        color: var(--text);
    }

        .file-excerpt h3 i {
            color: var(--primary);
            font-size: 13px;
            margin-left: 6px;
        }

.file-excerpt-body p {
    margin: 0 0 10px;
    line-height: 2.1;
    font-size: 14.5px;
    color: var(--text);
    text-align: justify;
}

.file-excerpt-note {
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px dashed var(--border-light, #e2e8f0);
    font-size: 12.5px;
    color: var(--text-muted);
}

@media (max-width: 767px) {
    .file-excerpt {
        padding: 14px 15px;
    }

    .file-excerpt-body p {
        font-size: 13.5px;
        line-height: 2;
    }
}
