/* ========================================
   Zongde Product List Page Styles
   ======================================== */

/* Hero Section */
.zd-pl-hero{
    position:relative;
    border-bottom:1px solid rgba(16,24,40,.08);
    overflow:visible;
}
.zd-pl-hero:before{
    content:"";
    position:fixed;
    left:50%;
    top:0;
    width:100vw;
    height:clamp(320px, 42vh, 560px);
    transform:translateX(-50%) scale(1.02);
    background-image:url("../images/product.jpg");
    background-size:cover;
    background-position:center;
    filter:saturate(1.05) contrast(1.05);
    z-index:-2;
    pointer-events:none;
}
.zd-pl-hero:after{
    content:"";
    position:fixed;
    left:50%;
    top:0;
    width:100vw;
    height:clamp(320px, 42vh, 560px);
    transform:translateX(-50%);
    background:linear-gradient(120deg, rgba(11,93,59,.78), rgba(0,0,0,.32));
    z-index:-1;
    pointer-events:none;
}
.zd-pl-hero .in{
    position:relative;
    z-index:1;
    padding:50px 0 34px;
}
.zd-pl-wrap{
    width:min(1160px, calc(100vw - 32px));
    margin:0 auto;
    padding:0 20px;
    box-sizing:border-box;
}
.zd-pl-k{
    font-size:12px;
    letter-spacing:.14em;
    text-transform:uppercase;
    color:rgba(255,255,255,.85);
}
.zd-pl-h1{
    margin:10px 0 8px;
    font-size:38px;
    line-height:1.12;
    font-weight:900;
    color:#fff;
}
.zd-pl-sub{
    margin:0;
    color:rgba(255,255,255,.92);
    font-size:14px;
    line-height:1.7;
    max-width:100%;
    overflow-wrap:break-word;
    word-wrap:break-word;
    word-break:break-word;
}
.zd-chipRow{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:16px;
}
.zd-chip{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 14px;
    border-radius:999px;
    background:rgba(255,255,255,.14);
    border:1px solid rgba(255,255,255,.30);
    color:#fff;
    font-weight:800;
    font-size:12px;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.zd-chip:hover{
    color:#fff;
    background:rgba(255,255,255,.18);
    border-color:rgba(255,255,255,.40);
}

/* Main Content */
.zd-pl-main{
    background:#f7f8fa;
}
.zd-pl-sec{
    padding:28px 0 54px;
}

/* Filter Bar */
.zd-filter-bar{
    background:#fff;
    border-radius:16px;
    box-shadow:0 4px 20px rgba(16,24,40,.06);
    padding:20px;
    margin-bottom:20px;
}
.zd-search-form{
    display:flex;
    gap:12px;
    align-items:center;
}
.zd-search-input{
    flex:1;
    padding:12px 16px;
    border:2px solid #e5e7eb;
    border-radius:10px;
    font-size:14px;
    transition:all 0.2s;
}
.zd-search-input:focus{
    outline:none;
    border-color:#0b5d3b;
    box-shadow:0 0 0 3px rgba(11,93,59,.1);
}
.zd-btn{
    padding:12px 24px;
    border:none;
    border-radius:10px;
    font-weight:600;
    font-size:14px;
    cursor:pointer;
    transition:all 0.2s;
}
.zd-btn-primary{
    background:#0b5d3b;
    color:#fff;
}
.zd-btn-primary:hover{
    background:#0a4d30;
    transform:translateY(-1px);
}
.zd-btn-secondary{
    background:#f3f4f6;
    color:#374151;
}
.zd-btn-secondary:hover{
    background:#e5e7eb;
}

/* Category Navigation */
.zd-cat-section{
    background:#fff;
    border-radius:16px;
    box-shadow:0 4px 20px rgba(16,24,40,.06);
    padding:20px;
    margin-bottom:16px;
}
.zd-cat-label{
    font-size:12px;
    font-weight:700;
    color:#6b7280;
    text-transform:uppercase;
    letter-spacing:.08em;
    margin-bottom:12px;
}
.zd-cat-list{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin:0;
    padding:0;
}
.zd-cat-list li{
    list-style:none;
}
.zd-cat-link{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 16px;
    border-radius:999px;
    background:#f9fafb;
    border:2px solid transparent;
    color:#374151;
    font-weight:600;
    font-size:13px;
    text-decoration:none;
    transition:all 0.2s;
}
.zd-cat-link:hover{
    background:#f3f4f6;
    border-color:#d1d5db;
    transform:translateY(-1px);
}
.zd-cat-link.active{
    background:#0b5d3b;
    color:#fff;
    border-color:#0b5d3b;
}
.zd-cat-link i{
    font-size:14px;
}

/* Product Count */
.zd-product-count{
    text-align:center;
    color:#6b7280;
    font-size:14px;
    margin-bottom:20px;
    padding:12px;
    background:#fff;
    border-radius:10px;
}
.zd-product-count strong{
    color:#0b5d3b;
    font-weight:700;
}

/* Product Grid */
.zd-product-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0,1fr));
    gap:20px;
    margin-bottom:30px;
}
.zd-product-card{
    background:#fff;
    border-radius:16px;
    overflow:hidden;
    border:1px solid rgba(16,24,40,.06);
    transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration:none;
    color:inherit;
}
.zd-product-card:hover{
    transform:translateY(-8px);
    box-shadow:0 20px 40px rgba(16,24,40,.12);
}
.zd-product-img-wrap{
    position:relative;
    width:100%;
    height:240px;
    overflow:hidden;
    background:#f9fafb;
}
.zd-product-img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform 0.3s;
}
.zd-product-card:hover .zd-product-img{
    transform:scale(1.05);
}
.zd-product-badge{
    background:rgba(11,93,59,.9);
    color:#fff;
    width:32px;
    height:32px;
    border-radius:50%;
    font-size:14px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}
.zd-product-badges{
    position:absolute;
    top:12px;
    right:12px;
    display:flex;
    flex-direction:column;
    gap:6px;
}
.zd-product-info{
    padding:16px;
}
.zd-product-title{
    font-weight:700;
    font-size:15px;
    color:#111827;
    margin-bottom:10px;
    line-height:1.4;
}
.zd-product-specs{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-bottom:10px;
}
.zd-spec-tag{
    display:inline-flex;
    align-items:center;
    gap:4px;
    padding:4px 8px;
    border-radius:6px;
    font-size:11px;
    font-weight:600;
    background:#f0fdf4;
    color:#166534;
    border:1px solid #bbf7d0;
}
.zd-spec-tag i{
    font-size:10px;
    opacity:0.7;
}
.zd-product-meta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    font-size:12px;
    color:#6b7280;
}
.zd-product-date{
    display:flex;
    align-items:center;
    gap:4px;
}

/* Empty State */
.zd-empty-state{
    grid-column:1/-1;
    text-align:center;
    padding:80px 20px;
    color:#6b7280;
}
.zd-empty-state i{
    font-size:64px;
    margin-bottom:20px;
    display:block;
    opacity:0.5;
}
.zd-empty-state p{
    font-size:16px;
    margin:0;
}

/* Pagination */
.zd-pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
    margin-top:30px;
    flex-wrap:wrap;
}
.zd-pagination a,
.zd-pagination span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:40px;
    height:40px;
    padding:0 12px;
    border-radius:10px;
    background:#fff;
    border:2px solid #e5e7eb;
    color:#374151;
    font-weight:600;
    font-size:14px;
    text-decoration:none;
    transition:all 0.2s;
}
.zd-pagination a:hover{
    background:#f3f4f6;
    border-color:#d1d5db;
    transform:translateY(-2px);
}
.zd-pagination span.current{
    background:#0b5d3b;
    color:#fff;
    border-color:#0b5d3b;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet */
@media(max-width:900px){
    .zd-product-grid{
        grid-template-columns:repeat(2, minmax(0,1fr));
    }
    .zd-pl-h1{
        font-size:32px;
    }
    .zd-pl-hero .in{
        padding:40px 0 28px;
    }
}

/* Mobile */
@media(max-width:640px){
    /* Hero Section Mobile */
    .zd-pl-hero:before,
    .zd-pl-hero:after{
        height:clamp(320px, 45vh, 480px);
    }
    .zd-pl-hero .in{
        padding:40px 0 32px;
    }
    .zd-pl-wrap{
        width:calc(100vw - 32px);
        padding:0 16px;
    }
    .zd-pl-k{
        font-size:11px;
        letter-spacing:.1em;
        margin-bottom:4px;
    }
    .zd-pl-h1{
        font-size:28px;
        line-height:1.25;
        margin:8px 0 10px;
        word-wrap:break-word;
        overflow-wrap:break-word;
    }
    .zd-pl-sub{
        font-size:13px;
        line-height:1.6;
        max-width:100%;
        margin-bottom:14px;
        word-wrap:break-word;
        overflow-wrap:break-word;
    }
    .zd-chipRow{
        gap:8px;
        margin-top:14px;
        flex-wrap:wrap;
    }
    .zd-chip{
        padding:8px 12px;
        font-size:11px;
        gap:6px;
        white-space:nowrap;
    }
    .zd-chip i{
        font-size:12px;
        flex-shrink:0;
    }

    /* Filter Bar Mobile */
    .zd-filter-bar{
        padding:16px;
        margin-bottom:16px;
        border-radius:12px;
    }
    .zd-search-form{
        flex-direction:column;
        gap:10px;
    }
    .zd-search-input{
        width:100%;
        padding:10px 14px;
        font-size:13px;
    }
    .zd-btn{
        width:100%;
        padding:10px 20px;
        font-size:13px;
    }

    /* Category Navigation Mobile */
    .zd-cat-section{
        padding:14px;
        margin-bottom:12px;
        border-radius:12px;
    }
    .zd-cat-label{
        font-size:11px;
        margin-bottom:10px;
    }
    .zd-cat-list{
        gap:8px;
    }
    .zd-cat-link{
        padding:8px 12px;
        font-size:12px;
        gap:6px;
    }
    .zd-cat-link i{
        font-size:12px;
    }

    /* Product Count Mobile */
    .zd-product-count{
        font-size:13px;
        padding:10px;
        margin-bottom:16px;
    }

    /* Product Grid Mobile */
    .zd-product-grid{
        grid-template-columns:1fr;
        gap:16px;
        margin-bottom:24px;
    }
    .zd-product-img-wrap{
        height:200px;
    }
    .zd-product-info{
        padding:14px;
    }
    .zd-product-title{
        font-size:14px;
        margin-bottom:8px;
    }
    .zd-product-specs{
        gap:5px;
        margin-bottom:8px;
    }
    .zd-spec-tag{
        padding:3px 6px;
        font-size:10px;
    }
    .zd-product-meta{
        font-size:11px;
    }

    /* Pagination Mobile */
    .zd-pagination{
        gap:6px;
        margin-top:24px;
    }
    .zd-pagination a,
    .zd-pagination span{
        min-width:36px;
        height:36px;
        padding:0 10px;
        font-size:13px;
    }

    /* Empty State Mobile */
    .zd-empty-state{
        padding:60px 20px;
    }
    .zd-empty-state i{
        font-size:48px;
        margin-bottom:16px;
    }
    .zd-empty-state p{
        font-size:14px;
    }
}

/* Small Mobile */
@media(max-width:480px){
    .zd-pl-hero:before,
    .zd-pl-hero:after{
        height:clamp(280px, 40vh, 400px);
    }
    .zd-pl-hero .in{
        padding:32px 0 24px;
    }
    .zd-pl-wrap{
        width:calc(100vw - 24px);
        padding:0 12px;
    }
    .zd-pl-k{
        font-size:10px;
    }
    .zd-pl-h1{
        font-size:24px;
        line-height:1.3;
        margin:6px 0 8px;
    }
    .zd-pl-sub{
        font-size:12px;
        line-height:1.5;
        margin-bottom:12px;
    }
    .zd-chipRow{
        gap:6px;
        margin-top:12px;
    }
    .zd-chip{
        padding:6px 10px;
        font-size:10px;
        gap:5px;
    }
    .zd-chip i{
        font-size:11px;
    }
}

/* ========================================
   Theme Directory Page Styles
   ======================================== */

.zd-theme-directory {
    margin: 40px 0;
}

.zd-theme-directory-header {
    text-align: center;
    margin-bottom: 40px;
}

.zd-theme-directory-title {
    font-size: 32px;
    font-weight: 900;
    color: var(--zd-ink);
    margin: 0 0 12px;
}

.zd-theme-directory-title i {
    color: var(--zd-brand);
    margin-right: 12px;
}

.zd-theme-directory-subtitle {
    font-size: 16px;
    color: var(--zd-muted);
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

.zd-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.zd-theme-card {
    background: var(--zd-card);
    border: 1px solid rgba(16,24,40,.08);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(16,24,40,.10);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.zd-theme-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(16,24,40,.15);
}

.zd-theme-card-icon {
    height: 120px;
    background: linear-gradient(135deg, rgba(11,93,59,.85), rgba(16,185,129,.85));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.zd-theme-card-body {
    padding: 20px 20px 16px;
    flex: 1;
}

.zd-theme-card-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--zd-ink);
    margin: 0 0 8px;
}

.zd-theme-card-desc {
    font-size: 14px;
    color: var(--zd-muted);
    line-height: 1.55;
    margin: 0 0 12px;
    min-height: 44px;
}

.zd-theme-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.zd-theme-card-count {
    font-size: 13px;
    color: var(--zd-brand);
    background: rgba(11,93,59,.08);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.zd-theme-card-preview {
    display: flex;
    gap: 8px;
    overflow: hidden;
    border-radius: 12px;
}

.zd-theme-card-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(16,24,40,.08);
}

.zd-theme-card-noimage {
    width: 100%;
    height: 80px;
    background: rgba(16,24,40,.04);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(16,24,40,.3);
    font-size: 24px;
}

.zd-theme-card-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(16,24,40,.08);
    background: rgba(16,24,40,.02);
}

.zd-theme-card-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--zd-brand);
    display: flex;
    align-items: center;
    gap: 8px;
}

.zd-theme-card-link i {
    transition: transform 0.2s ease;
}

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

.zd-theme-directory-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid rgba(16,24,40,.08);
}

@media (max-width: 991px) {
    .zd-theme-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
    
    .zd-theme-directory-title {
        font-size: 24px;
    }
}

@media(max-width:640px) {
    .zd-theme-directory {
        margin: 24px 0;
    }
    
    .zd-theme-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .zd-theme-card-icon {
        height: 100px;
        font-size: 40px;
    }
    
    .zd-theme-card-title {
        font-size: 18px;
    }
    
    .zd-theme-card-desc {
        font-size: 13px;
        min-height: auto;
    }
    
    .zd-theme-card-preview img {
        width: 70px;
        height: 70px;
    }
}
.theme-fabric-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 15px;
}
.theme-fabric-showcase-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.theme-fabric-showcase-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.theme-fabric-showcase-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.zd-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.zd-lightbox.active {
    display: flex;
}
.zd-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
}
.zd-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.zd-lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}