/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.template-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.template-preview {
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Template Preview Skeletons */
.preview-skeleton {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 210/297;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Template 1 - Modern Sidebar Preview */
.template-1-preview {
    display: flex;
}

.template-1-preview .skeleton-sidebar {
    width: 35%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.template-1-preview .skeleton-content {
    flex: 1;
    padding: 15px;
}

.template-1-preview .skeleton-header {
    height: 20px;
    background: #2c3e50;
    border-radius: 4px;
    margin-bottom: 15px;
    width: 70%;
}

.template-1-preview .skeleton-section {
    margin-bottom: 15px;
}

.template-1-preview .skeleton-line {
    height: 6px;
    background: #ecf0f1;
    border-radius: 3px;
    margin-bottom: 8px;
    width: 100%;
}

.template-1-preview .skeleton-line.short {
    width: 60%;
}

/* Template 2 - Classic Single Column Preview */
.template-2-preview {
    padding: 0;
}

.template-2-preview .skeleton-classic {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.template-2-preview .skeleton-header {
    height: 40px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    width: 100%;
}

.template-2-preview .skeleton-body {
    flex: 1;
    padding: 15px;
}

.template-2-preview .skeleton-line {
    height: 6px;
    background: #ecf0f1;
    border-radius: 3px;
    margin-bottom: 10px;
}

.template-2-preview .skeleton-line.full {
    width: 100%;
}

.template-2-preview .skeleton-line.medium {
    width: 70%;
}

.template-2-preview .skeleton-divider {
    height: 2px;
    background: #bdc3c7;
    margin: 15px 0;
    width: 100%;
}

/* Template Info */
.template-info {
    padding: 25px;
    text-align: center;
    border-top: 1px solid #ecf0f1;
}

.template-info h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.template-info p {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.template-badge {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.template-card:nth-child(2) .template-badge {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

/* Select Template Button */
.btn-select-template {
    display: block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-select-template:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2471a3 100%);
}

.btn-select-template i {
    margin-right: 8px;
}

.template-card:nth-child(2) .btn-select-template {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.template-card:nth-child(2) .btn-select-template:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
}
