/* =====================================================
   Premium Product Grid Styles
   ===================================================== */

/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ---- Container ---- */
.ppg-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 10px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
}

/* ---- Search Results Header ---- */
.ppg-search-header {
    margin-bottom: 20px;
}

.ppg-search-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px 0;
}

.ppg-search-title span {
    color: #13e800;
}

.ppg-search-count {
    font-size: 13px;
    color: #999;
    margin: 0;
    font-weight: 500;
}

/* ---- Filter Bar ---- */
.ppg-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.ppg-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 50px;
    background: #fff;
    color: #555;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
}

.ppg-filter-btn:hover {
    border-color: #13e800;
    color: #13e800;
    background: #f0fff0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(19, 232, 0, 0.15);
}

.ppg-filter-btn.active {
    background: linear-gradient(135deg, #13e800, #0fb500);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(19, 232, 0, 0.35);
}

.ppg-filter-btn.active .ppg-filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.ppg-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: #f0f0f0;
    font-size: 11px;
    font-weight: 700;
    color: #888;
    transition: all 0.3s ease;
}

.ppg-filter-icon {
    font-size: 15px;
}

/* ---- Grid Layout ---- */
.ppg-grid {
    display: grid;
    gap: 14px;
}

.ppg-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ppg-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ppg-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.ppg-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* ---- Product Card ---- */
.ppg-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.ppg-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: transparent;
}

/* Hide card on filter */
.ppg-card.ppg-hidden {
    display: none;
}

/* ---- Badges ---- */
.ppg-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ppg-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
}

.ppg-badge-sale {
    background: linear-gradient(135deg, #13e800, #0fb500);
    color: #fff;
    box-shadow: 0 3px 10px rgba(19, 232, 0, 0.3);
}

.ppg-badge-oos {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

/* ---- Image ---- */
.ppg-image-link {
    display: block;
    text-decoration: none !important;
}

.ppg-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ppg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ppg-card:hover .ppg-image {
    transform: scale(1.08);
}

.ppg-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f0f0f0;
}

/* ---- Product Info ---- */
.ppg-info {
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ---- Title ---- */
.ppg-title-link {
    text-decoration: none !important;
    color: inherit;
}

.ppg-title {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #1a1a2e;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
    letter-spacing: -0.2px;
}

.ppg-card:hover .ppg-title {
    color: #13e800;
}

/* ---- Price ---- */
.ppg-price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ppg-price-regular {
    font-size: 13px;
    font-weight: 600;
    color: #999;
    text-decoration: line-through;
}

.ppg-price-regular .woocommerce-Price-amount {
    font-weight: 600;
}

.ppg-price-sale {
    font-size: 17px;
    font-weight: 800;
    color: #13e800;
}

.ppg-price-sale .woocommerce-Price-amount {
    font-weight: 800;
}

.ppg-price-current {
    font-size: 17px;
    font-weight: 800;
    color: #1a1a2e;
}

.ppg-price-current .woocommerce-Price-amount {
    font-weight: 800;
}

/* ---- Specs / Description Bullets ---- */
.ppg-specs {
    margin-bottom: 8px;
    flex: 1;
}

.ppg-specs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #444;
}

.ppg-specs-list li {
    position: relative;
    padding-left: 14px;
    margin-bottom: 2px;
}

.ppg-specs-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #13e800;
}

/* ---- SKU / Product Code ---- */
.ppg-sku {
    font-size: 11px;
    font-weight: 600;
    color: #13e800;
    padding-top: 8px;
    margin-top: auto;
    position: relative;
}

.ppg-sku-separator {
    display: block;
    width: 100%;
    height: 1px;
    background: repeating-linear-gradient(90deg,
            #ccc 0px,
            #ccc 4px,
            transparent 4px,
            transparent 8px);
    margin-bottom: 6px;
}

/* ---- Add to Cart ---- */
.ppg-actions {
    margin-top: 8px;
}

.ppg-actions .ppg-add-to-cart,
.ppg-actions .button,
.ppg-actions .add_to_cart_button,
.ppg-actions a.button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 9px 16px !important;
    border: none !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #13e800, #0fb500) !important;
    color: #fff !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-transform: uppercase;
    text-decoration: none !important;
    box-sizing: border-box;
}

.ppg-actions .ppg-add-to-cart:hover,
.ppg-actions .button:hover,
.ppg-actions .add_to_cart_button:hover,
.ppg-actions a.button:hover {
    background: linear-gradient(135deg, #0fb500, #0c9600) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(19, 232, 0, 0.4);
}

.ppg-actions .added_to_cart {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #2e7d32;
    text-decoration: none !important;
}

/* ---- No Products ---- */
.ppg-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #aaa;
}

.ppg-no-products p {
    margin-top: 15px;
    font-size: 16px;
    font-weight: 500;
}

/* ---- Pagination ---- */
.ppg-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #f0f0f0;
    width: 100%;
}

.ppg-pagination-links {
    display: flex;
    gap: 4px;
}

.ppg-hidden {
    display: none !important;
}

.ppg-infinite-loader {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    color: #888;
    font-size: 14px;
    font-weight: 500;
}

.ppg-pagination[data-type="infinite"] .ppg-infinite-loader {
    display: flex;
}

.ppg-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #eee;
    border-top-color: #13e800;
    border-radius: 50%;
    animation: apsSpin 0.6s linear infinite;
}

.ppg-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    background: #f5f5f5;
    text-decoration: none;
    transition: all 0.25s ease;
}

.ppg-pagination .page-numbers:hover {
    background: #f0fff0;
    color: #13e800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ppg-pagination .page-numbers.current {
    background: linear-gradient(135deg, #13e800, #0fb500);
    color: #fff;
    box-shadow: 0 4px 15px rgba(19, 232, 0, 0.35);
}

.ppg-pagination .prev,
.ppg-pagination .next {
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* ---- Animations ---- */
@keyframes ppgFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ppg-card {
    animation: ppgFadeIn 0.4s ease-out both;
}

.ppg-card:nth-child(1) {
    animation-delay: 0.00s;
}

.ppg-card:nth-child(2) {
    animation-delay: 0.05s;
}

.ppg-card:nth-child(3) {
    animation-delay: 0.10s;
}

.ppg-card:nth-child(4) {
    animation-delay: 0.15s;
}

.ppg-card:nth-child(5) {
    animation-delay: 0.20s;
}

.ppg-card:nth-child(6) {
    animation-delay: 0.25s;
}

.ppg-card:nth-child(7) {
    animation-delay: 0.30s;
}

.ppg-card:nth-child(8) {
    animation-delay: 0.35s;
}

.ppg-card:nth-child(9) {
    animation-delay: 0.40s;
}

.ppg-card:nth-child(10) {
    animation-delay: 0.45s;
}

.ppg-card:nth-child(11) {
    animation-delay: 0.50s;
}

.ppg-card:nth-child(12) {
    animation-delay: 0.55s;
}

/* ---- Responsive ---- */
/* Responsive — keep 4 columns, just scale down */
@media screen and (max-width: 600px) {
    .ppg-container {
        padding: 10px 6px;
    }

    .ppg-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .ppg-filter-bar {
        gap: 4px;
    }

    .ppg-filter-btn {
        padding: 5px 10px;
        font-size: 10px;
    }

    .ppg-info {
        padding: 8px 6px 10px;
    }

    .ppg-title {
        font-size: 11px;
        margin: 0 0 4px 0;
    }

    .ppg-price-sale,
    .ppg-price-current {
        font-size: 13px;
    }

    .ppg-price-regular {
        font-size: 10px;
    }

    .ppg-specs-list {
        font-size: 9px;
    }

    .ppg-sku {
        font-size: 9px;
    }

    .ppg-actions .ppg-add-to-cart,
    .ppg-actions .button {
        padding: 6px 8px !important;
        font-size: 10px !important;
    }
}