/**
 * Gian hàng — thẻ sản phẩm (owl-shop-products + lưới)
 * Ghi đè .border-0 / .rounded-8 / .text-dark trên card trong block này
 */

/* —— Card —— */
.shop_main-product-item .card {
    position: relative;
    border: 1px solid rgba(15, 23, 42, 0.07) !important;
    border-radius: 16px !important;
    overflow: hidden;
    background: linear-gradient(165deg, #fff 0%, #f8fafc 50%, #f1f5f9 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 1px 3px rgba(15, 23, 42, 0.05),
        0 10px 28px rgba(15, 23, 42, 0.07);
    transition:
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.25s ease;
}

.shop_main-product-item .card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    z-index: 0;
}

.shop_main-product-item .card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #c40000 0%, #ff0800 50%, #ff8a80 100%);
    opacity: 0;
    transition: opacity 0.28s ease;
    z-index: 2;
    pointer-events: none;
    border-radius: 16px 16px 0 0;
}

.shop_main-product-item .card:hover::after {
    opacity: 1;
}

.shop_main-product-item .card > .p-3 {
    position: relative;
    z-index: 1;
}

.shop_main-product-item .card:hover {
    border-color: rgba(255, 8, 0, 0.22) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 4px 14px rgba(255, 8, 0, 0.09),
        0 22px 48px rgba(15, 23, 42, 0.11);
    transform: translateY(-4px);
}

/* —— Ảnh —— */
.shop_main-product-item .list-item-img {
    position: relative;
    border-radius: 14px !important;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background:
        radial-gradient(ellipse 100% 75% at 50% 0%, rgba(255, 255, 255, 0.8) 0%, transparent 50%),
        linear-gradient(168deg, #eef2f7 0%, #e2e8f0 45%, #f8fafc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.shop_main-product-item .list-item-img::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.5) 0%, transparent 45%, rgba(255, 8, 0, 0.035) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
}

.shop_main-product-item:hover .list-item-img::before {
    opacity: 1;
}

.shop_main-product-item .list-item-img::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, 0.07),
        inset 0 -1px 0 rgba(15, 23, 42, 0.03);
    pointer-events: none;
    z-index: 2;
}

.shop_main-product-item .list-item-img a {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    outline: none;
}

.shop_main-product-item .list-item-img a:focus-visible {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(255, 8, 0, 0.45);
    border-radius: 12px;
}

.shop_main-product-item .list-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.1));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

.shop_main-product-item:hover .list-item-img img {
    transform: scale(1.05);
    filter: drop-shadow(0 10px 22px rgba(15, 23, 42, 0.14));
}

/* —— Tiêu đề + giá —— */
.shop_main-product-item .list-item-info {
    padding-top: 0.75rem;
}

.shop_main-product-item .list-item-info h3.text-nm-1 {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.012em;
    margin-bottom: 0.5rem;
    min-height: 2.75em;
}

.shop_main-product-item .list-item-info h3 a.text-twoline,
.shop_main-product-item .list-item-info h3 a {
    color: #0f172a !important;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.shop_main-product-item .list-item-info h3 a:hover {
    color: #d40000 !important;
}

/* Dòng “Giá bán / Liên hệ” hoặc dòng phụ (không dùng .product-item-price) — chip */
.shop_main-product-item .list-item-info > p:not(.product-item-price) {
    margin-top: 0.35rem;
    margin-bottom: 0;
    padding: 8px 10px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #64748b;
    background: rgba(241, 245, 249, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 10px;
}

.shop_main-product-item .list-item-info > p:not(.product-item-price) b {
    font-weight: 700;
    color: #0f172a;
}

.shop_main-product-item .product-item-price {
    display: inline-block;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #b91c1c;
    margin-top: 0.4rem;
    padding: 6px 10px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(254, 226, 226, 0.55) 0%, rgba(254, 242, 242, 0.3) 100%);
    border: 1px solid rgba(252, 165, 165, 0.4);
}

.shop_main-product-item .price-old {
    font-size: 0.75rem;
    color: #94a3b8;
    text-decoration: line-through;
    margin-right: 6px;
}

.shop_main-product-item .price-promo {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #ff2d2d 0%, #c40000 100%);
    padding: 4px 8px;
    border-radius: 999px;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(196, 0, 0, 0.32);
}

/* —— Owl —— */
.owl-shop-products .owl-stage-outer {
    padding: 4px 2px 14px;
}

.owl-shop-products .owl-stage {
    display: flex;
}

.owl-shop-products .owl-item {
    display: flex;
    height: auto;
}

.owl-shop-products .shop-product-slide,
.owl-shop-products .shop_main-product-item,
.owl-shop-products .shop_main-product-item .card {
    height: 100%;
}

.owl-shop-products .shop_main-product-item .card {
    display: flex;
    flex-direction: column;
}

.owl-shop-products .shop_main-product-item .list-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.owl-shop-products .shop_main-product-item .product-item-price {
    margin-top: auto;
}

.shop-section-card .shop_main-product-item .p-3,
.shop_main-productlist .shop_main-product-item .p-3 {
    padding: 0.9rem 0.9rem 1rem !important;
}

@media (min-width: 576px) {
    .shop-section-card .shop_main-product-item .p-3,
    .shop_main-productlist .shop_main-product-item .p-3 {
        padding: 1rem 1rem 1.1rem !important;
    }
}

.owl-shop-products .shop_main-product-item .p-3 {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.9rem 0.9rem 1rem !important;
}

@media (min-width: 576px) {
    .owl-shop-products .shop_main-product-item .p-3 {
        padding: 1rem 1rem 1.1rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shop_main-product-item .card,
    .shop_main-product-item .card::after,
    .shop_main-product-item .list-item-img::before,
    .shop_main-product-item .list-item-img img {
        transition: none;
    }

    .shop_main-product-item .card:hover {
        transform: none;
    }

    .shop_main-product-item:hover .list-item-img img {
        transform: none;
    }
}
