/* ========================================
   GUNPLA@CC — Design System
   ======================================== */

:root {
  --bg-primary: #1a1a2e;
  --bg-surface: #16213e;
  --bg-surface-hover: #1c2a4a;
  --accent-red: #E60012;
  --accent-red-hover: #ff1a2e;
  --tag-accent: #e94560;
  --text-primary: #ffffff;
  --text-secondary: #c8c8d0;
  --text-muted: #9a9ab0;
  --border-color: #2a2a4a;
  --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --header-height: 64px;
  --max-width: 1200px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-red);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--accent-red-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   Header
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo img {
  height: 40px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.header-nav a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

/* Language Dropdown */
.lang-dropdown {
  position: relative;
  display: inline-block;
}

.lang-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-family);
  transition: all 0.2s ease;
}
.lang-toggle:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  min-width: 160px;
  box-shadow: var(--shadow);
  z-index: 1001;
  overflow: hidden;
}
.lang-menu.open {
  display: block;
}
.lang-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font-family);
  transition: background 0.15s ease;
}
.lang-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

/* Mobile hamburger */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  .header-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 12px 24px;
    gap: 4px;
  }
  .header-nav.open {
    display: flex;
  }
  .header-nav a {
    width: 100%;
    padding: 12px 14px;
  }
  .lang-dropdown {
    width: 100%;
  }
  .lang-toggle {
    width: 100%;
    text-align: left;
  }
  .lang-menu {
    right: 0;
    left: 0;
  }
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  width: 100%;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 20px;
  line-height: 1.1;
}
.hero h1 .red { color: var(--accent-red); }
.hero h1 .white { color: var(--text-primary); }
.hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 12px;
  line-height: 1.6;
}
.hero .subtitle-small {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* CTA Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent-red);
  color: var(--text-primary);
}
.btn-primary:hover {
  background: var(--accent-red-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(230, 0, 18, 0.3);
}
.btn-outline {
  background: transparent;
  color: var(--accent-red);
  border: 2px solid var(--accent-red);
}
.btn-outline:hover {
  background: var(--accent-red);
  color: var(--text-primary);
}
.btn-telegram {
  background: #0088cc;
  color: white;
}
.btn-telegram:hover {
  background: #0099dd;
  color: white;
  transform: translateY(-1px);
}

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.2s ease;
}
.card:hover {
  border-color: rgba(230, 0, 18, 0.3);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Section Styles */
.section {
  padding: 48px 0;
}
.section + .section {
  border-top: 1px solid var(--border-color);
}
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 640px;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

/* Grading Table */
.grading-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}
.grading-table th,
.grading-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.grading-table th {
  color: var(--accent-red);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.grading-table td {
  color: var(--text-secondary);
}
.grading-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Grade Badge */
.grade-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}
.grade-sealed { background: #1b5e20; color: #a5d6a7; }
.grade-mint { background: #1a472a; color: #81c784; }
.grade-opened { background: #e65100; color: #ffcc80; }
.grade-built { background: #4a148c; color: #ce93d8; }
.grade-missing { background: #b71c1c; color: #ef9a9a; }

/* Tags */
.tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(233, 69, 96, 0.15);
  color: var(--tag-accent);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Source List */
.source-list {
  list-style: none;
}
.source-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}
.source-list li:last-child {
  border-bottom: none;
}
.source-list a {
  font-weight: 600;
  font-size: 1.05rem;
}
.source-list .source-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Inline Link Arrow */
.link-arrow {
  color: var(--accent-red);
  font-weight: 600;
  transition: gap 0.2s ease;
}
.link-arrow:hover {
  gap: 6px;
}

/* Telegram Section */
.telegram-cta {
  text-align: center;
  padding: 48px 32px;
  background: linear-gradient(135deg, var(--bg-surface) 0%, #1a2744 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}
.telegram-cta h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.telegram-cta p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Gallery Grid & Cards */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
.gallery-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
}
.gallery-card:hover {
  border-color: rgba(230, 0, 18, 0.4);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
  color: var(--text-primary);
}
.gallery-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.gallery-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-card:hover .gallery-card-img img {
  transform: scale(1.05);
}
.gallery-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.gallery-card-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.gallery-card-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}
.gallery-card-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(233, 69, 96, 0.15);
  color: var(--tag-accent);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  align-self: flex-start;
}
.gallery-card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-red);
}
.gallery-placeholder {
  background: var(--bg-surface);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
/* ========================================
   PHOTO GALLERY (3-image grid)
   ======================================== */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.photo-gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
  border: 1px solid var(--border-color);
}
.photo-gallery img:hover { transform: scale(1.02); }
@media (max-width: 768px) {
  .photo-gallery { grid-template-columns: 1fr; }
  .photo-gallery img { height: auto; max-height: 400px; }
}

/* Lightbox Overlay */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

/* SKU badge */
.sku-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.sku-badge strong {
  color: var(--text-secondary);
  font-family: var(--font-family);
  letter-spacing: 0;
}

/* ========================================
   DETAIL PAGES
   ======================================== */
.detail-hero {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 32px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.detail-hero-img {
  width: 100%;
  height: auto;
  display: block;
}
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.detail-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}
.detail-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

/* Chatbot Floating Button */
.chatbot-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
}
.chatbot-fab button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-red);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(230, 0, 18, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.chatbot-fab button:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(230, 0, 18, 0.5);
}
.chatbot-fab button svg {
  width: 28px;
  height: 28px;
  fill: white;
}

/* Content Pages */
.content-page h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.content-page h2:first-child {
  margin-top: 0;
}
.content-page p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}
.content-page ul, .content-page ol {
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 24px;
}
.content-page li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.content-page strong {
  color: var(--text-primary);
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
.footer-brand img {
  height: 36px;
  margin-bottom: 12px;
}
.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 300px;
}
.footer-links h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-links a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: var(--text-primary);
}
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.footer-built {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Process Steps */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.process-step {
  text-align: center;
  padding: 24px 16px;
}
.process-step .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(230, 0, 18, 0.15);
  color: var(--accent-red);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.process-step h4 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.process-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Info box */
.info-box {
  background: rgba(230, 0, 18, 0.08);
  border-left: 3px solid var(--accent-red);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
}
.info-box p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* ========================================
   CHATBOT PANEL
   ======================================== */

.chat-panel {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  max-height: 520px;
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 9999;
  overflow: hidden;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #0f3460;
  border-bottom: 1px solid #1a1a2e;
}
.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #E60012;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.chat-title {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
}
.chat-status {
  font-size: 0.75rem;
  color: #4ecca3;
}
.chat-close {
  background: none;
  border: none;
  color: #888;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.chat-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: 360px;
}
.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg.bot { justify-content: flex-start; }
.chat-msg-content {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.chat-msg.user .chat-msg-content {
  background: #E60012;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.bot .chat-msg-content {
  background: #0f3460;
  color: #e0e0e0;
  border-bottom-left-radius: 4px;
}
.chat-msg-content p { margin: 0 0 8px; }
.chat-msg-content p:last-child { margin-bottom: 0; }
.chat-msg-content a { color: #e94560; text-decoration: underline; }
.chat-hint { font-size: 0.8rem; color: #888; }
.chat-input-area {
  display: flex;
  padding: 12px;
  border-top: 1px solid #0f3460;
  gap: 8px;
}
.chat-input-area input {
  flex: 1;
  background: #1a1a2e;
  border: 1px solid #0f3460;
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}
.chat-input-area input:focus { border-color: #E60012; }
.chat-input-area button {
  background: #E60012;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.chat-input-area button:hover { background: #ff1a2d; }
.typing-dots span {
  animation: blink 1.4s infinite both;
  font-size: 1.4rem;
  color: #888;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,80%,100% { opacity: 0; } 40% { opacity: 1; } }

@media (max-width: 480px) {
  .chat-panel { right: 8px; left: 8px; width: auto; bottom: 80px; }
}
