/* Product card — uniform image canvas (portrait + landscape) */
.product-cart-wrap .product-img-action-wrap,
.store-v2 .product-cart-wrap .product-img-action-wrap {
    position: relative;
    /* padding: 15px 15px 0; */
    margin: 0;
    /* background: #fff; */
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.product-cart-wrap .product-img-action-wrap .product-img,
.store-v2 .product-cart-wrap .product-img-action-wrap .product-img {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.product-cart-wrap .product-img-action-wrap .product-img a.product-img-canvas,
.store-v2 .product-cart-wrap .product-img-action-wrap .product-img a.product-img-canvas {
    display: block;
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #fff;
    border: 0;
    padding: 0;
    aspect-ratio: auto !important;
}

.product-cart-wrap .product-img-action-wrap .product-img a.product-img-canvas img,
.store-v2 .product-cart-wrap .product-img-action-wrap .product-img a.product-img-canvas img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100% - 16px);
    max-height: calc(100% - 16px);
    object-fit: contain;
    object-position: center;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-cart-wrap .product-img-action-wrap .product-img a.product-img-canvas img.hover-img,
.store-v2 .product-cart-wrap .product-img-action-wrap .product-img a.product-img-canvas img.hover-img {
    opacity: 0;
    visibility: hidden;
    z-index: 2;
}

.product-cart-wrap:hover .product-img-action-wrap .product-img a.product-img-canvas img.default-img:not(:only-child),
.store-v2 .product-cart-wrap:hover .product-img-action-wrap .product-img a.product-img-canvas img.default-img:not(:only-child) {
    opacity: 0;
    visibility: hidden;
}

.product-cart-wrap:hover .product-img-action-wrap .product-img a.product-img-canvas img.hover-img,
.store-v2 .product-cart-wrap:hover .product-img-action-wrap .product-img a.product-img-canvas img.hover-img {
    opacity: 1;
    visibility: visible;
}

.product-cart-wrap:hover .product-img-action-wrap .product-img a.product-img-canvas img.default-img:only-child,
.store-v2 .product-cart-wrap:hover .product-img-action-wrap .product-img a.product-img-canvas img.default-img:only-child {
    transform: translate(-50%, -50%) scale(1.05);
}

.product-cart-wrap .product-img-action-wrap .product-img a.product-img-canvas img.product-img--store-logo,
.store-v2 .product-cart-wrap .product-img-action-wrap .product-img a.product-img-canvas img.product-img--store-logo {
    max-width: min(140px, calc(100% - 32px));
    max-height: min(140px, calc(100% - 32px));
    border-radius: 12px;
}

.product-cart-wrap .product-img-action-wrap .product-action-1.product-action-1--stagger {
    position: absolute;
    top: 12px;
    left: auto;
    right: auto;
    inset-inline-end: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: fit-content;
    background: transparent !important;
    border: none !important;
    border-radius: 0;
    box-shadow: none !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
    z-index: 9;
}

.product-cart-wrap:hover .product-img-action-wrap .product-action-1.product-action-1--stagger {
    opacity: 1;
    visibility: visible;
}

.product-cart-wrap .product-action-1--stagger .action-btn {
    width: 38px;
    height: 38px;
    margin: 0 !important;
    padding: 0;
    line-height: 1;
    border: 1px solid #e8ecef !important;
    border-right: 1px solid #e8ecef !important;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(37, 61, 78, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #253D4E;
    opacity: 0;
    transform: translateX(14px);
    transition:
        opacity 0.25s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
    transition-delay: 0s;
}

[dir="rtl"] .product-cart-wrap .product-action-1--stagger .action-btn {
    transform: translateX(-14px);
}

.product-cart-wrap:hover .product-action-1--stagger .action-btn:nth-child(1) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.05s;
}

.product-cart-wrap:hover .product-action-1--stagger .action-btn:nth-child(2) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.12s;
}

.product-cart-wrap:hover .product-action-1--stagger .action-btn:nth-child(3) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.19s;
}

.product-cart-wrap .product-action-1--stagger .action-btn:hover {
    background: #3BB77E;
    border-color: #3BB77E !important;
    color: #fff;
    transform: translateX(0) scale(1.06);
}

.product-cart-wrap .product-action-1--stagger .action-btn.active {
    background: #3BB77E;
    border-color: #3BB77E !important;
    color: #fff;
}

/* store-v2 pages — align with store-page overrides */
.store-v2 .product-action-1--stagger .action-btn {
    border-color: var(--line, #e8ecef) !important;
}

.store-v2 .product-cart-wrap:hover .product-action-1--stagger .action-btn:hover,
.store-v2 .product-action-1--stagger .action-btn.active {
    background: var(--brand, #3BB77E);
    border-color: var(--brand, #3BB77E) !important;
}

/* Compact content — less space below image */
.product-cart-wrap .product-content-wrap {
    padding: 10px 12px 12px;
}

.product-cart-wrap .product-content-wrap .product-category {
    margin-bottom: 2px;
}

.product-cart-wrap .product-content-wrap .product-category a {
    font-size: 11px;
    line-height: 1.2;
}

.product-cart-wrap .product-content-wrap h2 {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
}

.product-cart-wrap .product-content-wrap h2 a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-cart-wrap .product-rate-cover {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-cart-wrap .product-card-rating-text {
    font-size: 11px;
    line-height: 1.2;
}

.product-cart-wrap .product-card-bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e8ecef;
}

.product-cart-wrap .product-card-bottom .product-price {
    flex: 1;
    min-width: 0;
    margin: 0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 6px;
    line-height: 1.2;
}

.product-cart-wrap .product-card-bottom .product-price > span:first-child {
    font-size: 16px;
    font-weight: 800;
    color: #2A4A11;
}

.product-cart-wrap .product-card-bottom .product-price .old-price {
    font-size: 11px;
}

.product-cart-wrap .product-card-bottom .add-cart {
    width: auto;
    flex-shrink: 0;
    margin: 0;
}

.product-cart-wrap .product-card-bottom .add-cart .add,
.product-cart-wrap .product-card-bottom .add-cart .add-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    height: 40px;
    min-width: 40px;
    padding: 0 12px;
    margin: 0;
    border: none;
    border-radius: 10px;
    background-color: #3BB77E;
    background-image: none;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(59, 183, 126, 0.22);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.product-cart-wrap .product-card-bottom .add-cart .add span {
    color: inherit;
}

.product-cart-wrap .product-card-bottom .add-cart .add i,
.product-cart-wrap .product-card-bottom .add-cart .add-disabled i {
    margin: 0 !important;
    font-size: 15px;
    line-height: 1;
    color: inherit;
    flex-shrink: 0;
}

.product-cart-wrap .product-card-bottom .add-cart .add:hover {
    background-color: #2A4A11;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(42, 74, 17, 0.24);
}

.product-cart-wrap .product-card-bottom .add-cart .add:active {
    transform: translateY(0);
}

.product-cart-wrap .product-card-bottom .add-cart .add-disabled {
    background: #eef1f4;
    color: #9aa4b2;
    cursor: not-allowed;
    box-shadow: none;
}

.product-cart-wrap .product-card-bottom .add-cart .add-disabled:hover {
    transform: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    .product-cart-wrap .product-img-action-wrap .product-img a.product-img-canvas,
    .store-v2 .product-cart-wrap .product-img-action-wrap .product-img a.product-img-canvas {
        height: 200px;
    }

    .product-cart-wrap .product-img-action-wrap .product-action-1.product-action-1--stagger {
        top: 8px;
        inset-inline-end: 8px;
        gap: 6px;
    }

    .product-cart-wrap .product-action-1--stagger .action-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .product-cart-wrap .product-content-wrap {
        padding: 8px 10px 10px;
    }

    .product-cart-wrap .product-card-bottom .add-cart .add,
    .product-cart-wrap .product-card-bottom .add-cart .add-disabled {
        height: 36px;
        padding: 0 10px;
        font-size: 12px;
        border-radius: 9px;
    }

    .product-cart-wrap .product-card-bottom .add-cart .add i,
    .product-cart-wrap .product-card-bottom .add-cart .add-disabled i {
        font-size: 13px;
    }
}
