/* ASA2 Product Templates Page Styles for Divi Integration */

/* Reset and Base Styles */
.product-templates-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.product-templates-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.product-templates-page .container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Header */
.product-templates-page .header {
    background: white;
    color: #2c3e50;
    padding: 40px 40px 20px 40px;
    text-align: left;
    margin-bottom: 0;
    border-bottom: 1px solid #e9ecef;
}

.product-templates-page .header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.product-templates-page .header p {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 800px;
    margin: 0;
    line-height: 1.5;
}

/* Featured Template - Nova25 */
.product-templates-page .featured-section {
    background: white;
    padding: 60px 40px;
    border-bottom: 1px solid #e9ecef;
}

.product-templates-page .featured-badge {
    display: inline-block;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.product-templates-page .featured-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2c3e50;
}

.product-templates-page .featured-description {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 30px;
    max-width: 800px;
}

.product-templates-page .featured-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-templates-page .highlight {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.product-templates-page .highlight-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.product-templates-page .highlight-label {
    font-size: 0.9rem;
    color: #6c757d;
}

.product-templates-page .featured-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Template Categories - moved to template-specific CSS */

/* Remove old category styles - now using single filterable list */

.product-templates-page .templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0;
}

.product-templates-page .template-item {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
    border-right: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.product-templates-page .template-item:hover {
    background: #f8f9fa;
}

.product-templates-page .template-item.featured {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-left: 4px solid #667eea;
}

.product-templates-page .template-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-templates-page .template-badge {
    background: #ff6b6b;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Template Screenshots */
.product-templates-page .template-screenshot {
    width: 100%;
    height: 160px; /* 16:9 ratio for width 280px -> height 160px */
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    position: relative;
}

.product-templates-page .template-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-templates-page .template-screenshot:hover img {
    transform: scale(1.05);
}

.product-templates-page .template-screenshot-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    position: relative;
}

.product-templates-page .template-screenshot-placeholder::before {
    content: "📸";
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.product-templates-page .template-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-templates-page .template-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.product-templates-page .feature-tag {
    background: #e9ecef;
    color: #495057;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.product-templates-page .template-actions {
    display: flex;
    gap: 10px;
}

.product-templates-page .btn {
    display: inline-block;
    border-radius: 16px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif !important;
    letter-spacing: 2px;
    text-align: center;
    transition: background-color 0.3s ease !important;
    transform: none !important;
    border: 2px solid transparent !important; /* Fixed border to prevent size jumping */
    cursor: pointer;
    padding: 16px 32px !important;
    box-shadow: 0 20px 71px -20px #091c4f !important;
}

.product-templates-page .btn:hover {
    transform: none !important;
    scale: none !important;
    border: 2px solid transparent !important; /* Maintain same border on hover */
}

.product-templates-page .btn-primary {
    background-color: rgb(255, 111, 97) !important;
    color: #ffffff !important;
    border-color: rgba(0,0,0,0) !important;
}

.product-templates-page .btn-primary:hover {
    background-color: rgba(255, 111, 97, 0.8) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.product-templates-page .btn-secondary {
    background: transparent;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 8px 16px !important;
    font-size: 14px !important;
}

.product-templates-page .btn-secondary:hover {
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none !important;
}

/* Footer Info */
.product-templates-page .info-section {
    background: white;
    padding: 40px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.product-templates-page .info-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.product-templates-page .info-description {
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto 25px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-templates-page .header {
        padding: 30px 20px 15px 20px;
    }

    .product-templates-page .header h1 {
        font-size: 1.8rem;
    }

    .product-templates-page .featured-section {
        padding: 40px 20px;
    }

    .product-templates-page .info-section {
        padding: 40px 20px;
    }


    .product-templates-page .featured-highlights {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-templates-page .templates-grid {
        grid-template-columns: 1fr;
    }

    .product-templates-page .template-item {
        padding: 20px;
    }

    .product-templates-page .template-screenshot {
        height: 180px; /* Slightly taller on mobile for better visibility */
    }

    .product-templates-page .featured-actions {
        flex-direction: column;
    }
}

/* Divi Theme Override - Ensure our styles take priority */
.et_pb_text .product-templates-page h1,
.et_pb_text .product-templates-page h2,
.et_pb_text .product-templates-page h3 {
    font-family: inherit !important;
}

.et_pb_text .product-templates-page a {
    text-decoration: none !important;
}

.et_pb_text .product-templates-page .btn:hover {
    text-decoration: none !important;
}