/* ============================================
   TOCA DA CAPI - TEMA ESCURO 2026
   ============================================ */

/* CSS Variables */
:root {
  --bg-primary: #0F0F1A;
  --bg-secondary: #1A1A2E;
  --bg-card: #252540;
  --border-color: #3A3A5C;

  --accent-orange: #FF6B35;
  --accent-orange-hover: #E55A2B;
  --accent-green: #00D4AA;
  --accent-green-hover: #00B894;

  --text-primary: #FFFFFF;
  --text-secondary: #A0A0B8;
  --text-muted: #6B6B80;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(255, 107, 53, 0.3);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 32px;
  }
}

/* ============================================
   HEADER
   ============================================ */

.header {
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
}

.brand__text {
  display: flex;
  flex-direction: column;
}

.brand__name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.brand__tagline {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-telegram {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0088cc, #00a8e8);
  color: white;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.btn-telegram:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.4);
}

.btn-telegram svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .btn-telegram span {
    display: none;
  }

  .btn-telegram {
    padding: 10px;
  }
}

/* ============================================
   HERO
   ============================================ */

.hero {
  padding: 40px 0 32px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 107, 53, 0.1) 0%, transparent 100%);
}

.hero__title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) {
  .hero__title {
    font-size: 48px;
  }
}

.hero__subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero__stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-green);
}

.hero__stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero__divider {
  width: 1px;
  height: 40px;
  background: var(--border-color);
}

@media (max-width: 480px) {
  .hero__divider {
    display: none;
  }
}

/* ============================================
   SEARCH
   ============================================ */

.search-section {
  padding: 16px 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 15px;
  transition: all var(--transition-normal);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-muted);
}

/* ============================================
   CATEGORY BAR
   ============================================ */

.category-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  position: sticky;
  top: 73px;
  z-index: 90;
}

.category-bar__container {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}

.category-bar__container::-webkit-scrollbar {
  display: none;
}

.category-btn {
  flex-shrink: 0;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.category-btn:hover {
  border-color: var(--accent-orange);
  color: var(--text-primary);
}

.category-btn.active {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: white;
  box-shadow: var(--shadow-glow);
}

/* ============================================
   CONTROLS
   ============================================ */

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.controls__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.controls__count {
  font-size: 14px;
  color: var(--text-muted);
}

.controls__count strong {
  color: var(--text-primary);
}

.sort-select {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.sort-select:focus {
  outline: none;
  border-color: var(--accent-orange);
}

/* ============================================
   PRODUCTS GRID
   ============================================ */

.products-section {
  padding: 16px 0 40px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

@media (min-width: 1400px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ============================================
   PRODUCT CARD
   ============================================ */

.product-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-orange);
}

.product-card__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-card);
  overflow: hidden;
}

.product-card__image-container {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image {
  transform: scale(1.08);
}

.product-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge--store-ml {
  background: #FFE600;
  color: #000;
}

.badge--store-shopee {
  background: #EE4D2D;
  color: #fff;
}

.badge--store-amazon {
  background: #FF9900;
  color: #000;
}

.badge--store-magalu {
  background: #0086FF;
  color: #fff;
}

.badge--discount {
  background: var(--accent-green);
  color: #000;
  position: absolute;
  bottom: 12px;
  left: 12px;
}

.product-card__content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  justify-content: space-between;
}

.product-card__title-link {
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
}

.product-card__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  transition: color var(--transition-fast);
}

.product-card__title-link:hover .product-card__title {
  color: var(--accent-orange);
}

.product-card__prices {
  margin-top: auto;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-card__current-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-green);
}

.product-card__original-price {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card__cta {
  display: none;
}

/* ============================================
   LOAD MORE
   ============================================ */

.load-more {
  text-align: center;
  padding: 40px 0;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-load-more:hover {
  border-color: var(--accent-orange);
  background: var(--bg-secondary);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  margin-top: 40px;
}

.footer__content {
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.footer__logo {
  width: 32px;
  height: 32px;
  opacity: 0.8;
}

.footer__name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.footer__email {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.footer__email code {
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: inherit;
}

.footer__disclaimer {
  max-width: 700px;
  margin: 0 auto;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer__disclaimer p {
  margin-bottom: 8px;
}

.footer__disclaimer strong {
  color: var(--text-secondary);
}

/* ============================================
   LOADING STATE
   ============================================ */

.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.loading__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-state__icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state__text {
  color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
  .hero__title {
    font-size: 28px;
  }

  .hero__meta {
    gap: 16px;
  }

  .hero__stat-value {
    font-size: 20px;
  }

  .category-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .product-card__current-price {
    font-size: 20px;
  }
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}