/* Sunny Horizon - Mobile Gaming Accessories Design System
   Brazilian smartphone gaming specialists
   Warm sunset + precision control aesthetic */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* Core palette - warm horizon sunset meets technical precision */
  --sunset: #F4A261;
  --sunset-dark: #D9773F;
  --teal: #2A9D8F;
  --teal-dark: #1F766B;
  --coral: #E76F51;
  --deep: #1A2F38;
  --slate: #264653;
  --slate-light: #3D5663;
  --sand: #F8F1E9;
  --sand-dark: #EDE4D7;
  --cool: #A8DADC;
  --cool-dark: #7FB3B5;
  --white: #FFFFFF;
  --offwhite: #FAF7F2;
  --text: #1F2A32;
  --text-light: #5A6A75;
  --text-muted: #7A8A95;
  --border: #D9D1C4;
  --success: #2A9D8F;
  --warning: #D9773F;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Shadows - physical product feel */
  --shadow-sm: 0 1px 3px rgba(26,47,56,0.08);
  --shadow-md: 0 4px 12px rgba(26,47,56,0.1);
  --shadow-lg: 0 10px 30px rgba(26,47,56,0.12);
  --shadow-product: 0 8px 25px -4px rgba(26,47,56,0.15), 0 4px 10px -2px rgba(26,47,56,0.08);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--offwhite);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--deep);
}
h1 { font-size: 42px; letter-spacing: -0.02em; }
h2 { font-size: 30px; letter-spacing: -0.015em; }
h3 { font-size: 21px; }
h4 { font-size: 17px; font-weight: 600; }

p { margin: 0 0 var(--space-md); }
.lead { font-size: 18px; color: var(--text-light); max-width: 620px; }

a { color: var(--teal); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--teal-dark); }

/* Container - mobile first */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}
@media (min-width: 640px) { .container { padding: 0 var(--space-lg); } }
@media (min-width: 1024px) { .container { padding: 0 var(--space-xl); } }

/* Buttons - controller inspired */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.23, 1.0, 0.32, 1);
  white-space: nowrap;
  min-height: 44px; /* touch target */
}
.btn:focus-visible { outline: 2px solid var(--sunset); outline-offset: 2px; }

.btn-primary {
  background: var(--sunset);
  color: var(--deep);
  box-shadow: 0 2px 8px rgba(244,162,97,0.35);
}
.btn-primary:hover {
  background: var(--sunset-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(244,162,97,0.4);
}

.btn-secondary {
  background: var(--teal);
  color: var(--white);
}
.btn-secondary:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--deep);
  border: 2px solid var(--deep);
}
.btn-outline:hover {
  background: var(--deep);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  padding: 10px 18px;
}
.btn-ghost:hover {
  background: var(--sand-dark);
}

/* Cards - physical product language */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s cubic-bezier(0.23,1,0.32,1), box-shadow 0.25s;
  overflow: hidden;
  border: 1px solid var(--border);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Product cards - tactile */
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-product);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
  transform: translateY(-3px);
}
.product-card .image {
  position: relative;
  background: var(--sand);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.product-card .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.23,1,0.32,1);
}
.product-card:hover .image img { transform: scale(1.035); }

.product-card .info {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card .tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}
.tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--sand-dark);
  color: var(--text-light);
  letter-spacing: 0.3px;
}
.tag-hot { background: #FEE2C7; color: #9F5A1F; }
.tag-cool { background: #C8E6E3; color: #1F5F57; }

.product-card h3 {
  font-size: 16px;
  margin: 0 0 4px;
  line-height: 1.2;
}
.product-card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 12px;
}
.product-card .price {
  font-size: 19px;
  font-weight: 700;
  color: var(--deep);
}
.product-card .rating {
  font-size: 13px;
  color: var(--sunset);
  display: flex;
  align-items: center;
  gap: 3px;
}
.product-card .rating span { color: var(--text-muted); font-size: 12px; }

.product-card .actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* Horizon motif - signature element */
.horizon {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--sunset) 20%, var(--teal) 80%, transparent);
  margin: var(--space-xl) 0;
}
.horizon-thick {
  height: 3px;
  background: linear-gradient(to right, var(--sunset), var(--teal));
  border-radius: 3px;
  margin: var(--space-lg) 0;
}

/* Game type badges - niche specific */
.game-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--deep);
  color: var(--white);
}
.game-badge.moba { background: #3D5A5F; }
.game-badge.br { background: #5C3A2E; }
.game-badge.fps { background: #3D2E5C; }
.game-badge.rpg { background: #2E4A3D; }

/* Thermal indicator */
.thermal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
.thermal .bar {
  width: 48px;
  height: 4px;
  background: #E5DDD0;
  border-radius: 999px;
  overflow: hidden;
}
.thermal .bar span {
  display: block;
  height: 100%;
  background: linear-gradient(to right, var(--teal), var(--sunset));
}

/* Sections */
.section {
  padding: var(--space-2xl) 0;
}
.section-header {
  margin-bottom: var(--space-xl);
}
.section-header h2 {
  margin-bottom: 8px;
}
.section-header .subtitle {
  color: var(--text-light);
  font-size: 16px;
  max-width: 520px;
}

/* Responsive grids */
.grid {
  display: grid;
  gap: var(--space-lg);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

@media (max-width: 640px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile navigation */
.nav-mobile {
  display: none;
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-mobile { display: block; }
}

/* Header */
header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo img { height: 36px; }
.logo-text {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--deep);
}
.logo-text span { color: var(--sunset); }

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.nav-links a:hover { color: var(--sunset); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(26,47,56,0.6);
  z-index: 2000;
  display: none;
}
.mobile-drawer.open { display: block; }
.mobile-drawer-content {
  background: var(--white);
  width: 280px;
  height: 100%;
  padding: 24px 20px;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}
.mobile-drawer-content a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-drawer-content a:last-child { border: none; }

/* Footer */
footer {
  background: var(--deep);
  color: #A9B8C4;
  padding: var(--space-2xl) 0 var(--space-lg);
  font-size: 14px;
}
footer h4 {
  color: var(--white);
  font-size: 14px;
  margin-bottom: 12px;
  font-family: var(--font-body);
  font-weight: 600;
}
footer a {
  display: block;
  color: #A9B8C4;
  padding: 4px 0;
  font-size: 13px;
}
footer a:hover { color: var(--sunset); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #32454F;
  font-size: 12px;
  color: #7D8C97;
}

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-lg); }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-lg); }

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--deep);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 3000;
}
.toast.show { display: flex; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(26,47,56,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  padding: 20px;
}
.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-body { padding: 20px; }
.modal-footer {
  padding: 16px 20px;
  background: var(--sand);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Table improvements */
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--sand);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-light);
}
tr:last-child td { border-bottom: none; }

/* Form */
input, select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font-body);
  background: var(--white);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--sunset);
  box-shadow: 0 0 0 3px rgba(244,162,97,0.15);
}

/* Responsive typography */
@media (max-width: 640px) {
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  .section { padding: 40px 0; }
  .btn { padding: 11px 20px; font-size: 13px; }
}