.product-page{
    background: var(--color-bg);
    padding-block: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.product-unavailable{
    width: 100%;
    margin-inline: auto;
    padding-block: var(--space-xl);
    background: var(--color-bg);
    display: flex;
    justify-content: center;
}

.product-page-section{
    .error-text{
        display: none;
        font-size: var(--font-size-sm);
        color: var(--color-error);
        font-weight: 500;
        line-height: normal;
        padding-inline: var(--space-md);
    }

    .error-text.visible{
        display: block;
    }
    
    width: min(1200px, 100%);
    padding-inline: clamp(12px, 4vw, 20px);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    span{
        font-size: var(--font-size-lg);
        font-weight: 500;
    }

    h1{
        margin: 0;
        margin-bottom: var(--space-xs);
    }

    .head{
        display: flex;
        align-items: end;
        justify-content: space-between;
        gap: var(--space-md);
    }

    .product-favourite:hover{
        svg{
            color: var(--color-error);
            fill: var(--color-error);
        }
    }

    .product-favourite.filled{
        svg{
            color: var(--color-error);
            fill: var(--color-error);
        }
    }

    .product-favourite.filled:hover{
        svg{
            color: var(--color-primary);
            fill: none;
        }
    }   

    .product-page-section-grid{
        margin-block: var(--space-xl);
        display: flex;
        flex-direction: column;
        gap: var(--space-md);
    }

    @media (min-width: 850px) {
        .product-page-section-grid{
            position: relative;
            display: grid;
            align-items: start;
            grid-template-columns: auto 420px;
            gap: var(--space-xl);
        }
    }
}

.product-page-float{
    position: fixed;
    top: 48px;
    left: 0;
    width: 100%;
    min-height: 48px;
    padding-block: var(--space-sm);
    background: white;
    box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, #1b1f2326 0px 0px 0px 1px;
    z-index: 500;
    display: flex;
    align-items: center;

    .product-page-float-detail{
        width: min(1200px, 100%);
        padding-inline: clamp(12px, 4vw, 20px);
        margin-inline: auto;
        display: flex;
        flex-direction: column;
        span{
            font-size: var(--font-size-base);
            font-weight: 500;
        }

        span:last-child{
            font-size: var(--font-size-xs);
        }
    }

    @media (min-width: 700px) {
        .product-page-float-detail{
            flex-direction: row;
            justify-content: space-between;

            span:last-child{
                font-size: var(--font-size-base);
                font-weight: 500;
            }
        }
    }
}

.product-action-section{
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    
    .product-coupon-section{
        padding: var(--space-md);
        background-color: var(--color-bg-alt);
        border-radius: var(--radius-xl);
        display: flex;
        flex-direction: column;
        gap:0;

        span:first-child{
            font-size: var(--font-size-sm);
            font-weight: 700;
        }

        span:last-child{
            line-height: normal;
            font-size: var(--font-size-sm);
            font-weight: 400;
        }
    }

    .discount-text{
        font-size: var(--font-size-xs);
        line-height: normal;
        font-weight: 400;
        text-align: left;
        margin-top: calc(var(--space-md) * -1);
    }

    .product-count-section{
        padding: var(--space-sm);
        background-color: var(--color-bg-alt);
        border-radius: var(--radius-xxl);
        display: flex;
        align-items: center;
        justify-content: space-between;
        span{
            font-size: var(--font-size-sm);
            font-weight: 600;
            padding-left: var(--space-sm);
        }

        .controller{
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: var(--space-md);

            input{
                border: 0.115rem solid var(--color-border);
                padding: 2px;
                text-align: center;
                width: 40px;
                border-radius: var(--radius-md);
                font-size: var(--font-size-lg);
                height: 36px;
            }

            .controller-button{
                background-color: var(--color-dark-gray);
                border-radius: var(--radius-round);
                display: flex;
                align-items: center;
                justify-content: center;
                width: 38px;
                aspect-ratio: 1;
                cursor: pointer;
                svg{
                    cursor: pointer;
                }
            }

            .controller-button.disabled{
                opacity: 0.3;
                cursor:auto;
                svg{
                    cursor: auto;
                }
            }
        }
    }

    .product-cart-block{
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
        .error-text{
            padding-inline: 0;
        }
        .product-cart-section{
            border-radius: var(--radius-xxl);
            display: flex;
            align-items: end;
            justify-content: space-between;
            span{
                font-size: var(--font-size-md);
                font-weight: 600;
            }
        }
    }

    .product-extra-section{
        display: grid;
        grid-template-columns: 24px auto;
        gap: var(--space-sm);
        span{
            font-size: var(--font-size-xs);
            line-height: normal;
            font-weight: 500;
        }

        svg{
            width: 100%;
            height: 100%;
        }
    }

    .out-of-stock-section{
        display: flex;
        flex-direction: column;
        gap: var(--space-xs);
        span:nth-child(1){
            font-size: var(--font-size-md);
            font-weight: 600;
        }
        span:nth-child(2){
            font-size: var(--font-size-sm);
            line-height: normal;
            font-weight: 400;
            text-align: left;
        }

        .out-of-stock-mail{
            margin-top: var(--space-sm);
            padding: var(--space-sm);
            background-color: var(--color-bg-alt);
            border-radius: var(--radius-xxl);
            display: grid;
            grid-template-columns: 1fr auto;
            padding-left: var(--space-md);
            gap: var(--space-md);
            align-items: center;
            input{
                text-align: left;
                border-radius: var(--radius-md);
                font-size: var(--font-size-sm);
                font-weight: 500;
            }
        }
    }

    .product-description-section{
        margin-top: var(--space-md);
        .head{
            display: flex;
            align-items: center;
            justify-content: space-between;

            button{
                color: var(--color-blue);
                font-weight: 500;
                font-size: var(--font-size-sm);
            }

            button:hover{
                text-decoration: underline;
            }
        }
        span{
            font-weight: 700;
            font-size: var(--font-size-xl);
        }
        p{
            font-size: var(--font-size-sm);
            font-weight: 500;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 300;
            overflow: hidden;
            cursor: pointer;
        }
        p.limited{
            -webkit-line-clamp: 3;
        }
    }

    .prospectus-section{
        height: 100%;
        min-height: 150px;
        margin-bottom: var(--space-xl);
        position: relative;
        padding: var(--space-sm-plus);
        background-color: var(--color-bg-alt);
        border-radius: var(--radius-xl);
        display: flex;
        flex-direction: column;
        align-items: baseline;
        padding-left: 140px;

        span{
            font-weight: 700;
            font-size: var(--font-size-base);
        }

        :nth-child(3){
            font-weight: 500;
            line-height: normal;
            font-size: var(--font-size-sm);
        }

        a {
            padding-top: 10px;
            margin-left: auto;
        }

        img{
            rotate: -3deg;
            width: 120px;
            object-fit: cover;
            position: absolute;
            top: -5px;
            left: 10px;
            box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
            border-radius: var(--radius-lg);
        }

        @media (min-width: 400px) and (max-width: 850px) {
            img{
                width: 140px;
                top: -15px;
            }

            margin-top: 0px;
            padding-left: 170px;
        }

        @media (min-width: 851px) {
            img{
                width: 145px;
                top: -23px;
            }

            margin-top: 0px;
            padding-left: 170px;
        }
    }

    .product-template-section{
        display: flex;
        flex-direction: column;
        .head{
            display: flex;
            align-items: center;
            justify-content: space-between;

            button{
                color: var(--color-blue);
                font-weight: 500;
                font-size: var(--font-size-sm);
            }

            button:hover{
                text-decoration: underline;
            }
        }

        span.title{
            font-size: var(--font-size-xl);
            font-weight: 700;
        }

        span.subtitle{
            font-size: var(--font-size-xs);
            font-weight: 500;
            margin-bottom: var(--space-sm);
        }

        button.capsule{
            margin-left: auto;
        }

        .product-template-section-block.hidden{
            display: none;
        }

        .product-template-section-block{
            padding: var(--space-sm);
            background-color: var(--color-bg-alt);
            border-radius: var(--radius-xl);
            display: flex;
            gap:var(--space-md);
            margin-bottom: var(--space-md);
            img{
                width: 50px;
                height: 50px;
                border-radius: var(--radius-round);
            }

            img.hidden{
                opacity: 0;
            }

            span.hidden{
                display: none;
            }

            .detail{
                width: 100%;
                display: flex;
                flex-direction: column;
                justify-content: center;
                span:first-child{
                    font-size: var(--font-size-xs);
                    font-weight: 500;
                    opacity: 0.8;
                }

                span:last-child{
                    font-size: var(--font-size-lg);
                    font-weight: 500;
                    margin-top: -5px;
                }
            }

            button{
                background: transparent;
                color: var(--color-blue);
                font-weight: 500;
                font-size: var(--font-size-sm);
            }

            button:hover{
                text-decoration: underline;
            }
        }
    }
}

.product-page-image-section{
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-lg);
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-xl);
    align-items: center;

    .aproduct-page-image-section-upper{
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-sm);
    }

    .product-page-image-scroller{
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--space-lg);

        .dots{
            display: flex;
            align-items: center;
            justify-content: center;
            gap: var(--space-md);
            background-color: var(--color-dark-gray);
            padding: 16px 24px;
            border-radius: var(--radius-xxl);
            .dot{
                width: 8px;
                aspect-ratio: 1;
                border-radius: var(--radius-round);
                background: var(--color-primary);
                opacity: 0.3;
                cursor: pointer;
            }

            .dot.active{
                opacity: 1.0;
            }
        }
    }

    .gallery-section{
        position: relative;
        width: 70%;
        aspect-ratio: 1;
        img{
            left: 0;
            top: 0;
            width: 100%;
            aspect-ratio: 1;
            object-fit: cover;
            border-radius: var(--radius-xl);
            position: absolute;
            z-index: 1;
        }
        img.front{
            z-index: 2;
        }
    }

    .product-page-image-scroller-button{
        background-color: var(--color-dark-gray);
        border-radius: var(--radius-round);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        aspect-ratio: 1;
        cursor: pointer;
        svg{
            cursor: pointer;
        }
    }
}

@media (min-width: 850px) {
    .product-page-image-section{
        position: sticky;
        top: 120px;
    }
}

.product-page-float.hidden{
    display: none;
}

.breadcrumb{
    margin: 0;
}

main{
    background: var(--color-bg-alt);
}

.template-view.open{
    transform: translateY(0);
    opacity: 1;
}

.template-view{
    transform: translateY(-100%);
    opacity: 0;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: white;
    width: 100%;
    height: 100%;
    overflow-x: scroll;
    transition: transform 500ms ease-in, opacity 300ms ease-in, gap 800ms ease-in;

    .head{
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: var(--space-md);
    }

    span.title{
        font-size: var(--font-size-xxl);
        font-weight: 700;
    }

    .template-view-section{
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-md);
        .template-view-section-block{
            display: flex;
            flex-direction: column;
            gap: var(--space-sm);
            align-items: center;
            img{
                width: 100%;
                aspect-ratio: 1;
                border-radius: var(--radius-round);
                cursor: pointer;
                transition: scale 0.2s ease-in;
                object-fit: cover;
            }

            img:hover{
                box-shadow: rgba(0, 0, 0, 0.1) -4px 9px 25px -6px;
                scale: 1.03;
            }

            span.name{
                font-size: var(--font-size-base);
                font-weight: 600;
                text-align: center;
            }
        }
        .template-view-section-block.disabled {
            img{
                opacity: 0.3;
                cursor:not-allowed;
            }
            span.disabled{
                font-size: var(--font-size-sm);
                font-weight: 500;
                margin-top: calc(var(--space-sm) * -1);
                text-align: center;
            }
            span.name{
                text-decoration: line-through;
            }
        }
    }
}

@media (min-width: 550px) and (max-width:799px) {
    .template-view{
        padding: 20px 40px;
        
        .template-view-section{
            grid-template-columns: repeat(6, 1fr);
        }
    }
}

@media (min-width: 800px) and (max-width:999px) {
    .template-view{
        padding: 20px 40px;
        
        .template-view-section{
            grid-template-columns: repeat(8, 1fr);
        }
    }
}

@media (min-width: 1000px) {
    .template-view{
        padding: 20px 40px;
        
        .template-view-section{
            grid-template-columns: repeat(10, 1fr);
        }
    }
}


.lash-group {
    margin-top: var(--space-md);
}

.lash-group .label {
    display: block;
    font-size: var(--space-md);
    font-weight: 500;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.option-btn {
    font-size: var(--font-size-sm);
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
}

.option-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.option-btn.disabled {
    background: #f3f3f3;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
}

.mix-label {
    background: #000;
    color: #fff;
    border-color: #000;
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    font-size: var(--font-size-sm);
    font-weight: 500;
}