/* ============================================
   ROOT & RESET
============================================ */
:root {
  --primary: #2a3d54;
  --primary-light: #3a5a7a;
  --primary-dark: #1a2a3a;
  --accent: #e67e22;
  --accent-light: #f39c12;
  --accent-gradient: linear-gradient(135deg, #e67e22, #f1c40f);
  --bg-body: #f4f6f9;
  --bg-card: #ffffff;
  --text-dark: #1a1a2e;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border-color: #e5e7eb;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-dark);
  line-height: 1.6;
  padding-bottom: 80px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   BRAND SELECTOR
============================================ */
.brand-section {
  padding: 40px 0 20px;
}

.brand-section h2 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--primary);
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
}

.brand-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.brand-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.15);
}

.brand-logo-wrap {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-wrap img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  font-weight: 700;
  font-size: 1rem;
  margin-top: 8px;
}

.brand-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.brand-card .check-mark {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--accent);
  font-size: 1.2rem;
}

.brand-card.active .check-mark {
  display: block;
}

/* ============================================
   TOOLBAR
============================================ */
.toolbar {
  padding: 16px 0 8px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.search-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-body);
  border-radius: 50px;
  padding: 0 18px;
  border: 2px solid transparent;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--accent);
  background: #fff;
}

.search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  border: none;
  background: transparent;
  padding: 12px 0;
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  color: var(--text-dark);
}

.search-box input::placeholder {
  color: var(--text-light);
}

.color-count-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  background: var(--bg-body);
  padding: 6px 16px;
  border-radius: 50px;
}

.color-count-badge strong {
  color: var(--text-dark);
}

.category-bar {
  display: flex;
  gap: 8px;
  padding: 12px 0 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.category-bar::-webkit-scrollbar {
  height: 4px;
}

.category-bar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

.category-btn {
  padding: 6px 18px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.category-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.category-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================
   COLOR GRID
============================================ */
.color-grid-wrapper {
  padding: 24px 0 40px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.color-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.color-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.color-card-swatch {
  height: 120px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-card-swatch .color-hex-label {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: var(--transition);
}

.color-card:hover .color-card-swatch .color-hex-label {
  opacity: 1;
}

.color-card-info {
  padding: 14px 16px 16px;
}

.color-card-info .color-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.color-card-info .color-code {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.color-card-info .color-brand-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  background: var(--bg-body);
  padding: 2px 10px;
  border-radius: 20px;
  margin-top: 6px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 1.1rem;
}

.load-more-wrapper {
  text-align: center;
  margin-top: 30px;
}

.load-more-btn {
  padding: 12px 40px;
  border-radius: 50px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(42, 61, 84, 0.25);
}

.load-more-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(42, 61, 84, 0.35);
}

/* ============================================
   PREVIEW POPUP
============================================ */
.preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.preview-overlay.open {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(40px) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.preview-modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.preview-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
}

.preview-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.preview-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.preview-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.preview-modal-body {
  padding: 24px;
}

.preview-wall-container {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #e5e7eb;
}

.preview-wall-color {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.preview-wall-fg {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.preview-color-info {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--bg-body);
  border-radius: var(--radius-sm);
}

.preview-color-swatch {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}

.preview-color-details h4 {
  font-size: 1.05rem;
  font-weight: 700;
}

.preview-color-details p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.preview-brand-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--primary);
  color: #fff;
  padding: 2px 12px;
  border-radius: 20px;
  margin-top: 4px;
}

/* Brightness Control */
.brightness-control {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 4px;
}

.brightness-control label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brightness-control input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  background: var(--border-color);
  height: 4px;
  border-radius: 10px;
  outline: none;
}

.brightness-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
}

.brightness-control input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* ============================================
   SPINNER
============================================ */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.spinner-overlay.active {
  display: flex;
}

.spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid var(--border-color);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   MOBILE BAR
============================================ */
.mobile-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-dark);
  padding: 10px 20px;
  display: none;
  z-index: 200;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px;
  border-radius: 50px;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(230, 126, 34, 0.4);
}

.mobile-bar a:hover {
  transform: scale(1.02);
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .color-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .color-count-badge {
    text-align: center;
  }

  .mobile-bar {
    display: block;
  }

  .preview-modal {
    max-height: 95vh;
  }

  .preview-modal-body {
    padding: 16px;
  }

  .preview-color-info {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .color-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }

  .color-card-swatch {
    height: 90px;
  }

  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .brand-card {
    padding: 14px 10px;
  }
}

/* ============================================
   SEO İÇERİK BÖLÜMÜ
============================================ */
.seo-content-section {
  padding: 60px 0 40px;
  background: #f8f9fa;
  border-top: 1px solid #e5e7eb;
}

.seo-content-inner {
  max-width: 900px;
  margin: 0 auto;
}

.seo-content-inner h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #2a3d54;
  margin-bottom: 20px;
  line-height: 1.3;
}

.seo-content-inner h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2a3d54;
  margin: 32px 0 14px;
  line-height: 1.4;
}

.seo-content-inner p {
  font-size: 1rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 16px;
}

.seo-content-inner strong {
  color: #2a3d54;
}

@media (max-width: 768px) {
  .seo-content-section {
    padding: 40px 0 30px;
  }
  .seo-content-inner h2 {
    font-size: 1.5rem;
  }
  .seo-content-inner h3 {
    font-size: 1.1rem;
  }
  .seo-content-inner p {
    font-size: 0.95rem;
  }
}