/************************************************************************
*************************************************************************

========================================  
                CSS INDEX
========================================

[1] lotto 
[2] 
[3] 
[4] 
[5] 
 
=============== End Index =============*/
/*=====================================
[1] lotto
======================================*/

.lottery_main {
    /* background-color: #e6e8eb; */

}

.lottery_main .box_1st {
    /* background-color: #e6e8eb; */
    border: 1px solid #cccccc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lottery_main .box_1st h3 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #FFFFFF;

}

.lottery_main .box_1st h4 {
    font-size: 18px;
    color: #FFFFFF;
    margin: 0px;

}

.lottery_main .box_2st {
    /* background-color: #e6e8eb; */
    border: 1px solid #cccccc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lottery_main .box_2st h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #FFFFFF;

}

.lottery_main .box_2st h4 {
    font-size: 16px;
    color: #FFFFFF;
    margin: 0px;

}

.lottery_main .box_3st {
    /* background-color: #e6e8eb; */
    margin: 0px;
    padding: 0px;
    border: 1px solid #cccccc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lottery_main .box_3st .box_3st_topic {
    overflow: hidden;
    margin: 0px;
    padding: 15px;
}

.lottery_main .box_3st .box_3st_topic h3 {
    font-size: 18px;
    font-weight: bold;
    float: left;
    color: #FFFFFF;
    margin: 0px;
    padding: 0px;
    margin: 0px;
    padding: 0px;

}

.lottery_main .box_3st .box_3st_topic h4 {
    font-size: 16px;
    float: right;
    color: #FFFFFF;
    margin: 0px;

}

.lotto-box {
    width: 100%;
    margin: 0 auto;
    font-family: sans-serif;
    background: #f2f2f2;
    padding: 0px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #cccccc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lotto-header {
    display: flex;
    justify-content: space-between;
    background: #b30000;
    color: white;
    padding: 10px;
    font-weight: bold;

}

.lotto-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 6 คอลัมน์ */
    gap: 10px;

    background: white;
    border-radius: 0 0 4px 4px;
}

.number {
    text-align: center;
    padding: 8px 0;
    border: 0px solid #ddd;
    background-color: #fff;
    font-weight: 500;
}


.lotto_index {
    display: block;
    width: 100%;
    text-align: center;
    border: 1px solid;
    padding: 20px 15px;
    background-color: #ffffff;
    -webkit-border-radius: 10px;
    border-radius: 10px;

}

.lotto_index>h2 {
    display: block;
    font-size: 25px;
    font-weight: bold;


}

.lotto_index>h3 {
    display: block;
    font-size: 16px;
    color: #cc0000;
    font-weight: bold;
    margin-bottom: 20px;


}

.lotto_index>.box_1 {
    display: block;
    overflow: hidden;
    margin-bottom: 30px;
}

.lotto_index>.box_1>.box_1_1 {
    padding: 10px;
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background-color: #dddddd;

}

.lotto_index>.box_1 h4 {
    display: block;
    font-size: 14px;
}

.lotto_index>.box_1 p {
    display: block;
    font-size: 34px;
    font-weight: bold;
    margin: 0px;
}

.lotto_index>.box_1 span {
    display: block;
    font-size: 11px;

}



.lotto_index>.box_1 .lotto_1st {
    color: red;
}



.lotto_index>.box_2 {
    display: block;
    overflow: hidden;
    margin-bottom: 30px;
}

.lotto_index>.box_2 h4 {
    display: block;
    font-size: 14px;
}

.lotto_index>.box_2 p {
    display: block;
    font-size: 30px;
    font-weight: bold;
    margin: 0px;
}

.lotto_index>.box_2 span {
    display: block;
    font-size: 11px;

}


:root {
    --bg: #f5f7fb;
    --ink: #0f172a;
    --muted: #64748b;
    --border: #e5e7eb;
    --card: #ffffff;
    --primary: #d10000;
    --primary-700: #a30000;
    --shadow: 0 3px 16px rgba(2, 22, 58, .06);
    --radius: 14px;
}

/* ===== Page Title ===== */
.lotto-title {
    max-width: 860px;
    margin: 24px auto 8px;
    padding: 0 16px;
    font-size: 22px;
    font-weight: 800;
    color: #4f0b0b;
}

/* ===== Container ===== */
.lotto {
    max-width: 860px;
    margin: 0 auto 32px;
    padding: 0 16px;
}

/* ===== Draw Card ===== */
.draw {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 18px 0;
    overflow: hidden;
}

/* Top blue bar */
.draw__bar {
    background: linear-gradient(180deg, var(--primary), var(--primary-700));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
}

.draw__title {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: .2px;
}

.draw__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .35);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
}

.draw__more::before {
    content: "ⓘ";
    font-weight: 900;
}

/* Body layout */
.draw__body {
    display: grid;
    grid-template-columns: 30% 1fr;
    gap: 10px;
    padding: 12px;
}


/* Big first prize box */
.prize--first {
    background: #f8fafc;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prize__label {
    font-size: 18px;
    font-weight: 800;
    color: var(--muted);
}

.prize__number {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--primary-700);
    line-height: 1.1;
    text-align: center;
}

/* Small prize groups (เลขหน้า/ท้าย) */
.mini {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    text-align: center;
}



/* < 480px (ฐาน) */
@media (max-width: 479.98px) {

    /* xs */
    .draw__body {
        grid-template-columns: 1fr;
    }
}

/* 480–639.98px */
@media (min-width: 480px) and (max-width: 639.98px) {

    /* small phones/portrait */
    .draw__body {
        grid-template-columns: 1fr;
    }
}

/* 640–767.98px */
@media (min-width: 640px) and (max-width: 767.98px) {

    /* large phones */
    .draw__body {
        grid-template-columns: 1fr;
    }
}

/* 768–1023.98px */
@media (min-width: 768px) and (max-width: 1023.98px) {
    /* tablets */
}

/* 1024–1279.98px */
@media (min-width: 1024px) and (max-width: 1279.98px) {
    /* small laptops */
}

/* 1280–1535.98px */
@media (min-width: 1280px) and (max-width: 1535.98px) {
    /* desktops */
}

/* ≥ 1536px */
@media (min-width: 1536px) {
    /* large desktops */
}

.mini__group {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    overflow: hidden;
}

.mini__label {
    font-size: 14px;
    font-weight: 800;
    color: var(--muted);
    margin-bottom: 8px;
}

.mini__numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    /* แกนหลัก (X ถ้า flex-direction: row) */
    align-items: center;

}

/* Number chips */
.chip {
    width: 45%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 0px;
    font-weight: 900;
    font-size: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
    text-align: center;
}

.chip--lg {
    width: 100%;

    font-size: 24px;
    padding: 10px 0px;
}

.chip--stretch {
    flex: 1;
}

/* ใช้เมื่ออยากยืดเต็มแถว */
/*========== End 17 Lottery ======================================*/


/*========== Homepage 3-Column News Section ======================*/

/* --- Section background --- */
.bg-accent.section-space-default {
    background-color: #f8fafb !important;
    padding: 35px 0 25px !important;
}

/* --- Equal height columns --- */
.bg-accent.section-space-default>.container>.row {
    display: flex;
    flex-wrap: wrap;
}

.bg-accent.section-space-default>.container>.row>[class*="col-"] {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    padding-top: 20px;
    padding-bottom: 10px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .04);
    margin-bottom: 20px;
}

/* gap ระหว่าง 3 คอลัมน์ */
.bg-accent.section-space-default>.container>.row {
    gap: 0;
}

.bg-accent.section-space-default>.container>.row>.col-lg-4 {
    flex: 0 0 calc(33.333% - 12px);
    max-width: calc(33.333% - 12px);
    margin-left: 6px;
    margin-right: 6px;
}

@media (max-width: 991px) {
    .bg-accent.section-space-default>.container>.row>.col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* --- Section Headers (topic-box-lg) --- */
.bg-accent .topic-border {
    margin-bottom: 22px !important;
    border-bottom: 2px solid #e5e7eb;
}

.bg-accent .topic-border:after {
    display: none !important;
}

.bg-accent .topic-box-lg {
    background: none !important;
    color: #1a1a2e !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    padding: 0 2px 10px 0 !important;
    height: auto !important;
    line-height: 1.4 !important;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    position: relative;
    z-index: 3;
    text-transform: none !important;
}

.bg-accent .topic-box-lg:before,
.bg-accent .topic-box-lg:after {
    display: none !important;
}

.bg-accent .topic-box-lg.color-web-orange {
    border-bottom-color: #f59e0b !important;
}

.bg-accent .topic-box-lg.color-azure-radiance {
    border-bottom-color: #cc0000 !important;
}

/* เส้นใต้ header ทุกคอลัมน์ */
.bg-accent .topic-border.color-web-orange {
    border-bottom-color: #f59e0b !important;
}

.bg-accent .topic-border.color-azure-radiance {
    border-bottom-color: #cc0000 !important;
}

/* --- Featured image card (top item per column) --- */
.bg-accent .position-relative.border-bottom {
    border-bottom: none !important;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .05);
    margin-bottom: 18px !important;
    padding-bottom: 14px !important;
    transition: box-shadow .25s;
}

.bg-accent .position-relative.border-bottom:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
}

.bg-accent .img-overlay-70 {
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    margin-bottom: 0 !important;
}

/* รูปภาพเด่น: fixed aspect ratio 16:9 */
.bg-accent .position-relative.border-bottom .img-overlay-70 img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover;
    transition: transform .35s ease !important;
}

.bg-accent .img-overlay-70:hover img {
    transform: scale(1.04);
}

.bg-accent .box-padding1010 {
    padding: 10px 14px 2px !important;
}

/* Featured card: ความสูงคงที่ ให้ 3 คอลัมน์ตรงกัน */
.bg-accent .position-relative.border-bottom {
    height: 285px;
    display: flex;
    flex-direction: column;
}

.bg-accent .position-relative.border-bottom .img-overlay-70 {
    flex-shrink: 0;
}

.bg-accent .position-relative.border-bottom .box-padding1010 {
    /* ไม่ใช้ flex: 1 เพื่อให้ title+date ชิดด้านบน ช่องว่างตกล่าง */
}

/* หัวข้อเด่น: เกิน 3 บรรทัด → scrollbar */
.bg-accent .position-relative.border-bottom .title-medium-dark.size-lg {
    font-size: 16px !important;
    line-height: 1.15 !important;
    max-height: calc(1.15em * 2);
    /* สูงสุด 3 บรรทัด */
    overflow-y: auto;
    margin-bottom: 0 !important;
    /* scrollbar บาง สวย */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.bg-accent .position-relative.border-bottom .title-medium-dark.size-lg::-webkit-scrollbar {
    width: 4px;
}

.bg-accent .position-relative.border-bottom .title-medium-dark.size-lg::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.bg-accent .position-relative.border-bottom .title-medium-dark.size-lg::-webkit-scrollbar-track {
    background: transparent;
}

/* วันที่ติดใต้หัวข้อ */
.bg-accent .position-relative.border-bottom .post-date-dark {
    margin-top: 4px !important;
}

.bg-accent .title-medium-dark.size-lg {
    font-size: 16px !important;
    line-height: 1.55 !important;
}

.bg-accent .title-medium-dark a {
    color: #1e293b;
    transition: color .2s;
}

.bg-accent .title-medium-dark a:hover {
    color: #cc0000;
}

/* --- Date styling --- */
.bg-accent .post-date-dark ul {
    margin: 4px 0 0 !important;
    padding: 0 !important;
}

.bg-accent .post-date-dark span {
    font-size: 12px !important;
    color: #475569 !important;
}

/* --- Media rows (thumbnail + text) --- */
.bg-accent .media {
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    border-radius: 8px;
    padding: 10px !important;
    margin-bottom: 6px !important;
    transition: background .2s;
}

.bg-accent .media:hover {
    background: #fff5f5;
}

.bg-accent .media:last-child {
    border-bottom: none !important;
}

.bg-accent .media img {
    border-radius: 8px !important;
    object-fit: cover;
    width: 110px !important;
    height: 72px !important;
}

.bg-accent .media .title-medium-dark {
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin-bottom: 2px;
}

/*========== End Homepage 3-Column ================================*/


/*========== บทความล่าสุด (Articles Section) =======================*/

/* --- Section wrapper --- */
.bg-body.section-space-less30 {
    padding: 35px 0 20px !important;
}

/* --- Section header --- */
.bg-body.section-space-less30 > .container > .row > .col-12 > .topic-border {
    margin-bottom: 22px !important;
    border-bottom: 2px solid #e5e7eb;
}

.bg-body.section-space-less30 > .container > .row > .col-12 > .topic-border:after {
    display: none !important;
}

.bg-body.section-space-less30 .topic-box-lg {
    background: none !important;
    color: #1a1a2e !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    padding: 0 2px 10px 0 !important;
    height: auto !important;
    line-height: 1.4 !important;
    border-bottom: 3px solid #cc0000;
    margin-bottom: -2px;
    position: relative;
    z-index: 3;
    text-transform: none !important;
}

.bg-body.section-space-less30 .topic-box-lg:before,
.bg-body.section-space-less30 .topic-box-lg:after {
    display: none !important;
}

/* --- Card grid --- */
.bg-body.section-space-less30 .col-12 > .row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.bg-body.section-space-less30 .col-12 > .row > [class*="col-"] {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
    padding: 0 !important;
}

/* --- Article card --- */
.bg-body.section-space-less30 .col-12 > .row > [class*="col-"] > .mb-25 {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,.05);
    transition: box-shadow .25s, transform .25s;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
}

.bg-body.section-space-less30 .col-12 > .row > [class*="col-"] > .mb-25:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

/* --- Image --- */
.bg-body.section-space-less30 .mb-25 > .img-opacity-hover {
    display: block;
    overflow: hidden;
}

.bg-body.section-space-less30 .mb-25 img.img-fluid {
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 0 !important;
    transition: transform .35s ease;
}

.bg-body.section-space-less30 .mb-25:hover img.img-fluid {
    transform: scale(1.04);
}

/* --- Text area --- */
.bg-body.section-space-less30 .mb-25 .title-medium-dark {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    padding: 12px 14px 0 !important;
    margin-bottom: 0 !important;
    max-height: calc(1.5em * 3);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.bg-body.section-space-less30 .mb-25 .title-medium-dark::-webkit-scrollbar {
    width: 4px;
}

.bg-body.section-space-less30 .mb-25 .title-medium-dark::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.bg-body.section-space-less30 .mb-25 .title-medium-dark a {
    color: #1e293b;
    transition: color .2s;
}

.bg-body.section-space-less30 .mb-25 .title-medium-dark a:hover {
    color: #cc0000;
}

/* --- Date --- */
.bg-body.section-space-less30 .mb-25 .post-date-dark {
    padding: 6px 14px 14px !important;
}

.bg-body.section-space-less30 .mb-25 .post-date-dark ul {
    margin: 0 !important;
    padding: 0 !important;
}

.bg-body.section-space-less30 .mb-25 .post-date-dark span {
    font-size: 12px !important;
    color: #475569 !important;
}

/* --- Responsive: 2 col on tablet, 1 col on phone --- */
@media (max-width: 991px) {
    .bg-body.section-space-less30 .col-12 > .row > [class*="col-"] {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

@media (max-width: 575px) {
    .bg-body.section-space-less30 .col-12 > .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .bg-body.section-space-less30 .col-12 > .row {
        gap: 14px;
    }
}

/*========== End บทความล่าสุด =====================================*/


/*========== ไลฟ์สไตล์ (Lifestyle Section) =========================*/

/* --- Section wrapper --- */
.lifestyle-section {
    background: #f8fafb !important;
    padding: 35px 0 25px !important;
}

/* --- Section header --- */
.lifestyle-section .topic-border {
    margin-bottom: 22px !important;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.lifestyle-section .topic-border:after {
    display: none !important;
}

.lifestyle-section .topic-box-lg {
    background: none !important;
    color: #1a1a2e !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    padding: 0 2px 10px 0 !important;
    height: auto !important;
    line-height: 1.4 !important;
    border-bottom: 3px solid #cc0000;
    margin-bottom: -2px;
    position: relative;
    z-index: 3;
    text-transform: none !important;
}

.lifestyle-section .topic-box-lg:before,
.lifestyle-section .topic-box-lg:after {
    display: none !important;
}

/* --- "ดูทั้งหมด" link --- */
.lifestyle-section .more-info-link {
    padding-bottom: 10px;
}

.lifestyle-section .more-info-link a {
    font-size: 14px;
    color: #cc0000 !important;
    font-weight: 500;
    transition: color .2s;
    text-decoration: none;
}

.lifestyle-section .more-info-link a:hover {
    color: #800000 !important;
}

/* --- 3-column layout --- */
.lifestyle-section .col-12 > .row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.lifestyle-section .col-12 > .row > .col-md-4 {
    flex: 1;
    max-width: calc(33.333% - 14px);
    padding: 0 !important;
}

/* --- Featured card (left column) --- */
.lifestyle-section .col-md-4.mb-20 {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,.05);
    transition: box-shadow .25s;
    margin-bottom: 0 !important;
}

.lifestyle-section .col-md-4.mb-20:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.lifestyle-section .col-md-4.mb-20 .img-overlay-70 {
    margin-bottom: 0 !important;
    overflow: hidden;
}

.lifestyle-section .col-md-4.mb-20 .img-overlay-70 img {
    width: 100% !important;
    height: auto !important;
    transition: transform .35s ease;
}

.lifestyle-section .col-md-4.mb-20:hover .img-overlay-70 img {
    transform: scale(1.04);
}

.lifestyle-section .col-md-4.mb-20 .box-padding1010 {
    padding: 12px 16px 14px !important;
}

.lifestyle-section .col-md-4.mb-20 .title-medium-dark {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    margin-bottom: 4px !important;
}

.lifestyle-section .col-md-4.mb-20 .title-medium-dark a {
    color: #1e293b;
    transition: color .2s;
}

.lifestyle-section .col-md-4.mb-20 .title-medium-dark a:hover {
    color: #cc0000;
}

.lifestyle-section .col-md-4.mb-20 .post-date-dark {
    font-size: 12px !important;
    color: #475569 !important;
}

/* --- Media rows (middle & right columns) --- */
.lifestyle-section .media {
    background: #fff;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    border-radius: 8px;
    padding: 10px !important;
    margin-bottom: 8px !important;
    transition: background .2s, box-shadow .2s;
}

.lifestyle-section .media:hover {
    background: #fff5f5;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.lifestyle-section .media:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

.lifestyle-section .media img {
    border-radius: 8px !important;
    object-fit: cover;
    width: 120px !important;
    height: 78px !important;
    transition: transform .3s ease;
}

.lifestyle-section .media:hover img {
    transform: scale(1.03);
}

.lifestyle-section .media .title-medium-dark {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    margin-bottom: 4px !important;
}

.lifestyle-section .media .title-medium-dark a {
    color: #1e293b;
    transition: color .2s;
}

.lifestyle-section .media .title-medium-dark a:hover {
    color: #cc0000;
}

.lifestyle-section .media .post-date-dark ul {
    margin: 0 !important;
    padding: 0 !important;
}

.lifestyle-section .media .post-date-dark span {
    font-size: 12px !important;
    color: #475569 !important;
}

/* --- Responsive --- */
@media (max-width: 991px) {
    .lifestyle-section .col-12 > .row > .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .lifestyle-section .col-12 > .row {
        gap: 16px;
    }
}

/*========== End ไลฟ์สไตล์ ========================================*/


/*========== Price & Info Dashboard (1 section, 2 rows) ===========*/

/* --- Section --- */
.price-widget-section {
    padding: 28px 0 !important;
    background: linear-gradient(135deg, #3d0f0f 0%, #650f0f 50%, #7a1e1e 100%);
    position: relative;
    overflow: hidden;
}

.price-widget-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 30%, rgba(245,158,11,.07) 0%, transparent 45%),
        radial-gradient(circle at 85% 70%, rgba(239,68,68,.07) 0%, transparent 45%);
    pointer-events: none;
}

/* --- Row (shared) --- */
.pw-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    align-items: stretch;
    margin-bottom: 18px;
}

.pw-row:last-child { margin-bottom: 0; }

/* --- Card base --- */
.pw-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
}

/* --- Card header (shared) --- */
.pw-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.pw-header i { font-size: 14px; }

.gold-hd { background: linear-gradient(90deg, #d97706, #f59e0b); }
.oil-hd  { background: linear-gradient(90deg, #cc0000, #ef4444); }
.ex-hd   { background: linear-gradient(90deg, #059669, #34d399); }
.wt-hd   { background: linear-gradient(90deg, #6366f1, #818cf8); }

.pw-badge {
    margin-left: auto;
    background: rgba(255,255,255,.2);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
}

/* --- Card body (shared) --- */
.pw-body {
    padding: 14px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- Footer (update time) --- */
.pw-foot {
    text-align: right;
    font-size: 10px;
    color: #475569;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

/* ============ Row 1: Gold + Oil ============ */

/* Gold 35% | Oil 65% */
.pw-gold {
    flex: 0 0 calc(35% - 9px);
    max-width: calc(35% - 9px);
    background: linear-gradient(180deg, #fffbf0 0%, #fff 35%);
    border: 1px solid rgba(245,158,11,.18);
}

.pw-oil {
    flex: 0 0 calc(65% - 9px);
    max-width: calc(65% - 9px);
    background: linear-gradient(180deg, #fff5f5 0%, #fff 35%);
    border: 1px solid rgba(204,0,0,.12);
}

/* --- Gold table --- */
.gold-tbl {
    width: 100%;
    border-collapse: collapse;
}

.gold-tbl thead th {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #92722a;
    padding: 0 0 8px;
    letter-spacing: .5px;
}

.gold-tbl thead th:first-child { text-align: left; }

.gold-tbl tbody tr { border-top: 1px solid #f0e6cc; }

.gold-tbl tbody td { padding: 10px 0; }

.g-label {
    font-weight: 700;
    color: #44382a;
    font-size: 13px;
}

.g-val {
    text-align: center;
    font-weight: 800;
    color: #b8860b;
    font-size: 16px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* --- Oil grid 4 col --- */
.oil-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.oil-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    padding: 10px 6px 8px;
    border: 1px solid #e2e8f0;
    transition: box-shadow .2s;
    text-align: center;
}

.oil-item:hover {
    box-shadow: 0 2px 10px rgba(204,0,0,.1);
    border-color: #fca5a5;
}

.oil-name {
    font-size: 10px;
    color: #475569;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
    min-height: 26px;
    display: flex;
    align-items: center;
}

.oil-price {
    font-size: 18px;
    font-weight: 800;
    color: #5e0f0f;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.oil-diff { font-size: 10px; font-weight: 700; }
.diff-up   { color: #ef4444; }
.diff-up::before { content: '\25B2 '; font-size: 7px; }
.diff-down { color: #22c55e; }
.diff-down::before { content: '\25BC '; font-size: 7px; }
.diff-none { color: #475569; }

.oil-unit {
    font-size: 9px;
    color: #475569;
    margin-top: 1px;
}

/* ============ Row 2: Exchange + Weather ============ */

/* Exchange 30% | Weather 70% (weather มี 9 จังหวัด) */
.pw-exchange {
    flex: 0 0 calc(30% - 9px);
    max-width: calc(30% - 9px);
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 35%);
    border: 1px solid rgba(34,197,94,.15);
}

.pw-weather {
    flex: 0 0 calc(70% - 9px);
    max-width: calc(70% - 9px);
    background: linear-gradient(180deg, #fef2f2 0%, #fff 35%);
    border: 1px solid rgba(99,102,241,.12);
}

/* --- Exchange table --- */
.ex-tbl {
    width: 100%;
    border-collapse: collapse;
}

.ex-tbl thead th {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    padding: 0 0 6px;
    text-align: center;
    letter-spacing: .5px;
}

.ex-tbl thead th:first-child { text-align: left; }

.ex-tbl tbody tr { border-top: 1px solid #e5e7eb; }
.ex-tbl tbody tr:hover { background: #f0fdf4; }
.ex-tbl tbody td { padding: 5px 0; text-align: center; }

.ex-cur {
    text-align: left !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ex-flag { font-size: 16px; line-height: 1; }
.ex-code { font-weight: 700; font-size: 12px; color: #334155; }
.ex-amt  { font-size: 12px; color: #64748b; }

.ex-val {
    font-weight: 800;
    font-size: 15px;
    color: #059669;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* --- Weather: 3x3 grid --- */
.wt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.wt-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    transition: box-shadow .2s;
}

.wt-item:hover {
    box-shadow: 0 2px 10px rgba(99,102,241,.1);
    border-color: #a5b4fc;
}

.wt-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.wt-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.wt-city {
    font-size: 10px;
    font-weight: 700;
    color: #334155;
    line-height: 1.2;
}

.wt-temp {
    font-size: 18px;
    font-weight: 800;
    color: #312e81;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.2;
}

.wt-desc {
    font-size: 9px;
    color: #6366f1;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wt-meta {
    flex-shrink: 0;
    font-size: 9px;
    color: #475569;
    text-align: right;
}

.wt-meta i { margin-right: 1px; font-size: 8px; }

/* ============ Responsive ============ */
@media (max-width: 991px) {
    .pw-gold, .pw-oil,
    .pw-exchange, .pw-weather {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .pw-row { gap: 14px; }
    .wt-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
    .oil-grid { grid-template-columns: repeat(2, 1fr); }
    .wt-grid { grid-template-columns: repeat(2, 1fr); }
    .price-widget-section { padding: 20px 0 !important; }
    .pw-row { margin-bottom: 14px; }
}

@media (max-width: 480px) {
    .wt-grid { grid-template-columns: 1fr; }
    .pw-body { padding: 12px 14px; }
}

/*========== End Price & Info Dashboard ===========================*/