/* Search product cards */

.col-lg-9 > .shop_container.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-left: 0;
    margin-right: 0;
}

.col-lg-9 > .shop_container.grid > [class*="col-"] {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.col-lg-9 > .shop_container.grid > :not([class*="col-"]) {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .col-lg-9 > .shop_container.grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.col-lg-9 > .shop_container.list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-left: 0;
    margin-right: 0;
}

.col-lg-9 > .shop_container.list > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    padding-left: 0;
    padding-right: 0;
}

.search-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-product-card:hover {
    border-color: #e0e0e0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.search-product-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: #f7f7f7;
    overflow: hidden;
}

.search-product-card__media a:not(.product-favorite-btn) {
    display: block;
    width: 100%;
    height: 100%;
}

.search-product-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.95);
    color: #9a9a9a;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.product-favorite-btn i {
    font-size: 15px;
    line-height: 1;
}

.product-favorite-btn:hover,
.product-favorite-btn:focus {
    background-color: var(--ho-ho_white);
    color: var(--ho-ho_red);
    transform: scale(1.08);
    text-decoration: none;
}

.product-favorite-btn.is-active {
    color: var(--ho-ho_red);
}

.product-favorite-btn:disabled {
    pointer-events: none;
    opacity: 0.7;
}

.search-product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    max-width: calc(100% - 56px);
    padding: 0.3rem 0.65rem;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ho-ho_darkgrey);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.search-product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 14px 14px;
}

.search-product-card__title {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--ho-ho_black);
}

.search-product-card__title a {
    color: inherit;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    text-overflow: unset;
}

.search-product-card__title a:hover {
    color: var(--ho-ho_red);
}

.search-product-card__location {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin: 0.35rem 0 0;
    color: #9a9a9a;
    font-size: 0.78rem;
    line-height: 1.35;
}

.search-product-card__location i {
    margin-top: 0.15rem;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.search-product-card__location span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-product-card__desc,
.search-product-card__list-actions {
    display: none;
}

.search-product-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 0.75rem;
}

.search-product-card__pricing {
    margin: 0;
    min-width: 0;
    flex: 1;
}

.search-product-card__price {
    display: block;
    color: var(--ho-ho_black);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

.search-product-card__add-form {
    margin: 0;
    flex-shrink: 0;
}

.search-product-card__cart-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: var(--ho-ho_red);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.search-product-card__cart-btn i {
    font-size: 16px;
    line-height: 1;
}

.search-product-card__cart-btn:hover,
.search-product-card__cart-btn:focus {
    background-color: var(--ho-ho_darkred);
    color: #fff;
    transform: scale(1.05);
}

.search-product-card__view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 6px;
    background-color: var(--ho-ho_red);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.search-product-card__view-btn:hover,
.search-product-card__view-btn:focus {
    background-color: var(--ho-ho_darkred);
    color: #fff;
}

/* List view adjustments */

.shop_container.list .search-product-card {
    flex-direction: row;
    align-items: stretch;
}

.shop_container.list .search-product-card__media {
    flex: 0 0 220px;
    max-width: 220px;
    width: 220px;
    aspect-ratio: 1 / 1;
}

.shop_container.list .search-product-card__body {
    justify-content: center;
    padding: 14px 18px;
}

.shop_container.list .search-product-card__title {
    font-size: 18px;
    font-weight: 600;
}

.shop_container.list .search-product-card__desc {
    display: block;
    margin-top: 0.65rem;
    color: var(--ho-ho_darkgrey);
    font-size: 0.9rem;
    line-height: 1.45;
}

.shop_container.list .search-product-card__desc p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop_container.list .search-product-card__footer {
    margin-top: 0.85rem;
}

.shop_container.list .search-product-card__cart-btn,
.shop_container.list .search-product-card__add-form {
    display: none;
}

.shop_container.list .search-product-card__list-actions {
    display: block;
    margin-top: 0.85rem;
}

@media (max-width: 575.98px) {
    .shop_container.list .search-product-card {
        flex-direction: column;
    }

    .shop_container.list .search-product-card__media {
        flex-basis: auto;
        max-width: none;
        width: 100%;
    }
}
