/* ============================================
   Product Archive Page - Premium Styles
   Prefix: pda- (Product Display Archive)
   ============================================ */

/* Main Container */
.pda-main-container {
    background: #ffffff;
    min-height: 100vh;
}

.pda-wrapper {
    padding: 30px 0 80px;
}

/* Page Header */
.pda-page-header {
    position: relative;
    padding: 50px 0;
    margin-bottom: 40px;
    overflow: hidden;
}

.pda-header-bg {
    position: absolute;
    top: 0;
    left: -5%;
    right: -5%;
    bottom: 0;
    background: linear-gradient(120deg, #AB47BC 0%, #BA68C8 100%);
    transform: skewY(-2deg);
    z-index: 0;
}

.pda-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

/* Breadcrumb */
.pda-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    margin-bottom: 20px;
    font-size: 13px;
}

.pda-bread-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s;
}

.pda-bread-link:hover {
    color: #fff;
}

.pda-bread-sep {
    color: rgba(255, 255, 255, 0.5);
}

.pda-bread-current {
    color: #fff;
    font-weight: 600;
}

/* Page Title */
.pda-page-title {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px 0;
    letter-spacing: -1px;
}

.pda-page-desc {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Filter Section */
.pda-filter-section {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 35px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pda-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pda-filter-left {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.pda-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.pda-filter-btn:hover {
    border-color: #AB47BC;
    color: #AB47BC;
    transform: translateY(-2px);
}

.pda-filter-btn.active {
    background: linear-gradient(120deg, #AB47BC 0%, #BA68C8 100%);
    border-color: #AB47BC;
    color: #fff;
}

.pda-cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.pda-filter-btn.active .pda-cat-count {
    background: rgba(255, 255, 255, 0.25);
}

.pda-filter-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* View Toggle */
.pda-view-toggle {
    display: flex;
    gap: 5px;
    background: #fff;
    padding: 4px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.pda-view-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
}

.pda-view-btn:hover {
    color: #AB47BC;
    background: #f5f5f5;
}

.pda-view-btn.active {
    background: linear-gradient(120deg, #AB47BC 0%, #BA68C8 100%);
    color: #fff;
}

/* Sort Dropdown */
.pda-sort-dropdown {
    position: relative;
}

.pda-sort-select {
    padding: 10px 40px 10px 18px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    transition: all 0.3s;
}

.pda-sort-select:hover,
.pda-sort-select:focus {
    border-color: #AB47BC;
    outline: none;
}

/* Results Info */
.pda-results-info {
    padding-top: 15px;
    border-top: 2px solid #e8e8e8;
}

.pda-results-count {
    font-size: 14px;
    color: #666;
}

.pda-results-count strong {
    color: #AB47BC;
    font-weight: 700;
}

/* Products Container */
.pda-products-container {
    margin-top: 30px;
}

.pda-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* List View */
.pda-products-grid.list-view {
    grid-template-columns: 1fr;
}

.pda-products-grid.list-view .pda-product-card {
    display: flex;
    flex-direction: row;
}

.pda-products-grid.list-view .pda-product-thumb {
    width: 300px;
    height: 250px;
    flex-shrink: 0;
}

.pda-products-grid.list-view .pda-product-details {
    flex: 1;
    padding: 30px;
}

.pda-products-grid.list-view .pda-product-excerpt {
    display: block;
}

/* Product Item */
.pda-product-item {
    opacity: 0;
    animation: pda-fadeInUp 0.6s forwards;
}

@keyframes pda-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pda-product-item:nth-child(1) { animation-delay: 0.05s; }
.pda-product-item:nth-child(2) { animation-delay: 0.1s; }
.pda-product-item:nth-child(3) { animation-delay: 0.15s; }
.pda-product-item:nth-child(4) { animation-delay: 0.2s; }
.pda-product-item:nth-child(5) { animation-delay: 0.25s; }
.pda-product-item:nth-child(6) { animation-delay: 0.3s; }

/* Product Card */
.pda-product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pda-product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(171, 71, 188, 0.25);
}

.pda-product-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Product Thumbnail */
.pda-product-thumb {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.pda-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pda-product-card:hover .pda-thumb-img {
    transform: scale(1.12) rotate(2deg);
}

/* Product Overlay */
.pda-product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(171, 71, 188, 0.95) 0%, rgba(186, 104, 200, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s;
}

.pda-product-card:hover .pda-product-overlay {
    opacity: 1;
}

.pda-quick-view {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #fff;
    color: #AB47BC;
    font-size: 15px;
    font-weight: 700;
    border-radius: 50px;
    transform: translateY(20px);
    transition: transform 0.4s;
}

.pda-product-card:hover .pda-quick-view {
    transform: translateY(0);
}

/* Product Badge */
.pda-product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #FF7043;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Product Details */
.pda-product-details {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pda-product-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.pda-product-card:hover .pda-product-name {
    color: #AB47BC;
}

.pda-product-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #999;
}

.pda-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pda-product-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 auto 0;
    display: none;
}

.pda-product-footer {
    padding-top: 16px;
    margin-top: auto;
    border-top: 2px solid #f5f5f5;
}

.pda-view-details {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #AB47BC;
    font-size: 14px;
    font-weight: 700;
    transition: gap 0.3s;
}

.pda-product-card:hover .pda-view-details {
    gap: 12px;
}

.pda-view-details i {
    font-size: 12px;
}

/* Empty State */
.pda-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    background: #f8f9fa;
    border-radius: 16px;
}

.pda-empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
    border-radius: 50%;
}

.pda-empty-icon i {
    font-size: 45px;
    color: #999;
}

.pda-empty-title {
    font-size: 26px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.pda-empty-text {
    font-size: 16px;
    color: #999;
    margin: 0;
}

/* Load More Button */
.pda-load-more-wrap {
    text-align: center;
    margin-top: 50px;
}

.pda-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(120deg, #AB47BC 0%, #BA68C8 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(171, 71, 188, 0.3);
}

.pda-load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(171, 71, 188, 0.4);
}

.pda-load-more-btn:active {
    transform: translateY(-1px);
}

.pda-load-more-btn i {
    font-size: 14px;
    transition: transform 0.3s;
}

.pda-load-more-btn:hover i {
    transform: translateY(3px);
}

/* Loading State */
.pda-load-more-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.pda-load-more-btn.loading i {
    animation: pda-spin 1s linear infinite;
}

@keyframes pda-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .pda-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 1024px) {
    .pda-page-title {
        font-size: 38px;
    }
    
    .pda-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pda-filter-right {
        justify-content: space-between;
    }
    
    .pda-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pda-wrapper {
        padding: 20px 0 60px;
    }
    
    .pda-page-header {
        padding: 35px 0;
    }
    
    .pda-page-title {
        font-size: 32px;
    }
    
    .pda-page-desc {
        font-size: 16px;
    }
    
    .pda-filter-section {
        padding: 20px;
    }
    
    .pda-filter-left {
        width: 100%;
    }
    
    .pda-filter-btn {
        flex: 1;
        justify-content: center;
        min-width: calc(50% - 5px);
    }
    
    .pda-products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pda-products-grid.list-view .pda-product-card {
        flex-direction: column;
    }
    
    .pda-products-grid.list-view .pda-product-thumb {
        width: 100%;
        height: 260px;
    }
    
    .pda-products-grid.list-view .pda-product-details {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .pda-page-title {
        font-size: 26px;
    }
    
    .pda-filter-btn {
        min-width: 100%;
    }
    
    .pda-view-toggle {
        flex: 1;
    }
    
    .pda-sort-select {
        width: 100%;
    }
}

/* Dark Mode Support */
body.dark-mode .pda-main-container {
    background: #0f0f0f;
}

body.dark-mode .pda-filter-section {
    background: #1a1a1a;
}

body.dark-mode .pda-filter-btn {
    background: #2a2a2a;
    border-color: #333;
    color: #ccc;
}

body.dark-mode .pda-filter-btn:hover {
    border-color: #AB47BC;
    color: #AB47BC;
}

body.dark-mode .pda-view-toggle {
    background: #2a2a2a;
    border-color: #333;
}

body.dark-mode .pda-sort-select {
    background: #2a2a2a;
    border-color: #333;
    color: #ccc;
}

body.dark-mode .pda-results-count {
    color: #999;
}

body.dark-mode .pda-product-card {
    background: #1a1a1a;
}

body.dark-mode .pda-product-name {
    color: #e0e0e0;
}

body.dark-mode .pda-product-excerpt {
    color: #999;
}

body.dark-mode .pda-product-footer {
    border-top-color: #2a2a2a;
}

body.dark-mode .pda-no-products {
    background: #1a1a1a;
}

body.dark-mode .pda-empty-title {
    color: #e0e0e0;
}

/* Print Styles */
@media print {
    .pda-filter-section,
    .pda-load-more-wrap,
    .pda-product-overlay {
        display: none;
    }
}
