/* Product catalog columns */
@media (max-width: 544px) {
    .ast-container .woocommerce ul.products:not(.elementor-grid),
    .woocommerce-page ul.products:not(.elementor-grid),
    .woocommerce.mobile-columns-3 ul.products:not(.elementor-grid),
    .woocommerce-page.mobile-columns-3 ul.products:not(.elementor-grid) {
        grid-template-columns: repeat(var(--mobile-catalog-column-size), minmax(0, 1fr));
    }
}

.entry-content[data-ast-blocks-layout] > * {
    max-width: var(--wp--custom--ast-content-width-size);
    margin-left: 0;
    margin-right: auto;
}

.astra-shop-summary-wrap {
    display: flex !important;
    flex-direction: column !important;
}

.astra-shop-thumbnail-wrap .chamnar-badge-discount {
    bottom: 10px;
    right: -5px;
}

.woocommerce-loop-product__title {
    order: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6em;
    line-height: 1.3 !important;

    color: var(--brand-color);
    font-size: 16px !important;
    font-weight: 700 !important;
    text-decoration: underline;
}

.woocommerce-loop-product__title:hover {
    color: var(--brand-hover);
}

.chamnar-grid-author {
    order: 2 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    width: 100%;
    min-width: 0 !important;
    display: block;

    margin-bottom: 5px;
    font-size: var(--font-size-body);
    color: var(--text-body);

    @media (max-width: 768px) {
        font-size: 13px;
    }
}

/* Force the "By" and the Author Links to act like normal words in a sentence */
.chamnar-grid-author span,
.chamnar-grid-author a {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
}

.chamnar-grid-author span {
    margin-right: 4px !important;
}

.astra-shop-thumbnail-wrap,
.woocommerce ul.products li.product a img {
    height: auto !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
}

.woocommerce ul.products li.product a img {
    position: relative !important;
    width: 100% !important;
    display: block !important;
    margin: 0 auto 15px !important;
}

.woocommerce-LoopProduct-link.woocommerce-loop-product__link img {
    transition: transform 0.3s ease;
}

.woocommerce-LoopProduct-link.woocommerce-loop-product__link:hover img {
    transform: translateY(-5px);
}

.products.columns-5 {
    justify-items: stretch !important;
}

.products.columns-5 .chamnar-price-wrapper {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--brand-color);
    font-size: var(--font-size-body);
}

.products.columns-5 .chamnar-price-wrapper .chamnar-online-price {
    color: var(--text-body);
    font-weight: 500;
}

.products.columns-5 .chamnar-price-wrapper .chamnar-online-price,
.products.columns-5 .chamnar-price-wrapper .chamnar-member-price {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    min-width: 0 !important;
    display: block;
}

.products.columns-5 .chamnar-price-wrapper .chamnar-online-price .original-price,
.products.columns-5 .chamnar-price-wrapper .chamnar-member-price .original-price {
    color: var(--text-muted);
    font-weight: normal;
    margin-right: 5px;
}

.products.columns-5 .chamnar-price-wrapper .chamnar-member-price .price-amount {
    font-size: calc(var(--font-size-body) + 2px);
    font-weight: 700;
}

@media (max-width: 768px) {
    .products.columns-5 .chamnar-price-wrapper {
        font-size: var(--font-size-label);
    }

    .products.columns-5 .chamnar-price-wrapper .chamnar-member-price .price-amount {
        font-size: var(--font-size-body);
    }
}

.price {
    order: 3;
}

/* Remove out of stock badge */
.ast-shop-product-out-of-stock {
    display: none;
}

/* Remove quick add to cart */
.astra-shop-thumbnail-wrap .ahfb-svg-iconset,
.astra-shop-thumbnail-wrap .ast-on-card-button,
.astra-shop-thumbnail-wrap .add_to_cart_button {
    display: none !important;
}

/* Page numbers */
.woocommerce-pagination .page-numbers li {
    border: 1px solid var(--brand-color) !important;
}

.woocommerce-pagination .page-numbers li .current {
    color: var(--text-white) !important;
    background-color: var(--brand-color) !important;
    border-color: var(--brand-color) !important;
}

.woocommerce-pagination .page-numbers li a:hover {
    color: var(--text-white) !important;
    background-color: var(--brand-color) !important;
}

.woocommerce-loop-product__link img,
.attachment-woocommerce_thumbnail {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: center;
}
