@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Cores Principais */
  --color-primary: #3b82f6;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #60a5fa;
  --color-secondary: #0f172a;
  --color-accent: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  /* Tons Neutros e Superfícies */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;

  /* Texto */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;

  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.08);

  /* Borda Arredondada */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Reset Básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Top Announcement Bar */
.top-announcement {
  background: linear-gradient(90deg, #1e293b, #0f172a);
  color: #f8fafc;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 8px 16px;
  text-align: center;
  letter-spacing: 0.02em;
}

.top-announcement strong {
  color: #38bdf8;
}

/* Header */
.storefront-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-secondary);
}

.logo-badge {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
}

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

.search-input-group {
  display: flex;
  align-items: center;
  background-color: var(--bg-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: 9999px;
  padding: 4px 6px 4px 18px;
  transition: all 0.2s ease;
}

.search-input-group:focus-within {
  border-color: var(--border-focus);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-input-group input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  color: var(--text-main);
  outline: none;
  padding: 6px 0;
}

.search-input-group button {
  background: var(--color-primary);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.search-input-group button:hover {
  background: var(--color-primary-dark);
}

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

.header-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-btn:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border-color);
}

.cart-btn {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: white !important;
  border-radius: 9999px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  font-weight: 600;
}

.cart-btn:hover {
  background: #334155;
  transform: translateY(-1px);
}

.cart-badge {
  background-color: var(--color-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  min-width: 20px;
  text-align: center;
}

/* Category Subnav */
.category-nav {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.category-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-nav-inner::-webkit-scrollbar {
  display: none;
}

.category-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.category-link:hover, .category-link.active {
  color: var(--color-primary);
  background-color: rgba(59, 130, 246, 0.08);
}

.category-link.destaque {
  color: #dc2626;
  font-weight: 700;
}

/* Container Principal */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 60px 20px;
}

/* Hero Banner */
.hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  color: white;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: #93c5fd;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  color: #ffffff;
  max-width: 600px;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: #cbd5e1;
  margin-bottom: 24px;
  max-width: 520px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-primary);
  color: white;
  padding: 12px 28px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  transition: all 0.2s ease;
}

.hero-btn:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

/* Benefit Cards */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.benefit-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.benefit-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.benefit-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.benefit-info h4 {
  font-size: 0.9375rem;
  margin-bottom: 2px;
}

.benefit-info p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Grid de Produtos */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* Card do Produto */
.product-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #93c5fd;
}

.product-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #f8fafc;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.product-discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--color-danger);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.product-stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

.product-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}

.product-pricing {
  margin-top: auto;
  margin-bottom: 14px;
}

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

.product-current-price {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--color-secondary);
}

.product-installments {
  font-size: 0.75rem;
  color: var(--color-accent);
  font-weight: 600;
}

.btn-add-cart {
  width: 100%;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

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

.btn-add-cart:disabled {
  background-color: #cbd5e1;
  cursor: not-allowed;
}

/* Footer */
.storefront-footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 60px 20px 20px 20px;
  margin-top: 60px;
  border-top: 1px solid #1e293b;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 16px;
}

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

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: gap;
  font-size: 0.8125rem;
}

/* Carrinho Drawer */
.cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: white;
  z-index: 201;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  animation: slideInRight 0.25s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.cart-drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
}

.cart-item-row {
  display: flex;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #f1f5f9;
}

.cart-item-details {
  flex: 1;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Responsividade */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .search-container {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
  .hero-title {
    font-size: 1.875rem;
  }
  .hero-banner {
    padding: 30px 20px;
  }
}