/* ============================================
   Template Card Page Styles
   ============================================ */

/* Breadcrumb */
.template-breadcrumb {
    padding: 100px 0 20px;
    background: #f8fafc;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: #94a3b8;
}

.breadcrumb-list a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-list a:hover {
    color: #667eea;
}

.breadcrumb-list li.active {
    color: #1a202c;
    font-weight: 500;
}

/* Hero Section - Product Grid */
.template-hero {
    padding: 20px 0 60px;
    background: #f8fafc;
}

.template-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Gallery */
.template-gallery {
    position: sticky;
    top: 100px;
}

.template-main-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    aspect-ratio: 3/4;
}

.template-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.template-main-image:hover img {
    transform: scale(1.02);
}

.template-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
}

.template-placeholder i {
    font-size: 80px;
    color: #cbd5e1;
}

.template-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
}

.badge-popular {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 50px;
}

.template-thumbnails {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.thumb {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: #ffffff;
}

.thumb:hover,
.thumb.active {
    border-color: #667eea;
    transform: translateY(-2px);
}

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

.thumb-mock {
    opacity: 0.7;
}

.thumb-mock:hover {
    opacity: 1;
}

/* Product Info */
.template-info {
    padding: 20px 0;
}

.template-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.template-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #ffffff;
    border-radius: 50px;
    font-size: 13px;
    color: #64748b;
}

.template-meta i {
    color: #667eea;
}

.template-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
    line-height: 1.2;
}

.template-rating {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.stars {
    display: flex;
    gap: 4px;
    color: #f59e0b;
}

.rating-text {
    color: #64748b;
    font-size: 14px;
}

.template-usage {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #10b981;
    font-size: 14px;
    font-weight: 500;
}

/* Price Block */
.template-price-block {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.price-label {
    color: #64748b;
    font-size: 14px;
}

.price-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
}

.price-value.free {
    color: #10b981;
}

.price-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.price-features span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
}

.price-features i {
    color: #10b981;
}

/* Actions */
.template-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-full {
    flex: 1;
}

.btn-favorite {
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 12px;
}

.btn-favorite i {
    font-size: 20px;
}

.btn-favorite.active i {
    color: #ef4444;
}

/* Stats */
.template-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
}

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

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #64748b;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
}

.trust-item i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 8px;
    font-size: 14px;
}

/* Description Section */
.template-description-section {
    padding: 60px 0;
    background: #ffffff;
}

.description-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 60px;
}

.description-main .section-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 24px;
}

.description-content {
    color: #475569;
    line-height: 1.8;
    font-size: 16px;
}

.description-content p {
    margin-bottom: 16px;
}

.template-features {
    margin-top: 40px;
}

.template-features h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 20px;
}

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

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    line-height: 1.6;
}

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

.features-list i {
    color: #10b981;
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Sidebar */
.description-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.how-it-works-card,
.platforms-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
}

.how-it-works-card h3,
.platforms-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.how-it-works-card h3 i,
.platforms-card h3 i {
    color: #667eea;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.step-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.step-content strong {
    color: #1a202c;
    font-size: 14px;
}

.step-content span {
    color: #64748b;
    font-size: 13px;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.platform-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #ffffff;
    border-radius: 8px;
}

.platform-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.platform-item span {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

/* Results Section */
.template-results {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

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

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 40px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.result-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-4px);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.result-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
}

.result-author {
    display: flex;
    flex-direction: column;
}

.result-author strong {
    color: #1a202c;
    font-size: 16px;
}

.result-author span {
    color: #64748b;
    font-size: 13px;
}

.result-stats-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.result-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.result-badge.success {
    background: #dcfce7;
    color: #166534;
}

.result-text {
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
    font-style: italic;
}

/* Related Templates */
.related-templates {
    padding: 80px 0;
    background: #ffffff;
}

.related-templates .section-title {
    margin-bottom: 40px;
}

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

.related-card {
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.related-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-image {
    aspect-ratio: 3/4;
    overflow: hidden;
}

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

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

.related-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
}

.related-placeholder i {
    font-size: 40px;
    color: #cbd5e1;
}

.related-info {
    padding: 16px;
}

.related-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-type {
    font-size: 13px;
    color: #64748b;
}

/* Other Types Section */
.other-types {
    padding: 80px 0;
    background: #f8fafc;
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.type-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.type-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.type-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.type-icon i {
    font-size: 28px;
    color: #ffffff;
}

.type-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}

.type-desc {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
}

.type-link {
    font-size: 14px;
    color: #667eea;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.type-link i {
    transition: transform 0.3s ease;
}

.type-card:hover .type-link i {
    transform: translateX(4px);
}

/* FAQ Section */
.template-faq {
    padding: 80px 0;
    background: #ffffff;
}

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

.faq-item {
    border-bottom: 1px solid #e2e8f0;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 500;
    color: #1a202c;
    cursor: pointer;
    text-align: left;
}

.faq-question:hover {
    color: #667eea;
}

.faq-question i {
    color: #64748b;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

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

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

.faq-answer p {
    padding-bottom: 24px;
    color: #64748b;
    line-height: 1.7;
}

/* CTA Section */
.template-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cta-card.large {
    text-align: center;
    color: #ffffff;
}

.cta-card.large .cta-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-card.large .cta-text {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
}

.cta-card.large .cta-actions {
    margin-bottom: 24px;
}

.btn-cta {
    background: #ffffff;
    color: #667eea;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cta-card.large .cta-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.cta-card.large .cta-features span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.cta-card.large .cta-features i {
    color: #4ade80;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    color: #64748b;
}

.btn-outline:hover {
    border-color: #667eea;
    color: #667eea;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    .template-product-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .template-gallery {
        position: static;
        max-width: 500px;
        margin: 0 auto;
    }

    .description-grid {
        grid-template-columns: 1fr;
    }

    .description-sidebar {
        order: -1;
    }

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

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

@media (max-width: 768px) {
    .template-breadcrumb {
        padding-top: 80px;
    }

    .template-title {
        font-size: 24px;
    }

    .template-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .stat-value {
        font-size: 16px;
    }

    .stat-label {
        font-size: 11px;
    }

    .results-grid,
    .related-grid,
    .types-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 24px;
    }

    .faq-question {
        font-size: 16px;
    }

    .cta-card.large .cta-title {
        font-size: 24px;
    }

    .cta-card.large .cta-features {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .template-thumbnails {
        gap: 8px;
    }

    .thumb {
        width: 60px;
        height: 60px;
    }

    .template-actions {
        flex-direction: column;
    }

    .btn-favorite {
        width: 100%;
        height: 48px;
    }

    .trust-badges {
        flex-direction: column;
        gap: 12px;
    }

    .price-features {
        flex-direction: column;
        gap: 8px;
    }
}
