/* ========================================
    ARCHIVE TEMPLATE - PRODUCTS STYLISH GRID
    Blue and Purple Gradient Theme
    ======================================== */

/* Container */
.products-archive {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 24px;
    background: linear-gradient(180deg,
        rgba(79, 70, 229, 0.03) 0%,
        rgba(139, 92, 246, 0.03) 50%,
        rgba(6, 182, 212, 0.02) 100%);
}

/* Page Header */
.product-archive-header {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.product-archive-header::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4F46E5 0%, #8B5CF6 100%);
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(20px);
}

.page-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 12px 0;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    z-index: 1;
}

.page-description {
    color: #6B7280;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

/* Product Card */
.product-card {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(248, 250, 252, 0.8) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.03),
        0 2px 4px rgba(0, 0, 0, 0.01);
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        #4F46E5 0%,
        #8B5CF6 50%,
        #06B6D4 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(79, 70, 229, 0.15),
        0 10px 20px rgba(139, 92, 246, 0.1),
        0 0 0 1px rgba(79, 70, 229, 0.1);
}

.product-card:hover::before {
    transform: scaleX(1);
}

/* Product Image Wrapper */
.product-image-wrapper {
    position: relative;
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg,
        #F3F4F6 0%,
        #E5E7EB 100%);
    aspect-ratio: 4/3;
}

.product-image-link {
    display: block;
    height: 100%;
    width: 100%;
    transition: transform 0.4s ease;
}

.product-image-link:hover {
    transform: scale(1.05);
}

.product-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Quick View Overlay */
.quick-view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(79, 70, 229, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .quick-view-overlay {
    opacity: 1;
}

.quick-view-btn {
    background: white;
    color: #4F46E5;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
}

.quick-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.4);
}

.quick-view-btn span {
    display: block;
}

/* Wishlist Overlay */
.wishlist-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    background: white;
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: all 0.3s ease;
}

.wishlist-overlay:hover {
    transform: scale(1.1);
}

.wishlist-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    transition: color 0.3s ease;
}

.wishlist-btn:hover {
    color: #EF4444;
}

.wishlist-btn svg {
    width: 20px;
    height: 20px;
}

/* Product Content */
.product-content {
    text-align: center;
}

/* Product Category */
.product-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #8B5CF6;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

/* Product Title */
.product-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 12px 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.product-title a {
    text-decoration: none;
    color: inherit;
}

.product-title a:hover {
    color: #4F46E5;
}

/* Product Rating */
.product-rating {
    margin-bottom: 12px;
}

.product-rating svg {
    width: 18px;
    height: 18px;
    fill: #FBBF24;
}

/* Product Price */
.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4F46E5;
    margin-bottom: 16px;
    font-family: 'Montserrat', sans-serif;
}

.product-price .price {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg,
        rgba(79, 70, 229, 0.1) 0%,
        rgba(139, 92, 246, 0.1) 100%);
    padding: 8px 20px;
    border-radius: 50px;
}

/* Price strike-through */
.product-price .price del {
    font-weight: 500;
    color: #9CA3AF;
    font-size: 1rem;
    margin-right: 8px;
    opacity: 0.7;
}

/* Sale Badge */
.product-card.on-sale::before {
    content: 'SALE';
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 50px;
    z-index: 1;
}

/* Out of Stock */
.product-card.out-of-stock .product-image-wrapper::after {
    content: 'Out of Stock';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 24px;
    border-radius: 12px;
    text-align: center;
    color: #EF4444;
    font-weight: 600;
}

/* Pagination */
.products-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.products-pagination .pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.products-pagination .page-numbers,
.products-pagination .page-numbers li {
    margin: 0;
}

.products-pagination .page-numbers a,
.products-pagination .page-numbers li span {
    background: linear-gradient(135deg,
        rgba(79, 70, 229, 0.1) 0%,
        rgba(139, 92, 246, 0.1) 100%);
    color: #4F46E5;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.products-pagination .page-numbers a:hover,
.products-pagination .page-numbers li.current span {
    background: linear-gradient(135deg, #4F46E5 0%, #8B5CF6 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.products-pagination .page-numbers li.current span {
    background: linear-gradient(135deg, #4F46E5 0%, #8B5CF6 100%);
    color: white;
}

.products-pagination .prev,
.products-pagination .next {
    background: linear-gradient(135deg,
        rgba(79, 70, 229, 0.05) 0%,
        rgba(139, 92, 246, 0.05) 100%);
    color: #6B7280;
}

.products-pagination .prev:hover,
.products-pagination .next:hover {
    background: linear-gradient(135deg, #4F46E5 0%, #8B5CF6 100%);
    color: white;
    transform: translateY(-2px);
}

/* Loading State */
.products-archive.loading .products-grid {
    opacity: 0.5;
    pointer-events: none;
}

/* Gradient Text Animation for Product Name */
.product-card {
    perspective: 1000px;
}

.product-title {
    background: linear-gradient(135deg,
        #4F46E5 0%,
        #8B5CF6 50%,
        #06B6D4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 200%;
    animation: shimmerText 3s ease infinite;
}

@keyframes shimmerText {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .products-archive {
        padding: 40px 20px;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }

    .product-card {
        padding: 20px;
    }

    .product-title {
        font-size: 1.2rem;
    }

    .product-price {
        font-size: 1.3rem;
    }

    .products-pagination {
        margin-top: 40px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .product-card {
        padding: 16px;
    }

    .product-image-wrapper {
        aspect-ratio: 1/1;
    }

    .product-category {
        font-size: 0.7rem;
    }

    .product-title {
        font-size: 1.1rem;
    }

    .product-price {
        font-size: 1.2rem;
    }

    .quick-view-btn {
        padding: 12px 24px;
        font-size: 0.85rem;
    }
}

/* Loading Skeleton Animation */
.skeleton {
    background: linear-gradient(90deg,
        rgba(248, 250, 252, 0.8) 25%,
        rgba(241, 245, 249, 0.4) 50%,
        rgba(248, 250, 252, 0.8) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}