/* MAIN SHOP PAGE ONLY */
body.post-type-archive-product.woocommerce-shop {
    --liora-shop-gold: #cfa05a;
    --liora-shop-gold-dark: #b9823c;
    --liora-shop-brown: #2a160f;
}

/* Modern, restrained image hover */
body.post-type-archive-product.woocommerce-shop .liora-shop-image-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    isolation: isolate;
    transform: translateZ(0);
    border: 1px solid rgba(77, 46, 29, .18);
    box-shadow: 0 8px 24px rgba(45, 28, 18, .10), 0 2px 6px rgba(45, 28, 18, .06);
    transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease;
}
body.post-type-archive-product.woocommerce-shop .liora-shop-image-link:hover {
    transform: translateY(-3px);
    border-color: rgba(207, 160, 90, .48);
    box-shadow: 0 16px 34px rgba(45, 28, 18, .16), 0 4px 12px rgba(45, 28, 18, .08);
}
body.post-type-archive-product.woocommerce-shop .liora-shop-image-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.16), transparent 38%, rgba(40,20,12,.10));
    transition: opacity .30s ease;
}
body.post-type-archive-product.woocommerce-shop .liora-shop-image-link::after {
    content: "VIEW PRODUCT  →";
    position: absolute;
    z-index: 3;
    left: 18px;
    right: 18px;
    bottom: 16px;
    padding: 10px 14px;
    text-align: center;
    border: 1px solid rgba(255,255,255,.55);
    background: rgba(35,18,12,.68);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    opacity: 0;
    transform: translateY(8px);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    transition: opacity .30s ease, transform .30s ease;
}
body.post-type-archive-product.woocommerce-shop .liora-shop-image-link img {
    display: block;
    width: 100%;
    transition: transform .42s cubic-bezier(.2,.7,.2,1), filter .42s ease;
    will-change: transform;
}
body.post-type-archive-product.woocommerce-shop .liora-shop-image-link:hover::before,
body.post-type-archive-product.woocommerce-shop .liora-shop-image-link:hover::after { opacity: 1; }
body.post-type-archive-product.woocommerce-shop .liora-shop-image-link:hover::after { transform: translateY(0); }
body.post-type-archive-product.woocommerce-shop .liora-shop-image-link:hover img {
    transform: scale(1.035);
    filter: contrast(1.025) saturate(1.025);
}

/* Exactly two action positions: Add to cart first, View cart second */
body.post-type-archive-product.woocommerce-shop .liora-shop-actions-row {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
    margin-top: 14px !important;
    min-height: 42px;
}
body.post-type-archive-product.woocommerce-shop .liora-shop-actions-row > .button,
body.post-type-archive-product.woocommerce-shop .liora-shop-actions-row > a.added_to_cart.wc-forward {
    position: static !important;
    float: none !important;
    margin: 0 !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

/* Original Add to cart stays in first position after AJAX add */
body.post-type-archive-product.woocommerce-shop .liora-shop-actions-row > .add_to_cart_button.added {
    background: var(--liora-shop-gold) !important;
    border-color: var(--liora-shop-gold) !important;
    color: #fff !important;
}
body.post-type-archive-product.woocommerce-shop .liora-shop-actions-row > .add_to_cart_button.added::after {
    display: none !important;
}

/* View cart is the second button */
body.post-type-archive-product.woocommerce-shop .liora-shop-actions-row > a.added_to_cart.wc-forward {
    order: 2 !important;
    border: 1px solid var(--liora-shop-brown) !important;
    border-radius: 2px !important;
    background: var(--liora-shop-brown) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: background .24s ease, color .24s ease, border-color .24s ease, transform .24s ease !important;
}
body.post-type-archive-product.woocommerce-shop .liora-shop-actions-row > a.added_to_cart.wc-forward::after {
    content: "→";
    margin-left: 8px;
}
body.post-type-archive-product.woocommerce-shop .liora-shop-actions-row > a.added_to_cart.wc-forward:hover,
body.post-type-archive-product.woocommerce-shop .liora-shop-actions-row > a.added_to_cart.wc-forward:focus {
    background: var(--liora-shop-gold) !important;
    border-color: var(--liora-shop-gold) !important;
    color: var(--liora-shop-brown) !important;
    outline: none !important;
    transform: translateY(-1px);
}

@media (max-width: 520px) {
    body.post-type-archive-product.woocommerce-shop .liora-shop-actions-row {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
}
@media (hover: none), (prefers-reduced-motion: reduce) {
    body.post-type-archive-product.woocommerce-shop .liora-shop-image-link::before,
    body.post-type-archive-product.woocommerce-shop .liora-shop-image-link::after { display: none; }
    body.post-type-archive-product.woocommerce-shop .liora-shop-image-link img { transform: none !important; transition: none !important; }
}
