/*
Theme Name: STREAMVID PRO
Theme URI: https://hd33movie.com/
Author: AI NET Studio
Description: ธีมเว็บดูหนังออนไลน์โทน Full Black Premium สำหรับ HD33MOVIE รองรับโฆษณา 3 ตำแหน่ง, ป้ายลอย, SEO ปี 2025 และหน้าเล่นหนังแบบเฟรมเดียวพรีเมียม
Version: 2.4
Text Domain: streamvid-pro
*/

:root {
    --sv-bg: #020617;
    --sv-bg-soft: #020617;
    --sv-surface: #020617;
    --sv-surface-soft: #020617;
    --sv-border: #1f2937;
    --sv-accent: #f472b6;
    --sv-accent-soft: #4c1d95;
    --sv-text: #e5e7eb;
    --sv-muted: #9ca3af;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top left, #111827 0, #020617 45%, #020617 100%);
    color: var(--sv-text);
}

a {
    color: #93c5fd;
    text-decoration: none;
}
a:hover {
    color: #bfdbfe;
}

.sv-site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */

.sv-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: linear-gradient(to bottom, rgba(2,6,23,0.95), rgba(2,6,23,0.85));
    border-bottom: 1px solid rgba(15,23,42,0.85);
}

.sv-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.sv-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0;
    gap: 2rem;
}

.sv-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.sv-logo-badge {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #facc15, #f97316 40%, #7c3aed 70%, #0f172a 100%);
    box-shadow: 0 0 20px rgba(245,158,11,0.5);
}

.sv-logo-text span {
    display: block;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.sv-logo-text small {
    display: block;
    font-size: 0.7rem;
    color: var(--sv-muted);
}

/* MAIN NAV */

.sv-main-nav ul {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.sv-main-nav a {
    position: relative;
    color: var(--sv-muted);
    font-weight: 500;
}
.sv-main-nav a:hover {
    color: #e5e7eb;
}
.sv-main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.35rem;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(to right, #f97316, #ec4899);
    transition: width 0.2s ease-out;
}
.sv-main-nav a:hover::after,
.sv-main-nav li.current-menu-item > a::after {
    width: 100%;
}

/* MAIN LAYOUT */

.sv-main {
    flex: 1 1 auto;
    padding: 1.5rem 0 3rem;
}

.sv-hero-wrapper {
    padding-top: 1.5rem;
}

.sv-hero {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.sv-hero-main {
    padding: 1.75rem 2rem;
    border-radius: 1.5rem;
    background: radial-gradient(circle at top left, #1f2937, #020617);
    border: 1px solid rgba(148,163,184,0.25);
    box-shadow: 0 20px 60px rgba(15,23,42,0.9);
}

.sv-kicker {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sv-muted);
    margin: 0 0 0.75rem;
}
.sv-hero-title {
    margin: 0 0 0.75rem;
    font-size: 1.6rem;
}
.sv-hero-sub {
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
    color: var(--sv-muted);
    max-width: 34rem;
}

.sv-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.sv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.45rem 1.2rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
    cursor: pointer;
}
.sv-btn-primary {
    background: linear-gradient(to right, #f97316, #ec4899);
    color: white;
    box-shadow: 0 10px 40px rgba(236,72,153,0.8);
}
.sv-btn-primary:hover {
    filter: brightness(1.05);
}
.sv-btn-ghost {
    background: transparent;
    border-color: rgba(148,163,184,0.4);
    color: var(--sv-text);
}
.sv-btn-ghost:hover {
    background: rgba(15,23,42,0.85);
}

.sv-hero-meta-chips {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--sv-muted);
}
.sv-hero-meta-chips li {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(15,23,42,0.85);
    border: 1px solid rgba(31,41,55,0.85);
}

.sv-hero-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sv-panel {
    border-radius: 1rem;
    padding: 1.25rem 1.3rem;
    background: radial-gradient(circle at top, #020617, #020617);
    border: 1px solid rgba(31,41,55,0.9);
}
.sv-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.sv-panel-title {
    font-size: 0.9rem;
    font-weight: 600;
}
.sv-panel-sub {
    font-size: 0.75rem;
    color: var(--sv-muted);
}

/* Hero card */

.sv-hero-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: stretch;
}
.sv-hero-card img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    object-fit: cover;
}
.sv-hero-card-body h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}
.sv-hero-card-body p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--sv-muted);
}

/* Movie layout */

.sv-movie-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 220px;
    gap: 1.5rem;
    align-items: flex-start;
}

.sv-movie-sidebar {
    border-radius: 1rem;
    padding: 1.1rem 1.2rem;
    background: rgba(15,23,42,0.92);
    border: 1px solid rgba(31,41,55,0.9);
    font-size: 0.85rem;
}
.sv-movie-sidebar h2 {
    margin: 0 0 0.8rem;
    font-size: 0.9rem;
}
.sv-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sv-filter-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
}
.sv-filter-list span {
    font-size: 0.75rem;
    color: var(--sv-muted);
}

/* Years grid */

.sv-year-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.sv-year-grid a {
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #020617;
    border: 1px solid rgba(31,41,55,0.9);
    font-size: 0.75rem;
    color: var(--sv-muted);
}
.sv-year-grid a:hover {
    color: #e5e7eb;
}

/* Archive grid */

.sv-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.sv-section-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.sv-movie-card {
    border-radius: 0.9rem;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(31,41,55,0.9);
    overflow: hidden;
    font-size: 0.8rem;
}
.sv-movie-card-thumb {
    position: relative;
    overflow: hidden;
}
.sv-movie-card-thumb img {
    display: block;
    width: 100%;
    height: auto;
}
.sv-movie-card-body {
    padding: 0.6rem 0.7rem 0.75rem;
}
.sv-movie-card-title {
    margin: 0 0 0.2rem;
    font-size: 0.85rem;
}
.sv-movie-card-meta {
    font-size: 0.75rem;
    color: var(--sv-muted);
}

/* Single movie */

.sv-single {
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    gap: 1.75rem;
    margin-bottom: 2rem;
}

.sv-single-poster img {
    width: 100%;
    border-radius: 1.1rem;
    display: block;
}

.sv-single-title {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
}

.sv-single-content {
    font-size: 0.95rem;
}

.sv-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--sv-muted);
    margin-bottom: 0.5rem;
}
.sv-meta-label {
    font-weight: 600;
    color: #e5e7eb;
}

.sv-badge-rating {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(22,163,74,0.15);
    border: 1px solid rgba(34,197,94,0.4);
    font-size: 0.75rem;
}

.sv-player-frame {
    position: relative;
    padding-top: 56.25%;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #020617;
}
.sv-player-frame iframe,
.sv-player-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Ads */

.sv-ad-slot {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(55,65,81,0.8);
}
.sv-ad-label {
    font-size: 0.75rem;
    color: var(--sv-muted);
    margin-bottom: 0.25rem;
}

/* Comments block */

.sv-comments {
    margin-top: 2rem;
}

/* Footer */

.sv-footer {
    border-top: 1px solid rgba(15,23,42,0.9);
    padding: 1.5rem 0 2rem;
    font-size: 0.8rem;
    color: var(--sv-muted);
}
.sv-footer-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
}

/* Responsive */

@media (max-width: 960px) {
    .sv-hero {
        grid-template-columns: minmax(0, 1fr);
    }
    .sv-movie-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .sv-single {
        grid-template-columns: minmax(0, 1fr);
    }
    .sv-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .sv-main-nav ul {
        flex-wrap: wrap;
        row-gap: 0.35rem;
    }
}



/* --- Single movie layout --- */
.sv-single {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.sv-single-header {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .sv-single-header {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sv-single-poster {
  max-width: 260px;
}

.sv-poster-frame {
  border-radius: 1.1rem;
  overflow: hidden;
  background: radial-gradient(circle at top, #f97316 0%, #4c1d95 55%, #020617 100%);
  box-shadow: 0 20px 50px rgba(0,0,0,0.65);
}

.sv-poster-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.sv-rating-chip {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
  border: 1px solid rgba(34,197,94,0.35);
}

.sv-single-main {
  background: radial-gradient(circle at top left, rgba(59,130,246,0.16), rgba(15,23,42,0.98));
  border-radius: 1.25rem;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 18px 45px rgba(0,0,0,0.7);
}

.sv-single-title {
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
}

.sv-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  font-size: 0.85rem;
  color: #e5e7eb;
  margin-bottom: 0.6rem;
}

.sv-meta-row--cast {
  margin-top: 0.4rem;
}

.sv-meta-label {
  font-weight: 600;
  color: #9ca3af;
  margin-right: 0.25rem;
}

.sv-tag-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.sv-tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.sv-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(96,165,250,0.16);
  color: #dbeafe;
  text-decoration: none;
}
.sv-chip--ghost {
  background: transparent;
  border: 1px solid rgba(148,163,184,0.5);
  color: #e5e7eb;
}

.sv-single-body-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1.3fr);
  gap: 1.75rem;
}

@media (max-width: 900px) {
  .sv-single-body-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sv-single-body-main {
  /* ตัว main ด้านในไม่ต้องเป็นการ์ดซ้อนอีกชั้น */
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.sv-section-block + .sv-section-block {
  margin-top: 1.35rem;
}

.sv-block-title {
  font-size: 1rem;
  margin: 0 0 0.65rem;
}

.sv-player-frame {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 0.9rem;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 16px 40px rgba(0,0,0,0.85);
}
.sv-player-frame iframe,
.sv-player-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sv-episode-block + .sv-episode-block {
  margin-top: 1rem;
}

.sv-episode-title {
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
}

.sv-single-body {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #e5e7eb;
}

.sv-single-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sv-related-panel {
  padding: 1.1rem 1.2rem 1.25rem;
}

.sv-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.9rem;
}

.sv-related-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  align-items: flex-start;
}
.sv-related-item:hover .sv-related-title {
  color: #bfdbfe;
}

.sv-related-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.6rem;
}

.sv-related-title {
  font-size: 0.9rem;
  color: #e5e7eb;
}
.sv-related-year {
  font-size: 0.78rem;
  color: #9ca3af;
}

/* ปิดคอมเมนต์ส่วนล่างสำหรับ single movie โดยไม่ต้องแก้โค้ดเพิ่ม */
.post-type-movie .sv-comments {
  display: none;
}


/* ปรับขนาดโปสเตอร์ในหน้าเดี่ยวให้ไม่ใหญ่เกินไปบนจอใหญ่ */
.sv-single-layout {
  align-items: flex-start;
}
@media (min-width: 1024px) {
  .sv-single-poster {
    max-width: 260px;
  }
}


.sv-related-thumb {
  width: 100%;
  margin-bottom: 0.4rem;
}

.sv-related-title {
  font-size: 0.9rem;
  color: #e5e7eb;
  margin-bottom: 0.1rem;
}
.sv-related-year {
  font-size: 0.78rem;
  color: #9ca3af;
}

/* เน้นหัวข้อของบล็อกต่างๆ ในหน้าหนังให้ชัดขึ้น */
.sv-block-title {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ระยะห่างระหว่างหัวข้อกับคอนเทนต์ */
.sv-section-block {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(148,163,184,0.12);
}
.sv-section-block + .sv-section-block {
  margin-top: 1.5rem;
}


/* --- Single movie visual tweaks (v1.9.3) --- */

/* บังคับอัตราส่วนโปสเตอร์ให้สวยงาม ไม่ยืด */
.sv-single-poster img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.9rem;
}

/* ปรับหนังแนะนำให้เรียงเป็นกริดแนวนอน */
.sv-related-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  gap: 1rem !important;
}

.sv-related-item {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
}

.sv-related-thumb {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.sv-related-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ให้บล็อก player และตอนทั้งหมดลอยจากพื้นหลังเล็กน้อย */
.sv-section-block {
  background: radial-gradient(circle at top left, rgba(30,64,175,0.26), rgba(15,23,42,0.98));
  border-radius: 0.9rem;
  padding: 1rem 1.2rem 1.1rem;
  box-shadow: 0 18px 40px rgba(0,0,0,0.65);
}
.sv-section-block + .sv-section-block {
  margin-top: 1.5rem;
}



/* ปุ่มแท็บนำทางในหน้าดูหนัง: ตัวอย่าง / หนังเต็ม / เรื่องย่อ / ข้อมูลหนัง */
.sv-single-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: radial-gradient(circle at top left, rgba(59,130,246,0.35), rgba(15,23,42,0.95));
  box-shadow: 0 18px 40px rgba(0,0,0,0.65);
}

.sv-single-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #e5e7eb;
  text-decoration: none;
  border: 1px solid transparent;
}

.sv-single-tabs a:hover {
  border-color: rgba(96,165,250,0.9);
  background: rgba(15,23,42,0.9);
}

/* เน้นอันที่กำลังถูก target แบบง่าย ๆ */
:target {
  scroll-margin-top: 110px;
}
:target .sv-block-title {
  color: #f97316;
}

/* บังคับอัตราส่วนโปสเตอร์หลักให้ไม่ยืด */
.sv-single-poster img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.9rem;
}

/* บังคับกริดหนังแนะนำให้เรียงเป็นแนวนอน */
.sv-related-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  gap: 1rem !important;
}

.sv-related-item {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
}

/* ให้ชิปนักแสดงดูคลิกได้ชัดขึ้น */
.sv-chip {
  cursor: pointer;
}


/* ---- ปรับหน้าเดี่ยวให้ดูเป็นการ์ดพรีเมียมมากขึ้น ---- */

/* กรอบรวมของ header (โปสเตอร์ + ข้อมูลหนัง) */
.sv-single-header {
  max-width: 1180px;
  margin: 0 auto 1.75rem auto;
  padding: 1.1rem 1.2rem;
  border-radius: 1.1rem;
  background: radial-gradient(circle at top left, rgba(30,64,175,0.55), rgba(15,23,42,0.96));
  box-shadow: 0 26px 60px rgba(0,0,0,0.85);
}

/* layout ซ้ายขวาให้บาลานซ์ */
.sv-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: flex-start;
}

/* โปสเตอร์: จำกัดขนาด + อัตราส่วน + การ์ด */
.sv-single-poster {
  max-width: 240px;
}
.sv-single-poster img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.9rem;
  box-shadow: 0 18px 45px rgba(0,0,0,0.85);
}

/* เนื้อหาหลักด้านขวาไม่ชิดขอบเกินไป */
.sv-single-main {
  padding-top: 0.25rem;
}

/* wrapper ของส่วนตัวอย่าง / หนังเต็ม / เรื่องย่อ */
.sv-single-body-wrapper {
  max-width: 1180px;
  margin: 0 auto 2.5rem auto;
}

/* การ์ดพื้นหลังของแต่ละ block ให้เด่นกว่าพื้นหลังหลัก */
.sv-section-block {
  background: radial-gradient(circle at top left, rgba(37,99,235,0.32), rgba(15,23,42,0.97));
  border-radius: 1rem;
  padding: 1.1rem 1.3rem 1.3rem;
  box-shadow: 0 22px 55px rgba(0,0,0,0.9);
}

/* ระยะห่างระหว่าง block */
.sv-section-block + .sv-section-block {
  margin-top: 1.6rem;
}

/* แท็บบนสุดจัดให้อยู่กลางและมีฟีลพรีเมียมมากขึ้น */
.sv-single-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 auto 1.2rem auto;
  padding: 0.25rem 0.35rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(59,130,246,0.55), rgba(236,72,153,0.45));
  box-shadow: 0 22px 50px rgba(0,0,0,0.85);
}

/* ปุ่มในแท็บ */
.sv-single-tabs a {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #f9fafb;
  border: 1px solid rgba(248,250,252,0.18);
  background: rgba(15,23,42,0.92);
}
.sv-single-tabs a:hover {
  border-color: rgba(248,250,252,0.65);
  background: rgba(15,23,42,1);
}

/* ให้ส่วน player มีมุมโค้งและไม่ชิดขอบการ์ด */
.sv-player-frame iframe,
.sv-player-frame video {
  border-radius: 0.9rem;
  overflow: hidden;
}

/* ให้หนังแนะนำด้านล่างยังคงเป็นกริดแนวนอน */
.sv-related-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  gap: 1rem !important;
}
.sv-related-item {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
}
.sv-related-thumb {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.sv-related-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* scroll anchor ไม่ชนเมนูบน */
:target {
  scroll-margin-top: 110px;
}


/* --- ปรับกรอบโปสเตอร์ให้ไม่ยืด และหนังแนะนำเป็นแนวนอนเสมอ --- */

/* กรอบโปสเตอร์ให้ตรึงอัตราส่วน 2:3 แล้วครอบรูป */
.sv-single-poster {
  max-width: 240px;
}
.sv-single-poster .sv-poster-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 0.9rem;
  box-shadow: 0 18px 45px rgba(0,0,0,0.85);
}
.sv-single-poster .sv-poster-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ปรับหนังแนะนำด้านล่างให้เป็นแนวนอน (flex row) */
.sv-related-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
}
.sv-related-item {
  width: 150px;
  text-decoration: none;
}
@media (min-width: 992px) {
  .sv-related-item {
    width: 180px;
  }
}
.sv-related-thumb {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.sv-related-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* Trailer section แสดงใต้หัวเรื่องแบบเต็มความกว้าง */
.sv-section-trailer-top {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* ปรับกริดหนังแนะนำด้านล่างให้เรียงแนวนอนสวย ๆ */
.sv-related-bottom .sv-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .sv-section-trailer-top {
    margin-top: 1.5rem;
  }
  .sv-related-bottom .sv-related-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}




/* ---- Alignment update: trailer + body card centered & same width ---- */
.sv-section-trailer-top,
.sv-single-body-wrapper {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

/* ให้กรอบเนื้อหาหนังทั้งหมดเป็นการ์ดเดียวแบบ Premium */
.sv-single-body-wrapper {
  display: block;
  margin-top: 1.75rem;
  margin-bottom: 3rem;
  padding: 1.4rem 1.6rem 1.8rem;
  border-radius: 1.2rem;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.97), rgba(15,23,42,0.9));
  box-shadow: 0 30px 80px rgba(0,0,0,0.88);
  box-sizing: border-box;
}

/* section ย่อยด้านในให้มีระยะห่างกัน แต่ไม่ซ้อนการ์ดหลายชั้น */
.sv-section-block {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.sv-section-block:last-child {
  margin-bottom: 0;
}


/* หนังแนะนำด้านล่าง ใช้ grid อัตโนมัติ ให้เต็มกรอบ */
.sv-related-bottom .sv-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.25rem;
}

/* card แนะนำหนังให้เต็มพื้นที่ */
.sv-related-bottom .sv-related-item {
  height: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
  .sv-section-trailer-top,
  .sv-single-body-wrapper {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .sv-single-body-wrapper {
    padding: 1rem 1rem 1.3rem;
    border-radius: 1rem;
    margin-top: 1.25rem;
  }
  .sv-related-bottom .sv-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* MOBILE NAV – horizontal scroll on small screens */
@media (max-width: 768px) {
    .sv-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .sv-main-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        scrollbar-width: none;
    }
    .sv-main-nav::-webkit-scrollbar {
        display: none;
    }
    .sv-main-nav ul {
        display: inline-flex;
        flex-wrap: nowrap;
        gap: 0.8rem;
    }
    .sv-main-nav li {
        flex: 0 0 auto;
    }
    .sv-main-nav a {
        padding: 0.25rem 0.7rem;
        border-radius: 999px;
        background: rgba(15,23,42,0.9);
        border: 1px solid rgba(31,41,55,0.9);
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .sv-main-nav li.current-menu-item > a,
    .sv-main-nav li.current_page_item > a {
        background: linear-gradient(135deg,#f97316,#ec4899);
        color:#0b1020;
        box-shadow: 0 0 18px rgba(236,72,153,0.75);
    }
}

/* FORCE TRAILER FULL FRAME 16:9 */
.sv-section-trailer-top iframe,
.sv-section-trailer-top video {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 0.9rem;
    object-fit: cover;
    box-shadow: 0 18px 48px rgba(0,0,0,0.9);
}

/* HERO SEARCH BAR */
.svp-hero-search {
    margin-top: 18px;
}
.svp-hero-search-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(8, 16, 32, 0.9);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04),
                0 18px 45px rgba(0, 0, 0, 0.75);
}
.svp-hero-search-icon {
    font-size: 18px;
    opacity: 0.9;
}
.svp-hero-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #ffffff;
    font-size: 14px;
}
.svp-hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}
.svp-hero-search-btn {
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #ff4b4b, #ff8e3c);
    color: #0a0f1f;
    box-shadow: 0 0 18px rgba(255, 114, 94, 0.7);
    white-space: nowrap;
}
.svp-hero-search-btn:hover {
    filter: brightness(1.05);
}
