/**
 * TEMA A - Estilo iFood/Rappi
 * Design brasileiro moderno: vibrante, clean e intuitivo
 */

:root {
  /* Cores principais - inspirado em iFood */
  --primary-color: #EA1D2C;
  --primary-dark: #C91322;
  --primary-light: #FF4757;
  --secondary-color: #FFB800;
  --accent-color: #00A8FF;

  /* Cores de fundo */
  --bg-color: #F8F8F8;
  --bg-white: #FFFFFF;
  --bg-card: #FFFFFF;

  /* Cores de texto */
  --text-primary: #2D3436;
  --text-secondary: #636E72;
  --text-light: #B2BEC3;

  /* Status colors */
  --success-color: #00B894;
  --warning-color: #FDCB6E;
  --danger-color: #D63031;
  --info-color: #74B9FF;

  /* Sombras */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  /* Bordas */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: -0.5px;
}

/* Navigation Bottom */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-around;
  padding: 0.75rem 0;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  width: 40px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 0 0 3px 3px;
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-item.active::before {
  transform: scaleX(1);
}

.nav-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.main-content {
  padding: 1.5rem 0 6rem;
  min-height: calc(100vh - 60px);
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0,0,0,0.05);
}

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

/* Banner Slider - Estilo iFood */
.banner-slider {
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  position: relative;
  height: 180px;
  box-shadow: var(--shadow-md);
}

.banner-slide {
  display: none;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  padding: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.banner-slide::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.banner-slide.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.product-grid-item {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0,0,0,0.05);
}

.product-grid-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.product-grid-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.product-info {
  padding: 0.75rem;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 700;
}

/* Product Card */
.product-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  transition: all 0.3s;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
}

.product-image {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(234, 29, 44, 0.3);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

.btn-block {
  display: flex;
  width: 100%;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #E1E8ED;
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all 0.3s;
  background: var(--bg-white);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(234, 29, 44, 0.1);
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-weight: 500;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background: #D5F4E6;
  color: #00875A;
  border-left: 4px solid var(--success-color);
}

.alert-error {
  background: #FFEBE6;
  color: #BF2600;
  border-left: 4px solid var(--danger-color);
}

/* Loading */
.loading {
  text-align: center;
  padding: 3rem;
}

.spinner {
  border: 4px solid rgba(234, 29, 44, 0.1);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.hidden { display: none; }

/* Typography */
h1, h2, h3 {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
