/* ============================================
   CASITA HOUSE - Estilos Principais
   Identidade Visual: Vermelho, Laranja, Amarelo
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Fredoka+One&display=swap');

/* Fallback fonts caso Google Fonts não carregue */
body { font-family: 'Nunito', 'Segoe UI', Arial, sans-serif; }

:root {
  --red-dark: #8B1A0A;
  --red-main: #C0392B;
  --red-light: #E74C3C;
  --orange-main: #E65C00;
  --orange-light: #FF8C00;
  --yellow-main: #FFD700;
  --yellow-light: #FFE44D;
  --white: #FFFFFF;
  --off-white: #FFF8F0;
  --gray-light: #F5F5F5;
  --gray-mid: #CCCCCC;
  --gray-dark: #555555;
  --text-dark: #1A1A1A;
  --shadow: 0 4px 15px rgba(0,0,0,0.15);
  --shadow-hover: 0 8px 25px rgba(0,0,0,0.25);
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--off-white);
  color: var(--text-dark);
  overflow-x: hidden;
}

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

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--red-main); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-dark); }

/* ============ HEADER ============ */
.site-header {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red-main) 50%, var(--orange-main) 100%);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-top {
  background: rgba(0,0,0,0.2);
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.9);
}

.header-top-platforms {
  display: flex;
  align-items: center;
  gap: 10px;
}

.platform-badge {
  background: rgba(255,255,255,0.15);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  transition: var(--transition);
}

.platform-badge:hover {
  background: rgba(255,255,255,0.3);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  gap: 15px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-img {
  height: 65px;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.4));
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: 'Fredoka One', cursive;
  font-size: 28px;
  color: var(--yellow-main);
  text-shadow: 2px 2px 0px var(--red-dark), -1px -1px 0px var(--red-dark);
  line-height: 1;
}

.logo-slogan {
  font-size: 11px;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-style: italic;
}

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

.search-bar {
  width: 100%;
  padding: 12px 50px 12px 20px;
  border-radius: 30px;
  border: 3px solid var(--yellow-main);
  background: white;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
}

.search-bar:focus {
  border-color: var(--yellow-light);
  box-shadow: 0 0 15px rgba(255,215,0,0.5);
}

.search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--yellow-main);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--yellow-light);
  transform: translateY(-50%) scale(1.1);
}

/* Nav */
.header-nav {
  background: rgba(0,0,0,0.25);
  padding: 0 20px;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
  margin: 0;
}

.nav-list li a {
  display: block;
  padding: 10px 18px;
  color: white;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  position: relative;
}

.nav-list li a:hover,
.nav-list li a.active {
  color: var(--yellow-main);
  border-bottom-color: var(--yellow-main);
}

/* ============ HERO BANNER ============ */
.hero-banner {
  background: linear-gradient(135deg, #1a0000 0%, var(--red-dark) 30%, var(--orange-main) 70%, #cc5500 100%);
  padding: 30px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero-lightning {
  font-size: 40px;
  animation: pulse 1s infinite;
  margin-right: 10px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.hero-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(28px, 5vw, 52px);
  color: var(--yellow-main);
  text-shadow: 3px 3px 0px rgba(0,0,0,0.5);
  line-height: 1;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 22px);
  color: white;
  font-weight: 800;
  margin-bottom: 5px;
}

.hero-extra {
  display: inline-block;
  background: var(--yellow-main);
  color: var(--red-dark);
  font-weight: 900;
  font-size: 14px;
  padding: 4px 20px;
  border-radius: 20px;
  margin-bottom: 15px;
  animation: glow 2s infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(255,215,0,0.5); }
  50% { box-shadow: 0 0 20px rgba(255,215,0,0.9); }
}

/* Countdown Timer */
.countdown-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.countdown-label {
  color: rgba(255,255,255,0.9);
  font-weight: 700;
  font-size: 14px;
}

.countdown-timer {
  display: flex;
  gap: 8px;
}

.countdown-block {
  background: rgba(0,0,0,0.4);
  border: 2px solid var(--yellow-main);
  border-radius: 8px;
  padding: 6px 12px;
  text-align: center;
  min-width: 50px;
}

.countdown-num {
  font-family: 'Fredoka One', cursive;
  font-size: 24px;
  color: var(--yellow-main);
  display: block;
  line-height: 1;
}

.countdown-unit {
  font-size: 10px;
  color: rgba(255,255,255,0.8);
  font-weight: 700;
  text-transform: uppercase;
}

.countdown-sep {
  font-size: 24px;
  color: var(--yellow-main);
  font-weight: 900;
  align-self: center;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ============ MAIN CONTENT ============ */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* ============ SECTION HEADERS ============ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--red-main);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fredoka One', cursive;
  font-size: 24px;
  color: var(--red-dark);
}

.section-title .icon {
  font-size: 28px;
}

.section-badge {
  background: var(--red-main);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.see-all-btn {
  background: transparent;
  border: 2px solid var(--red-main);
  color: var(--red-main);
  padding: 6px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Nunito', sans-serif;
}

.see-all-btn:hover {
  background: var(--red-main);
  color: white;
}

/* ============ PRODUCT GRID ============ */
.products-section {
  margin-bottom: 40px;
}

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

/* ============ PRODUCT CARD ============ */
.product-card {
  background: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--orange-light);
}

.product-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--red-main);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.product-card-badge.frete { background: #27AE60; }
.product-card-badge.top { background: var(--orange-main); }
.product-card-badge.lancamento { background: #8E44AD; }
.product-card-badge.viral { background: var(--red-main); }

.product-discount-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: var(--yellow-main);
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 50%;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
  font-family: 'Fredoka One', cursive;
}

.product-img-container {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--gray-light);
}

.product-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.platform-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: white;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.platform-icon.amazon { color: #FF9900; }
.platform-icon.mercado_livre { color: #FFE600; background: #3483FA; }
.platform-icon.shopee { color: #EE4D2D; }
.platform-icon.aliexpress { color: #FF4747; }
.platform-icon.temu { color: #FF6900; }

.product-info {
  padding: 12px 14px 14px;
}

.product-title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text-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: 8px;
}

.stars {
  color: var(--yellow-main);
  font-size: 13px;
}

.rating-text {
  font-size: 11px;
  color: var(--gray-dark);
  font-weight: 600;
}

.product-price-area {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.price-original {
  font-size: 12px;
  color: var(--gray-dark);
  text-decoration: line-through;
}

.price-current {
  font-family: 'Fredoka One', cursive;
  font-size: 22px;
  color: var(--red-main);
  line-height: 1;
}

.price-installment {
  font-size: 11px;
  color: var(--gray-dark);
}

.btn-buy {
  display: block;
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, var(--red-main), var(--orange-main));
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-buy:hover {
  background: linear-gradient(135deg, var(--red-dark), var(--red-main));
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(192,57,43,0.4);
}

/* ============ CHICO MASCOT SECTION ============ */
.chico-section {
  background: linear-gradient(135deg, var(--red-dark), var(--orange-main));
  border-radius: var(--border-radius-lg);
  padding: 30px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 30px;
  position: relative;
  overflow: hidden;
}

.chico-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.chico-img {
  width: 150px;
  flex-shrink: 0;
  filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.3));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.chico-text {
  color: white;
  position: relative;
  z-index: 1;
}

.chico-text h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 28px;
  color: var(--yellow-main);
  text-shadow: 2px 2px 0px rgba(0,0,0,0.3);
  margin-bottom: 8px;
}

.chico-text p {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  opacity: 0.95;
  max-width: 500px;
}

.chico-badges {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.chico-badge {
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.5);
  color: white;
  padding: 6px 18px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 14px;
  transition: var(--transition);
  animation: bounceIn 0.5s ease both;
}

.chico-badge:hover {
  background: var(--yellow-main);
  color: var(--red-dark);
  border-color: var(--yellow-main);
}

/* ============ FILTER TABS ============ */
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 5px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}

.filter-tab {
  padding: 8px 20px;
  background: white;
  border: 2px solid var(--gray-mid);
  border-radius: 25px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  font-family: 'Nunito', sans-serif;
  color: var(--gray-dark);
}

.filter-tab:hover,
.filter-tab.active {
  background: var(--red-main);
  border-color: var(--red-main);
  color: white;
}

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-dark);
}

.empty-state .empty-icon {
  font-size: 60px;
  margin-bottom: 15px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 18px;
  font-weight: 600;
}

/* ============ LOADING ============ */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--border-radius);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============ FOOTER ============ */
.site-footer {
  background: linear-gradient(135deg, var(--red-dark), #1a0000);
  color: rgba(255,255,255,0.9);
  padding: 40px 20px 20px;
  margin-top: 40px;
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-col h4 {
  font-family: 'Fredoka One', cursive;
  font-size: 16px;
  color: var(--yellow-main);
  margin-bottom: 12px;
}

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

.footer-col ul li {
  padding: 4px 0;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.footer-col ul li:hover {
  color: var(--yellow-main);
  padding-left: 5px;
}

.footer-bottom {
  max-width: 1400px;
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-copyright {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.footer-disclaimer {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  max-width: 600px;
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 30px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  position: relative;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--gray-light);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--red-main);
  color: white;
}

.modal-product-img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  background: var(--gray-light);
}

.modal-product-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}

.modal-product-desc {
  font-size: 14px;
  color: var(--gray-dark);
  line-height: 1.6;
  margin-bottom: 15px;
}

.modal-price-area {
  margin-bottom: 20px;
}

.modal-price {
  font-family: 'Fredoka One', cursive;
  font-size: 32px;
  color: var(--red-main);
}

.modal-original-price {
  font-size: 14px;
  color: var(--gray-dark);
  text-decoration: line-through;
  margin-right: 10px;
}

.btn-buy-modal {
  display: block;
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--red-main), var(--orange-main));
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-buy-modal:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(192,57,43,0.5);
}

/* ============ TOAST NOTIFICATION ============ */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--red-dark);
  color: white;
  padding: 15px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-hover);
  z-index: 99999;
  animation: slideInRight 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 300px;
}

.toast.success { background: #27AE60; }
.toast.error { background: var(--red-main); }
.toast.info { background: #2980B9; }

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

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .header-top-platforms { display: none; }

  .header-main {
    flex-wrap: wrap;
    padding: 10px 15px;
  }

  .search-container {
    order: 3;
    max-width: 100%;
    width: 100%;
  }

  .logo-name { font-size: 22px; }

  .nav-list li a {
    padding: 8px 12px;
    font-size: 12px;
  }

  .hero-title { font-size: 26px; }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .product-img-container { height: 150px; }

  .chico-section {
    flex-direction: column;
    text-align: center;
  }

  .chico-badges { justify-content: center; }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .main-content { padding: 10px; }

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

  .section-title { font-size: 18px; }
}
