/* ============================================================
   MEHR LEATHER — PRODUCT DETAIL
   Luxury editorial product page
   ============================================================ */

.product-detail-page {
    background: #fff;
}

.ml-product-detail {
    width: 100%;
    background: #fff;
    color: #27231f;
}

.ml-product-detail__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(380px, .55fr);
    align-items: start;
}


/* ============================================================
   GALLERY
   ============================================================ */

.ml-product-gallery {
    min-width: 0;
    background: #f5f3ef;
}

.ml-product-gallery__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: #e8e4dd;
}

.ml-product-gallery__item {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #f3f1ed;
    aspect-ratio: .82 / 1;
    overflow: hidden;
    cursor: zoom-in;
}

.ml-product-gallery__item:first-child {
    grid-column: 1 / -1;
    aspect-ratio: 1.6 / 1;
}

.ml-product-gallery__item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.22,.61,.36,1);
}

.ml-product-gallery__item:hover img {
    transform: scale(1.015);
}

.ml-product-gallery__empty {
    min-height: 70vh;
    display: grid;
    place-items: center;
    color: #999188;
    font-size: 12px;
}


/* ============================================================
   BUY BOX
   ============================================================ */

.ml-product-buybox {
    position: relative;
    min-width: 0;
    background: #fff;
}

.ml-product-buybox__inner {
    position: sticky;
    top: 46px;
    padding: 42px 42px 54px;
}

.ml-product-head {
    padding-bottom: 27px;
    border-bottom: 1px solid #e7e2dc;
}

.ml-product-sku {
    color: #9a938b;
    font-size: 9px;
    line-height: 1.7;
}

.ml-product-subtitle {
    margin-top: 16px;
    color: #777067;
    font-size: 11px;
}

.ml-product-head h1 {
    margin: 8px 0 0;
    color: #27231f;
    font-size: clamp(24px, 2vw, 36px);
    line-height: 1.55;
    font-weight: 400;
}

.ml-product-price {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.ml-product-price del {
    color: #aaa39a;
    font-weight: 400;
}

.ml-product-price strong {
    color: #332f2a;
    font-weight: 500;
}

.ml-product-wishlist {
    width: 100%;
    min-height: 52px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #e7e2dc;
    background: transparent;
    color: #5b554e;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
}

.ml-product-wishlist svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.25;
}


/* ============================================================
   OPTIONS
   ============================================================ */

.ml-product-option {
    padding: 24px 0;
    border-bottom: 1px solid #e7e2dc;
}

.ml-product-option__head {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #706961;
    font-size: 10px;
}

.ml-product-option__head strong {
    color: #342f2b;
    font-size: 10px;
    font-weight: 500;
}

.ml-link-button {
    padding: 0 0 3px;
    border: 0;
    border-bottom: 1px solid #6d665f;
    background: transparent;
    color: #5f5952;
    font-family: inherit;
    font-size: 9px;
    cursor: pointer;
}

.ml-color-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ml-color-option {
    position: relative;
    width: 48px;
    height: 48px;
    padding: 3px;
    border: 1px solid transparent;
    background: transparent;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.ml-color-option::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 1px solid transparent;
    pointer-events: none;
}

.ml-color-option.is-selected::after {
    border-color: #302c27;
}

.ml-color-option img,
.ml-color-option > span {
    width: 100%;
    height: 100%;
    display: block;
}

.ml-color-option img {
    object-fit: cover;
}

.ml-color-option > span {
    background: var(--color);
}

.ml-color-option.is-disabled {
    opacity: .32;
    cursor: not-allowed;
}

.ml-size-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
}

.ml-size-option {
    min-height: 50px;
    padding: 7px 4px;
    border: 1px solid #ddd8d0;
    background: #fff;
    color: #4c4741;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: inherit;
    cursor: pointer;
    transition: .18s ease;
}

.ml-size-option span {
    font-size: 10px;
}

.ml-size-option small {
    color: #9a5e4d;
    font-size: 7px;
}

.ml-size-option:hover:not(.is-disabled),
.ml-size-option.is-selected {
    border-color: #2c2925;
    background: #2c2925;
    color: #fff;
}

.ml-size-option.is-selected small {
    color: rgba(255,255,255,.72);
}

.ml-size-option.is-disabled {
    color: #bbb4ab;
    background:
        linear-gradient(
            to bottom right,
            transparent 49%,
            #ddd7cf 50%,
            transparent 51%
        );
    cursor: not-allowed;
}


/* ============================================================
   PURCHASE
   ============================================================ */

.ml-product-purchase {
    padding: 26px 0;
    border-bottom: 1px solid #e7e2dc;
}

.ml-add-to-cart {
    width: 100%;
    height: 54px;
    border: 1px solid #292621;
    background: #292621;
    color: #fff;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.ml-add-to-cart:hover:not(:disabled) {
    background: #fff;
    color: #292621;
}

.ml-add-to-cart:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.ml-purchase-message {
    min-height: 19px;
    margin-top: 8px;
    color: #9b4f3e;
    font-size: 9px;
}

.ml-purchase-message.is-success {
    color: #56694d;
}

.ml-delivery-note {
    margin: 10px 0 0;
    color: #8e877f;
    font-size: 9px;
    line-height: 1.9;
}


/* ============================================================
   ACCORDIONS
   ============================================================ */

.ml-product-accordions {
    border-bottom: 1px solid #e7e2dc;
}

.ml-product-accordion {
    border-bottom: 1px solid #eeeae4;
}

.ml-product-accordion:last-child {
    border-bottom: 0;
}

.ml-product-accordion summary {
    min-height: 58px;
    padding: 0;
    list-style: none;
    color: #39342f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 10px;
}

.ml-product-accordion summary::-webkit-details-marker {
    display: none;
}

.ml-product-accordion summary::after {
    content: "+";
    color: #746d65;
    font: 300 16px/1 Arial, sans-serif;
}

.ml-product-accordion[open] summary::after {
    content: "−";
}

.ml-product-accordion__body {
    padding: 0 0 22px;
    color: #777067;
    font-size: 10px;
    line-height: 2;
    white-space: pre-line;
}


/* ============================================================
   HELP
   ============================================================ */

.ml-product-help {
    padding: 28px 0 0;
}

.ml-product-help__eyebrow {
    color: #807970;
    font-size: 9px;
}

.ml-product-help p {
    margin: 9px 0 15px;
    color: #8c857d;
    font-size: 10px;
    line-height: 1.9;
}

.ml-product-help a {
    color: #322e29;
    text-underline-offset: 4px;
    font-size: 10px;
}


/* ============================================================
   RELATED
   ============================================================ */

.ml-related-products {
    padding: 80px 0 95px;
    border-top: 1px solid #e7e2dc;
}

.ml-related-products__head {
    margin-bottom: 30px;
    padding: 0 28px;
}

.ml-related-products__head span {
    color: #9a938a;
    font-size: 8px;
    letter-spacing: .14em;
}

.ml-related-products__head h2 {
    margin: 8px 0 0;
    font-size: 25px;
    font-weight: 400;
}

.ml-related-products__track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: #e9e5df;
}

.ml-related-card {
    background: #fff;
    padding-bottom: 18px;
}

.ml-related-card__media {
    display: block;
    aspect-ratio: .8 / 1;
    overflow: hidden;
    background: #f3f1ed;
}

.ml-related-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}

.ml-related-card:hover .ml-related-card__media img {
    transform: scale(1.015);
}

.ml-related-card h3 {
    margin: 14px 16px 4px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.6;
}

.ml-related-card h3 a {
    color: #292621;
    text-decoration: none;
}

.ml-related-card > div {
    margin: 0 16px;
    color: #777067;
    font-size: 9px;
}


/* ============================================================
   GALLERY MODAL
   ============================================================ */

.ml-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(250,249,246,.98);
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: .22s ease;
}

.ml-gallery-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ml-gallery-modal img {
    max-width: min(92vw, 1200px);
    max-height: 88vh;
    object-fit: contain;
}

.ml-gallery-modal__close {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #2d2925;
    font: 300 28px/1 Arial, sans-serif;
    cursor: pointer;
}


/* ============================================================
   SIZE GUIDE
   ============================================================ */

.ml-size-guide-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2390;
    background: rgba(25,22,19,.27);
    opacity: 0;
    visibility: hidden;
    transition: .2s ease;
}

.ml-size-guide {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2400;
    width: min(470px, 92vw);
    background: #fbfaf7;
    transform: translateX(100%);
    visibility: hidden;
    transition:
        transform .35s cubic-bezier(.76,0,.24,1),
        visibility .35s;
}

body.ml-size-guide-open {
    overflow: hidden;
}

body.ml-size-guide-open .ml-size-guide-backdrop {
    opacity: 1;
    visibility: visible;
}

body.ml-size-guide-open .ml-size-guide {
    transform: none;
    visibility: visible;
}

.ml-size-guide__head {
    height: 74px;
    padding: 0 24px;
    border-bottom: 1px solid #e6e1da;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ml-size-guide__head h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 400;
}

.ml-size-guide__head button {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    font: 300 26px/1 Arial, sans-serif;
    cursor: pointer;
}

.ml-size-guide__body {
    padding: 26px 24px;
}

.ml-size-guide__body p {
    margin: 0 0 24px;
    color: #777068;
    font-size: 10px;
    line-height: 2;
}

.ml-size-guide__table {
    border-top: 1px solid #ded8d0;
}

.ml-size-guide__table > div {
    min-height: 46px;
    padding: 0 6px;
    border-bottom: 1px solid #e7e2dc;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 10px;
    font-size: 10px;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 1100px) {

    .ml-product-detail__layout {
        grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
    }

    .ml-product-buybox__inner {
        padding-inline: 28px;
    }

    .ml-size-options {
        grid-template-columns: repeat(3, 1fr);
    }

    .ml-related-products__track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767.98px) {

    .ml-product-detail__layout {
        display: block;
    }

    .ml-product-gallery__grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        gap: 0;
        background: #f3f1ed;
    }

    .ml-product-gallery__grid::-webkit-scrollbar {
        display: none;
    }

    .ml-product-gallery__item,
    .ml-product-gallery__item:first-child {
        flex: 0 0 100%;
        width: 100%;
        aspect-ratio: .82 / 1;
        grid-column: auto;
        scroll-snap-align: start;
    }

    .ml-product-buybox__inner {
        position: static;
        padding: 28px 18px 50px;
    }

    .ml-product-head h1 {
        font-size: 25px;
    }

    .ml-size-options {
        grid-template-columns: repeat(4, 1fr);
    }

    .ml-add-to-cart {
        height: 52px;
    }

    .ml-related-products {
        padding: 55px 0 65px;
    }

    .ml-related-products__track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        gap: 1px;
    }

    .ml-related-products__track::-webkit-scrollbar {
        display: none;
    }

    .ml-related-card {
        flex: 0 0 72vw;
        max-width: 310px;
        scroll-snap-align: start;
    }

    .ml-gallery-modal img {
        max-width: 100vw;
        max-height: 84vh;
    }

    .ml-size-guide {
        width: 100%;
    }
}


@media (max-width: 389.98px) {

    .ml-product-buybox__inner {
        padding-inline: 14px;
    }

    .ml-size-options {
        grid-template-columns: repeat(3, 1fr);
    }
}
