/* 
Theme Name: Astra Child
Template: astra
Version: 1.0.0
*/

/* ================================
   GLOBAL
================================ */

/* พื้นหลังทั้งเว็บ */
body {
  background-color: #4EE7FF !important;
}

/* จองพื้นที่โลโก้ลด CLS */
.site-logo-wrapper {
  display: inline-block;
  width: 60px;
  height: 60px;
}
.custom-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Header ไม่ให้ขยับ */
.site-header {
  min-height: 120px;
}

/* ชื่อเว็บไม่ให้กระโดด */
.ast-site-title-wrap {
  display: inline-flex;
  align-items: center;
  min-height: 1.2em;
}

/* กันล้นขวา */
html, body {
  overflow-x: hidden;
}

/* =======================================================
   ALL PAGES CONFIG: หน้าแรก (VIP) + หน้าสมัครงาน (Jobs)
   รวมคำสั่งจัดกึ่งกลางและสไลด์ไว้ที่นี่ที่เดียว
   ======================================================= */

/* 1. จัดกึ่งกลางโครงสร้างหลัก (Main Container) */
body.page-template-template-front-vip .site-content,
body.page-template-template-front-vip .ast-container,
body.page-template-template-front-vip #primary,
body.page-template-template-front-vip .entry-content,
/* เพิ่มบรรทัดสำหรับหน้าสมัครงาน (ดักทุกชื่อที่เป็นไปได้) */
body.page-template-job-application-page .site-content,
body.page-template-job-application-page .ast-container,
body.page-template-job-application-page #primary,
body.page-template-job-application-page .entry-content,
body.page-template-page-jobs .site-content,
body.page-template-page-jobs .ast-container,
body.page-template-page-jobs #primary,
body.page-template-page-jobs .entry-content {
    max-width: 1200px;
    margin: 0 auto;       /* ✅ ตัวสำคัญ: สั่งให้กึ่งกลาง */
    padding-left: 0;
    padding-right: 0;
}

/* 2. จัดการกล่องสไลด์ (VIP Swiper) ให้กว้างเต็มกรอบ */
body.page-template-template-front-vip .vip-swiper,
body.page-template-job-application-page .vip-swiper,
body.page-template-page-jobs .vip-swiper {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;    /* ✅ จัดสไลด์ให้อยู่ตรงกลาง */
    padding: 0 10px;
    box-sizing: border-box;
    display: block;       /* ✅ บังคับแสดงผล */
}

/* 3. บังคับรูปในสไลด์ให้เต็มและขยับได้ */
body.page-template-template-front-vip .vip-swiper .swiper-slide img,
body.page-template-job-application-page .vip-swiper .swiper-slide img,
body.page-template-page-jobs .vip-swiper .swiper-slide img {
    width: 100% !important;
    height: auto !important;
    display: block;
    object-fit: contain;
}

/* 4. การแสดงผลบนมือถือ (ให้เต็มจอ ไม่เหลือขอบ) */
@media (max-width: 768px) {
    /* คุม Container */
    body.page-template-template-front-vip .site-content,
    body.page-template-template-front-vip .ast-container,
    body.page-template-template-front-vip #primary,
    body.page-template-template-front-vip .entry-content,
    body.page-template-job-application-page .site-content,
    body.page-template-job-application-page .ast-container,
    body.page-template-job-application-page #primary,
    body.page-template-job-application-page .entry-content,
    body.page-template-page-jobs .site-content,
    body.page-template-page-jobs .ast-container,
    body.page-template-page-jobs #primary,
    body.page-template-page-jobs .entry-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* คุม Swiper */
    body.page-template-template-front-vip .vip-swiper,
    body.page-template-job-application-page .vip-swiper,
    body.page-template-page-jobs .vip-swiper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 10px 0 !important;
        padding: 0 !important;
    }
}

/* ⭐ ใช้ได้ทั้ง shop-card และ shop-card-fix */
.shop-card, .shop-card-fix{
  background:#fff;
}

.shop-card-vip, .shop-card-vip2{
  position:relative;
}



.vip-indicator{
  position:absolute;
  left:12px; right:12px; bottom:2px;
  display:flex; align-items:center; gap:10px;
  pointer-events:none; z-index:5;
}
.vip-progress{
  flex:1; height:7px;
  background: rgba(255,255,255,.25);
  border-radius: 999px; overflow:hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.vip-progress span{
  display:block; height:100%; width:0%;
  background: rgba(255,255,255,.95);
  border-radius: 999px;
  transition: width .35s ease;
}
.vip-fraction{
  min-width:56px; text-align:center;
  font:700 12px/1 'Kanit',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  padding:7px 10px; border-radius:999px;
  background: rgba(0,0,0,.55); color:#fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

@media (max-width: 600px){
  .vip-indicator{
    bottom: 0px !important;   /* ดันลงไปใต้รูป */
    left: 5px !important;
    right: 5px !important;
  }
}

.vip-progress span{
  background: rgba(255,255,255,0.6); /* จากขาวจัด → ขาวจาง */
}


.kp-post-nav{
  max-width: 1000px;
  margin: 40px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}




/* wrapper เต็มบล็อกของ Astra */
.kp-ast-nav-wrap{
  width: 100%;
  margin: 40px 0;
  clear: both;
}

/* ตัวปุ่ม */
.kp-ast-nav{
  max-width: 420px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.kp-ast-nav a{
  display: block;
  padding: 14px 12px;
  text-align: center;
  background: #ffffff;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  color: #000;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

.kp-ast-nav a:hover{
  background:#ff4d94;
  color:#fff;
}

/* ================================
   FIX: แก้ปัญหาหน้า 2 หดเหลือครึ่งเดียว
================================ */
#primary,
.content-area,
.site-main,
.ast-primary-content-wrap { 
    width: 100% !important;
    float: none !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

#secondary,
.widget-area,
.ast-sidebar-wrap {
    display: none !important;
}

/* =================================================
   JOB PAGE – PINK TEXT SYSTEM (SAME AS FRONT PAGE)
================================================= */

/* แถบชมพู (ชื่อการ์ด / บทความ) */
.shop-title-bar,
.shop-title-bar-fix,
.kapoo-title-bar {
  background-color: #ff4081;
}

/* บังคับตัวหนังสือทั้งหมดบนพื้นชมพู */
.shop-title-bar,
.shop-title-bar *,
.shop-title-bar-fix,
.shop-title-bar-fix *,
.kapoo-title-bar,
.kapoo-title-bar * {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

/* ===============================
   ปุ่มชมพู (CTA)
=============================== */
.btn-pink-gradient,
.kp-cta-btn {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

.btn-pink-gradient *,
.kp-cta-btn * {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
/* ปุ่มชมพูทั้งหมดในหน้าแรก */
.view-all-btn,
.kp-cta-btn {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

/* เผื่อปุ่มมี element ซ้อน */
.view-all-btn *,
.kp-cta-btn * {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

/* ===============================
   KAPOOFIN PIN SYSTEM (GLOBAL)
   =============================== */

.kpf-pin {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: #ff4081;            /* ชมพูธีม */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  line-height: 1;
  z-index: 5;

  box-shadow:
    0 4px 10px rgba(255,64,129,.45),
    inset 0 1px 0 rgba(255,255,255,.35);
}

/* ดาว */
.kpf-pin::before {
  content: "★";
  transform: translateY(-1px);
}

/* เวอร์ชันเล็ก (เช่น บทความ) */
.kpf-pin.is-small {
  width: 22px;
  height: 22px;
  font-size: 13px;
}

/* hover */
.shop-card:hover .kpf-pin,
.kapoo-card:hover .kpf-pin {
  transform: scale(1.1);
}
.kpf-pin.is-vip {
  background: linear-gradient(135deg,#ff4081,#ff7ab3);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,64,129,.6); }
  70% { box-shadow: 0 0 0 10px rgba(255,64,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,64,129,0); }
}

/* ================================
   ทำให้ป้ายใหม่ (kp-strip) เหมือนป้ายเดิม
   ❗ แก้เฉพาะ CSS ตรงนี้เท่านั้น
================================ */

.kp-strip{
  background:#000;
  padding:15px 0 15px;
  display:flex;
  justify-content:center;
}

.kp-strip .kp-plate{
  position:relative;
  background: linear-gradient(
    to bottom,
    #5a5a5a 0%,
    #3a3a3a 50%,
    #2a2a2a 100%
  );
  border:1px solid #777;
  border-radius:10px;
  padding:10px 40px 10px;
  text-align:center;
  color:#fff;
  box-shadow:
    0 4px 6px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.2);
  max-width:90%;
  min-width:320px;
  font-family:'Kanit',sans-serif;
}

.kp-strip .kp-title{
  font-size:18px;
  font-weight:500;
  margin:0;
  color:#fff;
  text-shadow:1px 1px 2px #000;
}

.kp-strip .kp-subtitle{
  font-size:14px;
  font-weight:300;
  margin-top:4px;
  text-shadow:1px 1px 2px #000;
}

.kp-strip .kp-subtitle a{
  color:#ffffff;
  font-weight:bold;
  text-decoration:none;
}
.kp-strip .kp-subtitle a:hover{
  color:#00b900;
  text-decoration:underline;
}

/* ขีดชมพู: แสดงเฉพาะตอนมีบรรทัดที่ 2 */
.kp-strip .kp-subtitle:before{
  content:"";
  display:block;
  width:60%;
  height:2px;
  margin:6px auto;
  background:#ff4081;
  border-radius:2px;
}
/* ===============================
   GLOBAL METAL PLATE SCREWS
   =============================== */
.metal-plate{
  position: relative;
}

/* ===============================
   KP PLATE SCREWS (ใช้กับ kp-plate)
   =============================== */
.kp-plate{
  position: relative;
}


/* ===== GLOBAL METAL SCREWS (ถูกต้อง 100%) ===== */
.kp-plate,
.metal-plate{
  position: relative;
}
/* ===============================
   GLOBAL SCREW SYSTEM (ใช้ทั้งเว็บ)
   =============================== */

.kp-plate{
  position: relative;
}

.screw{
  position:absolute;
  width:6px;
  height:6px;
  border-radius:50%;
  background: radial-gradient(circle at 30% 30%, #fff, #9e9e9e 55%, #6b6b6b 100%);
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,.6),
    0 1px 1px rgba(255,255,255,.3);
  pointer-events:none;
  z-index:2;
}

.screw.tl { top: 8px; left: 8px; }
.screw.tr { top: 8px; right: 8px; }
.screw.bl { bottom: 8px; left: 8px; }
.screw.br { bottom: 8px; right: 8px; }



/* ===============================
   ARTICLE SINGLE (POST)
   =============================== */

.article-wrap{
    max-width: 920px;
    margin: 40px auto 80px;
    padding: 0 18px;
}

.article-content{
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 38px;
    box-shadow: 0 10px 40px rgba(0,0,0,.08);
}

.article-thumb{
    margin-bottom: 24px;
    border-radius: 14px;
    overflow: hidden;
}

.article-thumb img{
    width: 100%;
    height: auto;
    display: block;
}

.article-title{
    font-size: 34px;
    line-height: 1.35;
    margin-bottom: 10px;
    color: #003b44;
}

.article-body{
    font-size: 17px;
    line-height: 1.9;
    color: #222;
}

/* Mobile */
@media (max-width: 768px){
    .article-wrap{
        margin: 20px 10px 60px;
    }

    .article-content{
        padding: 20px 18px;
        border-radius: 14px;
    }

    .article-title{
        font-size: 24px;
    }

    .article-body{
        font-size: 15.5px;
    }
}
/* พื้นที่รวมบทความ */
.article-wrap {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}

/* การ์ดเนื้อหา */
.article-content {
    background: #ffffff;
    border-radius: 18px;
    padding: 35px;
    border: 3px solid #ff4fa3; /* ชมพูสด */
    box-shadow: 0 10px 25px rgba(255, 79, 163, 0.25);
    transition: all 0.3s ease;
}

/* Hover ให้เด้งแบบการ์ด */
.article-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(255, 79, 163, 0.35);
}

/* รูปภาพ */
.article-thumb img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 4px solid #ffd1e6;
}

/* หัวข้อบทความ */
.article-title {
    font-size: 30px;
    margin-bottom: 20px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #ff4fa3, #ff85c1);
    color: #ffffff;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(255, 79, 163, 0.35);
}

/* เนื้อหา */
.article-body {
    font-size: 17px;
    line-height: 1.9;
    color: #333;
}

/* ปุ่มในบทความ (ถ้ามี) */
.article-body a {
    color: #ff4fa3;
    font-weight: 600;
    text-decoration: none;
}

.article-body a:hover {
    text-decoration: underline;
}
/* กล่องรายละเอียด (บอร์ดข้อความ) */
.article-body {
    margin-top: 25px;
    padding: 25px 30px;
    background: #fff7fb; /* ชมพูอ่อน */
    border: 2px dashed #ff4fa3; /* เส้นบอร์ด */
    border-radius: 16px;
    box-shadow: inset 0 0 10px rgba(255, 79, 163, 0.12);
    font-size: 17px;
    line-height: 1.9;
    color: #333;
}

/* ย่อหน้า */
.article-body p {
    margin-bottom: 12px;
}

/* ลิงก์ */
.article-body a {
    color: #ff4fa3;
    font-weight: 600;
}

/* Hover ให้บอร์ดดูเด้ง */
.article-body:hover {
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(255, 79, 163, 0.18);
    transition: 0.3s ease;
}
/* =========================
   ปรับเฉพาะมือถือ
   ========================= */
@media (max-width: 768px) {

    /* พื้นที่รอบนอก */
    .article-wrap {
        max-width: 100%;
        padding: 5px;        /* ลดช่องว่างรอบนอก */
        margin: 0 auto;
    }

    /* การ์ดหลัก */
    .article-content {
        width: 100%;
        padding: 15px;      /* ลด padding ด้านใน */
        border-radius: 10px;
    }

    /* บอร์ดรายละเอียด */
    .article-body {
        padding: 12px;
    }

    /* รูปภาพไม่ล้น */
    .article-thumb img {
        width: 100%;
        height: auto;
    }
}
/* แถบข้อมูลโพสต์ */
.article-meta {
    margin: 12px 0 20px;
    padding: 10px 15px;
    background: #fff0f7;
    border-radius: 10px;
    font-size: 14px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #ff4fa3;
    font-weight: 500;
}
@media (max-width: 768px) {
    .article-meta {
        font-size: 13px;
        padding: 8px 10px;
    }
}

/* ==================================================
   RESTORE BOARD SHOP LIST (SAFE)
   ใช้เฉพาะหน้า category-board-shop เท่านั้น
   ================================================== */

body.category-board-shop .board-page-hero{
    max-width: 960px;
    margin: 40px auto 20px;
    padding: 0 20px;
}

body.category-board-shop .board-page-title{
    font-size: 34px;
    font-weight: 900;
    color: #003b44;
    margin-bottom: 6px;
}

body.category-board-shop .board-page-subtitle{
    font-size: 15px;
    color: #006b78;
    opacity: .9;
}

/* wrapper */
body.category-board-shop .board-wrap{
    max-width: 960px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

/* rules box */
body.category-board-shop .board-rules{
    background: #ffffff;
    border-left: 6px solid #ff4d94;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 26px;
    box-shadow: 0 12px 30px rgba(0,0,0,.12);
}

body.category-board-shop .board-rules-title{
    font-size: 18px;
    font-weight: 900;
    color: #003b44;
    margin-bottom: 12px;
}

/* create button */
body.category-board-shop .board-create-btn{
    display: inline-block;
    margin-bottom: 26px;
    background: linear-gradient(135deg,#ff4d94,#ff77b7);
    color: #fff;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(255,77,148,.35);
    transition: .25s ease;
}

body.category-board-shop .board-create-btn:hover{
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(255,77,148,.45);
}

/* topic card */
body.category-board-shop .board-topic{
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #ffffff;
    border-left: 6px solid #ff4d94;
    padding: 20px 24px;
    margin-bottom: 18px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* thumb */
body.category-board-shop .board-thumb{
    flex: 0 0 88px;
}

body.category-board-shop .board-thumb img{
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 10px;
}

/* content */
body.category-board-shop .board-topic-title{
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
}

body.category-board-shop .board-topic-title a{
    color: #003b44;
    text-decoration: none;
}

body.category-board-shop .board-topic-title a:hover{
    text-decoration: underline;
}

body.category-board-shop .board-meta{
    font-size: 12px;
    color: #7a8a92;
    margin: 2px 0 4px;
}

body.category-board-shop .board-excerpt{
    font-size: 14px;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* mobile */
@media (max-width: 768px){

    body.category-board-shop .board-topic{
        flex-direction: column;
        padding: 16px;
    }

    body.category-board-shop .board-thumb{
        width: 100%;
        margin-bottom: 12px;
    }

    body.category-board-shop .board-thumb img{
        width: 100%;
        height: auto;
    }

    body.category-board-shop .board-page-title{
        font-size: 26px;
    }
}
/* ===============================
   BOARD STICKY PIN (PREMIUM SAFE)
   =============================== */

.board-topic{
    position: relative;
}

/* การ์ดที่ถูกปักหมุด */
.board-topic.is-sticky{
    border-left-color: #ffb300;   /* ทอง */
    box-shadow: 0 12px 30px rgba(255,179,0,.25);
}

/* ป้ายปักหมุด */
.board-pin{
    position: absolute;
    top: 10px;
    right: 12px;
    background: linear-gradient(135deg,#ffb300,#ffd54f);
    color: #5d3b00;
    font-size: 12px;
    font-weight: 900;
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
    pointer-events: none;
    letter-spacing: .3px;
}

/* วิบวับเบาๆ */
.board-topic.is-sticky .board-pin{
    animation: stickyPulse 2s infinite;
}

@keyframes stickyPulse {
    0%   { transform: scale(1);   }
    50%  { transform: scale(1.06);}
    100% { transform: scale(1);   }
}

/* =========================
   BOARD BADGES + FILTER
========================= */

.board-topic{
    position:relative;
}

/* badge */
.board-badges{
    position:absolute;
    top:12px;
    right:12px;
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    z-index:5;
}

.badge{
    font-size:11px;
    font-weight:700;
    padding:4px 10px;
    border-radius:999px;
    color:#fff;
    box-shadow:0 4px 10px rgba(0,0,0,.25);
    white-space:nowrap;
}

.badge-sticky{
    background:linear-gradient(135deg, #ff4f9a, #ff2f7d);
    animation:pulseBadge 1.3s infinite;
}

.badge-admin{
    background:linear-gradient(135deg,#3f51b5,#2196f3);
}

.badge-vip{
    background:linear-gradient(135deg,#e91e63,#ff77b7);
}

.badge-hot{
    background:linear-gradient(135deg,#f44336,#ff9800);
}

@keyframes pulseBadge{
    0%{transform:scale(1)}
    50%{transform:scale(1.08)}
    100%{transform:scale(1)}
}

/* filter */
.board-filter{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.board-filter a{
    background:#ffffff;
    padding:6px 14px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    text-decoration:none;
    box-shadow:0 4px 12px rgba(0,0,0,.15);
}

.board-filter a:hover{
    background:#ff4d94;
    color:#fff;
}
/* เพิ่มต่อท้าย CSS เดิม */
.board-filter a.active {
    background: #ff4d94;
    color: #fff;
    pointer-events: none; /* ป้องกันการกดซ้ำ */
}