
.productpage {
    display: grid;
    grid-template-columns: 1fr 800px;
    gap: var(--gap-lg);
    margin-top: 20px;
    margin-bottom: 80px;
    border-bottom: 1px solid #eee;

    svg {
        fill: currentColor;
        stroke: currentColor;
    }

    a {
        color: inherit;
        cursor: pointer;
        text-decoration: unset;
    }

    button {
        cursor: pointer;
    }

    .productitem {
        position: relative;
    }
    
    .data {
        position: relative;
        padding-right: 380px;

        .producttitle {
            line-height: normal;
            margin-top: 0;
            margin-bottom: var(--gap-sm);
            font-size: 18px;
            font-family: var(--font-family-secondory);
            color: var(--color-secondory);
        }
        .description {
            color: var(--color-current);
        }
        .producttabs {
            display: flex;
            flex-direction: column;
            gap: var(--gap-md);

            .title {
                font-weight: bold;
                margin-bottom: var(--gap-xs);
                color: var(--color-secondory);
            }
        }
        .attributes {
            .attribute {
                display: flex;
                
                .aname {
                    flex: 1;
                    position: relative;
                    display: flex;
                    color: var(--color-current);
                }
                .aname:after {
                    content: '';
                    display: inline-block;
                    border-bottom: 1px dotted #ccc;
                    flex: 1;
                }
            }
            .attribute + .attribute {
                margin-top: var(--gap-small);
            }
        }

        .advantages {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: var(--gap-sm);
        }
        .advantage {
            display: flex;
            align-items: center;
            gap: var(--gap-xs);

            .icon {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 40px;
                height: 40px;
                background: rgba(var(--bg-secondory), 0.1);
                color: rgba(var(--bg-secondory), 0.9);
                border-radius: 8px;
            }
            .text {
                flex: 1;
                display: flex;
                flex-direction: column;
                gap: 2px;
                .atname {
                    font-weight: 600;
                    color: var(--color-secondory);
                }
                a {
                    color: var(--color-current);
                    font-size: 12px;
                    text-decoration: underline;
                }
            }
        }
    }

    .productcart {
        position: absolute;
        top: 0;
        right: 0;
        width: 360px;

        .giftblock {
            margin-bottom: var(--gap-xs);
            background: none;
            border: none;
            box-shadow: none;
            text-align: left;
            display: flex;
            align-items: center;
            gap: var(--gap-xs);
            font-weight: 500;
            color: var(--color-current);
            span {
                flex: 1;
            }
        }

        .productorder {
            background-color: #fff;
            border-radius: var(--gap-sm);
            padding: var(--gap-md) var(--gap-sm) var(--gap-sm);
            position: relative;
            box-shadow: 0 2px var(--gap-sm) #00000014;

            .price {
                display: flex;
                align-items: end;
                line-height: 1;
                gap: var(--gap-xs);
                font-size: 23px;
                font-family: var(--font-family-secondory);
                font-weight: bold;
                margin-bottom: var(--gap-sm);
                color: var(--color-current);
                
                span {
                    display: flex;
                    align-items: center;
                    gap: var(--gap-xs);
                }
                .new {
                    color: #fa1f4b;
                }
                .old {
                    font-size: 13px;
                    font-weight: 500;
                    text-decoration: line-through;
                    opacity: .8;
                }
            }

            .buttons {
                display: flex;
                flex-direction: column;
                gap: var(--gap-xs);
            }
            .actions {
                margin-top: var(--gap-sm);
                display: flex;
                flex-wrap: wrap;
                gap: var(--gap-xs);
            }
        }
    }

    .button {
        position: relative;
        width: 100%;
        font-family: var(--font-family-secondory);
        font-size: 15px;
        font-weight: 600;
        border: 1px solid rgba(var(--bg));
        background-color: rgba(var(--bg));
        color: var(--color-secondory);
        border-radius: var(--gap-sm);
        padding: 0.9rem var(--gap-xs);
        overflow: hidden;
    }
    .button:hover {
        box-shadow: none;
    }
    .button:hover::after {
        content: '';
        position: absolute;
        left: 0;
        width: 100%;
        top: 0;
        height: 100%;
        background-color: #0000000d;
    }
    .button-light {
        background-color: rgba(var(--bg), 0.35);
        border-color: rgba(var(--bg), 0.35);
    }
    .button-light:hover {
        background-color: rgba(var(--bg), 0.6);
        border-color: rgba(var(--bg), 0.6);
    }
    
    .button-a {
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--gap-xs);
        padding: var(--gap-small) var(--gap-xs);
        font-size: 12px;
        background: none;
        border: none;
        border-radius: var(--gap-xs);
        color: var(--color-current);
    }
    .button-a:hover {
        background-color: rgba(var(--bg-secondory), 0.9);
        color: white;
    }

    .more {
        display: inline-block;
        text-align: left;
        border: none;
        background: none;
        padding: 0;
        margin: 0;
        color: inherit;
        span {
            text-decoration: underline;
        }
    }
    .more:hover {
        color: var(--color-secondory);
    }
}

 


  /* Оверлей */
.drawer-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    transition: opacity .22s ease;
  }
.drawer-overlay.is-open{
    opacity: 1;
}

/* Drawer */
.drawer{
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(420px, 92vw);
    background: #fff;
    z-index: 9999;

    transform: translateX(110%);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;

    box-shadow: -24px 0 64px rgba(0,0,0,.18);
    border-left: 1px solid rgba(0,0,0,.06);

    display: grid;
    grid-template-rows: auto 1fr auto;

    .drawer__header {
        position: relative;
        padding: 18px 18px 12px;

        .drawer__title {
            margin: 0;
            font-size: 16px;
            font-weight: 600;
        }

        .drawer__close{
            position: absolute;
            right: 0;
            top: 0;
            width: 50px;
            height: 50px;
            background: none;
            border: none;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            margin: 0;
            opacity: .6;
        }
        .drawer__close:hover{
            opacity: 1;
        }
    }
    .drawer__body{
        padding: 0 18px 16px;
        overflow: auto; 
        p {
            margin: 0;
            padding: 0;
        }
    }

}
.drawer.is-open{
    transform: translateX(0);
    opacity: 1;
}
body.drawer-lock{
    overflow: hidden;
}
@media (prefers-reduced-motion: reduce){
    .drawer, .drawer-overlay{ transition: none; }
}


.slidervertical {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 16px;
    align-items:start;
    overflow: hidden;
    width: 100%;
    margin-bottom: var(--gap-lg);
    
    .slidervertical-thumbs,
    .slidervertical-main {
        position: relative;
        width: 100%;
        overflow: hidden;
    }

    .slidervertical-button {
        border: none;
        box-shadow: none;
    }

    @media (min-width: 1410px) {
        .slidervertical-button {
            margin: 0;
            padding: 0;
        }
 
        .slidervertical-thumbs {
            .slidervertical-button {
                left: calc(50% - 17.5px);
                right: auto;
                font-size: 13px;
            }
            .slidervertical-button.swiper-button-prev {
                top: 10px;
                bottom: auto;
                transform: rotate(90deg);
            }

            .slidervertical-button.swiper-button-next {
                top: auto;
                bottom: 10px;
                transform: rotate(90deg);
            }
        }
    }

    .swiper-thumbs {
        height: 500px;
        padding-bottom: 10px;
        .swiper-slide {
            display: flex;
            width: 100%;
        }
        img {
            height: 100%;
        }
        .swiper-slide img {
            width: 100%;
            margin: 0;
            border: 3px solid transparent;
            border-radius: var(--gap-xs);
            overflow: hidden;
        }
        .swiper-slide-thumb-active img {
            border-color: rgba(var(--bg));
        }
    }

    .slidervertical-main {
        .swiper-slide {
            display: inline-block;
            border-radius: var(--gap-sm);
            overflow: hidden;
        }
    }

    img {
        display: inline-block;
        width: 100%;
        height: auto;
        object-fit: cover;
        vertical-align: middle;
    }


    /* Контейнер для зума внутри главного слайда */
    .pdp-zoom-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    touch-action: none; /* важно для pointer-событий на mobile */
    }

    /* Базовая картинка */
    .pdp-zoom-img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
    transform: translate3d(0,0,0) scale(1);
    transform-origin: 50% 50%;
    will-change: transform;
    cursor: none;
    }

    /* Лупа (desktop) */
    .pdp-lens {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 9999px;
    border: 2px solid rgba(var(--bg));
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    pointer-events: none;
    display: none;

    background-repeat: no-repeat;
    }

    /* Активное состояние на desktop */
    .pdp-zoom-wrap.is-lens-on .pdp-lens {
    display: block;
    }

    /* Mobile: когда включили зум */
    .pdp-zoom-wrap.is-zoomed .pdp-zoom-img {
    cursor: grab;
    }
    .pdp-zoom-wrap.is-zoomed .pdp-zoom-img:active {
    cursor: grabbing;
    }

}


  


@media (max-width: 1410px) {
    .productpage {
        grid-template-columns: auto auto;

        .data {
            padding-right: 0;
        }

        .productcart {
            position: unset;
            width: 100%;
            margin-bottom: var(--gap-lg);
        }
    }
    .slidervertical {
        .swiper-thumbs {
            height: auto;
            .swiper-slide {
                height: 80px;
                width: 80px;
            }
        }
    }
    
    .slidervertical {
        display: flex;
        flex-direction: column-reverse;
        overflow: hidden;
        width: 100%;
        max-width: 50vw;
    }
}

@media (max-width: 768px) {
    
    .productpage {
        display: block; 

        .data {
            .advantages {
                font-size: 12px;
                .more {
                    font-size: inherit;
                }
                .advantage {
                    flex-direction: column;
                    align-items: baseline;
                }
            }
        }
    }
    .slidervertical {
        max-width: 100%;
        width: auto;
    }
    .slidervertical-thumbs {
        display: none;
    }
}