/* ฟอนต์ภาษาไทยและอังกฤษสุดพรีเมียม */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ตัวแปรสีและดีไซน์โทนน้ำเงินพรีเมียม (Midnight Cyber Blue Theme) */
:root {
  --bg-main: #0b0f19;
  --bg-surface: #121829;
  --bg-card: rgba(22, 30, 53, 0.65);
  --bg-card-hover: rgba(26, 38, 68, 0.85);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(59, 130, 246, 0.25);
  
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.5);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  
  --price-discount: #fbbf24;
  --price-original: #64748b;
  --star-color: #f59e0b;
  
  /* สีกลุ่ม MBTI */
  --color-analysts: #c084fc;   /* ม่วง */
  --color-diplomats: #34d399;   /* เขียวมิ้นต์ */
  --color-sentinels: #60a5fa;   /* ฟ้า */
  --color-explorers: #fbbf24;   /* ส้มเหลือง */
  
  --font-family: 'Outfit', 'Noto Sans Thai', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

/* รีเซ็ตสไตล์เริ่มต้น */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
  -webkit-tap-highlight-color: transparent;
}

/* ตั้งค่าหน้าหลัก */
body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(59, 130, 246, 0.12) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* กำหนดแถบเลื่อนเฉพาะตัว (Custom Scrollbar) */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border: 2px solid var(--bg-main);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ภาชนะควบคุมขนาดหน้ากระดาษ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   ส่วนหัวและเมนูบาร์ (Navbar & Header)
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.logo-icon {
  font-size: 28px;
  background: linear-gradient(135deg, var(--cyan), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px var(--cyan-glow));
}

.logo-img {
  height: 40px;
  width: auto;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 2px 8px rgba(6, 182, 212, 0.3));
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
}

.logo-text span {
  color: var(--cyan);
}

.btn-line-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #06c755;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  box-shadow: 0 4px 10px rgba(6, 199, 85, 0.25);
}

.btn-line-header:hover {
  background: #05b34c;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(6, 199, 85, 0.45);
}

.btn-line-header i {
  font-size: 18px;
}

/* ==========================================================================
   Hero Section (ส่วนแสดงโปรโมชั่นหลัก)
   ========================================================================== */
.hero-section {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
}

.hero-badge {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 20px;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  background: linear-gradient(to right, #ffffff, #93c5fd, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 30px;
}

.hero-promo-banner {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
  border: 1px solid var(--border-color);
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.02);
}

.hero-promo-banner i {
  color: var(--cyan);
  font-size: 20px;
  animation: pulse 1.5s infinite;
}

.hero-promo-text {
  font-size: 15px;
  font-weight: 500;
}

.hero-promo-text strong {
  color: var(--price-discount);
  font-size: 18px;
  text-decoration: underline;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 5px var(--cyan)); }
  100% { transform: scale(1); opacity: 0.9; }
}

/* ==========================================================================
   ระบบการกรองและค้นหา (Search & Filters Section)
   ========================================================================== */
.controls-section {
  margin-bottom: 40px;
  background: rgba(18, 24, 41, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ค้นหา */
.search-wrapper {
  position: relative;
  width: 100%;
}

.search-wrapper i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dark);
  font-size: 18px;
  transition: var(--transition-fast);
}

.search-input {
  width: 100%;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--border-color);
  padding: 16px 16px 16px 50px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 15px;
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--cyan);
  background: rgba(11, 15, 25, 0.9);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.search-input:focus + i {
  color: var(--cyan);
}

/* ปุ่มกรองประเภท */
.filter-group-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dark);
  font-weight: 700;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--text-muted);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* แสดงจำนวนรายการ */
.results-meta {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.results-meta strong {
  color: var(--cyan);
}

/* ==========================================================================
   ตารางการ์ดหนังสือ (Book Grid & Cards)
   ========================================================================== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
  margin-bottom: 80px;
}

.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  backdrop-filter: blur(10px);
}

.book-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: 0 15px 30px rgba(59, 130, 246, 0.15);
}

/* ป้ายลดราคาหัวการ์ด */
.card-badge-group {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.badge {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-sale {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: white;
  box-shadow: 0 4px 8px rgba(225, 29, 72, 0.3);
}

/* ปกหนังสือในหน้าหลัก */
.book-cover-container {
  position: relative;
  aspect-ratio: 1 / 1.35;
  background: #161c2e;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.book-card:hover .book-cover {
  transform: scale(1.05);
}

/* เอฟเฟกต์โฮเวอร์ทับรูปภาพ */
.cover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.65);
  backdrop-filter: blur(3px);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  z-index: 2;
}

.book-card:hover .cover-overlay {
  opacity: 1;
}

.quick-view-btn {
  background: white;
  color: var(--bg-main);
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(15px);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.book-card:hover .quick-view-btn {
  transform: translateY(0);
}

.quick-view-btn:hover {
  background: var(--cyan);
  color: white;
  box-shadow: 0 5px 15px var(--cyan-glow);
}

/* รายละเอียดหนังสือในกล่องข้อมูล */
.book-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.book-type {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 4px;
}

.book-type.analysts {
  color: var(--color-analysts);
  background: rgba(192, 132, 252, 0.12);
}

.book-type.diplomats {
  color: var(--color-diplomats);
  background: rgba(52, 211, 153, 0.12);
}

.book-type.sentinels {
  color: var(--color-sentinels);
  background: rgba(96, 165, 250, 0.12);
}

.book-type.explorers {
  color: var(--color-explorers);
  background: rgba(251, 191, 36, 0.12);
}

.book-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 44px;
}

.book-title:hover {
  color: var(--cyan);
}

/* เรตติ้งและดาว */
.rating-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.stars {
  display: flex;
  gap: 2px;
}

.star-filled {
  color: var(--star-color);
  font-size: 12px;
}

.star-empty {
  color: var(--text-dark);
  font-size: 12px;
}

.rating-value {
  font-size: 11px;
  color: var(--text-muted);
}

/* ส่วนแสดงราคา */
.price-box {
  margin-top: auto;
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.price-original {
  font-size: 14px;
  color: var(--price-original);
  text-decoration: line-through;
}

.price-discount {
  font-size: 24px;
  font-weight: 800;
  color: var(--price-discount);
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.1);
}

/* ปุ่มรายละเอียดและลิงก์ Line */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-line {
  width: 100%;
  background: #06c755;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 10px rgba(6, 199, 85, 0.15);
}

.btn-line:hover {
  background: #05b34c;
  box-shadow: 0 6px 15px rgba(6, 199, 85, 0.35);
  transform: translateY(-1px);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 5px 15px var(--primary-glow);
  filter: brightness(1.1);
}

.btn-primary:disabled {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

/* ข้อมูลเมื่อค้นหาไม่เจอ */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.no-results i {
  font-size: 48px;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.no-results p {
  font-size: 16px;
  color: var(--text-muted);
}

/* ลบสไตล์ตะกร้าออกตามต้องการ */

/* ==========================================================================
   ป๊อปอัพแสดงรายละเอียดหนังสือ (Details Modal)
   ========================================================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
  padding: 20px;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  position: relative;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: var(--transition-smooth);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  background: rgba(11, 15, 25, 0.6);
}

/* โครงสร้าง Modal Layout */
.modal-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 30px;
  padding: 30px;
}

.modal-image-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #161c2e;
  aspect-ratio: 1 / 1.35;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  height: fit-content;
}

.modal-book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-sale-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: white;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.4);
}

/* ข้อมูลขวาของ Modal */
.modal-details-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.modal-book-type {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 4px;
  width: fit-content;
  margin-bottom: 12px;
}

.modal-book-type.analysts {
  color: var(--color-analysts);
  background: rgba(192, 132, 252, 0.15);
}

.modal-book-type.diplomats {
  color: var(--color-diplomats);
  background: rgba(52, 211, 153, 0.15);
}

.modal-book-type.sentinels {
  color: var(--color-sentinels);
  background: rgba(96, 165, 250, 0.15);
}

.modal-book-type.explorers {
  color: var(--color-explorers);
  background: rgba(251, 191, 36, 0.15);
}

.modal-book-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-price-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.modal-price-label {
  font-size: 15px;
  color: var(--text-muted);
}

.modal-price-discount {
  font-size: 30px;
  font-weight: 900;
  color: var(--price-discount);
}

.modal-price-original {
  font-size: 16px;
  color: var(--price-original);
  text-decoration: line-through;
}

.modal-divider {
  height: 1px;
  background: var(--border-color);
  margin: 15px 0;
  width: 100%;
}

.modal-description-box {
  margin-bottom: 20px;
}

.modal-description-box h4 {
  font-size: 15px;
  color: var(--cyan);
  margin-bottom: 8px;
  font-weight: 700;
}

.modal-description-box p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* คุณสมบัติทางสเปกของหนังสือ */
.modal-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 25px;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.spec-label {
  color: var(--text-dark);
}

.spec-label i {
  color: var(--primary);
  width: 16px;
  text-align: center;
}

.spec-val {
  color: var(--text-main);
  font-weight: 500;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-line-btn {
  flex-grow: 2;
  font-size: 16px;
  padding: 14px 24px;
  background: #06c755;
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.25);
  text-decoration: none;
}

.modal-line-btn:hover {
  background: #05b34c;
  box-shadow: 0 6px 18px rgba(6, 199, 85, 0.45);
}

.modal-close-action-btn {
  flex-grow: 1;
  font-size: 16px;
  padding: 14px 24px;
}

/* ==========================================================================
   หน้าต่างจำลองสถานะชำระเงินสำเร็จ (Checkout Success Dialog)
   ========================================================================== */
.success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
  padding: 20px;
}

.success-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.success-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 35px rgba(6, 182, 212, 0.15);
  width: 100%;
  max-width: 480px;
  padding: 40px;
  border-radius: var(--radius-lg);
  text-align: center;
  transform: scale(0.9);
  transition: var(--transition-smooth);
}

.success-overlay.active .success-card {
  transform: scale(1);
}

.success-icon {
  font-size: 64px;
  color: var(--color-diplomats);
  margin-bottom: 20px;
  filter: drop-shadow(0 0 10px rgba(52, 211, 153, 0.3));
  animation: scaleBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleBounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.success-card h2 {
  font-size: 24px;
  margin-bottom: 12px;
  font-weight: 800;
}

.success-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.order-summary-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
}

.summary-line:last-child {
  margin-bottom: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

.text-cyan {
  color: var(--cyan);
  font-size: 18px;
}

/* ==========================================================================
   ส่วนท้ายของเว็บไซต์ (Footer)
   ========================================================================== */
footer {
  background: #080c14;
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  color: var(--text-muted);
}

.footer-layout {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-logo-img {
  height: 35px;
  width: auto;
  border-radius: 6px;
}

.footer-info h4 {
  color: var(--text-main);
  font-size: 18px;
  margin-bottom: 0;
  font-weight: 700;
}

.footer-info h4 span {
  color: var(--cyan);
}

.footer-info p {
  font-size: 14px;
  line-height: 1.7;
  max-width: 450px;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition-fast);
}

.social-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-3px);
}

.footer-links h5 {
  color: var(--text-main);
  font-size: 15px;
  margin-bottom: 18px;
  font-weight: 700;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--cyan);
  padding-left: 4px;
}

.footer-copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dark);
}

/* ==========================================================================
   แอนิเมชันตอนเปิดการ์ด / รายการต่างๆ (Animations & Transitions)
   ========================================================================== */
.fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   การปรับตามขนาดหน้าจอ (Responsive Web Design)
   ========================================================================== */
@media (max-width: 992px) {
  .modal-layout {
    grid-template-columns: 280px 1fr;
    gap: 20px;
    padding: 20px;
  }
  
  .hero-title {
    font-size: 34px;
  }
}

@media (max-width: 768px) {
  .modal-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .modal-image-container {
    max-width: 260px;
    margin: 0 auto;
  }
  
  .controls-section {
    padding: 16px;
  }
  
  .footer-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .cart-drawer {
    width: 100%;
    right: -100%;
  }
  
  .hero-title {
    font-size: 28px;
  }
  
  .hero-promo-banner {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }
  
  .modal-specs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .hero-title {
    font-size: 24px;
  }
  
  .book-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-actions {
    flex-direction: column;
  }
}
