/* =========================================================
   HAYA AI VIRTUAL TRY-ON
========================================================= */

.haya-ai-try-on-button {
    appearance: none;
    border: 1px solid #4a3029;
    background: #4a3029;
    color: #fff;
    padding: 14px 22px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: .25s ease;
    line-height: 1;
    margin-top: 12px;
}

.haya-ai-try-on-button:hover {
    background: #2e1e1a;
    border-color: #2e1e1a;
    color: #fff;
}

.haya-ai-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
}

.haya-ai-modal.is-open {
    display: block;
}

.haya-ai-overlay {
    position: absolute;
    inset: 0;
    background: rgba(25, 17, 14, .55);
    backdrop-filter: blur(5px);
}

.haya-ai-dialog {
    position: absolute;
    inset: 12px;
    display: flex;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 100px rgba(0,0,0,.25);
}

.haya-ai-left {
    width: 40%;
    min-height: 100%;
    background: #cdbba9;
    padding: 60px 58px;
    display: flex;
    flex-direction: column;
    color: #4a3029;
}

.haya-ai-eyebrow,
.haya-ai-step,
.haya-ai-product-label,
.haya-ai-size-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.haya-ai-eyebrow {
    margin-bottom: 44px;
}

.haya-ai-headline {
    margin: 0;
    color: #492e28;
    font-size: clamp(50px, 5vw, 86px);
    line-height: .89;
    letter-spacing: -4px;
    font-weight: 800;
}

.haya-ai-description {
    max-width: 450px;
    margin: 40px 0 0;
    font-size: 17px;
    line-height: 1.7;
    color: #6d5b52;
}

.haya-ai-product-card {
    margin-top: auto;
    padding: 22px 24px;
    border-radius: 15px;
    background: #f1ebe6;
}

.haya-ai-product-label {
    color: #77716c;
    margin-bottom: 18px;
}

.haya-ai-product-row {
    display: flex;
    align-items: center;
    gap: 17px;
}

.haya-ai-product-image {
    width: 81px !important;
    height: 93px !important;
    object-fit: cover;
    border-radius: 10px;
    background: #d7d0ca;
}

.haya-ai-product-name {
    font-size: 18px;
    font-weight: 700;
    color: #4d332c;
}

.haya-ai-product-price {
    margin-top: 8px;
    font-size: 16px;
    color: #77736e;
}

.haya-ai-right {
    position: relative;
    width: 60%;
    padding: 60px 58px;
    overflow-y: auto;
    background: #fff;
}

.haya-ai-close {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 50%;
    background: #f5f0eb;
    cursor: pointer;
    z-index: 5;
}

.haya-ai-close span::before,
.haya-ai-close span::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 2px;
    background: #4a3029;
    left: 16px;
    top: 26px;
}

.haya-ai-close span::before {
    transform: rotate(45deg);
}

.haya-ai-close span::after {
    transform: rotate(-45deg);
}

.haya-ai-step {
    margin-bottom: 25px;
    color: #ba8583;
}

.haya-ai-panel h3 {
    margin: 0 0 18px;
    color: #493129;
    font-size: clamp(40px, 4vw, 60px);
    line-height: 1;
    letter-spacing: -2px;
    font-weight: 800;
}

.haya-ai-subtitle {
    margin: 0 0 45px;
    font-size: 17px;
    color: #8a8883;
}

.haya-ai-upload-box {
    width: 100%;
    min-height: 450px;
    border: 3px dashed #dddcd7;
    border-radius: 18px;
    background: #fafaf8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .25s ease;
    text-align: center;
}

.haya-ai-upload-box:hover,
.haya-ai-upload-box.is-dragging {
    border-color: #b7b3ae;
    background: #f7f7f5;
}

.haya-ai-file {
    display: none;
}

.haya-ai-upload-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.haya-ai-upload-icon svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: #54392f;
    stroke-width: 1.8;
}

.haya-ai-upload-title {
    font-size: 19px;
    font-weight: 700;
    color: #4d342d;
    margin-bottom: 17px;
}

.haya-ai-upload-info {
    font-size: 12px;
    color: #999791;
    letter-spacing: .5px;
}

.haya-ai-photo-preview {
    display: none;
    position: relative;
    margin-top: 18px;
    padding: 10px;
    border: 1px solid #e2dfdb;
    border-radius: 14px;
}

.haya-ai-photo-preview.is-visible {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.haya-ai-photo-preview img {
    width: 70px;
    height: 90px;
    object-fit: cover;
    border-radius: 9px;
}

.haya-ai-remove-photo {
    border: 0;
    background: none;
    color: #76534a;
    cursor: pointer;
    text-decoration: underline;
}

.haya-ai-divider {
    width: 100%;
    height: 1px;
    background: #e5e3df;
    margin: 40px 0;
}

.haya-ai-size-title {
    color: #777771;
    margin-bottom: 22px;
}

.haya-ai-sizes {
    display: flex;
    gap: 10px;
}

.haya-ai-size {
    width: 57px;
    height: 57px;
    border-radius: 50%;
    border: 1px solid #d8d5cf;
    background: #fff;
    color: #55423b;
    cursor: pointer;
    font-weight: 600;
}

.haya-ai-size.active {
    background: #1d1d1d;
    color: #fff;
    border-color: #1d1d1d;
}

.haya-ai-create {
    width: 100%;
    height: 68px;
    border: 0;
    border-radius: 999px;
    background: #bcb8b6;
    color: #fff;
    margin-top: 60px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: .25s ease;
}

.haya-ai-create:hover {
    background: #9f9996;
}

.haya-ai-create:disabled {
    opacity: .6;
    cursor: wait;
}

.haya-ai-arrow {
    font-size: 29px;
}

.haya-ai-panel-loading,
.haya-ai-panel-result {
    display: none;
}

.haya-ai-panel-loading {
    min-height: 70vh;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.haya-ai-panel-loading.is-visible {
    display: flex;
}

.haya-ai-loader {
    width: 52px;
    height: 52px;
    border: 3px solid #e4ded9;
    border-top-color: #4a3029;
    border-radius: 50%;
    animation: haya-spin 1s linear infinite;
    margin-bottom: 28px;
}

@keyframes haya-spin {
    to { transform: rotate(360deg); }
}

.haya-ai-loading-title {
    color: #493129;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -1px;
}

.haya-ai-panel-loading p {
    color: #8a8883;
}

.haya-ai-progress {
    width: min(400px, 90%);
    height: 5px;
    background: #eeeae6;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 25px;
}

.haya-ai-progress div {
    width: 30%;
    height: 100%;
    background: #4a3029;
    border-radius: inherit;
    animation: haya-progress 2s ease-in-out infinite;
}

@keyframes haya-progress {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(430%); }
}

.haya-ai-panel-result.is-visible {
    display: block;
}

.haya-ai-panel-result h3 {
    margin-bottom: 18px;
}

.haya-ai-result-image {
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #f5f3f0;
}

.haya-ai-result-image img {
    display: block;
    width: 100%;
    height: auto;
}

.haya-ai-result-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.haya-ai-try-again,
.haya-ai-add-to-cart {
    flex: 1;
    min-height: 55px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
}

.haya-ai-try-again {
    border: 1px solid #4a3029;
    background: #fff;
    color: #4a3029;
    cursor: pointer;
}

.haya-ai-add-to-cart {
    background: #4a3029;
    color: #fff;
}

.haya-ai-error {
    display: none;
    margin-top: 18px;
    padding: 14px 17px;
    border-radius: 10px;
    background: #f9e9e6;
    color: #8a3f35;
    font-size: 14px;
}

.haya-ai-error.is-visible {
    display: block;
}

@media (max-width: 1000px) {
    .haya-ai-dialog {
        inset: 10px;
        overflow-y: auto;
        display: block;
    }

    .haya-ai-left,
    .haya-ai-right {
        width: 100%;
        min-height: auto;
    }

    .haya-ai-left {
        padding: 45px 35px;
    }

    .haya-ai-headline {
        font-size: 58px;
    }

    .haya-ai-product-card {
        margin-top: 45px;
    }

    .haya-ai-right {
        padding: 50px 35px;
    }

    .haya-ai-upload-box {
        min-height: 380px;
    }
}

@media (max-width: 600px) {
    .haya-ai-dialog {
        inset: 0;
        border-radius: 0;
    }

    .haya-ai-left {
        padding: 35px 24px;
    }

    .haya-ai-eyebrow {
        font-size: 11px;
        margin-bottom: 28px;
    }

    .haya-ai-headline {
        font-size: 52px;
        letter-spacing: -3px;
    }

    .haya-ai-description {
        margin-top: 28px;
        font-size: 15px;
    }

    .haya-ai-right {
        padding: 38px 24px 50px;
    }

    .haya-ai-close {
        top: 17px;
        right: 17px;
        width: 46px;
        height: 46px;
    }

    .haya-ai-panel h3 {
        font-size: 42px;
        padding-right: 40px;
    }

    .haya-ai-subtitle {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .haya-ai-upload-box {
        min-height: 320px;
    }

    .haya-ai-upload-info {
        max-width: 260px;
        line-height: 1.6;
    }

    .haya-ai-divider {
        margin: 30px 0;
    }

    .haya-ai-size {
        width: 50px;
        height: 50px;
    }

    .haya-ai-create {
        height: 62px;
        margin-top: 45px;
        padding: 0 22px;
    }

    .haya-ai-result-actions {
        flex-direction: column;
    }
}

html.haya-ai-no-scroll,
body.haya-ai-no-scroll {
    overflow: hidden !important;
}
