/* Search Results - Product Grid Layout for Astra / WooCommerce */

/* Κρύβει τίτλους/headers του default search όπου χρειάζεται */
body.search-results .ast-archive-description {
    margin-bottom: 30px;
}

/* Το βασικό wrapper των αποτελεσμάτων στο Astra */
body.search-results .site-main .ast-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 40px 28px !important;
    align-items: start !important;
}

/* Κάθε προϊόν σαν κάρτα */
body.search-results article.type-product {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: none !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    border-bottom: none !important;
    text-align: left !important;
}

/* Αφαίρεση εσωτερικών wrappers που κρατάνε blog layout */
body.search-results article.type-product .ast-post-format-,
body.search-results article.type-product .post-content,
body.search-results article.type-product .entry-content-wrap {
    width: 100% !important;
    max-width: 100% !important;
}

/* Εικόνες προϊόντων */
body.search-results article.type-product img {
    width: 100% !important;
    max-width: 220px !important;
    height: 220px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto 16px !important;
}

/* Τίτλος προϊόντος */
body.search-results article.type-product .entry-title {
    font-size: 15px !important;
    line-height: 1.35 !important;
    margin: 0 0 8px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

/* Κρύβει ημερομηνία, author, published info, comments κτλ */
body.search-results article.type-product .entry-meta,
body.search-results article.type-product .posted-on,
body.search-results article.type-product .byline,
body.search-results article.type-product .author,
body.search-results article.type-product .cat-links,
body.search-results article.type-product .tags-links,
body.search-results article.type-product .comments-link {
    display: none !important;
}

/* Κρύβει περιγραφή/excerpt */
body.search-results article.type-product .entry-content,
body.search-results article.type-product .entry-summary,
body.search-results article.type-product .ast-excerpt-container {
    display: none !important;
}

/* Read More */
body.search-results article.type-product .read-more,
body.search-results article.type-product .more-link {
    font-size: 14px !important;
    margin-top: 8px !important;
    display: inline-block !important;
}

/* Στο public site κρύβουμε τιμές / κουμπιά αγοράς αν εμφανιστούν στο search */
body:not(.b2b-site).search-results article.type-product .price,
body:not(.b2b-site).search-results article.type-product .add_to_cart_button,
body:not(.b2b-site).search-results article.type-product .button {
    display: none !important;
}

/* Tablet */
@media (max-width: 1024px) {
    body.search-results .site-main .ast-row {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    body.search-results .site-main .ast-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 30px 18px !important;
    }

    body.search-results article.type-product img {
        height: 180px !important;
        max-width: 180px !important;
    }
}

/* Μικρά κινητά */
@media (max-width: 480px) {
    body.search-results .site-main .ast-row {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile - center align search results */
@media (max-width: 768px) {
    body.search-results article.type-product {
        text-align: center !important;
    }

    body.search-results article.type-product .entry-title {
        text-align: center !important;
    }

    body.search-results article.type-product .read-more,
    body.search-results article.type-product .more-link {
        display: inline-block !important;
        text-align: center !important;
    }

    body.search-results article.type-product .post-thumb,
    body.search-results article.type-product .post-thumb-img-content,
    body.search-results article.type-product .entry-header {
        text-align: center !important;
    }
}
