/*product*/

.product {
    border-bottom: 1px solid var(--clr-brown-light);
}

.product__wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    border-bottom: 1px solid var(--clr-brown-light);
}

/*slider*/

.product__carousel {
    width: 50vw;
}

.swiper {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.product__swiper {
    position: sticky;
    top: 80px;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    
    background: var(--clr-white);
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product__swiper-buttons {
    position: absolute;
    left: calc(40 / 1440 * 100vw);
    bottom: calc(40 / 1440 * 100vw);

    display: flex;
    flex-direction: row;
    align-items: center;

    background-color: var(--clr-white);
    border: 1px solid var(--clr-brown);
    z-index: 1;
    box-sizing: border-box;
}

.product__swiper .swiper-pagination {
    position: relative;
    bottom: 0;

    width: 84px;
    height: 56px;

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

    box-sizing: border-box;
    border-left: 1px solid var(--clr-brown);
    border-right: 1px solid var(--clr-brown);
    background: var(--clr-white);
}

.product__swiper-button-next,
.product__swiper-button-prev {
    width: 56px;
    height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--clr-brown);
    background-color: var(--clr-white);
    cursor: pointer;
}

.product__swiper-button-next,
.product__swiper-button-prev {
    &.swiper-button-disabled {
        cursor: auto;
        opacity: .35;
        pointer-events: none;
    }
}

/*product info*/

.product__content {
    width: 100%;
    padding: calc(80 / 1440 * 100vw);

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 32px;

    border-left: 1px solid var(--clr-brown-light);
    box-sizing: border-box;
}

.product__header {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
}

.product__header-info {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 28px;
}

.product__availability {
    display: flex;
    align-items: center;
    gap: 4px;
}

.product__availability::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background-color: green;
    border-radius: 50%;
}

.product__availability.is-instock::before {
    background-color: green;
}

.product__availability.is-outofstock::before {
    background-color: red;
}

.product__availability.is-onbackorder::before {
    background-color: orange;
}

.product__header-info span {
    text-transform: uppercase;
}

.product__name {
    margin: 0;
    text-transform: uppercase;
}

.product__header-price {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
}

.product__price-old {
    text-decoration: line-through;
}

.product__btns {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
}

.product__btn {
    text-decoration: none;
}

.product__size {
    padding: 24px 0px;
    width: 100%;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 16px;

    box-sizing: border-box;
    border-bottom: 1px solid var(--clr-brown-light);
}

.product__size-list {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

.product__size-item {
    height: 56px;
    min-width: auto !important;
    padding: 16px 24px 14px 24px;

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

    box-sizing: border-box;
    color: var(--clr-brown);
    border: 1px solid var(--clr-border) !important;
    background-color: var(--clr-white);
    cursor: pointer;
}

.product__size-item:hover {
    background-color: var(--clr-brown);
    color: var(--clr-white);
}

.product__size-item.active {
    background-color: var(--clr-brown);
    color: var(--clr-white);
}

.product__size-item.is-disabled,
.product__size-item:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    color: var(--clr-brown-light);
    border-color: var(--clr-brown-light) !important;
    background-color: var(--clr-white);
}

.product__size-item.is-disabled:hover,
.product__size-item:disabled:hover {
    color: var(--clr-brown-light);
    background-color: var(--clr-white);
}

.product__size-actions {
    width: 100%;
    margin-top: 8px;

    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 10px;
}

.product__size-actions .product__size-btn,
.product__size-actions .product__add-to-cart {
    flex: 1 1 200px;
}

.product__characteristics {
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

.characteristics__table-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.characteristics__table-wrap {
    width: 100%;
    display: flex;
    align-items: flex-end;
    min-width: 0;
}

.characteristics__table-wrap::after {
    content: '';
    flex: 1 1 auto;
    min-width: 12px;
    border-bottom: 1px dotted currentColor;
    opacity: 0.5;
    margin: 0 8px 2px;
}

.characteristics__table-title {
    margin: 0;
    white-space: nowrap;
}

/*recommendation*/

.product__list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.product__item {
    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;

    /* aspect-ratio: 1/1; */

    background-color: var(--clr-white);
    box-sizing: border-box;
    text-decoration: none;
    overflow: hidden;
}

.product__item:not(:first-child) {
    border-left: 1px solid var(--clr-brown-light);
}

/* Close the right edge when the last item does not fill the last column */
.product__list > .product__item:last-child:not(:nth-child(4n)) {
    border-right: 1px solid var(--clr-brown-light);
}

.product__picture {
    height: 100%;
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
}

.product__img {
    height: 100%;
    width: 100%;
    display: block;
    object-fit: cover;
    transition: .3s ease-in-out;
}

.product__item:hover .product__picture .product__img {
    transform: scale(1.1);
}

.product__item-header {
    position: absolute;
    right: calc(30 / 1440 * 100vw);
    bottom: calc(30 / 1440 * 100vw);
    left: calc(30 / 1440 * 100vw);

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 14px;
}

.product__item-price {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.price-old {
    text-decoration: line-through;
}

.product__item-title {
    margin: 0;
}

/*size modal start*/

.modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #000000cc;
    z-index: 1000;
}

.modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-modal__content {
    position: relative;
    max-width: 720px;
    width: calc(100% - 40px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: calc(45 / 1440 * 100vw);
    background-color: var(--clr-extra-light);
    text-align: center;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 32px;
    line-height: 100%;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 1;
}

.size-modal__step.is-hidden,
.size-modal__panel.is-hidden,
.size-modal__control.is-hidden {
    display: none;
}

.size-modal__title {
    margin: 0 0 24px;
    text-transform: uppercase;
}

.size-modal__tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 24px;
}

.size-modal__tab {
    width: 100%;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.size-modal__subtitle {
    margin: 0 0 24px;
}

.size-modal__img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    display: block;
    margin: 0 auto 24px;
}

.size-modal__instructions {
    text-align: left;
    margin-bottom: 32px;
}

.size-modal__instructions-title {
    margin: 0 0 16px;
}

.size-modal__list {
    margin: 0;
    padding-left: 20px;
}

.size-modal__list-item {
    margin: 0;
}

.size-modal__list-item + .size-modal__list-item {
    margin-top: 8px;
}

.size-modal__footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.size-modal__control {
    flex: 0 0 auto;
}

.size-modal__submit {
    flex: 1 1 auto;
    min-width: 0 !important;
    max-width: none !important;
}

.size__item-stepper {
    display: flex;
    flex-direction: row;
    align-items: center;
    border: 1px solid var(--clr-brown);
    background: var(--clr-white);
}

.size__item-stepper-btn {
    padding: 0 calc(16 / 1440 * 100vw);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    border: none;
    background: transparent;
    cursor: pointer;
}

.size__item-stepper-btn-icon {
    height: calc(24 / 1440 * 100vw);
    width: calc(24 / 1440 * 100vw);
}

.size__item-stepper-value {
    padding: calc(16 / 1440 * 100vw) calc(28 / 1440 * 100vw);
    border-left: 1px solid var(--clr-border);
    border-right: 1px solid var(--clr-border);
    white-space: nowrap;
}

.size-modal__ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 32px 0;
}

.size-modal__ring-img {
    width: 100%;
    max-height: 256px;
    object-fit: contain;
    display: block;
}

.size-modal__ring-values {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.size-modal__size {
    margin: 0;
}

.size-modal__circumference {
    margin: 0;
}

.size-modal__actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.size-modal__action {
    width: 100%;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

@media screen and (max-width: 768px) {
    .size-modal__content {
        padding: 50px 40px;
    }

    .size__item-stepper-btn {
        padding: 0 16px;
    }

    .size__item-stepper-btn-icon {
        height: 24px;
        width: 24px;
    }

    .size__item-stepper-value {
        padding: 16px 20px;
    }
}

@media screen and (max-width: 576px) {
    .size-modal__content {
        padding: 40px 20px;
    }

    .size-modal__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .size-modal__control {
        display: flex;
        justify-content: center;
    }

    .size-modal__actions {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/*size modal end*/

/*share modal start*/

.share-modal {
    max-width: calc(420 / 1440 * 100vw);
    width: calc(100% - 40px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--clr-black);
    background-color: var(--clr-white);
}

.share-modal::backdrop {
    backdrop-filter: blur(10px);
    background-color: rgba(0, 0, 0, 0.05);
}

.share-modal__wrapper {
    position: relative;
    padding: calc(36 / 1440 * 100vw);
    display: flex;
    flex-direction: column;
    gap: calc(24 / 1440 * 100vw);
    box-sizing: border-box;
}

.share-modal__close {
    position: absolute;
    top: calc(16 / 1440 * 100vw);
    right: calc(16 / 1440 * 100vw);
    padding: 0;
    outline: none;
    border: none;
    background-color: transparent;
    cursor: pointer;
}

.share-modal__close-icon {
    display: block;
    width: 24px;
    height: 24px;
}

.share-modal__article {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 28px;
}

.share-modal__title,
.share-modal__subtitle {
    margin: 0;
}

.share-modal__socials {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
}

.share-modal__social {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: opacity 0.3s ease-in-out;
}

.share-modal__social:hover {
    opacity: 0.75;
}

.share-modal__social-icon {
    display: block;
    width: calc(48 / 1440 * 100vw);
    height: calc(48 / 1440 * 100vw);
    max-width: 56px;
    max-height: 56px;
}

.share-modal__social-label {
    text-align: center;
}

.share-modal__copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-modal__copy-label {
    margin: 0;
}

.share-modal__copy-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
}

.share-modal__copy-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.share-modal__copy-btn {
    flex: 0 0 auto;
    min-width: 0 !important;
    max-width: none !important;
    white-space: nowrap;
}

.share-modal__copy-status {
    margin: 0;
    min-height: 1.2em;
}

.share-modal__copy-status.is-success {
    color: var(--clr-brown);
}

@media screen and (max-width: 768px) {
    .share-modal {
        max-width: 420px;
        margin: auto 40px;
    }

    .share-modal__wrapper {
        padding: 36px 28px 28px;
        gap: 24px;
    }

    .share-modal__close {
        top: 14px;
        right: 14px;
    }

    .share-modal__social-icon {
        width: 48px;
        height: 48px;
    }
}

@media screen and (max-width: 480px) {
    .share-modal {
        margin: auto 20px;
        max-width: 100%;
    }

    .share-modal__wrapper {
        padding: 36px 20px 24px;
    }

    .share-modal__copy-row {
        flex-direction: column;
    }

    .share-modal__copy-btn {
        width: 100%;
    }
}

/*share modal end*/

@media screen and (max-width: 1024px) {

    .product__wrap {
        display: flex;
        flex-direction: column;
    }

    .product__carousel {
        width: 100vw;
        border-bottom: 1px solid var(--clr-brown-light);
    }

    .product__content {
        border-left: none;
    }

}

@media screen and (max-width: 768px) {

    .product__swiper-buttons {
        position: absolute;
        left: 40px;
        bottom: 40px;
    }

    .product__content {
        padding: 40px;
    }

    .product__size {
        padding: 0 0 24px;
    }

    .product__btns {
        width: 100%;
        flex-wrap: wrap;
    }

    .product__btn {
        min-width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .product__list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .product__item-header {
        right: 30px;
        bottom: 30px;
        left: 30px;
    }

}

@media screen and (max-width: 768px) {
    
    .product__item:not(:first-child) {
        border-left: none;
    }

    .product__item:nth-child(2n) {
        border-left: 1px solid var(--clr-black);
    }

    .product__item:nth-child(-n+2) {
        border-bottom: 1px solid var(--clr-brown-light);
    }

    .product__list > .product__item:last-child:not(:nth-child(4n)) {
        border-right: none;
    }

    .product__list > .product__item:last-child:not(:nth-child(2n)) {
        border-right: 1px solid var(--clr-brown-light);
    }

}

@media screen and (max-width: 480px) {

    .product__header-info {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .characteristics__table-title {
        font-size: 10px !important;
    }

    .product__swiper {
        display: flex !important;
        justify-content: center;
    }

    .product__swiper-buttons {
        left: auto;
        bottom: 20px;
    }

    .product__swiper-button-next,
     .product__swiper-button-prev {
        padding: 0 10px;
        height: 45px;
    }

    .swiper-pagination {
        height: 45px;
    }

    .product__swiper-button-prev-img {
        height: 16px;
    }

    .product__content {
        padding: 40px 20px;
    }

    .product__item:nth-child(2n) {
        border-left: none;
    }

    .product__item:nth-child(-n+2) {
        border-bottom: none;
    }

    .product__item:not(:last-child) {
        border-bottom: 1px solid var(--clr-brown-light);
    }

    .product__list > .product__item:last-child:not(:nth-child(2n)) {
        border-right: none;
    }

    .product__list {
        display: flex;
        flex-direction: column;
    }

}