/**
 * EMPÓRIO BOM DEMAIS - STYLESHEET
 * Visual inspirado no Mercado Livre
 * Tipografia: Inter (corpo) + Montserrat (títulos)
 */

/* ============================================
   VARIÁVEIS CSS
   ============================================ */
:root {
  /* Cores principais (estilo Mercado Livre) */
  --primary: #FFE600;          /* Amarelo destaque */
  --primary-contrast: #0066cc; /* Azul principal */
  --primary-dark: #0052a3;     /* Azul escuro (hover) */
  --secondary: #3483fa;        /* Azul secundário */

  /* Cores neutras */
  --text: #1b1b1b;
  --text-light: #6b7280;
  --muted: #9ca3af;
  --border: #e5e7eb;
  --bg-light: #f5f5f5;
  --bg-white: #ffffff;

  /* Status colors */
  --success: #00a650;
  --warning: #f59e0b;
  --danger: #dc2626;
  --info: #3b82f6;

  /* Espaçamentos */
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --card-gap: 18px;
  --container-width: 1200px;
  --container-padding: 20px;

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 10px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);

  /* Transições */
  --transition: all 0.2s ease;
}

/* ============================================
   RESET E BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary-contrast);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* ============================================
   TIPOGRAFIA
   ============================================ */
h1, .h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
  line-height: 1.2;
}

h2, .h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--text);
  line-height: 1.3;
}

h3, .h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text);
}

h4, .h4 {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
}

p {
  margin: 0 0 12px;
  line-height: 1.6;
}

.text-small {
  font-size: 14px;
}

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

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--container-padding);
}

/* ============================================
   HEADER
   ============================================ */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-top {
  background: var(--primary);
  padding: 8px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

.header-main {
  padding: 16px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-contrast);
  text-decoration: none;
  white-space: nowrap;
}

.logo:hover {
  color: var(--primary-dark);
}

/* Search Bar */
.search-bar {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 12px 50px 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  transition: var(--transition);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary-contrast);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.search-bar button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-contrast);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.search-bar button:hover {
  background: var(--primary-dark);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-icon {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-light);
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
}

.cart-icon:hover {
  background: var(--border);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* Navigation */
.nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 28px;
  flex-wrap: wrap;
}

.nav-item a {
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.nav-item a:hover,
.nav-item a.active {
  color: var(--primary-contrast);
  border-bottom-color: var(--primary-contrast);
}

/* ============================================
   BANNER / HERO
   ============================================ */
.hero {
  width: 100%;
  max-width: var(--container-width);
  margin: 24px auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-placeholder {
  background: linear-gradient(135deg, var(--primary-contrast), var(--secondary));
  color: white;
  padding: 80px 40px;
  text-align: center;
}

.hero-placeholder h2 {
  color: white;
  font-size: 36px;
  margin-bottom: 16px;
}

/* ============================================
   PRODUCTS GRID
   ============================================ */
.products-section {
  padding: 40px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.view-all {
  font-weight: 600;
  font-size: 14px;
  color: var(--primary-contrast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-grid {
  display: grid;
  gap: var(--card-gap);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* Product Card */
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.product-image {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--bg-light);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-wrapper {
  margin-top: auto;
}

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

.product-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.product-installment {
  font-size: 13px;
  color: var(--success);
  font-weight: 500;
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: var(--text);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-contrast);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background: #2968c8;
  color: white;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #008f44;
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-contrast);
  color: var(--primary-contrast);
}

.btn-outline:hover {
  background: var(--primary-contrast);
  color: white;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 18px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-contrast);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 6px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--text);
  color: white;
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 32px;
}

.footer-section h3 {
  color: white;
  margin-bottom: 16px;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 10px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .header-content {
    flex-wrap: wrap;
  }

  .search-bar {
    order: 3;
    flex-basis: 100%;
    max-width: 100%;
  }

  .nav-list {
    gap: 16px;
    font-size: 14px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-image {
    height: 180px;
  }

  h1, .h1 {
    font-size: 26px;
  }

  h2, .h2 {
    font-size: 20px;
  }

  .hero-placeholder {
    padding: 50px 24px;
  }

  .hero-placeholder h2 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-image {
    height: 240px;
  }

  .header-actions {
    gap: 12px;
  }

  .btn {
    padding: 10px 18px;
    font-size: 15px;
  }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.d-none {
  display: none;
}

.d-flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.align-center {
  align-items: center;
}

.gap-2 {
  gap: 16px;
}
