/* ── Owl carousel: equal height + kill legacy owl-item hover ── */
.widget.widget-product .product-carousel .owl-stage {
    display: flex;
    align-items: stretch;
}

.widget.widget-product .product-carousel .owl-item {
    display: flex !important;
    float: none;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
}

.widget.widget-product .product-carousel .owl-item:hover {
    transform: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.widget.widget-product .product-carousel .owl-stage-outer {
    overflow: hidden;
    padding: 8px 4px 16px !important;
}

/* ── Card shell ── */
.widget.widget-product .product-carousel .owl-item .cpc-card.item {
    --cpc-h: 400px;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: var(--cpc-h);
    height: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0 !important;
    overflow: hidden;
    background: #fff !important;
    border: 1px solid rgba(15, 23, 42, 0.07) !important;
    border-radius: 18px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.35s ease;
    isolation: isolate;
    cursor: pointer;
}

.cpc-card__glow {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    opacity: 0;
    background: linear-gradient(135deg, rgba(111, 179, 40, 0.35), rgba(99, 102, 241, 0.2), rgba(111, 179, 40, 0.35));
    background-size: 200% 200%;
    z-index: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.cpc-card__glow::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: calc(18px - 1px);
    background: #fff;
}

.widget.widget-product .product-carousel .owl-item .cpc-card.item:hover {
    transform: translateY(-8px) scale(1.015);
    border-color: rgba(111, 179, 40, 0.35) !important;
    box-shadow:
        0 20px 40px -16px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(111, 179, 40, 0.12) !important;
    z-index: 2;
}

.widget.widget-product .product-carousel .owl-item .cpc-card.item:hover .cpc-card__glow {
    opacity: 1;
    animation: cpc-glow-shift 3s ease infinite;
}

@keyframes cpc-glow-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ── Image ── */
.cpc-card__media-link {
    position: relative;
    z-index: 1;
    display: block;
    text-decoration: none;
    flex-shrink: 0;
}

.cpc-card__media {
    position: relative;
    height: 168px;
    margin: 12px 12px 0;
    padding: 12px;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f4f6f8 0%, #eef1f5 100%);
}

.cpc-card__media-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.9), transparent 55%);
    opacity: 0.8;
    transition: opacity 0.4s ease;
}

.cpc-card:hover .cpc-card__media-bg {
    opacity: 1;
}

.cpc-card__img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.cpc-card:hover .cpc-card__img {
    transform: scale(1.08) translateY(-2px);
}

.cpc-card__discount {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    padding: 5px 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
    animation: cpc-badge-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cpc-badge-pop {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.cpc-card__view-hint {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    color: #fff;
    font-size: 22px;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    backdrop-filter: blur(2px);
}

.cpc-card:hover .cpc-card__view-hint {
    opacity: 1;
    transform: scale(1);
}

/* ── Body ── */
.cpc-card__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
    padding: 12px 14px 14px;
    min-height: 0;
}

.cpc-card__title {
    margin: 0 0 10px;
    height: 40px;
    flex-shrink: 0;
}

.cpc-card__title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 100%;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    color: #1e293b;
    text-decoration: none;
    text-align: center;
    transition: color 0.25s ease;
}

.cpc-card:hover .cpc-card__title a {
    color: #5b8f15;
}

.cpc-card__price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-height: 46px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.cpc-card__price-old {
    margin: 0;
    height: 14px;
    font-size: 11px;
    font-weight: 400;
    line-height: 14px;
    color: #94a3b8;
    text-decoration: line-through;
}

.cpc-card__price-old--empty {
    visibility: hidden;
    text-decoration: none;
}

.cpc-card__price-old span {
    font-size: inherit;
    color: inherit;
}

.cpc-card__price-row {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 4px;
    max-width: 100%;
}

.cpc-card__price-val {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
    letter-spacing: -0.03em;
    transition: color 0.3s ease;
}

.cpc-card:hover .cpc-card__price-val {
    color: #4d7c0f;
}

.cpc-card__price-unit {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.cpc-card__price-row .product-tax-badge {
    display: inline !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-inline-start: 2px !important;
    font-size: 10px !important;
    line-height: 1 !important;
}

.cpc-card__price-row .product-tax-badge::before {
    content: "·";
    margin-inline-end: 2px;
    color: #cbd5e1;
}

.cpc-card__price-row .product-tax-badge__pct {
    color: #64748b !important;
    font-weight: 600 !important;
}

.cpc-card__price-row .product-tax-badge__label {
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

.cpc-card__price-contact {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
}

/* ── CTA ── */
.cpc-card__cta {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #7cb342 0%, #558b2f 100%);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 8px 20px -8px rgba(85, 139, 47, 0.65);
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease;
}

.cpc-card__cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.28) 50%, transparent 60%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}

.cpc-card:hover .cpc-card__cta::before {
    transform: translateX(120%);
}

.cpc-card__cta-text,
.cpc-card__cta-icon {
    position: relative;
    z-index: 1;
}

.cpc-card__cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 11px;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cpc-card:hover .cpc-card__cta {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -8px rgba(85, 139, 47, 0.75);
}

.cpc-card:hover .cpc-card__cta-icon {
    transform: scale(1.12) rotate(-8deg);
}

.cpc-card__cta--outline {
    background: #fff !important;
    border: 1.5px solid #e2e8f0;
    color: #334155 !important;
    box-shadow: none;
}

.cpc-card__cta--outline:hover {
    background: #f8fafc !important;
    border-color: #7cb342;
    color: #4d7c0f !important;
}

.cpc-card__cta--outline::before {
    display: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .widget.widget-product .product-carousel .owl-item .cpc-card.item {
        --cpc-h: 360px;
        border-radius: 16px !important;
    }

    .cpc-card__media {
        height: 140px;
        margin: 10px 10px 0;
        padding: 10px;
    }

    .cpc-card__title {
        height: 36px;
        margin-bottom: 8px;
    }

    .cpc-card__title a {
        font-size: 12px;
    }

    .cpc-card__price {
        min-height: 42px;
        margin-bottom: 10px;
    }

    .cpc-card__price-val {
        font-size: 16px;
    }

    .cpc-card__cta {
        height: 38px;
        font-size: 12px;
        border-radius: 10px;
    }

    .widget.widget-product .product-carousel .owl-item .cpc-card.item:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

@media (prefers-reduced-motion: reduce) {
    .widget.widget-product .product-carousel .owl-item .cpc-card.item,
    .cpc-card__img,
    .cpc-card__cta,
    .cpc-card__view-hint,
    .cpc-card__glow {
        transition: none !important;
        animation: none !important;
    }

    .widget.widget-product .product-carousel .owl-item .cpc-card.item:hover {
        transform: none;
    }
}
