/* ============================================================
   Product archive styles — loaded only on is_post_type_archive('product')
   via liposachets_enqueue_product_styles() in post-type.php.
   Single product styles  →  product.css
   Product List block     →  product-list.css  (auto-loaded by block)
   ============================================================ */

/* ── Product archive ────────────────────────────────────────── */
.lipo-products-archive {
    padding-top: clamp(2rem, 5vw, 4rem);
    padding-bottom: clamp(2.5rem, 6vw, 5rem);
}

.lipo-products-archive__intro {
    margin-bottom: clamp(1.2rem, 3vw, 2rem);
}

.lipo-products-archive__intro .wp-block-term-description {
    color: var(--wp--preset--color--body-dark-60, #54626a);
    max-width: 70ch;
}

.lipo-products-grid {
    gap: clamp(1rem, 2.2vw, 1.6rem) !important;
}

.lipo-product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--wp--preset--color--border-grey, #e6ecef);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lipo-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(10, 42, 51, 0.08);
    border-color: color-mix(in srgb, var(--wp--preset--color--primary) 35%, #e6ecef 65%);
}

.lipo-product-card__image {
    margin: 0 !important;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--wp--preset--color--background-alt, #f4f7f9);
}

.lipo-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lipo-product-card__content {
    padding: 1rem 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
}

.lipo-product-card__title {
    margin: 0;
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    line-height: 1.25;
}

.lipo-product-card__title a {
    color: var(--wp--preset--color--body);
    text-decoration: none;
}

.lipo-product-card__title a:hover {
    color: var(--wp--preset--color--primary-dark);
}

.lipo-product-card__excerpt {
    margin-top: auto;
    color: var(--wp--preset--color--body-dark-60, #54626a);
}

.lipo-product-card__excerpt p {
    margin: 0;
}

.lipo-product-card__excerpt .wp-block-post-excerpt__more-text {
    margin-top: 0.75rem;
}

.lipo-product-card__excerpt .wp-block-post-excerpt__more-link {
    display: inline-block;
    background: var(--wp--preset--color--primary-dark);
    color: var(--wp--preset--color--body-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    transition: opacity 0.2s ease;
}

.lipo-product-card__excerpt .wp-block-post-excerpt__more-link:hover {
    opacity: 0.88;
}

.lipo-products-archive__query .wp-block-query-pagination {
    margin-top: clamp(1rem, 3vw, 2rem);
    padding-top: 1rem;
    border-top: 1px solid var(--wp--preset--color--border-grey, #e6ecef);
}

.lipo-products-archive__query .wp-block-query-pagination a,
.lipo-products-archive__query .wp-block-query-pagination span {
    color: var(--wp--preset--color--primary-dark);
    font-weight: 700;
    text-decoration: none;
}

.lipo-products-archive__empty {
    border: 1px dashed var(--wp--preset--color--border-grey, #e6ecef);
    border-radius: 14px;
    padding: 1rem;
    color: var(--wp--preset--color--body-dark-60, #54626a);
}

.product-usp-grid-wrapper > * {
    overflow: hidden;
}

.product-usp-grid-wrapper img {
    width: 80px;
    height: 80px;
}

@media (max-width: 1024px) {
    .lipo-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .lipo-products-grid {
        grid-template-columns: 1fr !important;
    }

    .product-usp-grid-wrapper {
        gap: 0.5rem;
    }
}
