@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#body_swiper {
    background: #eee;
    font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #000;
    margin: 0;
    padding: 0;
}

@media (min-width: 601px) {
    #body_swiper {
        height: 450px;
    }
}

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: unset;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#body_swiper {
    background: unset;
    color: #000;
}

.swiper {
    width: 100%;
    height: 300px;
    margin-left: auto;
    margin-right: auto;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
}

.mySwiper2 {
    height: 80%;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
}

.mySwiper {
    height: 30%;
    box-sizing: border-box;
    padding: 10px 0;
}

.mySwiper .swiper-slide {
    width: 25%;
    height: 100%;
    opacity: 0.55;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.mySwiper .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #1570EF;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-button-next,
.swiper-button-prev {
    color: #194185;
}

.products {
    h1 {
        margin: 0px;
        color: #1D2939;
        font-size: 20px;
        font-weight: 500;
        letter-spacing: -0.01em;
        margin-top: 12px;
        word-wrap: break-word;
    }

    .status {
        height: 24px;
        margin: 0px;
        display: flex;
        gap: 5px;

        i {
            margin-left: auto;
            cursor: pointer;
        }
    }

    .status-time-product {
        font-size: 12px;
        font-weight: 500;
        background-color: #DC6803;
        color: white;
        margin-left: 0px;
        border-radius: 20px;
        padding: 4px 10px;
        box-shadow: 0 1px 2px rgba(16, 24, 40, 0.18);
    }

    .status-blue {
        cursor: pointer;
        color: #1570EF;
        border: 1px solid #1570EF;
        padding: 2px 8px;
        font-weight: 400;
        font-size: 12px;
        border-radius: 20px;
    }

    .status > i {
        transition: color 0.2s ease, transform 0.15s ease;
        border-radius: 100%;
    }

    .status > i:hover {
        color: #D92D20;
        transform: scale(1.1);
    }

    .control-text {
        margin-top: 4px;
        padding-top: 8px;
        border-top: 1px solid #EAECF0;

        .col.s6 {
            min-height: 56px;
            padding-top: 10px;
            padding-bottom: 10px;
        }
    }


    .text-sub {
        color: #667085;
        font-size: 11px;
        font-weight: 400;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        margin: 0px;
    }

    .text-main {
        color: #1D2939;
        font-size: 18px !important;
        font-weight: 500;
        font-variant-numeric: tabular-nums;
        margin: 2px 0 0;
    }

    .showbtn_bidder {
        display: none;
        margin-top: 1.25rem;

        .displayNoQuali {
            padding: 10px 14px;
            border: 1px solid #FEC84B;
            border-radius: 10px;
            background: #FFFAEB;
            margin-bottom: 0.75rem;

            .box-1 {
                display: block;
                font-size: 12px;
                color: #FDB022;
            }

            .box-1 {
                display: block;
                font-size: 14px;
                color: #DC6803;
            }
        }
    }

    .showbtn_bidder>.col.s12>.btn.waves-effect {
        background-color: #194185;
        color: white;
        width: 100%;
    }

    .showbtn_bidder .btn.waves-effect {
        border-radius: 999px;
        font-weight: 500;
        transition: transform 0.15s ease, box-shadow 0.2s ease;
    }

    .showbtn_bidder>.col.s12>.btn.waves-effect:not([disabled]) {
        box-shadow: 0 10px 22px -10px rgba(25, 65, 133, 0.55);
    }

    .showbtn_bidder>.col.s12>.btn.waves-effect:not([disabled]):hover {
        transform: translateY(-1px);
    }

    .showbtn_bidder .btn.waves-effect[disabled] {
        opacity: 0.55;
    }

    .activeColor {
        background: #194185;
        color: white;
        font-weight: 500;
        box-shadow: 0 10px 22px -10px rgba(25, 65, 133, 0.55);
    }

    .activeBorder {
        border: 2px solid #1570EF;
        color: #1570EF;
        font-weight: 500;
    }


    h2 {
        color: #1D2939;
        font-size: 24px;
        font-weight: 400;
        margin: 10px 0px;
    }

    .tabs {
        box-shadow: none;
        border-bottom: 1px solid #EAECF0;
    }

    .tabs .indicator {
        background-color: #1570EF;
        height: 2px;
    }

    .tabs .tab a {
        color: #667085;
        font-weight: 400;
        transition: color 0.2s ease;
    }

    .tabs .tab a.active,
    .tabs .tab a:hover {
        color: #194185;
    }

    #detail,
    #history_bidders,
    #chatbider {
        background: #fff;
        border: 1px solid #EAECF0;
        border-top: none;
        border-radius: 0 0 14px 14px;
        padding: 24px;
    }

    #detail {
        .text-p {
            color: #475467;
            font-size: 16px;
            font-weight: 300;
        }

        .bodyfile {
            display: flex;
            gap: 10px;
        }

        .headfile {
            color: #475467;
            font-size: 12px;
            font-weight: 300;
        }

        .dowloadfile {
            border-radius: 20px;
            border: 1px solid #D0D5DD;
            color: #1D2939;
            font-size: 16px;
            max-width: 10ch;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            transition: border-color 0.2s ease, background-color 0.2s ease;

        }

        .dowloadfile:hover {
            border-color: #194185;
            background-color: #F9FAFB;
        }
    }

    .row {
        .box-btn {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;

            button {
                display: flex;
                gap: 10px;
                flex-wrap: nowrap;
                border-radius: 999px;
            }
        }
    }

    .bidder-btn {
        display: flex;
        align-items: center;
        /* จัดให้อยู่กลางแนวตั้ง */
        border-radius: 12px;
    }

    .bidder-btn .btn {
        display: flex;
        align-items: center;
        /* จัดให้อยู่กลางแนวตั้ง */
        justify-content: center;
        /* จัดให้อยู่กลางแนวนอน */
        margin: 0 5px;
        /* กำหนดระยะห่างระหว่างปุ่ม */
        border-radius: 999px;
        transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    }

    .bidder-btn .btn:not([disabled]):hover {
        transform: translateY(-1px);
    }

    .bidder-btn .btn:nth-child(1) {
        width: auto;
        /* ปุ่มแรก */
        border: 1px solid #D0D5DD;
        color: #194185;
    }

    .bidder-btn .btn:nth-child(2) {
        width: 20%;
        /* ปุ่มที่สอง */
        box-shadow: unset;
        background: #F9FAFB;
        border: 1px solid #EAECF0;
    }

    .bidder-btn .btn:nth-child(2) input {
        text-align: center;
        font-weight: 500;
        font-variant-numeric: tabular-nums;
    }

    .bidder-btn .btn:nth-child(3) {
        width: auto;
        /* ปุ่มที่สาม */
        border: 1px solid #D0D5DD;
        color: #194185;
    }

    .bidder-btn .btn:nth-child(4) {
        width: 60%;
        /* ปุ่มที่สี่ */
        cursor: pointer;
    }

    #history_bidders {
        padding: 1rem;

        .header {
            display: flex;
            justify-content: space-between;
            border-bottom: 1px solid #d0d5dd;
            padding-bottom: 0px;
        }

        p {
            color: #475467;
            font-size: 14px;
            font-weight: 400;
        }
    }

    .proxybid {
        display: flex;
        gap: 10px;
        margin-top: 1rem;
        align-items: center;
        background: #EFF8FF;
        border-radius: 10px;
        padding: 10px 14px;
        font-size: 13px;
        color: #475467;

        span {
            color: #1570EF
        }
    }


    #detailbidder {
        .body {
            display: flex;
            justify-content: space-between;
            border-bottom: 1px solid #EAECF0;
            align-items: center;
            padding: 10px 4px;
            transition: background-color 0.2s ease;

            &:hover {
                background-color: #F9FAFB;
            }

            p {
                color: #1D2939;
                font-size: 16px;
                font-weight: 300;

                span {
                    color: #98A2B3;
                    font-size: 16px;
                    font-weight: 300;
                }
            }
        }
    }

    #chatbider {
        padding: 1rem;

        .chat-container {
            margin: auto;
            background: #fff;
            padding: 10px;
            display: flex;
            flex-direction: column;
            height: 500px;
        }

        .messages {
            flex: 1;
            overflow-y: auto;
            padding-bottom: 10px;
            overflow-x: hidden;
        }

        .message {
            display: flex;
            margin-bottom: 15px;
            position: relative;
        }

        .incoming {
            justify-content: flex-start;
        }

        .outgoing {
            justify-content: flex-end;
        }

        .bubble {
            padding: 10px 15px;
            border-radius: 15px;
            position: relative;
            animation: fadeInUp 0.5s ease forwards;
        }

        .incoming .bubble {
            background-color: #f1f1f1;
            color: #1D2939;
            font-weight: 400;
            font-size: 16px;
            margin-bottom: 5px;
            float: left;
        }

        .outgoing .bubble {
            background-color: #CCFBEF;
            color: #1D2939;
            font-weight: 400;
            font-size: 16px;
            float: right;
        }

        .timestamp {
            /* font-size: 0.75em;
            color: #888; */
        }

        .input-area {
            display: flex;
            border-top: 2px solid #a9a9a938;
            padding-top: 10px;
            align-items: center;
        }

        .input-area input {
            flex: 1;
            padding: 10px;
            border: 1px solid #D0D5DD;
            border-radius: 5px;
            margin: 0;
            margin-right: 5px;
            height: unset;
        }

        .input-area button {
            padding: 10px 15px;
            background-color: #194185;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }

        .sender-info {
            font-size: 0.85em;
            color: #555;
            display: flex;
            justify-content: space-between;
            margin-bottom: 5px;
            gap: 15px;
        }
    }


}
/* ราคาปัจจุบันเป็นตัวเลขหลักของบล็อกราคา */
.products .text-main.text-main--lead {
    color: #194185;
    font-size: 24px !important;
    font-weight: 600;
    line-height: 1.25;
}

/* ขั้นตอนก่อนประมูล */
.products .bid-ready {
    margin: 0.75rem 0 1.25rem;
    padding: 12px 14px;
    background: #F9FAFB;
    border: 1px solid #EAECF0;
    border-radius: 12px;
}

.products .bid-ready__title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1D2939;
}

.products .bid-ready__steps {
    list-style: none;
    margin: 0;
    padding: 0;
}

.products .bid-ready__steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    font-size: 14px;
    color: #344054;
}

.products .bid-ready__steps li > span {
    flex: 1;
}

.products .bid-ready__steps i {
    font-size: 20px;
    color: #98A2B3;
}

.products .bid-ready__steps .is-done i {
    color: #039855;
}

.products .bid-ready__steps .is-done > span {
    color: #667085;
}

.products .bid-ready__steps .is-pending i {
    color: #DC6803;
}

.products .bid-ready__steps .is-rejected i {
    color: #D92D20;
}

.products .bid-ready__steps a {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #D0D5DD;
    background: #fff;
    color: #194185;
    font-weight: 500;
    white-space: nowrap;
}

.products .bid-ready__steps a:hover {
    background: #EFF8FF;
}

.products .bid-ready__steps a:focus-visible {
    outline: 2px solid #194185;
    outline-offset: 2px;
}

.products .bid-ready__steps em {
    font-style: normal;
    color: #DC6803;
    white-space: nowrap;
}

/* มือถือ: ปุ่มประมูลติดขอบล่างจอขณะดูข้อมูลสินค้า */
@media (max-width: 600px) {
    .products .showbtn_bidder {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
        background: #fff;
        box-shadow: 0 -6px 16px -8px rgba(16, 24, 40, 0.18);
    }

    .products .control-text .col.s6 {
        min-height: 0;
    }
}

/* นับถอยหลังอ่านง่ายขึ้น ตัวเลขไม่ขยับ */
.products .status .status-time-product {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

/* สถานะของผู้ใช้: นำอยู่ / ถูกแซง */
.products .bid-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 0;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
}

.products .bid-status i {
    font-size: 20px;
}

.products .bid-status.is-leading {
    background: #ECFDF3;
    color: #05603A;
}

.products .bid-status.is-leading i {
    color: #039855;
}

.products .bid-status.is-outbid {
    background: #FEF3F2;
    color: #912018;
}

.products .bid-status.is-outbid i {
    color: #D92D20;
}

.products .bid-status strong {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* error ของการประมูล: อยู่ใต้ปุ่มจนกว่าจะปิดหรือประมูลใหม่ */
.products .bid-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 8px 10px 14px;
    border: 1px solid #FECDCA;
    border-radius: 12px;
    background: #FEF3F2;
    color: #912018;
    font-size: 14px;
}

.products .bid-error > i {
    font-size: 20px;
    color: #D92D20;
}

.products .bid-error__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.products .bid-error__body a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #194185;
    font-weight: 500;
}

.products .bid-error__body a i {
    font-size: 16px;
}

.products .bid-error__close,
.products .bid-error__close:focus {
    display: flex;
    padding: 2px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #912018;
    cursor: pointer;
}

.products .bid-error__close:hover {
    background: #FEE4E2;
}

.products .bid-error__close:focus-visible,
.products .bid-error__body a:focus-visible {
    outline: 2px solid #194185;
    outline-offset: 2px;
}

.products .bid-error__close i {
    font-size: 18px;
}

/* ประวัติการเสนอราคาที่ยังว่าง */
.products .prices-empty {
    margin: 0;
    padding: 24px 0;
    text-align: center;
    color: #667085;
}

/* รายละเอียดการประมูล: ส่วนอ่านปกติ (ไม่มีแท็บแล้ว) */
.products #detail {
    border-top: 1px solid #EAECF0;
    border-radius: 14px;
}

.products #detail h2 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 500;
    color: #1D2939;
}

.products #detail h2 + .text-p,
.products .detail-facts + h2 {
    margin-top: 0;
}

.products .detail-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 24px;
    margin: 0 0 28px;
}

.products .detail-facts dt {
    font-size: 13px;
    color: #667085;
}

.products .detail-facts dd {
    margin: 2px 0 0;
    font-size: 16px;
    font-weight: 500;
    color: #1D2939;
}

.products #detail .text-p {
    max-width: 72ch;
    line-height: 1.7;
}

/* ความเคลื่อนไหวสด */
.products .activity {
    margin: 1.5rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid #EAECF0;
}

.products .activity__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 8px;
}

.products .activity__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #1D2939;
}

.products .activity__live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #FEF3F2;
    color: #B42318;
    font-size: 12px;
    font-weight: 500;
}

.products .activity__live::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #F04438;
}

.products .activity__filters {
    display: flex;
    gap: 6px;
}

.products .activity__filters button,
.products .activity__filters button:focus {
    padding: 4px 12px;
    border: 1px solid #D0D5DD;
    border-radius: 999px;
    background: #fff;
    color: #344054;
    font-size: 13px;
    cursor: pointer;
}

.products .activity__filters button span {
    color: #667085;
    font-variant-numeric: tabular-nums;
}

.products .activity__filters button.is-active {
    border-color: #194185;
    background: #194185;
    color: #fff;
}

.products .activity__filters button.is-active span {
    color: #D1E0FF;
}

.products .activity__filters button:focus-visible,
.products .activity__compose button:focus-visible,
.products .activity__login a:focus-visible {
    outline: 2px solid #194185;
    outline-offset: 2px;
}

.products .activity__list {
    max-height: 360px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
    overscroll-behavior: contain;
}

.products .activity__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 8px;
    border-bottom: 1px solid #F2F4F7;
}

.products .activity__item.is-mine {
    background: #F5F8FF;
    border-radius: 8px;
}

.products .activity__icon {
    margin-top: 2px;
    font-size: 18px;
    color: #98A2B3;
}

.products .activity__item.is-bid .activity__icon {
    color: #194185;
}

.products .activity__body {
    flex: 1;
    min-width: 0;
}

.products .activity__body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #344054;
}

.products .activity__body strong {
    font-weight: 500;
    color: #1D2939;
}

.products .activity__amount {
    font-weight: 600;
    color: #194185;
    font-variant-numeric: tabular-nums;
}

.products .activity__message {
    display: block;
    overflow-wrap: anywhere;
}

.products .activity__tag {
    display: inline-block;
    margin-left: 4px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ECFDF3;
    color: #05603A;
    font-size: 12px;
    line-height: 20px;
}

.products .activity__tag--mine {
    background: #EFF8FF;
    color: #175CD3;
}

.products .activity__body time {
    font-size: 12px;
    color: #667085;
}

.products .activity__empty {
    padding: 24px 8px;
    text-align: center;
    color: #667085;
    font-size: 14px;
}

.products .activity__compose {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

#app .activity__compose input[type="text"],
#app .activity__compose input[type="text"]:focus:not([readonly]) {
    flex: 1;
    height: 40px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #D0D5DD;
    border-radius: 999px;
    box-sizing: border-box;
    box-shadow: none;
    font-size: 14px;
}

#app .activity__compose input[type="text"]:focus:not([readonly]) {
    border-color: #194185;
}

.products .activity__compose button,
.products .activity__compose button:focus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #194185;
    color: #fff;
    cursor: pointer;
}

.products .activity__compose button i {
    font-size: 18px;
}

.products .activity__login {
    margin: 10px 0 0;
    font-size: 14px;
    color: #475467;
}

.products .activity__login a {
    font-weight: 500;
    color: #194185;
}

/* เดสก์ท็อป: แกลเลอรีติดอยู่ขณะเลื่อนอ่านคอลัมน์ขวา */
@media (min-width: 601px) {
    .products .product-main {
        display: flex;
        align-items: flex-start;
    }

    .products .product-main > .col {
        min-width: 0;
    }

    .products .product-main > #body_swiper {
        position: sticky;
        top: 16px;
    }
}
