/* =========================================================
   ATLANTICA
   PRODUCT CARD — COMPONENT
   ========================================================= */


/* =========================================================
   CARD
   ========================================================= */

.atl-product-card {
    position: relative;

    width: 100%;

    overflow: hidden;

    border: 1px solid var(--atl-border);
    border-radius: 20px;

    background: #ffffff;

    box-shadow:
        0 8px 25px rgba(0, 35, 87, .045);

    transition:
        transform .28s cubic-bezier(.22,.61,.36,1),
        box-shadow .28s ease,
        border-color .28s ease;
}

.atl-product-card:hover {
    transform: translateY(-6px);

    border-color: rgba(11,42,130,.14);

    box-shadow:
        0 18px 45px rgba(0,35,87,.11);
}


/* =========================================================
   MEDIA / IMAGE
   ========================================================= */

.atl-product-card-media {
    position: relative;

    width: 100%;
    height: 245px;

    overflow: hidden;

    margin: 0;
    padding: 0;

    background: #f5f7fa;

    border-radius: 20px 20px 0 0;
}


/* =========================================================
   IMAGE LINK
   ========================================================= */

.atl-product-card-image-link {
    position: relative;

    width: 100%;
    height: 100%;

    display: block;

    overflow: hidden;

    margin: 0;
    padding: 0;

    text-decoration: none;
}


/* =========================================================
   IMAGE
   ========================================================= */

.atl-product-card-image {
    display: block;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 0;

    object-fit: cover;

    transition:
        transform .5s cubic-bezier(.22,.61,.36,1),
        filter .35s ease;
}

.atl-product-card:hover .atl-product-card-image {
    transform: scale(1.035);

    filter: saturate(1.04);
}


/* =========================================================
   IMAGE PLACEHOLDER
   ========================================================= */

.atl-product-card-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #aeb8c6;

    background:
        linear-gradient(
            145deg,
            #f7f9fb,
            #eef2f6
        );

    font-size: 38px;
}


/* =========================================================
   BADGES
   ========================================================= */

.atl-product-card-badges {
    position: absolute;

    z-index: 5;

    top: 14px;
    left: 14px;

    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;

    gap: 6px;

    max-width: calc(100% - 28px);

    pointer-events: none;
}

.atl-product-badge {
    min-height: 26px;

    padding: 0 10px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    color: #ffffff;

    font-size: 7px;
    font-weight: 850;

    line-height: 1;
    letter-spacing: .045em;

    text-transform: uppercase;

    white-space: nowrap;

    box-shadow:
        0 5px 14px rgba(0,0,0,.14);
}


/* =========================================================
   BADGE — NEW
   ========================================================= */

.atl-product-badge-new {
    background:
        linear-gradient(
            135deg,
            #c55902 0%,
            #fda257 100%
        );
}


/* =========================================================
   BADGE — FEATURED
   ========================================================= */

.atl-product-badge-featured {
    background:
        linear-gradient(
            135deg,
            #002357 0%,
            #0b2a82 100%
        );
}


/* =========================================================
   FAVORITE
   ========================================================= */

.atl-product-card-favorite {
    position: absolute;

    z-index: 8;

    top: 14px;
    right: 14px;

    width: 38px;
    height: 38px;

    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(0,35,87,.10);
    border-radius: 11px;

    color: #002357;

    background: rgba(255,255,255,.94);

    box-shadow:
        0 7px 20px rgba(0,35,87,.13);

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition:
        color .2s ease,
        background .2s ease,
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.atl-product-card-favorite i {
    display: block;

    font-size: 17px;

    line-height: 1;

    transition:
        transform .2s ease,
        color .2s ease;
}

.atl-product-card-favorite:hover {
    color: #ffffff;

    border-color: #c55902;

    background:
        linear-gradient(
            135deg,
            #c55902,
            #fda257
        );

    transform: translateY(-2px);

    box-shadow:
        0 10px 25px rgba(197,89,2,.25);
}

.atl-product-card-favorite:hover i {
    transform: scale(1.08);
}


/* =========================================================
   FAVORITE — ACTIVE
   Prévu pour quand le système favoris sera branché
   ========================================================= */

.atl-product-card-favorite.is-active {
    color: #ffffff;

    border-color: #c55902;

    background:
        linear-gradient(
            135deg,
            #c55902,
            #fda257
        );

    box-shadow:
        0 8px 22px rgba(197,89,2,.24);
}

.atl-product-card-favorite.is-active i {
    transform: scale(1.05);
}


/* =========================================================
   BODY
   ========================================================= */

.atl-product-card-body {
    padding: 19px;
}


/* =========================================================
   BRAND
   ========================================================= */

.atl-product-card-brand {
    display: block;

    margin: 0;

    color: var(--atl-blue);

    font-size: 8px;
    font-weight: 850;

    line-height: 1.2;

    letter-spacing: .14em;

    text-transform: uppercase;
}


/* =========================================================
   TITLE
   ========================================================= */

.atl-product-card-title {
    min-height: 42px;

    margin: 8px 0 0;

    color: var(--atl-blue-dark);

    font-size: 15px;
    font-weight: 760;

    line-height: 1.35;

    letter-spacing: -.015em;
}

.atl-product-card-title a {
    color: inherit;

    text-decoration: none;

    transition: color .2s ease;
}

.atl-product-card-title a:hover {
    color: var(--atl-blue);
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.atl-product-card-description {
    display: -webkit-box;

    min-height: 35px;

    margin: 8px 0 0;

    overflow: hidden;

    color: #687588;

    font-size: 10.5px;
    font-weight: 450;

    line-height: 1.6;

    letter-spacing: -.003em;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


/* =========================================================
   META
   ========================================================= */

.atl-product-card-meta {
    min-height: 22px;

    margin-top: 13px;

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 6px 12px;
}

.atl-product-card-meta > span {
    display: inline-flex;
    align-items: center;

    gap: 5px;

    color: #7c8796;

    font-size: 8.5px;
    font-weight: 600;

    line-height: 1.3;
}

.atl-product-card-meta > span i {
    color: var(--atl-blue);

    font-size: 10px;
}


/* =========================================================
   BOTTOM
   ========================================================= */

.atl-product-card-bottom {
    margin-top: 16px;
    padding-top: 14px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 12px;

    border-top: 1px solid var(--atl-border);
}


/* =========================================================
   PRICE
   ========================================================= */

.atl-product-card-price {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.atl-product-card-price small {
    margin-bottom: 3px;

    color: #8d98a7;

    font-size: 7.5px;
    font-weight: 700;

    line-height: 1;
}

.atl-product-card-price strong {
    display: block;

    color: var(--atl-blue-dark);

    font-size: 16px;
    font-weight: 850;

    line-height: 1.15;
}

.atl-product-card-price del {
    display: block;

    margin-top: 4px;

    color: #9aa4b1;

    font-size: 8px;

    line-height: 1;
}


/* =========================================================
   CART FORM
   ========================================================= */

.atl-product-card-cart-form {
    margin: 0;
    padding: 0;

    display: block;
}


/* =========================================================
   ACTION BUTTON
   ========================================================= */

.atl-product-card-action {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 11px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #002357,
            #0b2a82
        );

    text-decoration: none;

    cursor: pointer;

    box-shadow:
        0 7px 18px rgba(0,35,87,.17);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.atl-product-card-action i {
    font-size: 14px;

    line-height: 1;
}

.atl-product-card-action:hover {
    color: #ffffff;

    transform: translateY(-2px);

    box-shadow:
        0 10px 24px rgba(0,35,87,.24);

    background:
        linear-gradient(
            135deg,
            #0b2a82,
            #0c6f96
        );
}


/* =========================================================
   DISABLED / OUT OF STOCK
   ========================================================= */

.atl-product-card-action.is-disabled,
.atl-product-card-action:disabled {
    opacity: .55;

    cursor: not-allowed;

    background:
        linear-gradient(
            135deg,
            #8994a4,
            #aeb6c1
        );

    box-shadow: none;
}

.atl-product-card-action.is-disabled:hover,
.atl-product-card-action:disabled:hover {
    transform: none;

    box-shadow: none;
}


/* =========================================================
   FOCUS ACCESSIBILITY
   ========================================================= */

.atl-product-card-favorite:focus-visible,
.atl-product-card-action:focus-visible,
.atl-product-card-image-link:focus-visible,
.atl-product-card-title a:focus-visible {
    outline: 3px solid rgba(197,89,2,.28);

    outline-offset: 3px;
}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 767.98px) {

    .atl-product-card-media {
        height: 300px;
    }

    .atl-product-card-body {
        padding: 18px;
    }

    .atl-product-card-title {
        font-size: 15px;
    }

    .atl-product-card-description {
        font-size: 10px;
    }

    .atl-product-card-favorite {
        width: 38px;
        height: 38px;

        top: 12px;
        right: 12px;
    }

    .atl-product-card-badges {
        top: 12px;
        left: 12px;

        max-width: calc(100% - 65px);
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .atl-product-card-media {
        height: 290px;
    }

    .atl-product-card-body {
        padding: 17px;
    }

    .atl-product-card-brand {
        font-size: 7.5px;
    }

    .atl-product-card-title {
        min-height: 40px;

        font-size: 14px;
    }

    .atl-product-card-description {
        font-size: 10px;

        line-height: 1.55;
    }

    .atl-product-card-meta {
        margin-top: 11px;

        gap: 5px 9px;
    }

    .atl-product-card-meta > span {
        font-size: 8px;
    }

    .atl-product-card-bottom {
        margin-top: 14px;
    }

    .atl-product-card-price strong {
        font-size: 15px;
    }

    .atl-product-card-action {
        width: 37px;
        height: 37px;

        flex-basis: 37px;
    }

    .atl-product-badge {
        min-height: 24px;

        padding: 0 8px;

        font-size: 6.5px;
    }
}

/* ==========================================================
   ATLANTICA — PRODUCT CARD
   MOBILE IMAGE FIX
   ========================================================== */

/*
 * Sur mobile, le bloc image doit avoir une hauteur
 * proportionnelle à la largeur réelle de la carte.
 *
 * On évite ainsi la grande zone vide sous l'image.
 */

@media (max-width: 767.98px) {

    /* ------------------------------------------------------
       01. CONTENEUR IMAGE
       ------------------------------------------------------ */

    .atl-product-card-media {

        position: relative !important;

        width: 100% !important;

        /*
         * Ratio proche de celui des visuels produits
         * utilisés actuellement.
         */
        aspect-ratio: 1 / 1 !important;

        height: auto !important;

        min-height: 0 !important;
        max-height: none !important;

        overflow: hidden !important;

        padding: 0 !important;

        background: #F4F8FA !important;
    }


    /* ------------------------------------------------------
       02. IMAGE
       ------------------------------------------------------ */

    .atl-product-card-media img {

        position: absolute !important;

        inset: 0 !important;

        width: 100% !important;
        height: 100% !important;

        min-width: 0 !important;
        min-height: 0 !important;

        max-width: none !important;
        max-height: none !important;

        display: block !important;

        object-fit: cover !important;

        object-position: center center !important;

        margin: 0 !important;

        padding: 0 !important;
    }


    /* ------------------------------------------------------
       03. IMAGE / PICTURE
       ------------------------------------------------------ */

    .atl-product-card-media picture {

        position: absolute !important;

        inset: 0 !important;

        width: 100% !important;
        height: 100% !important;

        display: block !important;

        margin: 0 !important;
        padding: 0 !important;
    }


    .atl-product-card-media picture img {

        width: 100% !important;
        height: 100% !important;

        object-fit: cover !important;
    }


    /* ------------------------------------------------------
       04. SI LE WRAPPER UTILISE .atl-product-card-image
       ------------------------------------------------------ */

    .atl-product-card-image {

        position: relative !important;

        width: 100% !important;

        aspect-ratio: 1 / 1 !important;

        height: auto !important;

        min-height: 0 !important;

        overflow: hidden !important;

        padding: 0 !important;
    }


    .atl-product-card-image img {

        width: 100% !important;
        height: 100% !important;

        display: block !important;

        object-fit: cover !important;

        margin: 0 !important;
    }


    /* ------------------------------------------------------
       05. BADGES
       ------------------------------------------------------ */

    .atl-product-card-badges {

        z-index: 5 !important;
    }


    .atl-product-card-favorite {

        z-index: 6 !important;
    }

}


/* ==========================================================
   PETIT MOBILE
   ========================================================== */

@media (max-width: 575.98px) {

    .atl-product-card-media,
    .atl-product-card-image {

        aspect-ratio: 1 / 1 !important;

        height: auto !important;

        min-height: 0 !important;
    }


    .atl-product-card-media img,
    .atl-product-card-image img {

        width: 100% !important;
        height: 100% !important;

        object-fit: cover !important;
    }

}