/* Frontis Template Archive Block Styles */

.frontis-template-archive {
    width: 100%;
    margin: 0 auto;
}

.frontis-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .frontis-template-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Template Item Card */
.frontis-template-item {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Item Image */
.frontis-item-image {
    position: relative;
    width: 100%;
    max-height: 608px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #cfcfcf 0%, #cacaca 100%);
    border-radius: 4px;
}

.frontis-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.frontis-template-item:hover .frontis-item-image img {
    transform: scale(1.05);
}

.premium-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.frontis-item-title {
    margin: 0 0 24px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

.frontis-item-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.frontis-item-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.frontis-btn-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    flex: 1;
    min-width: 100px;
}

.frontis-btn-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.frontis-btn-details {
    background: #f5f5f5;
    color: #333;
    flex: 1;
    min-width: 100px;
}

.frontis-btn-details:hover {
    background: #e0e0e0;
}

/* Load More Button */
.frontis-load-more-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.frontis-load-more-btn {
    padding: 14px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.frontis-load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.frontis-load-more-btn:active {
    transform: translateY(0);
}

.frontis-load-more-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Loading and Error States */
.frontis-loading,
.frontis-error {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #666;
    grid-column: 1 / -1;
}

.frontis-error {
    color: #d32f2f;
    background: #ffebee;
    border-radius: 8px;
}

/* Editor Preview Styles */
.frontis-template-archive-editor {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    background: #f9f9f9;
}

.frontis-template-archive-preview {
    text-align: center;
}

.preview-info h3 {
    margin: 0 0 16px;
    font-size: 24px;
    color: #333;
}

.preview-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

.preview-note {
    margin-top: 20px;
    padding: 16px;
    background: #fff;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    color: #555;
    font-style: italic;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .frontis-template-archive {
        padding: 20px 15px;
    }

    .frontis-item-content {
        padding: 16px;
    }

    .frontis-item-title {
        font-size: 16px;
    }

    .frontis-item-actions {
        flex-direction: column;
    }

    .frontis-item-actions a {
        width: 100%;
    }
}

/* Skeleton */
.frontis-skeleton {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f6f7f8;
    border-radius: 4px;
    overflow: hidden;
    animation: pulse 1.5s ease-in-out infinite;
}

.frontis-skeleton .skeleton-image {
    height: 608px;
    background: #e2e5e7;
}

.frontis-skeleton .skeleton-title {
    height: 20px;
    margin: 12px 16px 8px;
    background: #e2e5e7;
    border-radius: 4px;
    width: 70%;
}

@keyframes pulse {
    0% {
        background-color: #e2e5e7;
    }

    50% {
        background-color: #f0f2f4;
    }

    100% {
        background-color: #e2e5e7;
    }
}