/* ===== Select Branches (หน้า home) =====
   พื้นสีเข้มต่อเนื่องจาก hero / แถบ banner — การ์ด: รูปร้านด้านบน + ข้อมูลบนพื้นเข้มด้านล่าง
   class ขึ้นต้น wtb- แยกจาก branch.css (ที่ยังใช้กับ modal เลือก delivery) */

.wtb-section {
    background:
        radial-gradient(80% 60% at 50% 0%, rgba(255, 198, 0, .06), transparent 70%),
        #120c08;
    padding: clamp(24px, 3vw, 40px) 0 clamp(32px, 4vw, 56px);
}

/* ---------- หัวข้อ ---------- */
.wtb-heading {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2vw, 28px);
    margin: 0 auto clamp(28px, 4vw, 48px);
    max-width: 900px;
}

.wtb-heading-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 198, 0, .55));
}

.wtb-heading-line:last-child {
    background: linear-gradient(to left, transparent, rgba(255, 198, 0, .55));
}

.wtb-heading-title {
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(38px, 5vw, 64px);
    font-weight: 400;
    letter-spacing: 2px;
    line-height: 1;
    color: #FFC600;
    text-align: center;
    white-space: nowrap;
}

/* ---------- การ์ด ---------- */
.wtb-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #1c1510;
    border: 1px solid rgba(255, 198, 0, .14);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.wtb-photo {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #2a1f17;
}

.wtb-photo-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform .6s ease;
}

/* ไล่สีจากรูปเข้าสู่พื้นการ์ด ให้ชื่อสาขาอ่านออก */
.wtb-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #1c1510 0%, rgba(28, 21, 16, .55) 30%, rgba(28, 21, 16, 0) 60%);
    pointer-events: none;
}

.wtb-name {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 10px;
    z-index: 1;
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(32px, 2.6vw, 40px);
    font-weight: 400;
    letter-spacing: 1.5px;
    line-height: 1;
    color: #FFC600;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

.wtb-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 22px 22px;
}

/* ---------- ข้อมูลสาขา ---------- */
.wtb-info {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.wtb-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-family: 'Prompt', sans-serif;
    font-size: 15px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .82);
}

.wtb-info svg {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    fill: #FFC600;
}

.wtb-info a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 198, 0, .45);
}

.wtb-info a:hover {
    color: #FFC600;
}

/* ---------- ปุ่ม ---------- */
.wtb-actions {
    margin-top: auto; /* ดันปุ่มลงล่าง การ์ดทุกใบปุ่มตรงแนวเดียวกัน */
    display: grid;
    gap: 10px;
}

.wtb-actions-row {
    display: flex;
    gap: 10px;
}

.wtb-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 46px;
    padding: 0 12px;
    border: 1.5px solid rgba(255, 198, 0, .6);
    border-radius: 10px;
    background: transparent;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 19px;
    letter-spacing: 1px;
    color: #FFC600;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}

.wtb-btn--primary {
    width: 100%;
    height: 50px;
    border-color: #FFC600;
    background: #FFC600;
    color: #1a1206;
    font-size: 21px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* เอฟเฟกต์เติมน้ำจากซ้ายไปขวา: ชั้นสีส้มอำพันขอบเป็นคลื่น เลื่อนเข้ามาตอน hover */
.wtb-btn--primary::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    width: calc(100% + 14px);
    background: linear-gradient(90deg, #ffb000, #ff8a00);
    -webkit-mask:
        linear-gradient(#000 0 0) left / calc(100% - 14px) 100% no-repeat,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='20'%3E%3Cpath d='M0 0H7Q14 5 7 10Q0 15 7 20H0Z'/%3E%3C/svg%3E") right top / 14px 20px repeat-y;
    mask:
        linear-gradient(#000 0 0) left / calc(100% - 14px) 100% no-repeat,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='20'%3E%3Cpath d='M0 0H7Q14 5 7 10Q0 15 7 20H0Z'/%3E%3C/svg%3E") right top / 14px 20px repeat-y;
    transform: translateX(-100%);
    transition: transform .7s cubic-bezier(.65, 0, .35, 1);
    animation: wtb-wave 1s linear infinite paused;
}

.wtb-btn--primary:hover::before {
    transform: translateX(0);
    animation-play-state: running;
}

@keyframes wtb-wave {
    to {
        -webkit-mask-position: left top, right 20px;
        mask-position: left top, right 20px;
    }
}

.wtb-btn:hover {
    background: rgba(255, 198, 0, .12);
    border-color: #FFC600;
    color: #FFC600;
}

.wtb-btn--primary:hover {
    background: #FFC600;
    color: #1a1206;
}

.wtb-btn:active {
    transform: scale(.97);
}

.wtb-btn.is-disabled {
    opacity: .4;
    pointer-events: none;
}

/* ---------- hover (เฉพาะอุปกรณ์ที่ใช้เมาส์) ---------- */
@media (hover: hover) {
    .wtb-card:hover {
        transform: translateY(-6px);
        border-color: rgba(255, 198, 0, .4);
        box-shadow: 0 22px 44px rgba(0, 0, 0, .5);
    }

    .wtb-card:hover .wtb-photo-img {
        transform: scale(1.06);
    }
}

/* ---------- Responsive ---------- */
@media (min-width: 1200px) and (max-width: 1399px) {
    .wtb-body {
        padding: 12px 18px 18px;
    }

    .wtb-name {
        left: 18px;
    }

    .wtb-info li {
        font-size: 14px;
    }

    .wtb-btn {
        font-size: 17px;
    }
}

@media (max-width: 575px) {
    .wtb-section .container-xxl {
        padding-left: 16px;
        padding-right: 16px;
    }

    .wtb-photo {
        aspect-ratio: 16 / 9;
    }

    .wtb-body {
        padding: 12px 18px 18px;
    }

    .wtb-name {
        left: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wtb-card,
    .wtb-photo-img,
    .wtb-btn--primary::before {
        transition: none;
        animation: none;
    }
}
