/* ============================================
   DON CAPS - E-commerce de Capacetes
   Design System e Estilos Globais
   ============================================ */

:root {
  /* Paleta Motociclística */
  --racing-red: #DC2626;
  --carbon-black: #000000;
  --metallic-gray: #6B7280;
  --safety-orange: #EA580C;
  --ice-white: #F8FAFC;
  
  /* Cores principais */
  --primary: var(--racing-red);
  --secondary: var(--carbon-black);
  --accent: var(--safety-orange);
  --light: var(--ice-white);
  --dark: var(--carbon-black);
  --white: #FFFFFF;
  
  /* Gradientes */
  --racing-gradient: linear-gradient(135deg, var(--carbon-black) 0%, #2D2D2D 100%);
  --red-gradient: linear-gradient(135deg, var(--racing-red) 0%, #B91C1C 100%);
  
  /* Efeitos */
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-racing: 0 4px 15px rgba(220, 38, 38, 0.3);
  --transition: all 0.3s ease;
  --border-radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--dark);
  line-height: 1.6;
  background-color: var(--light);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   HEADER
   ============================================ */

.header {
  background: var(--racing-gradient);
  border-bottom: 3px solid var(--racing-red);
  box-shadow: var(--shadow-racing);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  font-size: 0.875rem;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-main {
  padding: 15px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  animation: float 3s ease-in-out infinite;
}

.logo img {
  height: 50px;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

.search-bar {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 12px 45px 12px 15px;
  border: none;
  border-radius: 25px;
  font-size: 0.95rem;
}

.search-bar button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--secondary);
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-icon {
  position: relative;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.header-icon:hover {
  color: var(--secondary);
  transform: scale(1.1);
}

.badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--secondary);
  color: var(--white);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.nav-menu {
  background: rgba(0, 0, 0, 0.1);
  padding: 12px 0;
}

.nav-menu ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-menu a {
  color: var(--white);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: var(--transition);
}

.nav-menu a:hover::after {
  width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  margin-bottom: 60px;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-content {
  max-width: 600px;
  color: var(--white);
  padding: 40px;
  background: rgba(30, 58, 95, 0.8);
  border-radius: var(--border-radius);
  margin-left: 10%;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.hero-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}

.hero-dot.active,
.hero-dot:hover {
  background: white;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-size: 1rem;
}

.btn-primary {
  background: var(--red-gradient);
  color: var(--white);
  border: 2px solid var(--racing-red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-racing);
  background: var(--racing-red);
}

.btn-secondary {
  background: var(--primary);
  color: var(--white);
}

.btn-secondary:hover {
  background: #2D4B73;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* ============================================
   PRODUCT CARDS
   ============================================ */

.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: var(--primary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.product-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  border: 1px solid var(--metallic-gray);
}

.product-card::before {
  content: "RACE";
  position: absolute;
  top: -8px;
  right: 10px;
  background: var(--racing-red);
  color: white;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 3px;
  z-index: 2;
  letter-spacing: 1px;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--racing-red);
}

.product-image {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
  background: var(--light);
}

.product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
}

.badge-new,
.badge-sale {
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
}

.badge-new {
  background: var(--accent);
}

.badge-sale {
  background: var(--secondary);
}

.product-wishlist {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--white);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--dark);
  transition: var(--transition);
  z-index: 2;
}

.product-wishlist:hover,
.product-wishlist.active {
  color: var(--secondary);
  transform: scale(1.1);
}

.product-info {
  padding: 20px;
}

.product-category {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 5px;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  font-size: 0.875rem;
}

.stars {
  color: #FFD700;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.price-current {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.price-old {
  font-size: 1rem;
  color: #999;
  text-decoration: line-through;
}

.price-installment {
  font-size: 0.875rem;
  color: #666;
}

.product-actions {
  display: flex;
  gap: 10px;
}

.btn-add-cart {
  flex: 1;
  padding: 12px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-cart:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

/* ============================================
   CATEGORIES
   ============================================ */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.category-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}

/* ============================================
   TESTIMONIALS
   ============================================ */

.testimonials {
  background: var(--primary);
  color: var(--white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
}

.testimonial-rating {
  color: #FFD700;
  margin-bottom: 15px;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--dark);
  color: var(--white);
  padding: 60px 0 20px;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  margin-bottom: 20px;
  color: var(--secondary);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: #ccc;
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--secondary);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #999;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
  }

  .search-bar {
    order: 3;
    width: 100%;
    max-width: 100%;
  }

  .nav-menu ul {
    flex-wrap: wrap;
    gap: 15px;
  }

  .hero-content {
    margin-left: 0;
    padding: 20px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }

  .section-title {
    font-size: 2rem;
  }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

