.product {
    padding: 72px 48px;
    min-height: 100vh;
}

.product .container-page {
    max-width: 1200px;
    display: flex;
    justify-content: center;
    align-items: stretch;
    position: relative;
    gap: 32px;
    margin: 0 auto;
    height: auto;
}

/* Left side */
.product .container-images-mobile {
    display: none;
    height: 50vh;
}

.product .container-page .container-images {
    width: calc(100% - 43% - 32px);
}

.product .container-images .images-product {
    display: grid;
    grid-gap: 8px;
    width: 100%;
}

.product .images-product .main-image,
.product .images-product .other-images{
    width: 100%;
}

.product .images-product .other-images {
    display: flex;
    flex-wrap: wrap;
    align-content: space-between;
    gap: 8px;
    height: max-content;
}

.product .other-images .image-container {
    width: calc((100% - 8px) / 2);
}

.product .main-image img,
.product .other-images img {
    display: block;
    -o-object-fit: cover;
    object-fit: cover;
    height: 100%;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

/* ANIMATION ZOOM */
.product .zoomed-image {
    position: relative;
    overflow: hidden;
}

.product .zoomed-image img {
    width: 100%;
    height: auto;
    transition: filter .25s linear;
    transform-origin: center center;
    pointer-events: none;
}

/* Right side */
.product .container-page .container-info {
    position: sticky;
    top: calc(0px + 8px);
    transition: top .5s cubic-bezier(.45, .05, .55, .95);
    width: 43%;
    height: -moz-fit-content;
    height: fit-content;
}

.product .container-info .name-product {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product .container-info .price-product {
    margin: 2rem 0;
}

.product .price-product .price {
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.product .price-product .price-before-discount {
    font-size: 0.8rem;
    text-decoration: line-through;
    font-weight: 100;
    margin-left: 3px;
}

.product .container-variants {
    margin: 1rem 0;
}

.product .container-variants .option-product{
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.product .option-product .label-option {
    font-weight: 100;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 0.2rem;
}

.product .button-add-to-cart {
    background: var(--primary-color);
    color: var(--secondary-color);
    border: 2px solid var(--primary-color);
    padding: 0.5rem 1rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-size: 1rem;
    font-weight: 800;
    width: 100%;
    text-align: center;
    margin: 1rem 0;
}

.product .button-add-to-cart:hover {
    background: transparent;
    color: var(--primary-color);
    transition: 0.25s;
}

.product .social-networks {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.product .social-networks a {
    color: #000000;
}
.product .social-networks a:hover {
    color: var(--primary-color);
}

/* REVIEWS */
.star-rating {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--secondary-color);
    margin: 1.2rem 0 2rem 0;
}
.star-rating .star-container {
    position: relative;
    width: 18px;
    height: 18px;
    overflow: hidden;
    margin: 0 2px;
}

.star-rating .star-background,
.star-rating .star-foreground svg {
    position: absolute;
    width: 100%;
    height: 100%;
}

.star-rating .star-foreground {
    overflow: hidden;
    position: absolute;
    height: 100%;
}

.star-rating .number-reviews {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 5px;
    margin-left: 5px;
}

.product .reviews-container {
    max-width: 1200px;
    margin: 5rem auto;
}

.product .reviews-container .review {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: var(--primary-color-40);
}

.product .title-reviews {
    margin: 2rem auto;
    display: block;
    text-transform: uppercase;
    letter-spacing: -1px;
    font-weight: 500;
    color : var(--primary-color);
    text-align: center;
}

/* OTHER PRODUCTS */
.product .container-other-products {
    max-width: 1200px;
    margin: 5rem auto;
    display: grid;
    align-items: start;
    grid-row-gap: 32px;
}

.product .container-other-products .title-other-products {
    margin: 2rem auto;
    display: block;
    text-transform: uppercase;
    letter-spacing: -1px;
    font-weight: 500;
}

.product .container-other-products .other-products {
    display: grid;
    align-items: start;
    grid-gap: 32px;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, calc((100% / 4) - 32px * 3 / 4));
}

.product .other-products .other-product {
    display: block;
    width: 100%;
}

.product .other-product .product-image-wrapper {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.product .other-product .product-image-wrapper .product-image {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    padding-bottom: 100%;
}

.product .other-product .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.8s ease-in-out;
}

.product .other-product .product-image .second-image {
    opacity: 0;
}

.product .other-product .product-image:hover .second-image {
    opacity: 1;
}

.product .other-product .product-image:hover .first-image {
    opacity: 0;
}

.product .other-product .product-info-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding-top: 16px;
}

.product .other-product .product-info {
    display: flex;
    align-items: baseline;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    color: #000000;
}


.product .other-product .product-info .product-name {
    text-transform: capitalize;
    word-break: break-word;
}

/* MODAL */
.modal-media-product,
.modal-size {
    display: grid;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: fixed;
    overflow-y: scroll;
    overflow-x: hidden;
    top: 0;
    left: 0;
    width: 100vw;
    min-height: 100vh;
    height: 100vh;
    z-index: 1000;
    transform: translateZ(0);
    padding: 96px;
    background-color: var(--primary-color-80);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    visibility: hidden;
    opacity: 0;
    transition : opacity .7s cubic-bezier(.45, .05, .55, .95) 0s,visibility .7s cubic-bezier(.45, .05, .55, .95) 0s
}

.modal-size {
    background-color: transparent;
}

.modal-size .container {
    border: 1px solid grey;
    border-radius: 20px;
    padding: 1rem;
    background: #fff;
    position: relative;
}

.modal-media-product.active,
.modal-size.active {
    visibility: visible;
    opacity: 1;
}

.modal-media-product .container-media {
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    grid-area: 1 / -1;
    gap: 16px;
}

.modal-media-product .container-media img {
    max-width: 100%;
    width: unset;
    display: block;
    -o-object-fit: cover;
    object-fit: cover;
    height: 100%;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    transition: filter .25s linear;
}

.modal-media-product .container-close {
    position: absolute;
    top: 2rem;
    right: 3rem;
}

.modal-size .container-close {
    text-align: right;
}

.modal-media-product .container-close .close-modal {
    padding: 1rem;
    font-size: 1.5rem;
    color: #ffffff;
    background-color: transparent;
    border: none;
}

.modal-size .close-modal {
    border: none;
    background-color: transparent;
    font-size: 1.5rem;
}

/* MODAL SIZING */
table.size-guide {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    display: table;
    box-sizing: border-box;
    border-spacing: 2px;
    border-collapse: collapse;
}

.size-guide thead {
    display: table-header-group;
    vertical-align: middle;
    unicode-bidi: isolate;
    border-color: inherit;
    box-sizing: border-box;
    background-color: #eeeeee;
}

.size-guide tr {
    display: table-row;
    vertical-align: inherit;
    unicode-bidi: isolate;
    border-color: inherit;
    box-sizing: border-box;
}

.size-guide th,
.size-guide td {
    padding: 0.5rem;
    text-align: left;
    border: 1px solid #dbdbdb;
    display: table-cell;
    vertical-align: inherit;
    unicode-bidi: isolate;
    box-sizing: border-box;
}

.button-size-modal {
    display: flex;
    flex-direction: column;
}

@media screen and (max-width: 768px) {
    .product {
        padding: 1rem;
    }

    .product .container-page {
        flex-direction: column;
    }

    .product .container-images-mobile {
        display: block;
    }

    .splide__slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .product .container-page .container-images {
        display: none;
    }

    .product .container-page .container-info {
        width: 100%;
        top: 0;
    }
    
    .product .container-other-products .other-products {
        grid-template-columns: repeat(auto-fit, calc((100% / 2) - 32px * 1 / 2));
    }
    
    .product .other-product .product-info {
        flex-direction: column;
    }
    .modal-media-product {
        padding : 20px;
    }
}

@media  screen and (max-width: 576px) {
    .product .container-other-products .other-products {
        grid-template-columns: repeat(auto-fit, calc((100% / 1) - 32px * 0 / 1));
    }
}

