/**
 * Frontend Styles for Website Templates Manager
 */

/* Container Styles */
.wtm-templates-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Breadcrumb Navigation */
.wtm-breadcrumb-wrapper {
    margin: 0px 0 30px 0;
    padding: 5px 5px 5px 10px;
    border-radius: 5px;
    color: #fff;
    align-items: center;
    justify-content: space-between;
    background-color: #f19700;
    -webkit-box-shadow: 0px 2px 6px 1px rgba(0, 0, 0, 0.4) !important;
    -moz-box-shadow: 0px 2px 6px 1px rgba(0,0,0,0.4) !important;
    box-shadow: 0px 2px 6px 1px rgb(0 0 0 / 51%) !important;
}

.wtm-breadcrumb {
    margin: 0;
    padding: 0;
}

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

.wtm-breadcrumb-item {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.wtm-breadcrumb-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
        font-weight: bold;
            text-shadow: 1px 1px 1px rgb(0 0 0 / 71%);
}
.wtm-breadcrumb-link:visited {
    color: #fff;
}
.wtm-breadcrumb-link:hover {
    color: #fff;
    text-decoration: underline;
}

.wtm-breadcrumb-text {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
        text-shadow: 1px 1px 1px rgb(0 0 0 / 71%);
}

.wtm-breadcrumb-current .wtm-breadcrumb-text {
    color: #fff;
}

.wtm-breadcrumb-separator {
    color: #fff;
    font-size: 14px;
    margin: 0 4px;
    user-select: none;
}

/* Grid Layout */
.wtm-templates-grid {
    display: grid;
    gap: 30px;
    margin: 20px 0;
}

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

.wtm-templates-grid.wtm-columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.wtm-templates-grid.wtm-columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.wtm-templates-grid.wtm-columns-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Template Item */
.wtm-template-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.wtm-template-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Template Image */
.wtm-template-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
}

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

.wtm-template-item:hover .wtm-template-image img {
    transform: scale(1.05);
}

.wtm-template-image .wtm-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #999;
    font-size: 14px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
}

/* Template Content */
.wtm-template-content {
    padding: 20px;
}

.wtm-template-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.wtm-template-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.wtm-template-title a:hover {
    color: #007cba;
}

.wtm-template-intro {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.wtm-template-features {
    margin: 15px 0;
}

.wtm-template-features h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

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

.wtm-template-features li {
    padding: 3px 0 3px 20px;
    position: relative;
    font-size: 13px;
    color: #555;
}

.wtm-template-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 12px;
}

/* Template Meta */
.wtm-template-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.wtm-template-price {
    font-size: 16px;
    font-weight: 600;
    color: #28a745;
}

.wtm-template-actions {
    display: flex;
    gap: 10px;
}

.wtm-template-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.wtm-template-btn-primary {
    background: #007cba;
    color: #fff;
}

.wtm-template-btn-primary:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
}

.wtm-template-btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.wtm-template-btn-secondary:hover {
    background: #e9ecef;
    color: #333;
    text-decoration: none;
}

/* Single Template */
.wtm-single-template {
        width: 100%;
}

.wtm-single-header {
    text-align: center;
    margin-bottom: 40px;
}

.wtm-single-title {
    font-size: 36px;
    margin: 0 0 20px 0;
    color: #333;
    font-weight: 300;
}

.wtm-single-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.wtm-single-meta-item {
    text-align: center;
}

.wtm-single-meta-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.wtm-single-meta-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.wtm-template-gallery {
    margin: 40px 0;
}

.wtm-gallery-main {
    margin-bottom: 30px;
}

.wtm-gallery-main img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.wtm-gallery-thumbs {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
}

.wtm-gallery-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.3s ease;
    border: 2px solid transparent;
}

.wtm-gallery-thumb:hover {
    opacity: 0.8;
}

.wtm-gallery-thumb.active {
    border-color: #007cba;
}

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

.wtm-single-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.wtm-template-description {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.wtm-template-description h2,
.wtm-template-description h3,
.wtm-template-description h4 {
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
}

.wtm-template-description p {
    margin-bottom: 20px;
}

.wtm-template-description ul,
.wtm-template-description ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.wtm-template-sidebar {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    height: fit-content;
}

.wtm-template-sidebar h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.wtm-template-sidebar .wtm-template-price {
    font-size: 24px;
    color: #28a745;
    margin-bottom: 20px;
    text-align: center;
}

.wtm-template-sidebar .wtm-template-actions {
    flex-direction: column;
    gap: 15px;
}

.wtm-template-sidebar .wtm-template-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
}

/* Archive Template */
.wtm-archive-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.wtm-archive-title {
    font-size: 32px;
    margin: 0 0 15px 0;
    font-weight: 300;
}

.wtm-archive-description {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}



/* Lightbox */
.wtm-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.wtm-lightbox.active {
    display: flex;
}

.wtm-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.wtm-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.wtm-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wtm-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wtm-lightbox-nav.prev {
    left: -60px;
}

.wtm-lightbox-nav.next {
    right: -60px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wtm-templates-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
        gap: 20px;
    }
    
    .wtm-template-content {
        padding: 15px;
    }
    
    .wtm-template-meta {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .wtm-template-actions {
        flex-direction: column;
    }
    
    .wtm-single-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .wtm-single-title {
        font-size: 28px;
    }
    
    .wtm-single-meta {
        gap: 20px;
    }
    
    .wtm-breadcrumb-wrapper {
        margin: 15px 0 25px 0;
    }
    
    .wtm-breadcrumb-list {
        gap: 6px;
    }
    
    .wtm-breadcrumb-link,
    .wtm-breadcrumb-text,
    .wtm-breadcrumb-separator {
        font-size: 13px;
    }
    
    .wtm-breadcrumb-separator {
        margin: 0 2px;
    }
    

    
    .wtm-gallery-thumbs {
        gap: 10px;
    }
    
    .wtm-gallery-thumb {
        width: 100px;
        height: 70px;
    }
    
    .wtm-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .wtm-lightbox-nav.prev {
        left: 10px;
    }
    
    .wtm-lightbox-nav.next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .wtm-template-image {
        height: 200px;
    }
    
    .wtm-template-title {
        font-size: 16px;
    }
    
    .wtm-template-intro {
        font-size: 13px;
    }
    
    .wtm-single-title {
        font-size: 24px;
    }
    
    .wtm-archive-title {
        font-size: 24px;
    }
    
    .wtm-gallery-thumb {
        width: 80px;
        height: 60px;
    }
    
    .wtm-breadcrumb-wrapper {
        margin: 10px 0 20px 0;
    }
    
    .wtm-breadcrumb-list {
        gap: 4px;
    }
    
    .wtm-breadcrumb-link,
    .wtm-breadcrumb-text,
    .wtm-breadcrumb-separator {
        font-size: 12px;
    }
}

/* Loading States */
.wtm-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.wtm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: wtm-spin 1s linear infinite;
}

@keyframes wtm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.wtm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.wtm-pagination a,
.wtm-pagination span {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.wtm-pagination a:hover {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.wtm-pagination .current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* Custom Scrollbar */
.wtm-gallery-thumbs::-webkit-scrollbar {
    height: 4px;
}

.wtm-gallery-thumbs::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.wtm-gallery-thumbs::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.wtm-gallery-thumbs::-webkit-scrollbar-thumb:hover {
    background: #555;
}
.wtm-archive-page {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.wtm-archive-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background: linear-gradient(180deg, #b57d1e 0%, #f19700 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.wtm-archive-title {
font-size: 25px;
    margin: 0 0 0px 0;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
}

.wtm-archive-description {
    font-size: 18px;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.wtm-no-templates {
    text-align: center;
    padding: 80px 20px;
    background: #f9f9f9;
    border-radius: 12px;
    margin: 40px 0;
}

.wtm-no-templates h3 {
    font-size: 24px;
    color: #333;
    margin: 0 0 15px 0;
}

.wtm-no-templates p {
    font-size: 16px;
    color: #666;
    margin: 0 0 25px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.wtm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 60px 0 40px 0;
}

.wtm-pagination .page-numbers {
    display: inline-block;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
    font-weight: 500;
}

.wtm-pagination .page-numbers:hover {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.wtm-pagination .page-numbers.current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.wtm-pagination .page-numbers.prev,
.wtm-pagination .page-numbers.next {
    font-size: 18px;
    font-weight: 600;
}

/* Categories Menu */
.wtm-categories-menu {
    margin-bottom: 40px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.wtm-categories-container {
max-width: 100%;
    margin: 0 auto;
}

.wtm-categories-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
    text-align: center;
}

.wtm-categories-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

a.wtm-category-link {
    display: inline-flex
;
    align-items: center;
    gap: 6px;
    padding: 5px;
    background: #fff;
    color: #666;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 13px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

a.wtm-category-link:hover {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.2);
}

.wtm-category-link.wtm-category-active {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.wtm-category-count {
    background: #007cba;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.wtm-category-link:hover .wtm-category-count,
.wtm-category-link.wtm-category-active .wtm-category-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Template Category Badge */
.wtm-template-category {
    margin-bottom: 10px;
}
a.wtm-category-link-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #007cba;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.wtm-category-link-badge:hover {
    background: #005a87;
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .wtm-archive-page {
        padding: 15px;
    }
    
    .wtm-archive-header {
        padding: 40px 20px;
        margin-bottom: 30px;
    }
    
    .wtm-archive-title {
        font-size: 32px;
    }
    
    .wtm-archive-description {
        font-size: 16px;
    }
    
    /* Categories Menu Mobile */
    .wtm-categories-menu {
        margin-bottom: 30px;
        padding: 20px 0;
    }
    
    .wtm-categories-nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 20px;
        -webkit-overflow-scrolling: touch;
    }
    
    .wtm-category-link {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .wtm-template-category {
        margin-bottom: 8px;
    }
    

    
    .wtm-pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .wtm-pagination .page-numbers {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* Extra Small Mobile */
    @media (max-width: 480px) {
        .wtm-categories-menu {
            padding: 15px 0;
        }
        
        .wtm-categories-nav {
            padding: 0 15px;
            gap: 8px;
        }
        
        .wtm-category-link {
            padding: 6px 10px;
            font-size: 12px;
        }
    }
}