:root {
    --primary: #0f4c81;       /* น้ำเงิน BWT */
    --primary-dark: #0a3356;
    --accent: #d9383a;        /* แดง/ส้ม สำหรับปุ่ม Call-to-Action */
    --dark: #1e293b;
    --light-bg: #f8fafc;       /* พื้นหลังหน้าเว็บด้านล่างกลับมาเป็นสีสว่างสะอาดตา */
    --white: #ffffff;
    --border: #e2e8f0;
    --text-muted: #64748b;
    --radius: 16px;
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Prompt', sans-serif; background-color: var(--light-bg); color: var(--dark); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* === 1. Navigation Bar === */
.navbar { background: var(--white); color: var(--dark); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow); border-bottom: 1px solid var(--border); transition: box-shadow 0.25s ease; }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 80px; transition: height 0.25s ease; }
.logo-wrapper { display: flex; align-items: center; height: 100%; }
.logo-img { max-height: 55px; width: auto; object-fit: contain; transition: max-height 0.25s ease; }
.navbar.is-scrolled .nav-container { height: 60px; }
.navbar.is-scrolled .logo-img { max-height: 40px; }
.navbar.is-scrolled { box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1); }
.nav-links { display: flex; gap: 15px; list-style: none; align-items: center; }
.nav-links a { font-size: 16px; font-weight: 500; color: var(--dark); padding: 8px 16px; border-radius: 6px; transition: all 0.2s; }
.nav-links a:hover { background: rgba(15, 76, 129, 0.08); color: var(--primary); }
.nav-member-link { display: inline-flex; align-items: center; gap: 8px; }
.nav-member-icon { font-size: 18px; }
.nav-member-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.nav-member-avatar--placeholder { display: inline-flex; align-items: center; justify-content: center; background: rgba(15, 76, 129, 0.12); color: var(--primary); font-size: 14px; }
.menu-toggle { display: none; border: 0; background: transparent; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--primary); }

@media (max-width: 768px) {
    .nav-container { height: 68px; position: relative; }
    .logo-img { max-height: 45px; }
    .menu-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 68px;
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 20px 16px;
        background: var(--white);
        border-top: 1px solid var(--border);
        box-shadow: 0 8px 12px rgba(15, 23, 42, 0.08);
    }
    .nav-links.is-open { display: flex; }
    .nav-links a { display: block; padding: 12px 0; }
}

/* === 2. Hero Slider (ใช้คำสั่งผสมผสานสีเพียวๆ ละลายเนียนสนิท ไร้ตัวหนังสือดั้งเดิมโผล่บังสายตา) === */
.hero-slider {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    min-height: clamp(460px, 68vh, 700px);
    display: flex;
    align-items: center;
}

.hero-slider--compact { min-height: clamp(280px, 40vh, 420px); }

.slide { 
    position: absolute; 
    inset: 0; 
    opacity: 0; 
    transition: opacity 0.8s ease-in-out; 
    display: flex; 
    align-items: center; 
    width: 100%;
    height: 100%;
}
.slide.active { opacity: 1; z-index: 10; }


.slide-bg-glow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(92, 140, 255, 0.22), transparent 35%),
        radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.18), transparent 35%),
        linear-gradient(135deg, rgba(2, 6, 23, 0.96), rgba(17, 24, 39, 0.92));
    z-index: 1;
}

.slide-grid { 
    display: grid; 
    grid-template-columns: 1.2fr 0.8fr; 
    gap: 40px; 
    align-items: center; 
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 3;
}
@media (max-width: 992px) {
    .slide-grid { grid-template-columns: 1fr; padding: 40px 0; }
    .slide-right { display: none; }
}

/* คอนเทนต์รายละเอียดข้อมูลฝั่งซ้าย */
.slide-left { display: flex; flex-direction: column; gap: 16px; }
.slide-badge {
    align-self: flex-start;
    background: rgba(255, 179, 0, 0.15);
    border: 1px solid rgba(255, 179, 0, 0.3);
    color: #ffb300;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
}
.slide-left h1 { 
    font-size: 42px; 
    font-weight: 700; 
    color: #ffffff; 
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.slide-left p { 
    font-size: 16px; 
    color: #94a3b8; 
    font-weight: 400;
}
.slider-cta-wrap { margin-top: 10px; }
.cta-btn { display: inline-block; background: var(--accent); color: #ffffff; padding: 14px 32px; border-radius: var(--radius); font-weight: 500; transition: background 0.2s, transform 0.2s; box-shadow: 0 4px 14px rgba(217, 56, 58, 0.4); }
.cta-btn:hover { background: #b8282a; transform: translateY(-1px); }

/* รูปภาพแบนเนอร์ฝั่งขวา */
.slide-right { display: flex; justify-content: center; align-items: center; height: 100%; }
.slide-img-container {
    width: 85%;
    height: 85%;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateX(80px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.slide.active .slide-img-container { opacity: 1; transform: translateX(0); }
.slide-img-container img { width: 100%; height: 100%; object-fit: cover; }

/* สไลด์เนื้อหา: ภาพเต็ม header ชัดทางขวาและค่อย ๆ จางทางซ้าย */
.slide-content .slide-grid { grid-template-columns: 1fr; z-index: 3; align-items: end; padding-bottom: 40px; }
.content-slide-image { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.content-slide-image img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.slide-content .slide-right { display: none; }
.slide-content .slide-bg-glow { z-index: 1; }
/* กรอบพื้นหลังโปร่งแสงของสไลด์ content: แนวนอน กว้างเต็มพื้นที่ แต่จำกัดความสูงด้วยการตัดบรรทัดหัวข้อ/คำโปรย ส่วนสไลด์ tournament ไม่ได้ใช้ selector นี้จึงไม่กระทบ */
.slide-content .slide-left { position: relative; z-index: 4; width: 100%; padding: 18px 26px; gap: 8px; background: rgba(2, 6, 23, 0.38); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px; backdrop-filter: blur(2px); }
.slide-content .slide-left h1 { font-size: 32px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slide-content .slide-left p { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slide-content .slide-bg-glow {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.68) 0%, rgba(2, 6, 23, 0.48) 35%, rgba(2, 6, 23, 0.16) 66%, rgba(2, 6, 23, 0) 100%);
}
/* ปุ่ม CTA เฉพาะสไลด์ประเภทเนื้อหา (content) เปลี่ยนจากสีแดงเป็นสีเขียวและเล็กลง ส่วนสไลด์ tournament ยังคงใช้ .cta-btn สีแดงตามเดิม */
.slide-content .cta-btn { background: #16a34a; padding: 9px 22px; font-size: 13px; box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35); }
.slide-content .cta-btn:hover { background: #15803d; }

@media (max-width: 576px) {
    .hero-slider { min-height: 500px; }
    .hero-slider--compact { min-height: 320px; }
    .slide-grid { display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: 32px 0; }
    .slide-right { display: flex; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
    .slide-img-container { width: 100%; height: 100%; box-shadow: none; opacity: 1; transform: none; }
    .slide-bg-glow { z-index: 2; background: linear-gradient(180deg, rgba(2, 6, 23, 0.2) 0%, rgba(2, 6, 23, 0.88) 78%, rgba(2, 6, 23, 0.96) 100%); }
    .slide-left { position: relative; z-index: 4; gap: 7px; padding: 14px; background: rgba(2, 6, 23, 0.58); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px; backdrop-filter: blur(3px); }
    .slider-cta-wrap { position: relative; z-index: 5; }
    .slide-badge { padding: 3px 8px; font-size: 11px; }
    .slide-left h1 { font-size: 20px; line-height: 1.3; }
    .slide-left p { font-size: 12px; line-height: 1.45; }
    .slider-cta-wrap { margin-top: 2px; }
    .cta-btn { padding: 8px 16px; border-radius: 6px; background: rgba(217, 56, 58, 0.82); font-size: 12px; }
}

/* === 3. Filter Bar === */
.filter-section { margin-top: -40px; position: relative; z-index: 20; padding-bottom: 40px; }
.filter-wrapper { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: 0 12px 30px rgba(0,0,0,0.06); border: 1px solid var(--border); }
.filter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
@media (max-width: 992px) { .filter-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .filter-grid { grid-template-columns: 1fr; } }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group--full { grid-column: 1 / -1; }
.filter-group label { font-size: 13px; font-weight: 600; color: var(--primary); }
.filter-control { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 14px; color: var(--dark); background-color: var(--light-bg); }
.search-input-group { display: flex; flex-wrap: nowrap; gap: 8px; }
.search-input-group .filter-control { flex: 1 1 auto; min-width: 0; }
.search-submit-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; border: 0; border-radius: 8px; background: var(--primary); color: #ffffff; font-size: 16px; cursor: pointer; transition: background 0.2s ease; }
.search-submit-btn:hover { background: var(--primary-dark); }
.group-filter-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.day-filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.day-filter-btn { padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--dark); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.day-filter-btn:hover { border-color: var(--day-color, var(--primary)); }
.day-filter-btn.is-active { border-color: var(--day-color, var(--primary)); background: var(--day-color, var(--primary)); color: #ffffff; }
.sort-filter-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--dark); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.sort-filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.sort-filter-btn.is-active { border-color: var(--primary); background: var(--primary); color: #ffffff; }
@media (max-width: 576px) {
    .group-filter-bar { justify-content: flex-start; }
    .day-filter-group { gap: 6px; }
    .day-filter-btn { padding: 6px 10px; font-size: 12px; }
}

/* === 4. Site Statistics === */
.site-stats { padding: 0 0 34px; }
.site-stats .container { display: flex; justify-content: center; }
.site-stats-list { display: flex; align-items: center; gap: 14px; width: max-content; max-width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
.site-stats-list::-webkit-scrollbar { display: none; }
.site-stat { flex: 0 0 106px; padding: 4px 14px; text-align: center; border-right: 1px solid var(--border); }
.site-stat dt { color: var(--primary); font-size: 28px; font-weight: 700; line-height: 1.2; }
.site-stat dd { margin: 3px 0 0; color: var(--text-muted); font-size: 14px; }
.app-download-links { display: flex; flex: 0 0 auto; flex-wrap: nowrap; align-items: center; gap: 10px; }
.app-download-link { display: inline-flex; position: relative; min-width: 0; align-items: center; justify-content: center; padding: 0; border: 0; background: none; border-radius: 8px; overflow: visible; line-height: 0; transition: transform 0.2s ease; }
.app-download-link:hover { transform: translateY(-2px); }
.app-download-link img { display: block; width: auto; height: 40px; max-width: none; border-radius: 8px; }


@media (max-width: 576px) {
    .site-stats { padding-bottom: 26px; }
    .site-stats .container { justify-content: flex-start; }
    .site-stats-list { width: 100%; flex-wrap: wrap; overflow-x: visible; }
    .site-stat { flex-basis: 76px; padding: 4px 6px; }
    .site-stat dt { font-size: 19px; }
    .site-stat dd { font-size: 11px; }
    .app-download-links { flex-basis: 100%; justify-content: center; gap: 10px; margin-top: 10px; }
    .app-download-link img { height: 30px; }
}

/* === 4. Main Sponsors === */
.promo-banner { border-radius: var(--radius); overflow: hidden; }
.promo-banner-inner { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 40px 44px; background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.08), transparent 55%), linear-gradient(120deg, #0b3d24, #1e7a4d); background-color: #0f4c2e; overflow: hidden; }
.promo-banner-inner::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px); background-size: 26px 26px; mask-image: radial-gradient(circle at 100% 0%, #000 0%, transparent 65%); pointer-events: none; }
.promo-badge { padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #ffffff; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; }
.promo-title { color: #ffffff; font-size: 28px; font-weight: 700; }
.promo-subtitle { max-width: 520px; color: rgba(255, 255, 255, 0.85); font-size: 15px; }
.promo-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 12px 22px; border-radius: 999px; background: #ffffff; color: #0f4c2e; font-size: 14px; font-weight: 700; transition: transform 0.2s ease; }
.promo-cta:hover { transform: translateY(-2px); }
.sponsor-section { padding: 0 0 40px; }
.sponsor-title { margin-bottom: 16px; color: var(--primary); font-size: 18px; font-weight: 600; }
.sponsor-logos { display: grid; grid-auto-flow: column; grid-auto-columns: 82px; grid-template-rows: 52px; align-items: center; justify-content: center; gap: 12px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.sponsor-logos::-webkit-scrollbar { display: none; }
.sponsor-logo { display: flex; align-items: center; justify-content: center; height: 65px; }
.sponsor-logo img { display: block; max-width: 100%; max-height: 55px; object-fit: contain; }

@media (max-width: 576px) {
    .promo-banner-inner { padding: 28px 24px; }
    .promo-title { font-size: 22px; }
    .promo-subtitle { font-size: 13px; }
    .sponsor-section { padding-bottom: 28px; }
    .sponsor-title { margin-bottom: 12px; font-size: 16px; }
    .sponsor-logos { grid-auto-columns: 72px; grid-template-rows: 60px; justify-content: flex-start; gap: 10px; margin: 0 -20px; padding: 0 20px 4px; }
    .sponsor-logo { height: 60px; }
    .sponsor-logo img { max-height: 60px; }
}

/* === 5. Recommended Posters === */
.recommended-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.section-title { font-size: 22px; font-weight: 600; margin-bottom: 25px; display: flex; align-items: center; gap: 10px; color: var(--primary); }
.recommended-heading .section-title { margin-bottom: 0; }
.section-title::before { content: ''; width: 5px; height: 22px; background: var(--accent); display: inline-block; border-radius: 2px; }
.view-all-link { color: var(--primary); font-size: 15px; font-weight: 600; }
.poster-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
@media (max-width: 992px) { .poster-grid { grid-template-columns: repeat(3, 1fr); } }
.poster-pagination { display: none; }
@media (max-width: 576px) {
    .recommended-heading { margin-bottom: 16px; }
    .section-title { font-size: 20px; }
    .poster-grid {
        display: flex;
        gap: 12px;
        margin: 0 -20px;
        padding: 0 20px 4px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .poster-grid::-webkit-scrollbar { display: none; }
    .poster-card { flex: 0 0 42%; scroll-snap-align: start; }
    .poster-body { display: none; }
    .poster-pagination { display: flex; justify-content: center; gap: 9px; margin-top: 18px; }
    .poster-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #d1d5db; cursor: pointer; transition: width 0.2s, background 0.2s; }
    .poster-dot.active { width: 25px; border-radius: 8px; background: #4f6fca; }
}
.poster-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: all 0.3s ease; }
.poster-card:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(15, 76, 129, 0.1); }
.poster-img-box { display: block; position: relative; width: 100%; padding-top: 135%; background: var(--border); overflow: hidden; }
.poster-img-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster-img-box::after { content: ''; position: absolute; top: 0; left: -150%; width: 60%; height: 100%; background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%); transform: skewX(-20deg); pointer-events: none; animation: poster-shine 3.5s ease-in-out infinite; }
@keyframes poster-shine { 0% { left: -150%; } 80% { left: 150%; } 100% { left: 150%; } }
.poster-featured { position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; background: linear-gradient(135deg, #ff512f, #f9d423); color: #ffffff; font-size: 12px; font-weight: 700; letter-spacing: 0.3px; box-shadow: 0 4px 10px rgba(249, 84, 47, 0.45); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.poster-featured::before { content: '\2605'; font-size: 12px; }
.poster-review-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; background: rgba(15, 23, 42, 0.78); color: #ffffff; font-size: 12px; font-weight: 600; backdrop-filter: blur(2px); }
.poster-rating-stars { display: inline-flex; gap: 2px; color: #94a3b8; font-size: 11px; }
.poster-rating-stars .is-filled { color: #fbbf24; }
.poster-body { padding: 15px; text-align: center; }
.poster-name { font-size: 14px; font-weight: 500; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* === 6. Recommended Players === */
.player-section { margin-top: 42px; }
.player-card-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.player-card { overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--white); box-shadow: var(--shadow); }
.player-card-image { position: relative; display: flex; align-items: center; justify-content: center; height: 174px; overflow: hidden; background: #e2e8f0; color: var(--primary); font-size: 48px; }
.player-card-image img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.player-level { position: absolute; top: 0; left: 0; display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 5px 8px; border-radius: 0 0 8px 0; background: #dc3545; color: #ffffff; font-size: 11px; line-height: 1.1; }
.player-level strong { margin-top: 2px; font-size: 18px; }
.player-level.is-up { background: #16a34a; }
.player-level.is-down { background: #dc3545; }
.player-card-body { padding: 12px; }
.player-card-body h3 { overflow: hidden; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); color: var(--dark); font-size: 16px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.player-card-stats { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; color: var(--text-muted); font-size: 12px; }
.player-card-stats span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.player-review { min-width: 0; }
.player-rating-stars { gap: 1px !important; color: #94a3b8; font-size: 10px; }
.player-rating-stars .is-filled { color: #fbbf24; }
.player-details-link { display: block; padding: 7px; border-radius: 6px; background: var(--primary); color: #ffffff; font-size: 13px; font-weight: 600; text-align: center; }
.player-details-link:hover { background: var(--primary-dark); }

@media (max-width: 992px) { .player-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 576px) {
    .player-section { margin-top: 34px; }
    .player-card-grid { display: flex; gap: 12px; margin: 0 -20px; padding: 0 20px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .player-card-grid::-webkit-scrollbar { display: none; }
    .player-card { flex: 0 0 44%; scroll-snap-align: start; }
    .player-card-image { height: 148px; }
}

/* === 7. Badminton Groups === */
.group-section { margin-top: 52px; }
.group-section-collapsible { overflow: hidden; transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.4s ease; }
.group-section-collapsible.is-collapsed { margin-top: 0; margin-bottom: 0; opacity: 0; pointer-events: none; }
.show-top-groups-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 10px 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--primary); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); transition: background 0.2s, border-color 0.2s; }
.show-top-groups-btn:hover { background: rgba(15, 76, 129, 0.08); border-color: var(--primary); }
.group-card-grid { display: flex; gap: 20px; padding-bottom: 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.group-card-grid::-webkit-scrollbar { display: none; }
.group-card { flex: 0 0 calc((100% - 104px) / 4); overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--white); box-shadow: var(--shadow); scroll-snap-align: start; display: block; color: inherit; text-decoration: none; transition: box-shadow 0.2s, transform 0.2s; }
.group-card:hover { box-shadow: var(--shadow-lg, 0 10px 24px rgba(15, 23, 42, 0.12)); transform: translateY(-2px); }
.group-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.group-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #cbd5e1; cursor: pointer; transition: width 0.2s, background 0.2s; }
.group-dot.active { width: 24px; border-radius: 6px; background: var(--primary); }
.group-banner { position: relative; height: 158px; background: var(--border); }
.group-banner > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.group-review-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; background: rgba(15, 23, 42, 0.78); color: #ffffff; font-size: 12px; font-weight: 600; backdrop-filter: blur(2px); }
.group-rating-stars { display: inline-flex; gap: 2px; color: #94a3b8; font-size: 11px; }
.group-rating-stars .is-filled { color: #fbbf24; }
.group-card-body { padding: 18px 16px; }
.group-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.group-card-heading h3 { font-size: 18px; line-height: 1.35; color: var(--dark); }
.group-featured { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: 12px; font-weight: 600; }
.today-day-badge { display: inline-flex; align-items: center; margin-left: 8px; padding: 4px 12px; border-radius: 999px; color: #ffffff; font-size: 13px; font-weight: 600; vertical-align: middle; }
.today-groups-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 14px; }
.group-description { min-height: 48px; margin-bottom: 14px; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.group-detail { display: flex; align-items: center; gap: 10px; margin-top: 9px; color: #475569; font-size: 13px; }
.group-detail strong { flex: 0 0 38px; color: var(--primary); font-size: 12px; }
.group-detail-icon { display: inline-flex; flex: 0 0 38px; align-items: center; justify-content: center; color: var(--primary); font-size: 17px; line-height: 1; }
.group-detail > i { flex: 0 0 auto; color: var(--primary); font-size: 16px; }
.group-detail > i + span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-detail a { color: var(--primary); }
.group-day-list { display: flex; flex-wrap: wrap; gap: 5px; }
.group-day-list span { padding: 3px 8px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 12px; font-weight: 600; }
.all-group-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.all-group-sentinel { height: 1px; }
.all-group-loading { padding: 20px; text-align: center; color: var(--text-muted); font-size: 14px; }

@media (max-width: 992px) {
    .group-card { flex-basis: calc((100% - 20px) / 2); }
    .all-group-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .group-section { margin-top: 38px; }
    .group-card-grid { gap: 12px; margin: 0 -20px; padding: 0 20px 4px; }
    .group-card { flex-basis: 82%; }
    .group-banner { height: 150px; }
    .all-group-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* === 7.4 แกลเลอรี่ภาพนักกีฬา (index.php เท่านั้น) === */
.gallery-section { margin-top: 52px; }
.gallery-panel { background: linear-gradient(160deg, #161d2b 0%, #05070c 100%); border-radius: 20px; padding: 28px 24px 30px; }
.gallery-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.gallery-panel-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: #ffffff; letter-spacing: 0.3px; }
.gallery-badge { padding: 3px 10px; border-radius: 999px; background: var(--accent); color: #ffffff; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; }
.gallery-nav { display: flex; gap: 10px; flex: 0 0 auto; }
.gallery-nav-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: #ffffff; font-size: 15px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.gallery-nav-btn:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.55); }
.gallery-track { display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 2px; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item { position: relative; flex: 0 0 200px; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 14px; border: 2px solid transparent; background: #1b2230; padding: 0; cursor: zoom-in; font: inherit; scroll-snap-align: start; }
.gallery-item.is-latest { border-color: var(--accent); }
.gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item-badge { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.55); color: #ffffff; font-size: 13px; backdrop-filter: blur(3px); }
.gallery-item-flag { position: absolute; top: 10px; right: 10px; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #ffffff; font-size: 11px; font-weight: 700; }
.gallery-item-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.35); color: #ffffff; font-size: 26px; opacity: 0; transition: opacity 0.25s ease; }
.gallery-item:hover .gallery-item-overlay, .gallery-item:focus-visible .gallery-item-overlay { opacity: 1; }
.gallery-caption-overlay { position: absolute; inset: auto 0 0 0; padding: 30px 12px 12px; background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0)); text-align: left; }
.gallery-caption-text { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #ffffff; font-size: 13px; font-weight: 600; line-height: 1.35; }
.gallery-empty { color: #94a3b8; font-size: 14px; padding: 10px 0 4px; }
.gallery-lightbox { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 40px 20px; background: rgba(10, 15, 26, 0.9); }
.gallery-lightbox.is-open { display: flex; }
.gallery-lightbox-figure { max-width: min(900px, 92vw); max-height: 88vh; text-align: center; }
.gallery-lightbox-figure img { display: block; max-width: 100%; max-height: 76vh; margin: 0 auto; border-radius: 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.gallery-lightbox-figure figcaption { margin-top: 14px; color: #f1f5f9; font-size: 15px; }
.gallery-lightbox-close { position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #ffffff; font-size: 18px; cursor: pointer; transition: background 0.2s; }
.gallery-lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }

@media (max-width: 576px) {
    .gallery-section { margin-top: 38px; }
    .gallery-panel { padding: 20px 16px 24px; border-radius: 16px; }
    .gallery-panel-title { font-size: 17px; }
    .gallery-item { flex-basis: 150px; border-radius: 10px; }
    .gallery-nav-btn { width: 34px; height: 34px; font-size: 13px; }
}

/* === 7.5 ข่าวสารและวิดีโอวงการแบดมินตัน (index.php เท่านั้น) === */
.feed-section { margin-top: 44px; }
.feed-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.feed-title { font-size: 19px; font-weight: 800; letter-spacing: 0.3px; color: var(--dark); text-transform: uppercase; }
.feed-see-more { flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; background: #eef1f4; color: var(--dark); font-size: 13px; font-weight: 600; transition: background 0.2s; }
.feed-see-more:hover { background: #e2e6ea; }
.news-empty { color: var(--text-muted); font-size: 14px; padding: 20px 0; }

.feed-layout { display: grid; grid-template-columns: 0.5fr 1fr; gap: 14px; align-items: stretch; }
.feed-video-grid { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 10px; }
.feed-card { position: relative; display: block; overflow: hidden; border-radius: 10px; background: #111722; color: inherit; text-decoration: none; }
.feed-card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.feed-card:hover img { transform: scale(1.06); }
.feed-video-grid .feed-card { aspect-ratio: 3 / 4; }
.feed-card-type-badge { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.55); color: #ffffff; font-size: 10px; backdrop-filter: blur(2px); }
.feed-card-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.5); border: 2px solid rgba(255, 255, 255, 0.85); color: #ffffff; font-size: 14px; transition: background 0.2s, transform 0.2s; }
.feed-card:hover .feed-card-play { background: var(--accent); transform: translate(-50%, -50%) scale(1.08); }
.feed-card-overlay { position: absolute; inset: auto 0 0 0; padding: 24px 10px 8px; background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0) 75%); }
.feed-card-headline { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #ffffff; font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.feed-card--news { border-radius: 12px; height: 100%; }
.feed-card--news .feed-card-overlay { padding: 30px 14px 14px; }
.feed-card-headline-big { display: block; color: #ffffff; font-size: 17px; font-weight: 800; line-height: 1.3; margin-bottom: 6px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.feed-card-excerpt { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: #e2e8f0; font-size: 12px; line-height: 1.5; margin-bottom: 10px; }
.feed-card-meta { display: flex; align-items: center; gap: 8px; }
.feed-card-avatar { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.18); color: #ffffff; font-size: 10px; }
.feed-card-meta-text strong { display: block; color: #ffffff; font-size: 12px; font-weight: 700; }

@media (max-width: 900px) {
    .feed-layout { grid-template-columns: 1fr; }
    .feed-card--news { aspect-ratio: 16 / 9; }
}
@media (max-width: 576px) {
    .feed-section { margin-top: 32px; }
    .feed-title { font-size: 16px; }
    .feed-see-more { padding: 7px 14px; font-size: 12px; }
    .feed-video-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .feed-card-headline { font-size: 10px; }
    .feed-card-headline-big { font-size: 15px; }
}

/* === 8. Badminton Group Detail Page (badminton-group-detail.php เท่านั้น) === */
.gdp-hero { position: relative; overflow: hidden; min-height: clamp(220px, 32vw, 400px); background-color: var(--dark); background-size: cover; background-position: center; }
.gdp-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(2, 6, 23, 0.55) 0%, rgba(2, 6, 23, 0.05) 35%); }
.gdp-hero-inner { position: absolute; inset: 0; z-index: 2; }
.gdp-logo-float { position: relative; z-index: 2; width: 120px; height: 120px; margin: -100px 0 14px; border-radius: 16px; background: var(--white); padding: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); overflow: hidden; }
.gdp-logo-float img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.gdp-hero .group-review-count { z-index: 2; }
.gdp-body { padding: 32px 20px 60px; }
.gdp-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gdp-name { font-size: 28px; font-weight: 700; color: var(--dark); }
.gdp-distance-wrap { display: inline-flex; align-items: center; margin-left: 4px; color: var(--text-muted); font-size: 14px; font-weight: 400; }
.gdp-desc { max-width: 760px; margin-bottom: 20px; color: var(--text-muted); font-size: 15px; line-height: 1.7; }
.gdp-days { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.gdp-days-label { display: inline-flex; align-items: center; gap: 6px; color: var(--dark); font-size: 14px; font-weight: 600; }
.gdp-not-found { padding: 70px 0 24px; text-align: center; color: var(--text-muted); font-size: 16px; }

/* รายละเอียดวัน/เวลา/สนามของแต่ละวันที่จัดก๊วน */
.gdp-schedule-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.gdp-schedule-item { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 10px 14px; border-radius: 12px; background: #f1f5f9; }
.gdp-schedule-day { flex: 0 0 auto; padding: 4px 12px; border-radius: 999px; color: #ffffff; font-size: 13px; font-weight: 600; }
.gdp-schedule-time, .gdp-schedule-court { display: inline-flex; align-items: center; gap: 6px; color: #334155; font-size: 14px; }
.gdp-schedule-time i, .gdp-schedule-court i { color: var(--primary); }

/* การ์ดข้อมูล: สนาม / เบอร์โทร / ยอดเข้าชม */
.gdp-info-card { display: flex; flex-direction: column; margin: 22px 0; padding: 4px 16px; border-radius: 14px; background: #f1f5f9; }
.gdp-info-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.25); }
.gdp-info-row:last-child { border-bottom: 0; }
.gdp-info-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--white); color: var(--primary); font-size: 17px; box-shadow: var(--shadow); }
.gdp-info-label { color: var(--text-muted); font-size: 12.5px; }
.gdp-info-value { color: var(--dark); font-size: 15px; font-weight: 600; }
.gdp-info-value a { color: var(--dark); }
.gdp-info-value a:hover { color: var(--primary); }

/* แผนที่สนาม */
.gdp-section-title { margin-bottom: 14px; font-size: 18px; font-weight: 700; color: var(--dark); }
.gdp-map-section { margin-bottom: 12px; }
.gdp-map-frame { overflow: hidden; border-radius: 14px; border: 1px solid var(--border); }
.gdp-map-frame iframe { display: block; width: 100%; height: 260px; border: 0; }
.gdp-map-caption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 10px; color: #475569; font-size: 13.5px; }
.gdp-map-caption > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.gdp-map-caption i { color: var(--primary); }

/* รีวิวก๊วน */
.gdp-reviews { margin-bottom: 32px; }
.gdp-reviews-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.gdp-reviews-head .gdp-section-title { margin-bottom: 0; }
.gdp-reviews-avg { display: inline-flex; align-items: center; gap: 8px; color: var(--dark); font-size: 15px; }
.gdp-reviews-avg .group-rating-stars { font-size: 14px; }
.gdp-reviews-empty { padding: 28px; border-radius: 14px; background: #f1f5f9; text-align: center; color: var(--text-muted); font-size: 14px; }
.gdp-review-list { display: flex; flex-direction: column; gap: 16px; }
.gdp-review-item { padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); }
.gdp-review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.gdp-review-avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.gdp-review-avatar--placeholder { display: inline-flex; align-items: center; justify-content: center; background: var(--light-bg); color: var(--text-muted); font-size: 18px; }
.gdp-review-name { color: var(--dark); font-size: 14.5px; font-weight: 600; }
.gdp-review-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.gdp-review-meta .group-rating-stars { font-size: 12px; }
.gdp-review-date { color: var(--text-muted); font-size: 12.5px; }
.gdp-review-text { color: #334155; font-size: 14px; line-height: 1.7; white-space: pre-line; }
.gdp-review-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gdp-review-images img { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; }

/* แถบปุ่มด้านล่าง (sticky action bar) */
body.has-gdp-action-bar { padding-bottom: 78px; }
.gdp-action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--white); border-top: 1px solid var(--border); box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.08); }
.gdp-action-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--primary); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.gdp-action-btn--icon { flex: 0 0 auto; width: 46px; height: 46px; font-size: 19px; }
.gdp-action-btn--icon:hover { background: rgba(15, 76, 129, 0.08); }
.gdp-action-btn--primary { flex: 1 1 auto; height: 46px; padding: 0 18px; background: var(--accent); border-color: var(--accent); color: #ffffff; }
.gdp-action-btn--primary:hover { background: #b8282a; }
.gdp-action-btn--join { flex: 1 1 auto; height: 46px; padding: 0 18px; background: var(--primary); border-color: var(--primary); color: #ffffff; }
.gdp-action-btn--join:hover { background: var(--primary-dark); }
#gdp-favorite-btn.is-active { background: #fee2e2; border-color: #fecaca; color: #dc2626; }

.gdp-toast { position: fixed; left: 50%; bottom: 84px; z-index: 60; padding: 10px 18px; border-radius: 999px; background: rgba(15, 23, 42, 0.92); color: #ffffff; font-size: 13.5px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); transform: translateX(-50%); }

@media (max-width: 576px) {
    .gdp-hero { min-height: 220px; }
    .gdp-logo-float { width: 88px; height: 88px; margin: -44px 0 12px; border-radius: 12px; }
    .gdp-body { padding-top: 24px; }
    .gdp-name { font-size: 22px; }
    .gdp-map-frame iframe { height: 200px; }
    .gdp-action-bar { padding: 10px 14px; }
    .gdp-action-btn--primary span, .gdp-action-btn--join span { display: none; }
}

/* === 9. คูปองส่วนลด (index.php เท่านั้น) === */
.coupon-section { margin-top: 40px; margin-bottom: 20px; }
.coupon-grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
.coupon-grid::-webkit-scrollbar { display: none; }
.coupon-card { flex: 0 0 calc((100% - 48px) / 4.4); overflow: hidden; border-radius: 10px; border: 1px solid var(--border); background: var(--white); box-shadow: var(--shadow); scroll-snap-align: start; display: flex; }
.coupon-value-side { display: flex; flex: 0 0 66px; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 10px 4px; background: linear-gradient(160deg, var(--primary), var(--primary-dark)); color: #ffffff; text-align: center; }
.coupon-value { font-size: 15px; font-weight: 700; line-height: 1.1; }
.coupon-value-label { font-size: 9px; opacity: 0.85; }
.coupon-divider { position: relative; flex: 0 0 0; width: 0; border-left: 2px dashed rgba(15, 23, 42, 0.18); }
.coupon-notch { position: absolute; left: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--light-bg); }
.coupon-notch-top { top: -7px; }
.coupon-notch-bottom { bottom: -7px; }
.coupon-detail-side { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; }
.coupon-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--dark); }
.coupon-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-size: 10.5px; line-height: 1.4; }
.coupon-condition { color: var(--text-muted); font-size: 10px; }
.coupon-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; font-size: 10px; color: #94a3b8; }
.coupon-meta i { margin-right: 1px; }
.coupon-remaining { font-weight: 600; color: var(--accent); }
.coupon-action-row { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.coupon-code { flex: 1 1 auto; min-width: 0; overflow: hidden; padding: 3px 6px; border-radius: 5px; background: #f1f5f9; color: #475569; font-family: 'Courier New', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.2px; text-overflow: ellipsis; white-space: nowrap; }
.coupon-copy-btn { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; padding: 3px 7px; border: 1px dashed var(--primary); border-radius: 5px; background: rgba(15, 76, 129, 0.06); color: var(--primary); font-family: inherit; font-size: 10px; font-weight: 700; letter-spacing: 0.2px; cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.coupon-copy-btn i { font-size: 11px; }
.coupon-copy-btn:hover { background: rgba(15, 76, 129, 0.12); }
.coupon-copy-btn.is-copied { border-color: #16a34a; background: rgba(22, 163, 74, 0.1); color: #16a34a; }

/* การ์ดว่าง (เติมให้ครบ 5 เมื่อคูปองจริงมีไม่พอ) */
.coupon-card--empty { flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 108px; border: 1.5px dashed #cbd5e1; background: #f1f5f9; box-shadow: none; color: #94a3b8; font-size: 11px; font-weight: 600; }
.coupon-card--empty i { font-size: 20px; }

@media (max-width: 992px) {
    .coupon-grid { gap: 10px; }
    .coupon-card { flex-basis: calc((100% - 20px) / 2.4); }
}
@media (max-width: 576px) {
    .coupon-grid { margin: 0 -20px; padding: 0 20px 4px; }
    .coupon-card { flex-basis: 78%; }
    .coupon-value-side { flex-basis: 56px; }
    .coupon-value { font-size: 13px; }
}

/* === ชุมชนของเรา (Join Our Community) === */
/* เต็มความกว้างจอ (ชนขอบซ้าย-ขวา) ด้วยเทคนิคดันออกนอก .container ที่ห่ออยู่ */
.community-section { position: relative; left: 50%; right: 50%; width: 100vw; margin-left: -50vw; margin-right: -50vw; margin-top: 40px; overflow: hidden; }
.community-bg { position: absolute; inset: 0; z-index: 0; }
.community-bg-slide { position: absolute; inset: 0; background-size: cover; background-position: left top; opacity: 0; filter: brightness(0.88) saturate(1.08); transform: scale(1.02); transition: opacity 1.8s ease; }
.community-bg-slide.active { opacity: 1; }
/* ไล่เฉดจากซ้าย (โปร่งกว่า ให้เห็นภาพเต็มๆ) ไปทางขวา (ทึบกว่า คุมโทนหลังการ์ด) */
.community-bg-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 51, 86, 0.32) 0%, rgba(10, 51, 86, 0.5) 40%, rgba(10, 51, 86, 0.82) 100%); }
.community-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 36px; align-items: center; padding: 56px 20px; }
.community-title { margin: 0 0 16px; color: #ffffff; font-size: 3.2rem; font-weight: 700; line-height: 1.25; letter-spacing: 0.5px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.5); }
.community-desc { margin: 0; color: rgba(255, 255, 255, 0.92); font-size: 14.5px; line-height: 1.7; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.community-carousel-wrap { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; }
.community-nav-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #ffffff; font-size: 16px; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease; }
.community-nav-btn:hover { background: #ffffff; color: var(--primary); transform: translateY(-1px); }
.community-track { flex: 1 1 auto; display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; min-width: 0; }
.community-track::-webkit-scrollbar { display: none; }
.community-card { flex: 0 0 calc((100% - 40px) / 2); scroll-snap-align: start; display: block; border-radius: 14px; overflow: hidden; background: var(--white); color: inherit; text-decoration: none; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.community-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2); }
.community-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; }
.community-card-source { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--dark); }
.community-card-source i { color: var(--accent); }
.community-card-img { aspect-ratio: 3 / 4; background: var(--light-bg); }
.community-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.community-card-body { padding: 14px 16px 18px; }
.community-card-text { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--dark); }
.community-card-time { font-size: 12.5px; color: var(--text-muted, #64748b); }
.community-empty { margin: 0; padding: 24px; color: rgba(255, 255, 255, 0.85); font-size: 14px; }

@media (max-width: 992px) {
    .community-inner { grid-template-columns: 1fr; gap: 24px; padding: 40px 20px; }
    .community-title { font-size: 26px; }
    .community-card { flex-basis: calc((100% - 20px) / 2); }
}
@media (max-width: 576px) {
    .community-inner { padding: 32px 20px; }
    .community-nav-btn { width: 36px; height: 36px; font-size: 14px; }
    .community-track { margin: 0 -20px; padding: 0 20px 4px; }
    .community-card { flex-basis: 78%; }
}

/* === 10. Member Login / Register (member-login.php เท่านั้น) === */
.auth-page-main { padding: 48px 20px 90px; }
.auth-card { max-width: 460px; margin: 0 auto; padding: 32px 28px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); border: 1px solid var(--border); }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 26px; padding: 4px; border-radius: 999px; background: var(--light-bg); }
.auth-tab-btn { flex: 1 1 auto; padding: 10px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--text-muted); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s, color 0.2s; }
.auth-tab-btn.is-active { background: var(--primary); color: #ffffff; box-shadow: 0 4px 10px rgba(15, 76, 129, 0.25); }
.auth-panel { display: none; }
.auth-panel.is-active { display: block; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; margin-bottom: 6px; color: var(--dark); font-size: 13.5px; font-weight: 600; }
.auth-input { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--light-bg); color: var(--dark); font-family: inherit; font-size: 14px; transition: border-color 0.2s, background 0.2s; }
.auth-input:focus { outline: none; border-color: var(--primary); background: var(--white); }
.auth-level-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-level-btn { padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--light-bg); color: var(--dark); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.auth-level-btn.is-active { border-color: var(--primary); background: var(--primary); color: #ffffff; }
.auth-submit-btn { width: 100%; margin-top: 6px; padding: 13px; border: 0; border-radius: 10px; background: var(--primary); color: #ffffff; font-family: inherit; font-size: 15px; font-weight: 700; text-align: center; cursor: pointer; transition: background 0.2s; }
.auth-submit-btn:hover { background: var(--primary-dark); }
.auth-alert { margin-bottom: 16px; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; }
.auth-alert--error { background: #fee2e2; color: #b91c1c; }
.auth-alert--success { background: #dcfce7; color: #15803d; }
.auth-switch-hint { margin-top: 18px; text-align: center; color: var(--text-muted); font-size: 13px; }
.auth-switch-hint button { border: 0; background: transparent; padding: 0; color: var(--primary); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: underline; }
.auth-logged-in { text-align: center; }

/* คั่นด้วยเส้น + ปุ่มเข้าสู่ระบบผ่านโซเชียล */
.auth-divider { position: relative; display: flex; align-items: center; justify-content: center; margin: 22px 0 16px; text-align: center; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--border); }
.auth-divider span { flex: 0 0 auto; padding: 0 12px; color: var(--text-muted); font-size: 12.5px; white-space: nowrap; }
.auth-social-row { display: flex; justify-content: center; gap: 14px; }
.auth-social-btn { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 1px solid var(--border); border-radius: 50%; background: var(--white); color: var(--dark); font-size: 19px; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.auth-social-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.auth-social-btn--google:hover { border-color: #ea4335; color: #ea4335; }
.auth-social-btn--facebook:hover { border-color: #1877f2; color: #1877f2; }
.auth-social-btn--line:hover { border-color: #06c755; color: #06c755; }


@media (max-width: 576px) {
    .auth-card { padding: 26px 20px; }
}
