/* assets/css/style.css */

/* --- Fonts & General --- */
body {
    font-family: 'Prompt', sans-serif;
    background-color: #f4f7f6;
    color: #333;
}

/* --- Navbar & Logo Tweaks --- */
.custom-nav-link {
    color: #4a4a4a !important; /* สีเทาเข้ม */
    font-size: 16px;
    padding: 10px 15px !important;
    transition: all 0.3s ease;
}

.custom-nav-link:hover, .custom-nav-link.active {
    color: #ff2a2a !important; /* สีแดงตามโลโก้ DG */
    font-weight: 600;
}

/* --- Hero Search Section --- */
.hero-section {
    background: linear-gradient(135deg, #135589 0%, #2A93D5 100%);
    padding: 60px 20px;
    color: white;
    text-align: center;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}
.search-box input {
    padding: 15px 25px;
    border-radius: 30px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-size: 18px;
}
.search-box button {
    position: absolute;
    right: 5px;
    top: 5px;
    border-radius: 25px;
    padding: 10px 25px;
}

/* --- Status Badges (BKK Category Rules) --- */
.status-badge { 
    font-size: 14px; 
    padding: 6px 12px; 
    border-radius: 20px; 
    font-weight: 500; 
}
.bg-banned { /* ไม่รับฝากเก็บ (Cat 1/Cat 2 บางตัว) */
    background-color: #ffe5e5; 
    color: #d32f2f; 
    border: 1px solid #ffcdd2; 
}
.bg-conditional { /* ฝากได้มีเงื่อนไข (Cat 2 อิง FP) */
    background-color: #fff4e5; 
    color: #ed6c02; 
    border: 1px solid #ffe0b2; 
}
.bg-allowed { /* ฝากเก็บได้ (Cat 3) */
    background-color: #e8f5e9; 
    color: #2e7d32; 
    border: 1px solid #c8e6c9; 
}

/* --- Accordion Customization --- */
.accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: #FFFFFF;
    box-shadow: none;
}
.accordion-button:focus {
    box-shadow: none;
}

/* --- Floating Cart Button --- */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #2A93D5;
    color: white;
    border-radius: 50px;
    padding: 15px 25px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1050;
    font-weight: 600;
    transition: 0.3s;
    border: 2px solid white;
}
.floating-cart:hover { 
    transform: scale(1.05); 
    background-color: #135589; 
}
.cart-badge {
    background-color: #ff4757;
    color: white;
    border-radius: 50%;
    padding: 4px 8px;
    font-size: 12px;
    position: absolute;
    top: -5px;
    right: -5px;
    border: 2px solid white;
}

/* --- Matrix Table & Offcanvas --- */
.offcanvas-end {
    width: 500px !important;
}
.matrix-table th, .matrix-table td { 
    text-align: center; 
    vertical-align: middle; 
    width: 60px; 
    height: 60px; 
    font-weight: bold;
}
.cell-ok { background-color: #2e7d32; color: #2e7d32; }
.cell-away { background-color: #fff9c4; color: #f57f17; }
.cell-separated { background-color: #ffe0b2; color: #e65100; }
.cell-ban { background-color: #ffcdd2; color: #c62828; }

/* --- Alert Banner --- */
.alert-danger {
    font-size: 14px;
}
.alert-danger .alert-link {
    color: #b71c1c;
}
.alert-danger .alert-link:hover {
    color: #ff2a2a;
}

/* --- Language Toggle Switch --- */
.lang-toggle-box {
    display: inline-flex;
    align-items: center;
}
.btn-lang-active {
    background-color: #ff2a2a; /* สีแดงของโลโก้ */
    color: white !important;
    box-shadow: 0 2px 5px rgba(255, 42, 42, 0.4);
}
.btn-lang-inactive {
    background-color: transparent;
    color: #6c757d !important;
    transition: all 0.3s ease;
}
.btn-lang-inactive:hover {
    background-color: #e2e6ea;
    color: #333 !important;
}

/* --- Top Promo Banner --- */
.top-promo-banner {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1030;
}

/* --- Footer & Social Icons --- */
.footer-link:hover {
    color: #ff2a2a !important;
    text-decoration: underline !important;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}
.social-icon:hover {
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.icon-line { background-color: #00B900; } /* สีเขียว Line */
.icon-fb { background-color: #1877F2; }   /* สีฟ้า Facebook */
.icon-yt { background-color: #FF0000; }   /* สีแดง YouTube */

/* --- Search Result Cards (กรอบผลลัพธ์) --- */
.result-master-card {
    border: 1px solid #d3d9df;
    border-top: 5px solid #135589; /* แถบสีน้ำเงินด้านบนให้ดูเป็นหมวดหมู่ */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    background-color: #fff;
    transition: box-shadow 0.3s ease;
}
.result-master-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1); /* เอาเมาส์ชี้แล้วเงาชัดขึ้น */
}
.accordion-item {
    border: 1px solid #dee2e6 !important; /* เพิ่มเส้นขอบกรอบย่อย */
    margin-bottom: 12px;
    border-radius: 8px !important;
    overflow: hidden;
}

/* --- DB Cards (Law & Docs) --- */
.db-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 5px solid #6c757d; /* สีเริ่มต้น */
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}
.db-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.border-pat { border-left-color: #f39c12 !important; } /* ทกท. สีส้ม */
.border-md { border-left-color: #2980b9 !important; } /* กรมเจ้าท่า สีน้ำเงิน */
.border-min { border-left-color: #27ae60 !important; } /* กระทรวง สีเขียว */

.btn-db {
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
/* --- Dropdown Menu Customization --- */
.dropdown-menu .dropdown-item {
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #ffeaea; /* พื้นหลังสีแดงอ่อน */
    color: #ff2a2a; /* ตัวอักษรสีแดง ทกท. */
    border-radius: 4px;
}
/* --- DG Labels & Placards --- */
.dg-label-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.2)); /* เพิ่มเงาให้ป้ายดูลอยขึ้นมา */
}

.dg-label-img-sm {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-bottom: 4px;
}

/* ปรับขนาดฉลากตอนที่อยู่ในตะกร้าให้เล็กลงหน่อยจะได้ไม่เบียด */
#cartList .dg-label-img {
    width: 30px;
    height: 30px;
}

/* ปรับขนาดรูป Placard ให้อยู่ในกรอบเล็กๆ (บนปุ่ม Accordion) ได้สวยงาม */
.accordion-header .dg-label-img {
    width: 25px; /* ลดขนาดลงหน่อย จะได้ไม่ดันปุ่มให้บวม */
    height: 25px;
    filter: drop-shadow(0px 1px 2px rgba(0,0,0,0.1));
}
.accordion-header .dg-label-img-sm {
    width: 20px;
    height: 20px;
    margin-bottom: 0;
}