/* ============================================
   STYLE MODERN v4 — ทะเบียนเฮง.คอม
   เปลี่ยนแค่สีสัน+ขอบ ไม่ยุ่งกับ layout ภายในการ์ด
   Version: 4.0 | 2026-05-24
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;500;600;700&family=Sarabun:wght@400;600;700&display=swap');

* { box-sizing: border-box; }

body { font-family: 'Sarabun', Tahoma, sans-serif; }

/* === HEADER — gradient บน background เดิม === */
#header {
    background: linear-gradient(135deg, rgba(26,26,46,0.92), rgba(15,52,96,0.88)), url(images/bg_car02.png) no-repeat 422px 17px !important;
    height: auto !important;
    min-height: 200px;
    padding-bottom: 15px;
}
#header_title h1 {
    font-family: 'Prompt', sans-serif;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
#header_title h1 a { color: #fff !important; }
.description { color: rgba(255,255,255,0.8); }

#headNews {
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 6px 14px;
    margin-top: 8px;
    color: rgba(255,255,255,0.85);
}

/* === CARD GRID — grid container เท่านั้น ไม่แตะภายในการ์ด === */
.divFrameTop {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

/* === ป้ายปกติ — แก้แค่ขอบ+เงา ไม่แตะ width/height/float ภายใน === */
.divFrame {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
    display: inline-block !important;
    border-radius: 8px !important;
    border: 1px solid #ccc !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    background-size: 100% 100% !important;
}
.divFrame:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #999 !important;
}
.divFrame.truck { border-color: #3b82f6 !important; }
.divFrame.truck:hover { box-shadow: 0 4px 12px rgba(37,99,235,0.15); }
.divFrame.pickup { border-color: #22c55e !important; }
.divFrame.pickup:hover { box-shadow: 0 4px 12px rgba(22,163,74,0.15); }

/* ตัวอักษรทะเบียน — เปลี่ยนแค่ font */
.divFrame label.tabien { font-family: 'Prompt', sans-serif !important; }
.divFrame label.price { font-family: 'Sarabun', sans-serif !important; }
.divFrame a { font-family: 'Prompt', sans-serif !important; text-decoration: none; }

/* === ป้ายประมูล — เก็บ background เดิมทั้งหมด === */
.divFrameSpecial2 {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
    display: inline-block !important;
    border-radius: 8px !important;
    border: 1.5px solid #c9a830 !important;
    box-shadow: 0 1px 3px rgba(180,140,20,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    background-size: 100% 100% !important;
}
.divFrameSpecial2:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(180,140,20,0.2);
    border-color: #a08520 !important;
}
.divFrameSpecial2 label.tabien { font-family: 'Prompt', sans-serif !important; }
.divFrameSpecial2 label.price { font-family: 'Sarabun', sans-serif !important; }
.divFrameSpecial2 a { font-family: 'Prompt', sans-serif !important; text-decoration: none; }

/* === ป้ายมอเตอร์ไซค์ === */
.divFrameMotor {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
    display: inline-block !important;
    border-radius: 8px !important;
    border: 1px solid #8b5cf6 !important;
    transition: transform 0.2s, box-shadow 0.2s;
    background-size: 100% 100% !important;
}
.divFrameMotor:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139,92,246,0.12);
}
.divFrameMotor label.tabien { font-family: 'Prompt', sans-serif !important; }

/* === ราคาพิเศษ (กรอบแดง) === */
.divFrame[style*="border-color:#FF4242"],
.divFrameSpecial2[style*="border-color:#FF4242"] {
    border-color: #e63946 !important;
    border-width: 2px !important;
}

/* === POST / SECTIONS — แก้แค่ font + เพิ่มการ์ดขาว === */
.post {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.post-top { border-bottom: 2px solid #f0f2f5; padding-bottom: 10px; }
.post-title h1, .post-title h2 { font-family: 'Prompt', sans-serif; }
.post-title h1 a, .post-title h2 a { color: #1a1a2e !important; text-decoration: none; }
.post-title h1 a:hover, .post-title h2 a:hover { color: #e63946 !important; }
.post-title h3 { font-family: 'Sarabun', sans-serif; }
.post-top h3 a, .post-top h3 span { color: #e63946 !important; }

.post-top h4 {
    background: linear-gradient(135deg, #e63946, #d62839) !important;
    background-image: none !important;
    color: #fff !important;
    border-radius: 10px;
}
.post-top h4 span { display: none; }

/* === BUTTONS === */
.buttonblue, input[type="submit"] {
    font-family: 'Sarabun', sans-serif;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 24px !important;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}
.buttonblue:hover, input[type="submit"]:hover { transform: translateY(-1px); }

.postmetadata span a {
    background: linear-gradient(135deg, #e63946, #dc2626) !important;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Sarabun', sans-serif;
    font-weight: 600;
    padding: 10px 20px;
    display: inline-block;
    width: auto !important;
    height: auto !important;
}

/* === MISC === */
.square {
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    outline: none !important;
    padding: 5px 10px !important;
    transition: border-color 0.2s;
}
.square:hover { border-color: #e63946 !important; }
.square a { color: #1a1a2e; text-decoration: none; }
.square:hover a { color: #e63946; }

blockquote.style4 {
    background: #f8f9fa !important;
    border-left: 4px solid #e63946;
    border-top: none; border-bottom: none;
    border-radius: 0 6px 6px 0;
    padding: 14px 18px;
    background-image: none !important;
    text-indent: 0;
    font-style: normal;
}

#footer {
    background: #1a1a2e !important;
    background-image: none !important;
    height: auto !important;
    padding: 25px 20px;
}
#footer_title h1 { font-family: 'Prompt', sans-serif; }
#footer_title h1 a { color: #fff; }
#footer_text { color: rgba(255,255,255,0.7); }

.sidebars h2 { font-family: 'Prompt', sans-serif; }
.entry { font-family: 'Sarabun', sans-serif; }

a.paginate { background: #f0f2f5; color: #1a1a2e; text-decoration: none; border-radius: 4px !important; padding: 4px 10px !important; }
a.paginate:hover { background: #e63946; color: #fff; }
a.current { background: #e63946 !important; color: #fff !important; border-radius: 4px !important; padding: 4px 10px !important; }

input[type="text"], input[type="password"], select, textarea {
    border-radius: 6px; border: 1.5px solid #ddd; padding: 8px 12px;
}

/* === ลบ effects ที่ไม่จำเป็น === */
.post-top h4 { background-image: none !important; }
#extraDiv2 { display: none !important; }
.zoom { background-image: none !important; }

/* === RESPONSIVE === */
@media (max-width: 900px) { .divFrameTop { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 600px) {
    .divFrameTop { grid-template-columns: repeat(2, 1fr) !important; gap: 6px; }
    #header_title h1 { font-size: 48px !important; }
}
@media (max-width: 400px) {
    #header_title h1 { font-size: 32px !important; }
}

/* === PATCH v4.1 — การ์ดยืดเต็ม grid + มอเตอร์ไซค์ 3 บรรทัด === */

/* ให้การ์ดทุกประเภทยืดเต็มความกว้างของ grid cell */
.divFrame,
.divFrameSpecial2 {
    width: 100% !important;
}

/* มอเตอร์ไซค์ — สูงกว่าปกติ เพราะมี 3 บรรทัด */
.divFrameMotor {
    width: 100% !important;
    height: 80px !important;
    min-height: 80px;
}
