/* ============================================================
   NP Archive Products — np-archive-products.css
   Version: 1.0.0
   ============================================================ */

/* ── Container ───────────────────────────────────────────────── */
.np-archive-products-wrap {
    width: 100%;
    box-sizing: border-box;
}

/* ── Grid ─────────────────────────────────────────────────────── */
.np-archive-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

/* ── Card ────────────────────────────────────────────────────── */
.np-product-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.np-product-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.13);
    transform: translateY(-2px);
}

.np-product-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.np-product-link:hover {
    text-decoration: none;
    color: inherit;
}

/* ── Image Area ──────────────────────────────────────────────── */
.np-product-image-wrap {
    position: relative;
    padding: 16px 16px 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.np-product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.25s ease;
}

.np-product-card:hover .np-product-img {
    transform: scale(1.04);
}

/* ── Overlay ─────────────────────────────────────────────────── */
.np-product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: inherit;
}

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

.np-overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #00a896;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.15s ease, transform 0.15s ease;
}

.np-overlay-btn:hover {
    background: #00897b;
    transform: scale(1.02);
    color: #ffffff;
}

/* ── Product Info ────────────────────────────────────────────── */
.np-product-info {
    padding: 8px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.np-product-title {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #333333;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.np-product-rating {
    margin: 4px 0;
    font-size: 12px;
    color: #f5c208;
}

.np-product-rating .star-rating {
    float: none;
    display: inline-block;
    margin: 0 auto;
}

.np-product-price {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #00a896;
    text-align: center;
}

.np-product-price del {
    color: #aaaaaa;
    font-weight: 400;
    margin-right: 4px;
    text-decoration: line-through;
}

.np-product-price ins {
    background: none;
    text-decoration: none;
    color: #e74c3c;
}

/* ── No Products ────────────────────────────────────────────── */
.np-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888888;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ── Numbered Pagination ────────────────────────────────────── */
.np-pagination {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.np-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #555555;
    text-decoration: none;
    background: #ffffff;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.np-pagination a.page-numbers:hover {
    border-color: #00a896;
    color: #00a896;
    background: rgba(0, 168, 150, 0.05);
    text-decoration: none;
}

.np-pagination .page-numbers.current {
    background: #00a896;
    border-color: #00a896;
    color: #ffffff;
    pointer-events: none;
}

.np-pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    pointer-events: none;
    color: #999999;
}

.np-pagination .page-numbers.prev,
.np-pagination .page-numbers.next {
    font-size: 16px;
}

/* ── Load More ────────────────────────────────────────────────── */
.np-loadmore-wrap {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.np-loadmore-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 32px;
    background: #00a896;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.15s ease, transform 0.1s ease;
    min-width: 120px;
}

.np-loadmore-btn:hover {
    background: #00897b;
    transform: translateY(-1px);
    color: #ffffff;
}

.np-loadmore-btn:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

/* ── Spinner ──────────────────────────────────────────────────── */
.np-loadmore-spinner {
    display: flex;
    gap: 6px;
    align-items: center;
    height: 24px;
}

.np-spinner-dot {
    width: 8px;
    height: 8px;
    background: #00a896;
    border-radius: 50%;
    animation: np-bounce 1.2s infinite ease-in-out both;
}

.np-spinner-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.np-spinner-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.np-spinner-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes np-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── All Loaded Message ──────────────────────────────────────── */
.np-all-loaded {
    font-size: 13px;
    color: #999999;
    margin: 0;
    padding: 8px 0;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .np-archive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

@media (max-width: 767px) {
    .np-archive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .np-product-image-wrap {
        padding: 10px 10px 6px;
    }

    .np-product-title {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .np-product-price {
        font-size: 12px;
    }

    .np-overlay-btn {
        font-size: 11px;
        padding: 6px 12px;
    }

    .np-pagination .page-numbers {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
    }

    .np-loadmore-btn {
        font-size: 13px;
        padding: 10px 24px;
        min-width: 100px;
    }

    .np-no-products {
        padding: 40px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .np-archive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .np-product-image-wrap {
        padding: 6px 6px 4px;
    }

    .np-product-info {
        padding: 4px 8px 8px;
    }

    .np-product-title {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }

    .np-product-price {
        font-size: 11px;
    }

    .np-overlay-btn {
        font-size: 10px;
        padding: 4px 10px;
        gap: 4px;
    }

    .np-overlay-btn svg {
        width: 10px;
        height: 10px;
    }
}