html {scroll-behavior: smooth;}
body {width: 100%;overflow: hidden;}
/* Design (chat-page-static): product title uses text-14 — not defined in style.css */
.text-14 { font-size: 14px; }
.lh-1-3 { line-height: 1.3; }
.claud-section {
    display: flex;
    flex-direction: column;
    align-items: start;
    width: 100%;
    margin: 0 auto;
    height: calc(100vh - 110px);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    .product-details-img-wrap {
        width: 100%;
        aspect-ratio: 1 / 1;
        background: #fff;
    }
    .product-img {
        width: 100%;
        height: 100%;
        max-height: 100%;
        object-fit: contain;
        object-position: center;
        border-radius: 16px;
    }
    .product-badge-sale {
        position: absolute;
        top: 12px;
        right: 12px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
        font-size: 14px;
        font-weight: 500;
        color: var(--color-first);
        padding: 4px 16px;
        background: var(--color-dark);
        border: 1px solid rgba(255, 255, 255, 0.55);
        border-radius: 50px;
        backdrop-filter: blur(12px) saturate(1.4);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    .product_img {width: 120px;height: 120px;flex-shrink: 0;}
    .product-item-horizontal .product_info {flex: 1 1 auto;min-width: 0;}
    .object-fit-cover {object-fit: cover !important;}
    .iconSize-16 {min-width: 16px;width: 16px;min-height: 16px;height: 16px;}
    .bg-color-third {background-color: var(--color-third) !important;}
    @media screen and (max-width: 767px) {
        .product_img {width: 90px;height: 90px;}
        .pro-h4.text-16 {font-size: 14px !important;}
    }
}
/* Same element has both classes: claud-section-area chat-refine-popout */
.claud-section-area.chat-refine-popout {
    display: none;
}
.claud-section-area.chat-refine-popout.is-active,
.claud-section-area.chat-refine-popout:has(#preference-card:not(.d-none)) {
    display: block;
}
/* .chat-input uses my-auto (vertical center). With preference card open that leaves a huge white gap —
   keep the compose bar pinned to the bottom like a normal chat turn. */
.chat-input:has(.claud-section-area.chat-refine-popout.is-active),
.chat-input:has(#preference-card:not(.d-none)),
.chat-input.claud-input-pinned,
body.claud-prefs-open .chat-input {
    margin-top: auto !important;
    margin-bottom: 0 !important;
}
.claud-section-area{
    .preference-card.d-none {
        display: none !important;
    }

    .preference-card-title {
        line-height: 1.35;
        padding-right: 8px;
    }

    .preference-options-list {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .preference-option-btn {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 12px;
        transition: background-color 0.15s ease;
        cursor: pointer;
    }
    .preference-option-btn:hover,
    .preference-option-btn:focus {
        background-color: var(--color-third);
        outline: none;
    }

    .preference-option-num {
        flex-shrink: 0;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        color: var(--color-first);
        background-color:var(--color-fourth);
        font-size: 0.8rem;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-top: 2px;
    }

    .preference-option-body {
        flex: 1;
        min-width: 0;
    }

    .preference-option-desc {
        margin-top: 2px;
        line-height: 1.35;
    }

    .preference-skip-btn {
        color: var(--color-second);
        background: var(--color-dark);
        font-weight: 500;
    }

    .preference-skip-btn:hover {
        background: var(--color-third);
    }

    .ai-chat-container .right-chat .chat-msg.bg-color-first {
        background-color: var(--color-third) !important;
        color: var(--color-first) !important;
        border-radius: 20px !important;
        border-bottom-right-radius: 4px !important;
        width: fit-content;
        padding: 4px 12px;
        margin: 0 0 0 auto;
    }

    .ai-chat-container .right-chat .chat-msg .color-white-same {
        color: var(--color-first) !important;
    }

}
/* Selected preferences — Claud.com chips flush to the right edge of the chat column */
/* Override .right-chat-box max-width:80% / padding so pills sit on the right edge */
#chat-box-block .ai-preferences-row-wrap.right-chat-box,
#chat-box-block .ai-preferences-row-wrap,
.ai-preferences-row-wrap {
    display: flex !important;
    justify-content: flex-end !important;
    float: none !important;
    clear: both;
    width: 100% !important;
    max-width: 100% !important;
    margin: 4px 0 12px;
    margin-left: auto !important;
    margin-right: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    text-align: right;
    box-shadow: none !important;
}
#chat-box-block .left-chat-box .ai-preferences-row-wrap {
    width: 100% !important;
    align-self: stretch;
}
#chat-box-block .ai-preferences-row-wrap .preference-pills-row,
.ai-preferences-row-wrap .preference-pills-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end !important;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    overflow: visible;
    padding: 2px 0;
    scrollbar-width: none;
}
#chat-box-block .preference-pill,
.preference-pill {
    display: inline-flex;
    flex-shrink: 0;
    max-width: 100%;
    padding: 8px 14px;
    background: var(--color-third, #f3f4f6);
    color: var(--color-first, #111);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
    border-radius: 999px;
    white-space: normal;
    word-break: break-word;
}
html[data-bs-theme=dark] .claud-section-area .preference-option-num {color: var(--color-dark);}
html[data-bs-theme=dark] #chat-box-block .preference-pill {
    background: var(--color-third);
    color: var(--color-first);
}

/* Temporary chat: compose bar uses .bg-dark-2 — force light preference text for contrast */
.chat-input-box.bg-dark-2 .claud-section-area .preference-card-title,
.chat-input-box.bg-dark-2 .claud-section-area .preference-option-label,
.chat-input-box.bg-dark-2 .claud-section-area .color-first {
    color: #fff !important;
}
.chat-input-box.bg-dark-2 .claud-section-area .preference-option-desc,
.chat-input-box.bg-dark-2 .claud-section-area .color-text-content,
.chat-input-box.bg-dark-2 .claud-section-area .color-second {
    color: rgba(255, 255, 255, 0.72) !important;
}
.chat-input-box.bg-dark-2 .claud-section-area .preference-option-num {
    color: #111 !important;
    background-color: #fff !important;
}
.chat-input-box.bg-dark-2 .claud-section-area .preference-option-btn:hover,
.chat-input-box.bg-dark-2 .claud-section-area .preference-option-btn:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
}
.chat-input-box.bg-dark-2 .claud-section-area .preference-skip-btn {
    color: #111 !important;
    background: #fff !important;
    border-color: transparent !important;
}
.chat-input-box.bg-dark-2 .claud-section-area .preference-skip-btn:hover {
    background: #f0f0f0 !important;
}
