/* NUVARE - CSS Puro (Convertido de Tailwind) */
/* Mantendo EXATAMENTE o mesmo design do site Node.js/React */

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

:root {
  --primary-blue: #2563eb;
  --primary-blue-dark: #1d4ed8;
  --primary-blue-light: #3b82f6;
  --black: #000000;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --yellow-400: #facc15;
  --radius: 0.65rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--white);
  color: var(--gray-900);
  line-height: 1.5;
}

/* ===== HEADER ===== */
header {
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-top-bar {
  display: none;
}

.header-top-bar-content {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-top-bar a {
  color: var(--white);
  text-decoration: none;
  margin-left: 1rem;
}

.header-top-bar a:hover {
  opacity: 0.8;
}

.header-main {
  padding: 0.25rem;
}

.header-main-content {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-logo img {
  height: 16rem;
  object-fit: contain;
  display: block;
}

.header-logo a {
  text-decoration: none;
}

.search-bar {
  flex: 1;
  max-width: 28rem;
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  background-color: var(--gray-100);
  border: none;
  border-radius: 9999px;
  font-size: 1rem;
}

.search-bar input::placeholder {
  color: var(--gray-400);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-user-btn {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--gray-700);
  cursor: pointer;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.header-user-btn:hover {
  color: var(--black);
}

@media (min-width: 768px) {
  .header-user-btn {
    display: flex;
  }
}

.header-cart {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}

.header-cart svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--gray-700);
  transition: color 0.2s;
}

.header-cart:hover svg {
  color: var(--black);
}

.cart-badge {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  background-color: var(--red-500);
  color: var(--white);
  font-size: 0.75rem;
  border-radius: 9999px;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-menu-toggle {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  .header-menu-toggle {
    display: none;
  }
}

/* Navigation Menu */
.header-nav {
  background-color: var(--white);
  border-top: 1px solid var(--gray-200);
}

.header-nav.hidden {
  display: none;
}

@media (min-width: 768px) {
  .header-nav.hidden {
    display: block;
  }
}

.header-nav-content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}

@media (min-width: 768px) {
  .header-nav-content {
    flex-direction: row;
    gap: 1.5rem;
  }
}

.header-nav-shipping {
  background-color: var(--black);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  flex: 1;
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: none;
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--black);
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  height: 24rem;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    height: 100vh;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .hero {
    height: 31.25rem;
  }
}

@media (max-width: 639px) {
  .hero {
    height: 25rem;
  }
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 80rem;
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem 3rem;
  text-align: center;
  z-index: 2;
}

.hero-text {
  font-size: 1.125rem;
  color: var(--white);
  margin-bottom: 1.5rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .hero-text {
    font-size: 1.25rem;
  }
}

.hero-btn {
  background-color: var(--white);
  color: var(--black);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-btn:hover {
  background-color: var(--gray-200);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr 3fr;
  }
}

/* ===== SIDEBAR FILTERS ===== */
.sidebar {
  background-color: var(--gray-50);
  padding: 1.5rem;
  border-radius: var(--radius);
  position: sticky;
  top: 6rem;
}

.sidebar-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-section {
  margin-bottom: 2rem;
}

.filter-section-title {
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-option {
  background: none;
  border: none;
  text-align: left;
  font-size: 0.875rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: color 0.2s;
  padding: 0.25rem 0;
}

.filter-option:hover {
  color: var(--black);
}

.filter-option.active {
  font-weight: 700;
  color: var(--black);
}

.price-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.price-input-group {
  display: flex;
  flex-direction: column;
}

.price-input-group label {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}

.price-input-group input {
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: calc(var(--radius) - 0.25rem);
  font-size: 0.875rem;
}

.apply-filters-btn {
  width: 100%;
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.apply-filters-btn:hover {
  background-color: var(--primary-blue-dark);
}

/* ===== PRODUCTS SECTION ===== */
.products-section {
  grid-column: 1;
}

@media (min-width: 1024px) {
  .products-section {
    grid-column: 2;
  }
}

.products-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

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

.product-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s;
  background-color: var(--white);
}

.product-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.product-image-container {
  position: relative;
  background-color: var(--gray-100);
  height: 20rem;
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-image {
  transform: scale(1.1);
}

.product-discount {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--red-600);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
}

.product-info {
  padding: 1rem;
}

.product-name {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  line-height: 1.25;
  font-size: 0.875rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.product-stars {
  display: flex;
}

.product-star {
  width: 0.75rem;
  height: 0.75rem;
}

.product-star.filled {
  color: var(--yellow-400);
}

.product-star.empty {
  color: var(--gray-300);
}

.product-rating-count {
  font-size: 0.75rem;
  color: var(--gray-600);
}

.product-price {
  margin-bottom: 1rem;
}

.product-price-current {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
}

.product-price-original {
  font-size: 0.875rem;
  color: var(--gray-500);
  text-decoration: line-through;
  margin-left: 0.5rem;
}

.add-to-cart-btn {
  width: 100%;
  background-color: var(--black);
  color: var(--white);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: calc(var(--radius) - 0.25rem);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.add-to-cart-btn:hover:not(:disabled) {
  background-color: var(--gray-900);
}

.add-to-cart-btn:disabled {
  background-color: var(--gray-400);
  cursor: not-allowed;
}

/* ===== FEATURES SECTION ===== */
.features-section {
  background-color: var(--gray-50);
  padding: 4rem 1rem;
}

.features-content {
  max-width: 80rem;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-item {
  text-align: center;
}

.feature-icon {
  background-color: var(--black);
  color: var(--white);
  border-radius: 9999px;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.feature-icon svg {
  width: 2rem;
  height: 2rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-description {
  color: var(--gray-600);
  font-size: 0.875rem;
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--black);
  color: var(--white);
}

.footer-content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

.footer-section h4 {
  font-weight: 600;
  margin-bottom: 1rem;
}

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

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  font-size: 0.875rem;
  color: var(--gray-400);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-logo img {
  height: 10rem;
  object-fit: contain;
  margin-bottom: 1rem;
}

.footer-description {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--gray-400);
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--white);
}

.footer-social svg {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
  }
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white);
}

/* ===== UTILITIES ===== */
.hidden {
  display: none;
}

.block {
  display: block;
}

.flex {
  display: flex;
}

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

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
}

input {
  font-family: inherit;
}

/* Responsiveness */
@media (max-width: 639px) {
  .header-main-content {
    flex-wrap: wrap;
  }

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

  .header-logo img {
    height: 8rem;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .header-logo img {
    height: 10rem;
  }
}
