:root {
  --primary: #F9B000;
  --primary-dark: #d69000;
  --dark: #1b1b1f;
  --accent-dark: #4d1818;
  --light: #ffffff;
  --gray: #f3f4f6;
  --gray-soft: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-hover: 0 16px 40px rgba(15, 23, 42, 0.18);
}

/* ==== RESET / BASE ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: radial-gradient(circle at top, #fff9e8 0, #f5f5f7 35%, #f3f4f6 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Links genéricos */
a {
  color: inherit;
  text-decoration: none;
}

/* Utilitário para centralização padrão */
.section-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Linha Amarela Superior ===== */
.top-line {
    height: 40px;
    width: 100%;
    background-color: rgb(249, 176, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.promo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    height: 40px;
}

.promo-message {
    color: white;
    font-size: 14px;
    font-weight: 600;
    line-height: 40px;
    text-align: center;
    position: absolute;
    opacity: 0;
    transform: translateY(20px);
    width: max-content;
    transition: 0.6s;
}

.promo-message.active {
  opacity: 1;
  transform: translateY(0);
}

.promo-message.exit {
  opacity: 0;
  transform: translateY(-20px);
}

/* ==== HEADER ==== */
.header {
  width: 100%;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.center-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  max-width: 1200px;
}

.logo img {
  height: 110px;
  width: auto;
  display: block;
  transition: transform 0.25s ease;
}

.logo img:hover {
  transform: translateY(-2px) scale(1.02);
}

/* ==== SEARCH BAR ==== */
.search-bar {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 11px 44px 11px 16px;
  border-radius: 999px;
  outline: none;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) inset;
}

.search-bar input::placeholder {
  color: #9ca3af;
}

.search-bar input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(249, 176, 0, 0.3), 0 14px 30px rgba(15, 23, 42, 0.12);
}

.search-bar img {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.search-bar img:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.08);
}

/* Sugestões */
.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  max-height: 260px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: var(--shadow-soft);
}

.search-suggestions .suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.9rem;
}

.search-suggestions .suggestion-item:hover {
  background-color: #fff7dd;
}

/* ==== WELCOME ==== */
.welcome {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  line-height: 1.4;
}

.welcome a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin: 0 3px;
}

.welcome a:hover {
  text-decoration: underline;
}

.profile-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-left: 10px;
  vertical-align: middle;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  top: -6px;
  box-shadow: 0 0 0 2px #f3f4f6;
}

.profile-icon:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 2px var(--primary);
}

/* ==== CART ==== */
.cart {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart img {
  width: 30px;
  height: auto;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cart:hover img {
  transform: translateY(-1px) scale(1.05);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.3);
}

/* ==== CART SIDEBAR ==== */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 90%;
  height: 100vh;
  background-color: #ffffff;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.25);
  transform: translateX(100%);
  transition: transform 0.4s ease;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  border-radius: 20px 0 0 20px;
}

.cart-sidebar.active {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.cart-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 600;
}

.close-cart {
  font-size: 1.6rem;
  cursor: pointer;
  color: #6b7280;
  transition: color 0.25s ease, transform 0.25s ease;
}

.close-cart:hover {
  color: var(--primary);
  transform: rotate(8deg);
}

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

/* Overlay */
.cart-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1400;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Itens do carrinho */
.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.cart-item img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 14px;
  flex-shrink: 0;
}

.cart-item-image-link img {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-item-image-link img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-soft);
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-info h4 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}

.cart-item-info p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.cart-item-info .quantidade {
  font-weight: 600;
  color: #111827;
}

/* Quantidade */
.cart-quantity {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.cart-quantity input.quantity-input {
  width: 48px;
  text-align: center;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 4px;
  font-size: 0.85rem;
}

.qty-btn {
  background-color: var(--primary);
  color: #111827;
  border: none;
  border-radius: 999px;
  padding: 4px 9px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.2s ease, transform 0.1s ease;
}

.qty-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

/* Cor / detalhes */
.cart-color,
.cart-color-select,
.cart-refil,
.cart-torneira {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.color-circle {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
}

.color-name {
  font-weight: 500;
  text-transform: capitalize;
}

.cart-color-select label,
.cart-refil .refil-label,
.torneira-label {
  font-weight: 600;
  font-size: 0.8rem;
}

.cart-color-select .color-select,
.cart-refil .refil-input {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 0.8rem;
  background-color: #ffffff;
}

/* Remover item */
.remove-btn {
  background-color: transparent;
  border: none;
  color: #ef4444;
  font-size: 0.8rem;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 6px;
  transition: color 0.2s ease;
}

.remove-btn:hover {
  color: #b91c1c;
}

/* Footer do carrinho */
.cart-footer {
  border-top: 1px solid #e5e7eb;
  padding: 16px 18px 18px;
  background-color: #f9fafb;
  margin-top: auto;
  border-radius: 18px 0 0 0;
}

.cart-summary {
  margin-bottom: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem;
  color: var(--text);
}

.cart-summary p {
  margin: 4px 0;
  display: flex;
  justify-content: space-between;
}

.cart-summary span {
  font-weight: 600;
  color: var(--primary);
}

/* Cupom */
.cart-coupon {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.cart-coupon input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  font-size: 0.85rem;
  background: #ffffff;
}

.cart-coupon button {
  padding: 9px 14px;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s ease, transform 0.1s ease;
}

.cart-coupon button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

.coupon-message {
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
  transition: all 0.3s ease;
}
.coupon-message.success {
  color: #16a34a;
  display: block;
}
.coupon-message.error {
  color: #ef4444;
  display: block;
}

#coupon-code.coupon-success {
  border-color: #16a34a;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.15);
}

#coupon-code.coupon-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.15);
}

/* Botão finalizar */
.checkout-btn {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 12px 30px rgba(234, 179, 8, 0.4);
}

.checkout-btn:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
}

/* ===== SUMMARY: Badge Frete Grátis ===== */
#summary-frete-gratis {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e6f4ea;            /* tom suave verde */
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.06);
  color: #065f46;                       /* verde escuro (acento) */
  font-weight: 700;
  font-size: 0.94rem;
}

/* ícone circular */
#summary-frete-gratis .badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, #34d399, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(6, 95, 70, 0.12);
}

/* texto explicativo (quebra responsiva) */
#summary-frete-gratis .badge-text {
  line-height: 1.05;
  color: #064e3b;
  font-weight: 700;
}


/* ==== NAVBAR ==== */
.categories-nav {
  width: 100%;
  background-color: #ffffff;
  color: var(--dark);
  font-weight: 600;
  position: relative;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  position: relative;
  gap: 40px;
}

.nav-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--dark);
  cursor: pointer;
}

/* Lista principal */
.categories-list {
  display: flex;
  list-style: none;
  gap: 26px;
  transition: all 0.3s ease;
}

.categories-list li a {
  position: relative;
  padding: 6px 4px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.categories-list li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f9b000, #f97316);
  transition: width 0.25s ease;
}

.categories-list li a:hover {
  color: var(--primary);
}

.categories-list li a:hover::after {
  width: 100%;
}

/* Submenu */
.has-sub {
  position: relative;
}

.sub-menu {
  position: absolute;
  top: 120%;
  left: 0;
  background-color: #ffffff;
  list-style: none;
  min-width: 210px;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.25s ease;
  overflow: hidden;
}

.sub-menu li a {
  display: block;
  padding: 9px 14px;
  color: var(--text);
  font-weight: 500;
}

.sub-menu li a:hover {
  background-color: #fff7dd;
  color: #111827;
}

.has-sub:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

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

/* ==== RESPONSIVIDADE ==== */

@media (max-width: 1024px) {
  .cart-sidebar {
    width: 320px;
    max-width: 85%;
  }
}

@media (max-width: 900px) {
  .center-section {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .logo img {
    height: 90px;
  }

  .center-section {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

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

  .welcome {
    order: 4;
    font-size: 0.8rem;
    text-align: center;
  }

  .logo {
    order: 1;
  }

  .cart {
    order: 2;
  }

  .cart-sidebar {
    width: 82%;
    max-width: 82%;
  }

  /* Nav Bar */
  .nav-toggle {
    display: block;
  }

  .categories-list {
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    border-top: 1px solid #e5e7eb;
  }

  .categories-list li {
    text-align: center;
    width: 100%;
    border-bottom: 1px solid #f3f4f6;
    padding: 6px 0;
  }

  .categories-list.show {
    max-height: 900px;
  }

  .has-sub .sub-menu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .has-sub.open .sub-menu {
    max-height: 700px;
  }

  /* Esconde slider em telas muito pequenas se quiser */
  .slider {
    display: none;
  }
}

@media (max-width: 480px) {
  .cart-sidebar {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }

  .newsletter {
    margin: 40px auto;
  }
  #summary-frete-gratis { font-size: 0.86rem; padding: 10px; gap: 8px; }
  #summary-frete-gratis .badge-icon { width: 30px; height: 30px; font-size: 0.85rem; }
}
