/*
Theme Name: PTK Theme
Theme URI: https://puttakom.com/
Author: ZetaBot
Description: PTK app-style theme for puttakom.com
Version: 1.4.2
Text Domain: ptk-theme
*/

:root{
  --ptk-bg:#0d0d0d;
  --ptk-surface:#111;
  --ptk-surface-2:#161616;
  --ptk-surface-3:#1d1d1d;
  --ptk-text:#f5f5f5;
  --ptk-muted:#9aa0a6;
  --ptk-gold:#c49a3d;
  --ptk-gold-soft:#f5d061;
  --ptk-danger:#e11d48;
  --ptk-radius:14px;
  --ptk-gap:12px;
  --ptk-shadow:0 12px 30px rgba(0,0,0,.35);
  --ptk-content-max:1180px;
  --ptk-bottom-nav-h:64px;
  --ptk-menu-h:58px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}

body{
  margin:0;
  background:var(--ptk-bg);
  color:var(--ptk-text);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.55;
}

a{color:inherit}
img{max-width:100%;height:auto}
.screen-reader-text{position:absolute;left:-9999px}

.ptk-container{
  width:min(100%, var(--ptk-content-max));
  margin:0 auto;
  padding:0 10px;
}

.ptk-site-wrap{
  min-height:100vh;
  padding-top:calc(var(--ptk-menu-h) + 18px);
  padding-bottom:calc(var(--ptk-bottom-nav-h) + 20px);
}

/* =========================
   SPLASH
========================= */
.ptk-splash{
  position:fixed;
  inset:0;
  background:
    radial-gradient(circle at top, rgba(196,154,61,.18), transparent 40%),
    #000;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:99999;
  opacity:1;
  visibility:visible;
  transition:opacity .4s ease, visibility .4s ease;
}

.ptk-splash.is-hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

.ptk-splash__inner{
  width:min(90vw, 780px);
  border:1px solid rgba(196,154,61,.25);
  border-radius:22px;
  overflow:hidden;
  background:#090909;
  box-shadow:0 20px 50px rgba(0,0,0,.5);
}

.ptk-splash__inner img{
  display:block;
  width:100%;
  height:auto;
}

.ptk-splash__fallback{
  min-height:200px;
  display:grid;
  place-items:center;
  text-align:center;
  padding:24px;
}

.ptk-splash__fallback strong{
  display:block;
  font-size:clamp(28px, 5vw, 48px);
  letter-spacing:.06em;
  color:var(--ptk-gold-soft);
  margin-bottom:8px;
}

.ptk-splash__fallback span{
  color:#d9d9d9;
  font-size:16px;
}

/* =========================
   TOPBAR
========================= */
.ptk-topbar{
  display:none;
}

/* =========================
   DESKTOP PRIMARY MENU
========================= */
.ptk-primary-menu{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:9990;
  background:rgba(17,17,17,.95);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(255,255,255,.05);
  overflow:hidden;
}

.ptk-primary-menu .ptk-container{
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.ptk-primary-menu .ptk-container::-webkit-scrollbar{
  display:none;
}

.ptk-primary-menu-shell,
.ptk-scroll-nav-shell{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 0;
}

.ptk-primary-menu-scroll,
.ptk-scroll-nav__inner{
  cursor:grab;
}

.ptk-primary-menu-scroll.is-dragging,
.ptk-scroll-nav__inner.is-dragging{
  cursor:grabbing;
}

.ptk-primary-menu a,
.ptk-scroll-nav a{
  cursor:pointer;
}

.ptk-hamburger{
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:var(--ptk-surface-2);
  color:var(--ptk-text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:var(--ptk-shadow);
  flex:0 0 42px;
}

.ptk-hamburger .dashicons{
  font-size:20px;
  width:20px;
  height:20px;
}

.ptk-hamburger-inline{
  width:42px;
  height:42px;
  flex:0 0 42px;
}

.ptk-hamburger-fixed{
  flex:0 0 42px;
  width:42px;
  height:42px;
  position:relative;
  z-index:5;
  background:var(--ptk-surface-2);
}

.ptk-primary-logo{
  flex:0 0 auto;
}

.ptk-primary-logo a{
  display:flex;
  align-items:center;
}

.ptk-primary-logo img{
  height:38px;
  width:auto;
  display:block;
  border-radius:8px;
  max-width:none;
}

.ptk-primary-menu-scroll{
  flex:1;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
}

.ptk-primary-menu-scroll::-webkit-scrollbar{
  display:none;
}

.ptk-primary-menu__list,
.ptk-scroll-nav__menu{
  display:flex;
  align-items:center;
  gap:10px;
  list-style:none;
  margin:0;
  padding:0;
  flex-wrap:nowrap;
  white-space:nowrap;
  width:max-content;
}

.ptk-primary-menu__list > li,
.ptk-scroll-nav__menu > li{
  flex:0 0 auto;
  margin:0;
  padding:0;
}

.ptk-primary-menu__list > li > a,
.ptk-scroll-nav__menu > li > a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:42px;
  padding:8px 16px;
  border-radius:999px;
  text-decoration:none;
  transition:all .2s ease;
}

.ptk-primary-menu__list > li > a{
  color:#eee;
}

.ptk-scroll-nav__menu > li > a{
  background:transparent;
  color:#ddd;
  font-weight:400;
}

.ptk-primary-menu__list > li > a:hover,
.ptk-primary-menu__list > li.current-menu-item > a,
.ptk-primary-menu__list > li.current_page_item > a,
.ptk-primary-menu__list > li.is-active > a{
  background:rgba(196,154,61,.16);
  color:var(--ptk-gold-soft);
}

/* =========================
   MOBILE SCROLL MENU
========================= */
.ptk-scroll-nav{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:9990;
  background:rgba(17,17,17,.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(255,255,255,.05);
}

.ptk-scroll-nav__inner{
  flex:1;
  min-width:0;
  position:relative;
  overflow:auto hidden;
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.ptk-scroll-nav__inner::-webkit-scrollbar{
  display:none;
}

.ptk-scroll-nav__list{
  display:flex;
  align-items:center;
  gap:8px;
  padding:0;
  width:max-content;
  min-width:100%;
  position:relative;
}

.ptk-scroll-nav__indicator{
  display:none !important;
}

.ptk-scroll-nav__menu > li > a:hover{
  background:rgba(255,255,255,.04);
}

.ptk-scroll-nav__menu > li.current-menu-item > a,
.ptk-scroll-nav__menu > li.current_page_item > a,
.ptk-scroll-nav__menu > li.is-active > a{
  background:rgba(196,154,61,.18);
  color:var(--ptk-gold-soft);
  font-weight:600;
}

/* =========================
   DRAWER
========================= */
.ptk-drawer-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.5);
  opacity:0;
  visibility:hidden;
  transition:all .25s ease;
  z-index:9998;
}

.ptk-drawer-backdrop.is-active{
  opacity:1;
  visibility:visible;
}

.ptk-drawer{
  position:fixed;
  top:0;
  left:0;
  bottom:0;
  width:min(92vw, 380px);
  background:linear-gradient(180deg,#111,#0a0a0a);
  border-right:1px solid rgba(255,255,255,.06);
  transform:translateX(-100%);
  transition:transform .25s ease;
  z-index:9999;
  display:flex;
  flex-direction:column;
}

.ptk-drawer.is-active{
  transform:translateX(0);
}

.ptk-drawer__head{
  position:relative;
  padding:20px 18px 16px;
  border-bottom:1px solid rgba(255,255,255,.06);
  background:radial-gradient(circle at top left, rgba(196,154,61,.16), transparent 60%);
}

.ptk-drawer__logo{
  display:flex;
  align-items:center;
  gap:12px;
}

.ptk-drawer__logo img{
  width:44px;
  height:44px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid rgba(196,154,61,.22);
  flex:0 0 44px;
}

.ptk-drawer__brand{
  font-weight:800;
  color:var(--ptk-gold-soft);
  letter-spacing:.05em;
}

.ptk-drawer__desc{
  color:#d0d0d0;
  font-size:14px;
}

.ptk-drawer__close{
  position:absolute;
  top:14px;
  right:14px;
  width:38px;
  height:38px;
  border:0;
  border-radius:10px;
  background:rgba(255,255,255,.05);
  color:#fff;
  cursor:pointer;
}

.ptk-drawer__body{
  padding:14px;
  overflow:auto;
}

/* Drawer Grid App Menu */
.ptk-primary-drawer-menu{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
}

.ptk-primary-drawer-menu > li{
  margin:0;
  padding:0;
  min-width:0;
}

.ptk-primary-drawer-menu > li > a{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:108px;
  padding:14px 10px 12px;
  border-radius:16px;
  text-decoration:none;
  background:#161616;
  border:1px solid rgba(255,255,255,.05);
  color:#fff;
  text-align:center;
  transition:all .2s ease;
  overflow:hidden;
  font-size:13px;
  line-height:1.35;
  word-break:break-word;
  white-space:normal;
}

.ptk-primary-drawer-menu > li > a:hover,
.ptk-primary-drawer-menu > li.current-menu-item > a,
.ptk-primary-drawer-menu > li.current_page_item > a,
.ptk-primary-drawer-menu > li.is-active > a{
  background:rgba(196,154,61,.14);
  border-color:rgba(196,154,61,.28);
  color:var(--ptk-gold-soft);
}

.ptk-primary-drawer-menu > li > a .ptk-menu-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0;
}

.ptk-primary-drawer-menu > li > a .ptk-menu-icon--dashicon{
  width:24px;
  height:24px;
  font-size:24px;
  line-height:24px;
}

.ptk-primary-drawer-menu > li > a .ptk-menu-icon--image img{
  width:24px;
  height:24px;
  object-fit:contain;
  display:block;
}

.ptk-primary-drawer-menu > li > a .menu-item-text,
.ptk-primary-drawer-menu > li > a .ptk-drawer-label{
  display:block;
}

.ptk-primary-drawer-menu > li.menu-item-has-children > a::after{
  content:"⟩";
  position:absolute;
  top:8px;
  right:10px;
  font-size:14px;
  line-height:1;
  color:rgba(245,208,97,.92);
  font-weight:700;
}

.ptk-primary-drawer-menu .sub-menu{
  display:none !important;
}

/* =========================
   CONTENT
========================= */
main#primary{
  padding:10px 0 18px;
}

.ptk-page-card{
  padding:10px;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}

.entry-title{
  display:none !important;
}

.entry-content{
  color:inherit;
}

.entry-content a{
  color:var(--ptk-gold-soft);
}

.entry-content > :first-child{
  margin-top:0 !important;
}

/* =========================
   BOTTOM NAV
========================= */
.ptk-bottom-nav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:9991;
  background:rgba(17,17,17,.96);
  backdrop-filter:blur(12px);
  border-top:1px solid rgba(255,255,255,.06);
}

.ptk-bottom-nav__inner{
  display:grid;
  gap:6px;
  padding:8px 8px calc(8px + env(safe-area-inset-bottom));
}

.ptk-bottom-nav__link{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-height:48px;
  border-radius:14px;
  text-decoration:none;
  color:#ddd;
  transition:background .2s ease,color .2s ease, transform .2s ease;
}

.ptk-bottom-nav__link:hover{
  background:rgba(255,255,255,.04);
}

.ptk-bottom-nav__link.is-active{
  background:rgba(196,154,61,.16);
  color:var(--ptk-gold-soft);
  transform:translateY(-1px);
}

.ptk-bottom-nav__link .dashicons{
  width:18px;
  height:18px;
  font-size:18px;
}

.ptk-bottom-nav__label{
  font-size:11px;
  line-height:1;
  text-align:center;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ptk-badge-count{
  position:absolute;
  top:3px;
  right:14px;
  min-width:18px;
  height:18px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 5px;
  background:var(--ptk-danger);
  color:#fff;
  font-size:10px;
  font-weight:700;
  box-shadow:0 6px 16px rgba(225,29,72,.35);
}

/* =========================
   FOOTER / PLACEHOLDER
========================= */
.site-footer{
  color:#aaa;
  padding:20px 0 100px;
  text-align:center;
}

.ptk-home-placeholder{
  display:grid;
  gap:14px;
}

.ptk-home-placeholder__grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.ptk-home-placeholder__item{
  background:var(--ptk-surface-2);
  border:1px solid rgba(255,255,255,.05);
  border-radius:16px;
  padding:16px;
}

.ptk-setting-note{
  background:#111;
  color:#fff;
  border-left:4px solid var(--ptk-gold);
  padding:12px 14px;
  margin:0 0 16px;
  border-radius:8px;
}

/* =========================
   MENU ICON
========================= */
.ptk-primary-menu__list a,
.ptk-scroll-nav__menu a,
.ptk-primary-drawer-menu a{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.ptk-primary-drawer-menu li a{
  display:flex;
}

.ptk-menu-icon{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:all .2s ease;
}

.ptk-menu-icon--dashicon{
  width:18px;
  height:18px;
  font-size:18px;
  line-height:18px;
}

.ptk-menu-icon--image img{
  width:18px;
  height:18px;
  object-fit:contain;
  display:block;
}

.ptk-primary-menu__list a .dashicons,
.ptk-scroll-nav__menu a .dashicons{
  font-size:16px;
  margin-right:4px;
}

.ptk-primary-menu__list > li.current-menu-item > a .ptk-menu-icon,
.ptk-primary-menu__list > li.current_page_item > a .ptk-menu-icon,
.ptk-primary-menu__list > li.is-active > a .ptk-menu-icon,
.ptk-scroll-nav__menu > li.current-menu-item > a .ptk-menu-icon,
.ptk-scroll-nav__menu > li.current_page_item > a .ptk-menu-icon,
.ptk-scroll-nav__menu > li.is-active > a .ptk-menu-icon,
.ptk-primary-drawer-menu > li.current-menu-item > a .ptk-menu-icon,
.ptk-primary-drawer-menu > li.current_page_item > a .ptk-menu-icon,
.ptk-primary-drawer-menu > li.is-active > a .ptk-menu-icon{
  color:var(--ptk-gold-soft);
  transform:scale(1.06);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 860px){
  .ptk-primary-menu{
    display:none;
  }

  .ptk-site-wrap{
    padding-top:calc(var(--ptk-menu-h) + 18px);
  }

  body.ptk-hide-footer-mobile .site-footer{
    display:none;
  }

  .ptk-home-placeholder__grid{
    grid-template-columns:1fr;
  }

  .site-footer{
    display:none !important;
  }

  .ptk-bottom-nav{
    border-top:1px solid rgba(255,255,255,.08);
  }

  .ptk-bottom-nav__inner{
    gap:4px;
    padding:8px 8px calc(10px + env(safe-area-inset-bottom));
  }

  .ptk-bottom-nav__link{
    min-height:54px;
    gap:5px;
    padding:4px 2px;
    border-radius:14px;
  }

  .ptk-bottom-nav__link .dashicons{
    width:20px;
    height:20px;
    font-size:20px;
    line-height:20px;
  }

  .ptk-bottom-nav__label{
    font-size:12px;
    line-height:1.35;
    overflow:visible;
  }

  .ptk-bottom-nav__link.is-active{
    background:rgba(196,154,61,.18);
    color:var(--ptk-gold-soft);
  }

  .ptk-primary-drawer-menu{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:8px;
  }

  .ptk-primary-drawer-menu > li > a{
    min-height:100px;
    padding:12px 8px 10px;
    border-radius:14px;
    font-size:12px;
  }

  .ptk-primary-drawer-menu > li > a .ptk-menu-icon--dashicon{
    width:22px;
    height:22px;
    font-size:22px;
    line-height:22px;
  }

  .ptk-primary-drawer-menu > li > a .ptk-menu-icon--image img{
    width:22px;
    height:22px;
  }
}

@media (min-width: 861px){
  .ptk-scroll-nav{
    display:none;
  }

  .ptk-bottom-nav{
    display:none;
  }

  .ptk-site-wrap{
    padding-top:calc(var(--ptk-menu-h) + 18px);
    padding-bottom:40px;
  }
}

/* สามขีดค้างซ้ายทุกจอ */
.ptk-hamburger-inline{
  position:sticky;
  left:0;
  z-index:5;
  flex:0 0 42px;
  background:var(--ptk-surface-2);
}

/* desktop active จาก JS */
.ptk-primary-menu__list > li.is-active > a{
  background:rgba(196,154,61,.16);
  color:var(--ptk-gold-soft);
}

/* mobile active จาก JS */
.ptk-scroll-nav__menu > li.is-active > a{
  background:rgba(196,154,61,.16);
  color:var(--ptk-gold-soft);
}

/* drawer active จาก JS */
.ptk-primary-drawer-menu > li.is-active > a{
  background:rgba(196,154,61,.16);
  color:var(--ptk-gold-soft);
}

/* บนคอม ใช้เมาส์แล้วเห็นว่ากำลังลาก */
.ptk-primary-menu .ptk-container.is-dragging{
  cursor:grabbing;
}

/* ========================================
   PTK POST ARCHIVE - FINAL (REPLACE ALL)
======================================== */

.ptk-post-archive{
  display:block;
}

.ptk-post-archive__header{
  margin-bottom:14px;
}

.ptk-post-archive__title{
  margin:0;
  font-size:26px;
  line-height:1.25;
  color:#f2f2f2;
}

/* =========================
   GRID (มือถือ 2 / คอม 4)
========================= */
.ptk-post-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:14px;
}

@media (min-width: 768px){
  .ptk-post-grid{
    grid-template-columns: repeat(3, 1fr);
    gap:16px;
  }
}

@media (min-width: 1024px){
  .ptk-post-grid{
    grid-template-columns: repeat(4, 1fr);
    gap:18px;
  }
}

/* =========================
   CARD
========================= */
.ptk-post-card{
  background:#121212;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.05);
  padding:0;
  transition:all .25s ease;
}

/* hover (desktop only) */
@media (hover:hover){
  .ptk-post-card:hover{
    transform:translateY(-4px);
    border-color:rgba(196,154,61,.35);
    box-shadow:0 12px 30px rgba(0,0,0,.6);
  }
}

/* =========================
   IMAGE (ไม่ล้น)
========================= */
.ptk-post-card__thumb{
  aspect-ratio:4/3;
  overflow:hidden;
  background:#0d0d0d;
}

.ptk-post-card__thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .4s ease;
}

@media (hover:hover){
  .ptk-post-card:hover .ptk-post-card__thumb img{
    transform:scale(1.04);
  }
}

/* =========================
   LINK
========================= */
.ptk-post-card__link{
  display:block;
  text-decoration:none;
  color:inherit;
}

/* =========================
   BODY
========================= */
.ptk-post-card__body{
  padding:12px 14px 14px;
}

/* meta */
.ptk-post-card__meta{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color:#999;
  margin-bottom:6px;
}

/* title */
.ptk-post-card__title{
  margin:0 0 6px;
  font-size:16px;
  line-height:1.4;
  font-weight:600;
  color:#f2f2f2;
}

/* excerpt */
.ptk-post-card__excerpt{
  font-size:13px;
  color:#bbb;
  line-height:1.5;
}

/* =========================
   EMPTY STATE
========================= */
.ptk-post-empty{
  padding:18px;
}

.ptk-post-empty__title{
  margin:0 0 8px;
}

/* =========================================================
   PTK FACEBOOK STYLE COMMENTS
   SAFE MODE - append to style.css
========================================================= */

.ptk-comments-wrap{
  margin-top:28px;
}

.ptk-comments-header{
  margin-bottom:18px;
}

.ptk-comments-title{
  margin:0;
  font-size:24px;
  line-height:1.2;
  font-weight:700;
  color:#f3e7c2;
  display:flex;
  align-items:center;
  gap:10px;
}

.ptk-comments-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:30px;
  height:30px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(196,154,61,.16);
  color:#e6c36a;
  font-size:14px;
  font-weight:700;
  border:1px solid rgba(196,154,61,.22);
}

/* =========================
   COMMENT LIST
========================= */
.ptk-comment-list,
.ptk-comment-list .children{
  list-style:none;
  margin:0;
  padding:0;
}

.ptk-comment-list > .ptk-comment-item{
  margin:0 0 18px;
}

.ptk-comment-list .children{
  margin:14px 0 0 62px;
  padding-left:18px;
  border-left:1px solid rgba(196,154,61,.15);
}

.ptk-comment-card{
  display:flex;
  gap:12px;
  align-items:flex-start;
}

.ptk-comment-left{
  flex:0 0 52px;
}

.ptk-comment-avatar,
.ptk-comment-form-avatar,
.ptk-comment-left img{
  width:52px;
  height:52px;
  border-radius:999px;
  object-fit:cover;
  display:block;
  border:1px solid rgba(196,154,61,.25);
  box-shadow:0 8px 18px rgba(0,0,0,.22);
  background:#111;
}

.ptk-comment-right{
  flex:1 1 auto;
  min-width:0;
}

.ptk-comment-bubble{
  background:linear-gradient(180deg, rgba(34,34,34,.94) 0%, rgba(22,22,22,.96) 100%);
  border:1px solid rgba(196,154,61,.14);
  border-radius:18px;
  padding:14px 16px;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
}

.ptk-comment-meta-top{
  margin-bottom:8px;
}

.ptk-comment-author-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:4px;
}

.ptk-comment-author-link{
  text-decoration:none;
}

.ptk-comment-author,
.ptk-comment-author-name{
  font-size:15px;
  font-weight:700;
  color:#fff;
}

.ptk-comment-badge,
.ptk-comment-form-badge{
  display:inline-flex;
  align-items:center;
}

.ptk-comment-badge .ptk-badge,
.ptk-comment-form-badge .ptk-badge{
  margin:0;
}

.ptk-comment-time{
  font-size:12px;
  color:#b8b8b8;
}

.ptk-comment-time a{
  color:#b8b8b8;
  text-decoration:none;
}

.ptk-comment-time a:hover{
  color:#e6c36a;
}

.ptk-comment-content{
  color:#ececec;
  font-size:15px;
  line-height:1.7;
  word-wrap:break-word;
}

.ptk-comment-content p{
  margin:0 0 10px;
}

.ptk-comment-content p:last-child{
  margin-bottom:0;
}

.ptk-comment-awaiting{
  display:block;
  margin-bottom:10px;
  color:#e6c36a;
  font-style:normal;
  font-size:13px;
}

.ptk-comment-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
  padding-left:8px;
  font-size:13px;
}

.ptk-comment-actions a{
  color:#d8b45d;
  text-decoration:none;
  font-weight:600;
}

.ptk-comment-actions a:hover{
  color:#f4d277;
}

.ptk-comment-action-sep,
.ptk-comment-action-time{
  color:#8c8c8c;
}

/* =========================
   COMMENT FORM
========================= */
.ptk-comment-form{
  margin-top:26px;
}

.ptk-comment-form-shell{
  background:linear-gradient(180deg, rgba(20,20,20,.95) 0%, rgba(14,14,14,.98) 100%);
  border:1px solid rgba(196,154,61,.16);
  border-radius:22px;
  padding:16px;
  box-shadow:0 12px 28px rgba(0,0,0,.22);
}

.ptk-comment-form-head{
  margin-bottom:14px;
}

.ptk-comment-form-user{
  display:flex;
  align-items:center;
  gap:12px;
}

.ptk-comment-form-user-meta{
  min-width:0;
}

.ptk-comment-form-name-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:3px;
}

.ptk-comment-form-name{
  font-size:15px;
  font-weight:700;
  color:#fff;
}

.ptk-comment-form-sub{
  font-size:12px;
  color:#9f9f9f;
}

.ptk-comment-form-body{
  margin-bottom:14px;
}

.ptk-comment-textarea{
  width:100%;
  min-height:110px;
  resize:vertical;
  border-radius:16px;
  border:1px solid rgba(196,154,61,.16);
  background:#101010;
  color:#f3f3f3;
  padding:14px 15px;
  font-size:15px;
  line-height:1.6;
  outline:none;
  box-shadow:none;
}

.ptk-comment-textarea::placeholder{
  color:#7f7f7f;
}

.ptk-comment-textarea:focus{
  border-color:rgba(196,154,61,.45);
  box-shadow:0 0 0 3px rgba(196,154,61,.10);
}

.ptk-comment-submit{
  display:flex;
  justify-content:flex-end;
}

.ptk-comment-submit-btn{
  appearance:none;
  border:0;
  border-radius:999px;
  padding:12px 20px;
  background:linear-gradient(180deg, #e1be66 0%, #c49a3d 100%);
  color:#111;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 10px 22px rgba(196,154,61,.22);
  transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.ptk-comment-submit-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(196,154,61,.28);
}

.ptk-comment-submit-btn:active{
  transform:translateY(0);
}

#cancel-comment-reply-link{
  display:inline-flex;
  margin:0 0 12px;
  color:#d2a94d;
  text-decoration:none;
  font-size:13px;
  font-weight:600;
}

/* =========================
   LOGIN REQUIRED BOX
========================= */
.ptk-comment-login-box{
  margin-top:18px;
  background:linear-gradient(180deg, rgba(24,24,24,.95) 0%, rgba(15,15,15,.98) 100%);
  border:1px solid rgba(196,154,61,.15);
  border-radius:20px;
  padding:18px;
  text-align:center;
  box-shadow:0 12px 28px rgba(0,0,0,.18);
}

.ptk-comment-login-text{
  color:#ececec;
  font-size:15px;
  margin-bottom:12px;
}

.ptk-comment-login-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 18px;
  border-radius:999px;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  background:linear-gradient(180deg, #e1be66 0%, #c49a3d 100%);
  color:#111;
  box-shadow:0 10px 22px rgba(196,154,61,.22);
}

.ptk-comment-login-btn:hover{
  color:#111;
  opacity:.96;
}

/* =========================
   COMMENTS NAV / CLOSED
========================= */
.comment-navigation{
  margin:18px 0 10px;
}

.comment-navigation .nav-links{
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.comment-navigation a{
  color:#d8b45d;
  text-decoration:none;
  font-weight:600;
}

.ptk-comments-closed{
  color:#8f8f8f;
  margin-top:10px;
}

/* =========================
   WORDPRESS DEFAULT COMMENT FORM HIDES
========================= */
.comment-form-cookies-consent,
.comment-notes,
.logged-in-as{
  display:none;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px){
  .ptk-comments-title{
    font-size:21px;
  }

  .ptk-comment-left{
    flex:0 0 44px;
  }

  .ptk-comment-avatar,
  .ptk-comment-form-avatar,
  .ptk-comment-left img{
    width:44px;
    height:44px;
  }

  .ptk-comment-bubble{
    padding:12px 13px;
    border-radius:16px;
  }

  .ptk-comment-list .children{
    margin-left:28px;
    padding-left:12px;
  }

  .ptk-comment-form-shell{
    padding:14px;
    border-radius:18px;
  }

  .ptk-comment-textarea{
    min-height:96px;
    font-size:14px;
  }

  .ptk-comment-actions{
    padding-left:4px;
    gap:6px;
  }
}

/* =========================================================
   PTK LUXURY COMMENT UI
   dark / gold / soft / premium
========================================================= */

.ptk-comments-wrap{
  margin-top:36px;
}

.ptk-comments-header{
  margin-bottom:20px;
}

.ptk-comments-title{
  margin:0;
  display:flex;
  align-items:center;
  gap:12px;
  font-size:26px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:-0.02em;
  color:#f6e7be;
}

.ptk-comments-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:32px;
  height:32px;
  padding:0 11px;
  border-radius:999px;
  border:1px solid rgba(212,170,78,.24);
  background:linear-gradient(180deg, rgba(212,170,78,.18) 0%, rgba(212,170,78,.08) 100%);
  color:#f1d07a;
  font-size:13px;
  font-weight:700;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
}

/* list */
.ptk-comment-list,
.ptk-comment-list .children{
  list-style:none;
  margin:0;
  padding:0;
}

.ptk-comment-list > .ptk-comment-item{
  margin:0 0 22px;
}

.ptk-comment-list .children{
  margin:16px 0 0 66px;
  padding-left:18px;
  border-left:1px solid rgba(212,170,78,.14);
}

/* single comment row */
.ptk-comment-card{
  display:flex;
  gap:14px;
  align-items:flex-start;
}

.ptk-comment-left{
  flex:0 0 52px;
}

.ptk-comment-avatar,
.ptk-comment-form-avatar,
.ptk-comment-left img{
  width:52px;
  height:52px;
  border-radius:50%;
  object-fit:cover;
  display:block;
  border:1px solid rgba(212,170,78,.22);
  background:#111;
  box-shadow:
    0 8px 20px rgba(0,0,0,.26),
    0 0 0 4px rgba(255,255,255,.015);
}

.ptk-comment-right{
  flex:1 1 auto;
  min-width:0;
}

/* bubble */
.ptk-comment-bubble{
  position:relative;
  padding:15px 17px;
  border-radius:20px;
  border:1px solid rgba(212,170,78,.12);
  background:
    linear-gradient(180deg, rgba(30,30,30,.96) 0%, rgba(18,18,18,.98) 100%);
  box-shadow:
    0 14px 34px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.03);
  backdrop-filter:blur(6px);
}

.ptk-comment-meta-top{
  margin-bottom:8px;
}

.ptk-comment-author-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:4px;
}

.ptk-comment-author-link{
  text-decoration:none;
}

.ptk-comment-author,
.ptk-comment-author-name{
  color:#fff;
  font-size:15px;
  font-weight:700;
  letter-spacing:-0.01em;
}

.ptk-comment-badge,
.ptk-comment-form-badge{
  display:inline-flex;
  align-items:center;
}

.ptk-comment-time{
  font-size:12px;
  color:#a8a8a8;
}

.ptk-comment-time a{
  color:#a8a8a8;
  text-decoration:none;
  transition:color .18s ease;
}

.ptk-comment-time a:hover{
  color:#e9c66f;
}

.ptk-comment-content{
  color:#efefef;
  font-size:15px;
  line-height:1.75;
  word-break:break-word;
}

.ptk-comment-content p{
  margin:0 0 10px;
}

.ptk-comment-content p:last-child{
  margin-bottom:0;
}

.ptk-comment-awaiting{
  display:block;
  margin-bottom:10px;
  color:#e7c56c;
  font-size:13px;
  font-style:normal;
  font-weight:600;
}

/* actions */
.ptk-comment-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  padding-left:8px;
  margin-top:9px;
  font-size:13px;
}

.ptk-comment-actions a{
  color:#dbb760;
  text-decoration:none;
  font-weight:700;
  transition:color .18s ease, opacity .18s ease;
}

.ptk-comment-actions a:hover{
  color:#f4d789;
}

.ptk-comment-action-sep,
.ptk-comment-action-time{
  color:#8d8d8d;
}

/* form */
.ptk-comment-form{
  margin-top:28px;
}

.ptk-comment-form-shell{
  border-radius:24px;
  padding:18px;
  border:1px solid rgba(212,170,78,.14);
  background:
    radial-gradient(circle at top right, rgba(212,170,78,.08), transparent 34%),
    linear-gradient(180deg, rgba(24,24,24,.97) 0%, rgba(14,14,14,.99) 100%);
  box-shadow:
    0 18px 40px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.03);
}

.ptk-comment-form-head{
  margin-bottom:14px;
}

.ptk-comment-form-user{
  display:flex;
  align-items:center;
  gap:12px;
}

.ptk-comment-form-user-meta{
  min-width:0;
}

.ptk-comment-form-name-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:4px;
}

.ptk-comment-form-name{
  color:#fff;
  font-size:15px;
  font-weight:700;
}

.ptk-comment-form-sub{
  color:#9f9f9f;
  font-size:12px;
}

.ptk-comment-form-body{
  margin-bottom:14px;
}

.ptk-comment-textarea{
  width:100%;
  min-height:130px;
  resize:vertical;
  padding:16px 16px;
  border-radius:18px;
  border:1px solid rgba(212,170,78,.14);
  background:linear-gradient(180deg, #111 0%, #0d0d0d 100%);
  color:#f2f2f2;
  font-size:15px;
  line-height:1.7;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02);
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.ptk-comment-textarea::placeholder{
  color:#7f7f7f;
}

.ptk-comment-textarea:focus{
  outline:none;
  border-color:rgba(212,170,78,.44);
  box-shadow:
    0 0 0 4px rgba(212,170,78,.08),
    inset 0 1px 0 rgba(255,255,255,.03);
}

.ptk-comment-submit{
  display:flex;
  justify-content:flex-end;
}

.ptk-comment-submit-btn{
  appearance:none;
  border:0;
  min-height:46px;
  padding:0 22px;
  border-radius:999px;
  background:linear-gradient(180deg, #f1d685 0%, #d4aa4e 100%);
  color:#141414;
  font-size:14px;
  font-weight:800;
  letter-spacing:.01em;
  cursor:pointer;
  box-shadow:
    0 12px 26px rgba(212,170,78,.24),
    inset 0 1px 0 rgba(255,255,255,.28);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.ptk-comment-submit-btn:hover{
  transform:translateY(-1px);
  box-shadow:
    0 16px 30px rgba(212,170,78,.28),
    inset 0 1px 0 rgba(255,255,255,.28);
  filter:brightness(1.02);
}

.ptk-comment-submit-btn:active{
  transform:translateY(0);
}

#cancel-comment-reply-link{
  display:inline-flex;
  margin:0 0 12px;
  color:#dfba65;
  text-decoration:none;
  font-size:13px;
  font-weight:700;
}

#cancel-comment-reply-link:hover{
  color:#f5d88b;
}

/* guest login box */
.ptk-comment-login-box{
  border-radius:22px;
  padding:22px 18px;
  text-align:center;
  border:1px solid rgba(212,170,78,.14);
  background:
    radial-gradient(circle at top center, rgba(212,170,78,.08), transparent 38%),
    linear-gradient(180deg, rgba(24,24,24,.97) 0%, rgba(14,14,14,.99) 100%);
  box-shadow:
    0 18px 40px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.03);
}

.ptk-comment-login-text{
  margin-bottom:13px;
  color:#ececec;
  font-size:15px;
  line-height:1.7;
}

.ptk-comment-login-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 20px;
  border-radius:999px;
  text-decoration:none;
  background:linear-gradient(180deg, #f1d685 0%, #d4aa4e 100%);
  color:#141414;
  font-size:14px;
  font-weight:800;
  box-shadow:
    0 12px 26px rgba(212,170,78,.24),
    inset 0 1px 0 rgba(255,255,255,.28);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.ptk-comment-login-btn:hover{
  color:#141414;
  transform:translateY(-1px);
  filter:brightness(1.02);
}

/* nav / misc */
.comment-navigation{
  margin:18px 0 12px;
}

.comment-navigation .nav-links{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.comment-navigation a{
  color:#dbb760;
  text-decoration:none;
  font-weight:700;
}

.comment-navigation a:hover{
  color:#f5d88b;
}

.ptk-comments-closed{
  margin-top:10px;
  color:#9b9b9b;
}

/* clean default wp bits */
.comment-form-cookies-consent,
.comment-notes,
.logged-in-as{
  display:none !important;
}

/* mobile */
@media (max-width: 768px){
  .ptk-comments-title{
    font-size:22px;
  }

  .ptk-comment-left{
    flex:0 0 44px;
  }

  .ptk-comment-avatar,
  .ptk-comment-form-avatar,
  .ptk-comment-left img{
    width:44px;
    height:44px;
  }

  .ptk-comment-bubble{
    border-radius:18px;
    padding:13px 14px;
  }

  .ptk-comment-list .children{
    margin-left:24px;
    padding-left:12px;
  }

  .ptk-comment-form-shell{
    border-radius:20px;
    padding:14px;
  }

  .ptk-comment-textarea{
    min-height:110px;
    font-size:14px;
  }
}

/* =========================================================
   PTK COMMENT FINAL POLISH
   badge spacing + submit button inside box left aligned
========================================================= */

/* 1) ระยะห่าง badge ให้ดูหรูและไม่ติดกัน */
.ptk-comment-author-row{
  gap: 10px;
}

.ptk-comment-badge,
.ptk-comment-form-badge{
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
}

.ptk-comment-badge .ptk-badge,
.ptk-comment-form-badge .ptk-badge{
  margin-right: 6px !important;
}

.ptk-comment-badge .ptk-badge:last-child,
.ptk-comment-form-badge .ptk-badge:last-child{
  margin-right: 0 !important;
}

/* กันกรณี badge ถูก render หลาย span ติดกัน */
.ptk-comment-author-row .ptk-badge + .ptk-badge,
.ptk-comment-form-name-row .ptk-badge + .ptk-badge{
  margin-left: 8px !important;
}

/* 2) จัด form ให้ปุ่มอยู่ในกรอบและอยู่ซ้าย */
.ptk-comment-form{
  margin-top: 28px;
}

.ptk-comment-form .ptk-comment-form-shell{
  margin-bottom: 0;
}

.ptk-comment-form .ptk-comment-submit{
  justify-content: flex-start;
  margin-top: -2px;
  padding-top: 2px;
}

/* ทำให้ปุ่ม submit เข้าไปอยู่ในกรอบเดียวกับ textarea */
.ptk-comment-form .form-submit{
  margin: 0;
}

.ptk-comment-form .ptk-comment-form-shell + .ptk-comment-submit,
.ptk-comment-form .ptk-comment-submit{
  position: relative;
}

/* กรณี WordPress วาง submit แยกออกมานอก shell
   ใช้ visual style ให้เนียนเป็นชุดเดียวกัน */
.ptk-comment-form .ptk-comment-submit{
  margin-top: -8px;
  padding: 0 18px 18px;
  border-left: 1px solid rgba(212,170,78,.14);
  border-right: 1px solid rgba(212,170,78,.14);
  border-bottom: 1px solid rgba(212,170,78,.14);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  background:
    radial-gradient(circle at bottom left, rgba(212,170,78,.06), transparent 30%),
    linear-gradient(180deg, rgba(18,18,18,.98) 0%, rgba(12,12,12,.99) 100%);
  box-shadow:
    0 18px 40px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.02);
}

/* ทำให้ shell กับ submit ต่อกันเนียน */
.ptk-comment-form .ptk-comment-form-shell{
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding-bottom: 14px;
  box-shadow:
    0 18px 40px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.03);
}

/* 3) ปุ่มให้บาลานซ์ขึ้น */
.ptk-comment-submit-btn{
  min-width: 156px;
  justify-content: center;
}

/* 4) จูน spacing แถวชื่อกับ badge */
.ptk-comment-form-name-row{
  gap: 10px;
  margin-bottom: 5px;
}

.ptk-comment-author-row{
  margin-bottom: 5px;
}

/* 5) มือถือ */
@media (max-width: 768px){
  .ptk-comment-form .ptk-comment-submit{
    padding: 0 14px 14px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
  }

  .ptk-comment-form .ptk-comment-form-shell{
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .ptk-comment-submit-btn{
    min-width: 140px;
  }

  .ptk-comment-author-row,
  .ptk-comment-form-name-row{
    gap: 8px;
  }

  .ptk-comment-author-row .ptk-badge + .ptk-badge,
  .ptk-comment-form-name-row .ptk-badge + .ptk-badge{
    margin-left: 6px !important;
  }
}


/* ========================================
   PTK COMMENT BUTTON PULL-IN FIX
   ดึงปุ่มกลับเข้าไปในกรอบแบบเนียน
======================================== */

.ptk-comment-form .ptk-comment-form-shell{
  border-bottom-left-radius: 24px !important;
  border-bottom-right-radius: 24px !important;
  padding-bottom: 64px !important; /* เผื่อพื้นที่ให้ปุ่ม */
  position: relative;
}

.ptk-comment-form .ptk-comment-submit{
  justify-content: flex-start !important;
  margin-top: -54px !important;   /* ดึงปุ่มขึ้นไปในกรอบ */
  padding: 0 18px !important;
  position: relative;
  z-index: 2;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ptk-comment-form .form-submit{
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ptk-comment-submit-btn{
  min-width: 156px;
  justify-content: center;
}

@media (max-width: 768px){
  .ptk-comment-form .ptk-comment-form-shell{
    border-bottom-left-radius: 20px !important;
    border-bottom-right-radius: 20px !important;
    padding-bottom: 58px !important;
  }

  .ptk-comment-form .ptk-comment-submit{
    margin-top: -50px !important;
    padding: 0 14px !important;
  }
}

/* =========================================================
   PTK SINGLE POST + SIDEBAR FINAL
   clean / merged / safe
========================================================= */

/* =========================
   LAYOUT
========================= */
.single-post .ptk-single-layout{
  width:100%;
  max-width:1240px;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0, 1fr) 320px;
  gap:28px;
  align-items:start;
}

.single-post .ptk-single-layout__main{
  min-width:0;
}

.single-post .ptk-single-layout__sidebar{
  min-width:0;
  position:sticky;
  top:24px;
  align-self:start;
  display:grid;
  gap:18px;

  padding:18px;
  border-radius:26px;

  background:
    radial-gradient(circle at top right, rgba(212,170,78,.08), transparent 28%),
    linear-gradient(180deg, rgba(20,20,20,.92) 0%, rgba(10,10,10,.96) 100%);

  border:1px solid rgba(212,170,78,.10);

  box-shadow:
    0 18px 42px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.03);
}

/* =========================
   SIDEBAR CARD
========================= */
.single-post .ptk-single-sidebar-card{
  padding:18px;
  background:rgba(255,255,255,.02);
  border:1px solid rgba(212,170,78,.08);
  border-radius:20px;
  box-shadow:none;
  backdrop-filter:blur(4px);
}

.single-post .ptk-single-sidebar-card__title,
.single-post .ptk-single-layout__sidebar .widget-title{
  margin:0 0 14px;
  font-size:18px;
  line-height:1.3;
  color:#ffffff;
}

.single-post .ptk-single-sidebar-card__content{
  min-width:0;
}

/* =========================
   SEARCH FORM (FINAL CLEAN)
========================= */
.single-post .ptk-single-layout__sidebar .search-form{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0;

  background: #111;
  border-radius: 14px;
  overflow: hidden;
}

.single-post .ptk-single-layout__sidebar .search-form label{
  display: block;
  width: 100%;
}

.single-post .ptk-single-layout__sidebar input[type="search"],
.single-post .ptk-single-layout__sidebar .search-field{
  width: 100%;
  min-width: 0;
  display: block;
  height: 50px;
  padding: 0 16px;

  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  color: #f2f2f2;

  box-shadow: none !important;
  transition: all .2s ease;
}

.single-post .ptk-single-layout__sidebar input[type="search"]::placeholder,
.single-post .ptk-single-layout__sidebar .search-field::placeholder{
  color: #7f7f7f;
}

.single-post .ptk-single-layout__sidebar input[type="search"]:focus,
.single-post .ptk-single-layout__sidebar .search-field:focus{
  outline: none;
  box-shadow: inset 0 -2px 0 rgba(212,170,78,.35);
}

.single-post .ptk-single-layout__sidebar .search-submit{
  appearance: none;
  border: 0;
  min-height: 46px;
  padding: 0 18px;

  background: transparent !important;
  color: #ffffff !important;

  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;

  border-top: 1px solid rgba(255,255,255,.06);
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: all .18s ease;
}

.single-post .ptk-single-layout__sidebar .search-submit:hover{
  background: rgba(255,255,255,.04) !important;
}

.single-post .ptk-single-layout__sidebar .search-submit:active{
  transform: scale(0.98);
}

/* =========================
   SIDEBAR LISTS
========================= */
.single-post .ptk-single-sidebar-list,
.single-post .ptk-single-sidebar-posts,
.single-post .ptk-single-layout__sidebar ul{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:10px;
}

.single-post .ptk-single-sidebar-list__item a,
.single-post .ptk-single-sidebar-posts__item a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  text-decoration:none;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(212,170,78,.08);
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.single-post .ptk-single-sidebar-posts__item a{
  flex-direction:column;
  align-items:flex-start;
}

.single-post .ptk-single-sidebar-list__item a:hover,
.single-post .ptk-single-sidebar-posts__item a:hover{
  transform:translateY(-1px);
  border-color:rgba(212,170,78,.16);
  background:rgba(255,255,255,.045);
  box-shadow:0 10px 22px rgba(0,0,0,.16);
}

.single-post .ptk-single-sidebar-list__name,
.single-post .ptk-single-sidebar-posts__post-title{
  min-width:0;
}

.single-post .ptk-single-sidebar-list__count{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  padding:0 8px;
  border-radius:999px;
  background:rgba(212,170,78,.12);
  color:#e5c06a;
  font-size:12px;
  font-weight:700;
}

.single-post .ptk-single-sidebar-posts__post-title{
  font-size:14px;
  line-height:1.5;
}

.single-post .ptk-single-sidebar-posts__date{
  font-size:12px;
  color:#9c9c9c;
}

/* =========================
   SINGLE POST ARTICLE
========================= */
.single-post .ptk-single-post{
  position:relative;
  overflow:hidden;
  padding:24px;
  border-radius:28px !important;

  background:
    radial-gradient(circle at top left, rgba(212,170,78,.08), transparent 24%),
    radial-gradient(circle at bottom right, rgba(212,170,78,.05), transparent 28%),
    linear-gradient(180deg, rgba(22,22,22,.94) 0%, rgba(12,12,12,.98) 100%);

  border:1px solid rgba(212,170,78,.10);

  box-shadow:
    0 22px 50px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.03);
}

/* กันกรณี ptk-page-card ทับ */
.single-post .ptk-single-post.ptk-page-card{
  background:
    radial-gradient(circle at top left, rgba(212,170,78,.08), transparent 24%),
    radial-gradient(circle at bottom right, rgba(212,170,78,.05), transparent 28%),
    linear-gradient(180deg, rgba(22,22,22,.94) 0%, rgba(12,12,12,.98) 100%) !important;

  border:1px solid rgba(212,170,78,.10) !important;

  box-shadow:
    0 22px 50px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.03) !important;
}

.single-post .ptk-single-post__header{
  margin-bottom:18px;
}

.single-post .ptk-single-post__title{
  margin:0 0 10px;
  font-size:34px;
  line-height:1.2;
  color:#f6e7be;
}

.single-post .ptk-single-post__meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  font-size:14px;
  color:#a7a7a7;
}

.single-post .ptk-single-post__categories a{
  color:#d9b45f;
}

.single-post .ptk-single-post__categories a:hover{
  color:#f3d27d;
}

.single-post .ptk-single-post__thumbnail{
  width:100%;
  margin:0 0 22px;
  box-shadow:0 14px 30px rgba(0,0,0,.20);
  border-radius:20px;
  overflow:hidden;
  background:#111;
}

.single-post .ptk-single-post__thumbnail img{
  display:block;
  width:100%;
  height:auto;
}

.single-post .ptk-single-post__content{
  color:#ececec;
  width:100%;
  max-width:100%;
  line-height:1.9;
  font-size:17px;
}

.single-post .ptk-single-post__content > *{
  max-width:100%;
}

.single-post .ptk-single-post__content h2,
.single-post .ptk-single-post__content h3,
.single-post .ptk-single-post__content h4{
  color:#f4e3b4;
}

.single-post .ptk-single-post__content a{
  color:#e0bb63;
}

.single-post .ptk-single-post__content a:hover{
  color:#f4d789;
}

.single-post .ptk-single-post__content img{
  max-width:100%;
  height:auto;
  border-radius:16px;
}

.single-post .ptk-single-post__content figure{
  margin:0 0 20px;
  max-width:100%;
}

.single-post .ptk-single-post__content iframe,
.single-post .ptk-single-post__content video,
.single-post .ptk-single-post__content embed{
  max-width:100%;
  width:100%;
  border-radius:16px;
}

.single-post .ptk-single-post__footer{
  margin-top:24px;
  padding-top:18px;
  border-top:1px solid rgba(212,170,78,.08);
}

.single-post .ptk-single-post__tags{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.single-post .ptk-single-post__tag{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  text-decoration:none;
  background:rgba(212,170,78,.10);
  border:1px solid rgba(212,170,78,.14);
  color:#e5c06a;
  font-size:13px;
  font-weight:600;
}

/* =========================
   POST NAV
========================= */
.single-post .ptk-single-post__nav{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-top:20px;
  margin-bottom:24px;
}

.single-post .ptk-single-post__nav-prev,
.single-post .ptk-single-post__nav-next{
  min-width:0;
}

.single-post .ptk-single-post__nav a{
  display:block;
  padding:14px 16px;
  border-radius:18px;
  text-decoration:none;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(212,170,78,.10);
}

.single-post .ptk-single-post__nav-next{
  text-align:right;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1024px){
  .single-post .ptk-single-layout{
    grid-template-columns:minmax(0, 1fr);
  }

  .single-post .ptk-single-layout__sidebar{
    position:static;
    top:auto;
  }
}

@media (max-width: 768px){
  .single-post .ptk-single-layout__sidebar{
    padding:14px;
    border-radius:20px;
  }

  .single-post .ptk-single-sidebar-card{
    padding:16px;
    border-radius:18px;
  }

  .single-post .ptk-single-sidebar-card__title,
  .single-post .ptk-single-layout__sidebar .widget-title{
    font-size:17px;
  }

  .single-post .ptk-single-sidebar-card input[type="search"],
  .single-post .ptk-single-sidebar-card .search-field,
  .single-post .ptk-single-layout__sidebar input[type="search"],
  .single-post .ptk-single-layout__sidebar .search-field{
    height:46px;
    border-radius:14px;
  }

  .single-post .ptk-single-sidebar-card .search-submit,
  .single-post .ptk-single-layout__sidebar .search-submit{
    border-radius:14px;
  }

  .single-post .ptk-single-post{
    padding:18px;
    border-radius:22px !important;
  }

  .single-post .ptk-single-post__title{
    font-size:28px;
  }

  .single-post .ptk-single-post__content{
    font-size:16px;
    line-height:1.85;
  }

  .single-post .ptk-single-post__nav{
    grid-template-columns:1fr;
  }

  .single-post .ptk-single-post__nav-next{
    text-align:left;
  }
}

/* ========================================
   SEARCH STYLE (BALANCE VERSION)
======================================== */

/* container */
.single-post .ptk-single-layout__sidebar .search-form{
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  padding: 8px; /* 🔥 เพิ่ม layer ให้ดูเหมือนเดิม */
}

/* input */
.single-post .ptk-single-layout__sidebar input[type="search"],
.single-post .ptk-single-layout__sidebar .search-field{
  background: #1a1a1a !important; /* 🔥 คืนฟีลเดิม */
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; /* 🔥 แยก layer แต่ไม่ชนขอบ */
  padding: 0 14px;
}

/* focus */
.single-post .ptk-single-layout__sidebar input[type="search"]:focus{
  border-color: rgba(212,170,78,.35);
  box-shadow: 0 0 0 2px rgba(212,170,78,.08);
}

/* button */
.single-post .ptk-single-layout__sidebar .search-submit{
  margin-top: 6px;

  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;

  color: #fff;
}

.single-post .ptk-single-layout__sidebar .search-submit:hover{
  background: #222;
}

/* ========================================
   SEARCH BOOST (premium highlight)
======================================== */

/* container ให้มีมิติ */
.single-post .ptk-single-layout__sidebar .search-form{
  border: 1px solid rgba(212,170,78,.12);
  box-shadow:
    0 10px 26px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.02);
}

/* input ให้ดูเด่นขึ้น */
.single-post .ptk-single-layout__sidebar input[type="search"],
.single-post .ptk-single-layout__sidebar .search-field{
  background: #1c1c1c !important;
  border: 1px solid rgba(255,255,255,.10);
  color: #ffffff;

  transition: all .18s ease;
}

/* hover เบาๆ */
.single-post .ptk-single-layout__sidebar input[type="search"]:hover{
  border-color: rgba(212,170,78,.25);
}

/* focus = highlight จริง */
.single-post .ptk-single-layout__sidebar input[type="search"]:focus{
  border-color: rgba(212,170,78,.45);
  box-shadow:
    0 0 0 3px rgba(212,170,78,.10),
    inset 0 1px 0 rgba(255,255,255,.04);
}

/* ปุ่มให้ดูเป็น action */
.single-post .ptk-single-layout__sidebar .search-submit{
  background: linear-gradient(180deg, #e7c76a 0%, #cfa33f 100%);
  color: #141414;
  font-weight: 800;

  box-shadow: 0 8px 20px rgba(212,170,78,.25);
}

/* hover ปุ่ม */
.single-post .ptk-single-layout__sidebar .search-submit:hover{
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* =========================================================
   PTK POST ARCHIVE FINAL
========================================================= */

.ptk-post-archive{
  display:block;
  width:100%;
  max-width:1240px;
  margin:0 auto;
}

.ptk-post-archive__header{
  margin-bottom:18px;
}

.ptk-post-archive__title{
  margin:0;
  font-size:30px;
  line-height:1.2;
  color:#f4e3b4;
}

.ptk-post-archive__description{
  margin-top:10px;
  color:#a9a9a9;
  font-size:15px;
  line-height:1.7;
}

.ptk-post-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:20px;
}

.ptk-post-card{
  padding:0;
  overflow:hidden;
  border-radius:24px !important;

  background:
    radial-gradient(circle at top left, rgba(212,170,78,.06), transparent 30%),
    linear-gradient(180deg, rgba(22,22,22,.95) 0%, rgba(12,12,12,.98) 100%) !important;

  border:1px solid rgba(212,170,78,.10) !important;

  box-shadow:
    0 16px 40px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.03) !important;

  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.ptk-post-card:hover{
  transform:translateY(-6px);
  border-color:rgba(212,170,78,.18) !important;
  box-shadow:
    0 22px 50px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.03) !important;
}

.ptk-post-card__link{
  display:block;
  text-decoration:none;
  color:inherit;
}

.ptk-post-card__thumb{
  aspect-ratio:16 / 10;
  overflow:hidden;
  background:#111;
}

.ptk-post-card__thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.ptk-post-card__body{
  padding:16px;
}

.ptk-post-card__meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:10px;
  font-size:13px;
  color:#9f9f9f;
}

.ptk-post-card__meta-sep{
  opacity:.75;
}

.ptk-post-card__category{
  color:#d9b45f;
}

.ptk-post-card__title{
  margin:0 0 10px;
  font-size:18px;
  line-height:1.45;
  color:#f4e3b4;
}

.ptk-post-card__excerpt{
  font-size:14px;
  line-height:1.7;
  color:#cfcfcf;
}

.ptk-post-pagination{
  margin-top:28px;
}

.ptk-post-pagination .nav-links{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
}

.ptk-post-pagination .page-numbers{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:42px;
  min-height:42px;
  padding:0 14px;
  border-radius:14px;
  text-decoration:none;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(212,170,78,.10);
  color:#ddd;
}

.ptk-post-pagination .page-numbers.current{
  background:linear-gradient(180deg, #e7c76a 0%, #cfa33f 100%);
  color:#141414;
  border-color:transparent;
}

.ptk-post-empty{
  max-width:900px;
  margin:0 auto;
}

.ptk-post-empty__title{
  margin:0 0 10px;
  color:#f4e3b4;
}

.ptk-post-empty__content{
  color:#cfcfcf;
}

@media (max-width: 1024px){
  .ptk-post-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px){
  .ptk-post-archive__title{
    font-size:26px;
  }

  .ptk-post-grid{
    grid-template-columns:1fr;
    gap:16px;
  }

  .ptk-post-card{
    border-radius:20px !important;
  }
}

/* =========================================================
   PTK SEARCH PAGE
========================================================= */

.ptk-search-page{
  width:100%;
  max-width:980px;
  margin:0 auto;
}

.ptk-search-page__header{
  margin-bottom:18px;
}

.ptk-search-page__title{
  margin:0 0 8px;
  font-size:32px;
  line-height:1.2;
  color:#f4e3b4;
}

.ptk-search-page__desc{
  margin:0;
  color:#a0a0a0;
  font-size:15px;
  line-height:1.7;
}

.ptk-search-page__sticky{
  margin-bottom:18px;
  padding:18px;
  border-radius:22px;
  background:
    radial-gradient(circle at top left, rgba(212,170,78,.06), transparent 28%),
    linear-gradient(180deg, rgba(22,22,22,.95) 0%, rgba(12,12,12,.98) 100%);
  border:1px solid rgba(212,170,78,.10);
  box-shadow:
    0 18px 42px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.03);
}

.ptk-search-page__helper{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.ptk-search-page__helper-card{
  padding:16px;
  border-radius:18px;
  background:rgba(255,255,255,.02);
  border:1px solid rgba(212,170,78,.08);
}

.ptk-search-page__helper-card h3{
  margin:0 0 10px;
  font-size:18px;
  color:#fff;
}

.ptk-search-page__helper-card p{
  margin:0;
  color:#bdbdbd;
  line-height:1.7;
}

@media (max-width: 768px){
  .ptk-search-page__title{
    font-size:28px;
  }

  .ptk-search-page__sticky{
    padding:14px;
    border-radius:18px;
  }

  .ptk-search-page__helper{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   PTK SEARCH RESULTS PAGE
========================================================= */

.ptk-search-results-page .ptk-post-card__price{
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #e0bb63;
}

/* ========================================
   PTK DESKTOP HEADER SEARCH
======================================== */

.ptk-primary-menu-shell{
  display:flex;
  align-items:center;
  gap:12px;
}

.ptk-primary-menu-scroll{
  flex:1 1 auto;
  min-width:0;
}

.ptk-header-search-link--desktop{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:12px;
  text-decoration:none;
  color:#fff;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}

.ptk-header-search-link--desktop:hover{
  background:rgba(255,255,255,.08);
}

@media (max-width: 768px){
  .ptk-header-search-link--desktop{
    display:none;
  }
}

/* ========================================
   MOBILE MENU CLEAN (PTK)
======================================== */
@media (max-width: 768px){

  /* ซ่อน Home */
  .ptk-scroll-nav__menu .menu-item-home{
    display: none !important;
  }

  /* ซ่อน Profile */
  .ptk-scroll-nav__menu .page-item-316{
    display: none !important;
  }

}

/* =========================================================
   PTK FORUM SINGLE (กระทู้หน้าเดียว)
========================================================= */

.ptk-forum-single-wrap{
  max-width:820px;
  margin:0 auto;
  padding:16px;
}

/* =========================================================
   NAV (ปุ่มกลับ)
========================================================= */
.ptk-forum-single-nav{
  display:flex;
  gap:10px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.ptk-back-link{
  display:inline-flex;
  align-items:center;
  padding:6px 12px;
  border-radius:10px;
  background:#1f1f1f;
  color:#ddd;
  text-decoration:none;
  font-size:13px;
  transition:all .2s ease;
}

.ptk-back-link:hover{
  background:#2a2a2a;
  color:#fff;
}

.ptk-back-link.secondary{
  opacity:.7;
}

/* =========================================================
   AUTHOR
========================================================= */
.ptk-forum-single-author{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:12px;
}

.ptk-forum-single-author img{
  width:48px;
  height:48px;
  border-radius:999px;
  object-fit:cover;
  border:2px solid rgba(196,154,61,.25);
}

.ptk-author-meta{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.ptk-author-name{
  font-size:14px;
  font-weight:700;
  color:#f1f1f1;
}

.ptk-author-date{
  font-size:12px;
  color:#999;
}

/* =========================================================
   TITLE
========================================================= */
.ptk-forum-single-title{
  font-size:26px;
  line-height:1.4;
  margin:10px 0 16px;
  color:#f4e3b4;
}

/* =========================================================
   IMAGES
========================================================= */
.ptk-forum-single-images{
  display:grid;
  gap:10px;
  margin-bottom:18px;
}

.ptk-forum-single-image img{
  width:100%;
  border-radius:14px;
  display:block;
  background:#111;
}

/* =========================================================
   CONTENT
========================================================= */
.ptk-forum-single-content{
  line-height:1.75;
  margin-bottom:22px;
  color:#ddd;
}

.ptk-forum-single-content p{
  margin-bottom:12px;
}

/* =========================================================
   COMMENTS
========================================================= */
.ptk-forum-single-comments{
  margin-top:10px;
}

/* =========================================================
   PTK FORUM SINGLE - BACKGROUND LAYER
========================================================= */

.ptk-forum-single-wrap{
  position:relative;
  z-index:1;
}

/* background glow */
.ptk-forum-single-wrap::before{
  content:'';
  position:absolute;
  top:-80px;
  left:-40px;
  right:-40px;
  height:200px;
  background:radial-gradient(circle at top, rgba(196,154,61,.18), transparent 70%);
  z-index:-1;
  pointer-events:none;
}


/* =========================================================
   CARD FEEL (ทำให้ content ลอย)
========================================================= */

.ptk-forum-single-wrap{
  background:linear-gradient(180deg,#1a1a1a 0%, #121212 100%);
  border:1px solid rgba(255,255,255,.05);
  border-radius:20px;
  box-shadow:0 14px 40px rgba(0,0,0,.35);
}


/* =========================================================
   IMAGES PRO STYLE
========================================================= */

.ptk-forum-single-images{
  display:grid;
  gap:12px;
}

/* ภาพหลัก */
.ptk-forum-single-image img{
  width:100%;
  border-radius:16px;
  display:block;

  box-shadow:0 10px 28px rgba(0,0,0,.35);
  transition:all .25s ease;
}

/* hover ภาพ */
.ptk-forum-single-image img:hover{
  transform:scale(1.02);
  box-shadow:0 18px 46px rgba(0,0,0,.45);
}


/* =========================================================
   CONTENT PANEL (แยก layer)
========================================================= */

.ptk-forum-single-content{
  background:rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.05);
  padding:16px;
  border-radius:14px;
}


/* =========================================================
   AUTHOR CARD
========================================================= */

.ptk-forum-single-author{
  background:rgba(255,255,255,.02);
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.05);
}


/* =========================================================
   TITLE EMPHASIS
========================================================= */

.ptk-forum-single-title{
  text-shadow:0 2px 10px rgba(0,0,0,.5);
}

/* =========================================================
   PTK TOPIC GALLERY
========================================================= */

.ptk-topic-gallery{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
}

.ptk-topic-gallery .ptk-forum-single-image{
  display:block;
  overflow:hidden;
  border-radius:14px;
  background:#111;
}

.ptk-topic-gallery .ptk-forum-single-image img{
  width:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
  display:block;
  transition:transform .25s ease;
}

.ptk-topic-gallery .ptk-forum-single-image:hover img{
  transform:scale(1.03);
}

@media (max-width:640px){
  .ptk-topic-gallery{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   PTK TOPIC LIGHTBOX
========================================================= */

.ptk-topic-lightbox{
  position:fixed;
  inset:0;
  z-index:99999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.88);
  backdrop-filter:blur(8px);
}

.ptk-topic-lightbox.is-active{
  display:flex;
}

.ptk-topic-lightbox img{
  max-width:96vw;
  max-height:86vh;
  object-fit:contain;
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.55);
  background:#111;
}

.ptk-topic-lightbox-close{
  position:absolute;
  top:16px;
  right:16px;
  width:42px;
  height:42px;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:22px;
  cursor:pointer;
}

.ptk-topic-lightbox-close:hover{
  background:rgba(255,255,255,.20);
}
