/* ==============================================
=            Item Product Styles            =
============================================== */

.item-product {
    position       : relative;
    display        : flex;
    flex-direction : column;
    gap            : 1rem;
}

.item-product__image {
    overflow        : hidden;
    display         : flex;
    justify-content : center;
    align-items     : center;
    height          : 380px;
    border-radius   : 16px;
    background      : linear-gradient(180deg, rgba(255, 247, 235, 0.85) 0%, rgba(255, 255, 255, 0.65) 100%);
}

.item-product__image img {
    width      : 100%;
    height     : 100%;
    transition : transform 0.25s ease;
    object-fit : cover;
}

.item-product:hover .item-product__image img {
    transform : scale(1.05);
}

.item-product__infos {
    font-family    : var(--e-global-typography-text-font-family);
    position       : relative;
    display        : flex;
    flex-direction : column;
    gap            : 0;
}

.item-product__infos-link {
    display : block;
}

.item-product__infos-footer {
    display         : flex;
    flex-direction  : column;
    justify-content : space-between;
    align-items     : flex-start;
    padding-right   : 50px;
}

.item-product__infos-etat {
    font-size      : 13px;
    font-weight    : 500;
    font-style     : normal;
    line-height    : 25px;
    letter-spacing : -0.13px;
    text-transform : uppercase;
    display        : inline-flex;
    width          : fit-content;
    margin-bottom  : 4px;
    padding        : 4px 20px;
    border-radius  : 25px;
}

.item-product__infos-title h3 {
    font-family    : var(--e-global-typography-text-font-family);
    font-size      : 16px;
    font-weight    : 400;
    font-style     : normal;
    line-height    : 25px;
    color          : var(--e-global-color-text);
    text-transform : uppercase;
    margin         : 0;
}

.item-product__infos-footer-price {
    font-size      : 20px;
    font-weight    : 600;
    font-style     : normal;
    line-height    : 25px;
    color          : var(--e-global-color-accent);
    text-transform : uppercase;
    display        : flex;
    align-items    : center;
    gap            : 0.5rem;
}

.item-product__infos-footer-price small {
    font-size   : 0.75rem;
    font-weight : 500;
    color       : rgba(53, 40, 21, 0.55);
}

.item-product__infos-footer-price--old {
    font-size       : 0.85rem;
    font-weight     : 500;
    color           : rgba(53, 40, 21, 0.45);
    text-decoration : line-through;
}

.item-product__infos-footer-cart {
    position        : absolute;
    top             : 37px;
    right           : 0;
    display         : flex;
    flex-direction  : row;
    justify-content : flex-end;
    align-items     : center;
}

.item-product__infos-footer-cart a.added_to_cart {
    display : none;
}

.item-product__infos-footer-cart a.btn-add-product {
    display          : inline-flex;
    justify-content  : center;
    align-items      : center;
    width            : 44px;
    height           : 44px;
    transition       : transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    border-radius    : 2px;
    background-color : var(--e-global-color-accent);
}

.item-product__infos-footer-cart a.btn-add-product:hover {
    transform : translateY(-2px);
}

.item-product__infos-footer-cart a.btn-add-product.added {
    background-color : #4caf50;
}

.item-product__infos-footer-cart a.btn-add-product.added img {
    display : none;
}

.item-product__infos-footer-cart a.btn-add-product.added::after {
    content      : '✓';
    color        : #fff;
    font-size    : 18px;
    font-weight  : 700;
    line-height  : 1;
}

.item-product__infos-footer-cart a.btn-add-product--out {
    background-color : rgba(53, 40, 21, 0.35);
}

.item-product__infos-footer-cart a.btn-add-product--out:hover {
    transform : none;
}


.item-product__infos-footer-cart a img {
    max-width : 20px;
    height    : auto;
    filter    : brightness(0) invert(1);
}

/* Out of stock styles */
.item-product--out-of-stock .item-product__image {
    position : relative;
}

.item-product--out-of-stock .item-product__image::after {
    content          : '';
    position         : absolute;
    top              : 0;
    left             : 0;
    width            : 100%;
    height           : 100%;
    background-color : rgba(255, 255, 255, 0.6);
    pointer-events   : none;
}

.item-product--out-of-stock .item-product__image img {
    filter  : grayscale(100%);
    opacity : 0.5;
}

.item-product--out-of-stock .item-product__infos {
    opacity : 0.7;
}

/* Responsive styles */
@media (max-width : 1024px) {
    .item-product__image {
        height : 320px;
    }
}

@media (max-width : 768px) {
    .item-product__image {
        height : 280px;
    }
}
