/* ═══════════════════════════════════════════════════════════════════════════════
   NORDESTE RP - COMPONENT STYLES
   Visual overrides para todos os componentes da loja
   Usa tokens unificados --nr-* definidos em core.css
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── TAILWIND CSS VARIABLE OVERRIDES ─── */
/* !important necessario aqui pois compete com inline <style> no <head> */
:root {
  --background: 11 11 15 !important;
  --foreground: 234 236 239 !important;
  --primary: 0 224 164 !important;
  --secondary: 255 210 74 !important;
  --muted: 16 19 24 !important;
  --muted-foreground: 165 169 178 !important;
  --border: 234 236 239 / 0.1 !important;
  --card: 16 19 24 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BODY & BASE
   ═══════════════════════════════════════════════════════════════════════════════ */

.nr-store {
  background: var(--nr-bg);
  color: var(--nr-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   HEADER & NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════════ */

header {
  background: rgba(11, 11, 15, 0.7);
  backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: 1px solid rgba(0, 224, 164, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* Gradiente sutil na borda inferior */
header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--nr-primary), var(--nr-accent), transparent);
  opacity: 0.4;
  pointer-events: none;
}

/* Barra de anuncio superior */
#top-announce {
  background: var(--nr-grad-primary);
  color: var(--nr-bg);
  font-weight: var(--nr-fw-bold);
  padding: 12px 16px;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

#top-announce span {
  background: rgba(11, 11, 15, 0.15);
  color: var(--nr-bg);
  border-radius: var(--nr-radius-sm);
  padding: 4px 8px;
  font-weight: var(--nr-fw-black);
}

/* Shimmer na barra de anuncio */
#top-announce::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shine 3s infinite;
  pointer-events: none;
}

/* Logo e nome da loja */
header h1 {
  font-weight: var(--nr-fw-bold);
  letter-spacing: -0.025em;
  background: var(--nr-grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Barra de pesquisa */
#search-bar,
#search-bar-mobile {
  background: rgba(16, 19, 24, 0.8);
  border: 2px solid var(--nr-border);
  border-radius: 25px;
  color: var(--nr-text);
  transition: border-color 0.2s var(--nr-ease), box-shadow 0.2s var(--nr-ease);
}

#search-bar:focus,
#search-bar-mobile:focus {
  border-color: var(--nr-primary);
  box-shadow: 0 0 0 3px rgba(0, 224, 164, 0.1), inset 0 0 12px rgba(0, 224, 164, 0.05);
  background: var(--nr-surface);
}

/* Dropdown de resultados de busca */
#search-result,
#search-result-mobile {
  background: rgba(16, 19, 24, 0.95);
  border: 1px solid rgba(0, 224, 164, 0.12);
  border-radius: var(--nr-radius);
  box-shadow: var(--nr-shadow-lg);
  backdrop-filter: blur(20px);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BUTTONS & CTAs
   ═══════════════════════════════════════════════════════════════════════════════ */

.nr-store .btn-primary,
.nr-store .button,
.nr-store button[type="submit"] {
  background: var(--nr-grad-primary);
  color: var(--nr-bg);
  border: none;
  border-radius: var(--nr-radius-sm);
  font-weight: var(--nr-fw-bold);
  font-family: 'Rajdhani', sans-serif;
  padding: 12px 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 14px;
  box-shadow: var(--nr-shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--nr-ease), box-shadow 0.2s var(--nr-ease);
}

.nr-store .btn-primary:hover,
.nr-store .button:hover,
.nr-store button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--nr-shadow-lg);
}

.nr-store .btn-primary:active,
.nr-store .button:active,
.nr-store button[type="submit"]:active {
  transform: translateY(0) scale(0.98);
}

.nr-store .btn-primary:focus-visible,
.nr-store .button:focus-visible,
.nr-store button[type="submit"]:focus-visible {
  outline: 2px solid var(--nr-accent);
  outline-offset: 2px;
}

/* Shimmer effect on primary buttons */
.nr-store .btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 80%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s;
  pointer-events: none;
}

.nr-store .btn-primary:hover::after {
  left: 150%;
}

/* Secondary button */
.nr-store .btn-secondary {
  background: rgba(16, 19, 24, 0.8);
  color: var(--nr-text);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-sm);
  font-weight: var(--nr-fw-semibold);
  transition: background 0.2s var(--nr-ease), border-color 0.2s var(--nr-ease), transform 0.2s var(--nr-ease);
}

.nr-store .btn-secondary:hover {
  background: var(--nr-surface);
  border-color: var(--nr-primary);
  transform: translateY(-1px);
}

/* Outline & Ghost buttons */
.nr-store .btn-outline,
.nr-store .btn-ghost {
  background: transparent;
  color: var(--nr-text);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-sm);
  transition: background 0.2s var(--nr-ease), border-color 0.2s var(--nr-ease), transform 0.2s var(--nr-ease);
}

.nr-store .btn-outline:hover,
.nr-store .btn-ghost:hover {
  background: rgba(0, 224, 164, 0.08);
  border-color: var(--nr-primary);
  transform: translateY(-1px);
}

/* Cart button */
.nr-store .open-cart {
  position: relative;
  overflow: visible;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BADGES & CHIPS
   ═══════════════════════════════════════════════════════════════════════════════ */

.nr-store .badge,
.nr-store .chip,
.nr-store [class*="bg-emerald-500/10"],
.nr-store [class*="bg-indigo-500/10"] {
  background: rgba(255, 210, 74, 0.15);
  color: var(--nr-accent);
  border: 1px solid rgba(255, 210, 74, 0.3);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: var(--nr-fw-semibold);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nr-store [class*="bg-emerald-500/10"] {
  background: rgba(0, 224, 164, 0.15);
  color: var(--nr-primary);
  border-color: rgba(0, 224, 164, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PACKAGE CARDS
   ═══════════════════════════════════════════════════════════════════════════════ */

.nr-store .package,
.nr-store [class*="package"] {
  background: linear-gradient(135deg, rgba(16, 19, 24, 0.9), rgba(26, 29, 36, 0.8));
  border: 1px solid rgba(0, 224, 164, 0.08);
  border-radius: var(--nr-radius);
  box-shadow: var(--nr-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  transition: transform 0.3s var(--nr-ease), box-shadow 0.3s var(--nr-ease), border-color 0.3s var(--nr-ease);
  position: relative;
  overflow: hidden;
}

/* Borda-topo animada que aparece no hover */
.nr-store .package::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--nr-grad-primary);
  transform: scaleX(0);
  transition: transform 0.4s var(--nr-ease);
  z-index: 2;
  pointer-events: none;
}

.nr-store .package:hover::before {
  transform: scaleX(1);
}

.nr-store .package:hover,
.nr-store [class*="package"]:hover {
  transform: translateY(-6px);
  box-shadow: var(--nr-shadow-lg), 0 0 30px rgba(0, 224, 164, 0.08);
  border-color: rgba(0, 224, 164, 0.2);
}

/* Imagem do produto */
.nr-store .package img {
  transition: transform 0.4s var(--nr-ease), filter 0.4s var(--nr-ease);
}

.nr-store .package:hover img {
  transform: scale(1.06);
  filter: brightness(1.1);
}

/* Preco com glow */
.nr-store .package .text-sm.font-bold,
.nr-store .package .text-lg.font-bold {
  color: var(--nr-primary);
  text-shadow: 0 0 12px rgba(0, 224, 164, 0.25);
}

/* Texto muted nos cards */
.nr-store .package .text-muted-foreground {
  color: var(--nr-text-muted);
  font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CART DRAWER
   ═══════════════════════════════════════════════════════════════════════════════ */

#cart-drawer {
  backdrop-filter: blur(20px);
}

#cart-drawer > div {
  background: linear-gradient(180deg, rgba(16, 19, 24, 0.96), rgba(11, 11, 15, 0.98));
  backdrop-filter: blur(24px) saturate(1.5);
  border-left: 1px solid rgba(0, 224, 164, 0.12);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
}

#cart-drawer h4 {
  color: var(--nr-text);
  font-weight: var(--nr-fw-bold);
  font-size: 20px;
}

#cart-pricing {
  background: linear-gradient(135deg, rgba(0, 224, 164, 0.06), rgba(255, 210, 74, 0.03));
  border: 1px solid rgba(0, 224, 164, 0.15);
  border-radius: var(--nr-radius-sm);
}

/* Hover em items do carrinho */
#cart-drawer-wrapper > div {
  position: relative;
  transition: background 0.2s var(--nr-ease);
  border-radius: var(--nr-radius-sm);
}

#cart-drawer-wrapper > div:hover {
  background: rgba(0, 224, 164, 0.03);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CHECKOUT
   ═══════════════════════════════════════════════════════════════════════════════ */

#checkout .bg-muted {
  background: var(--nr-grad-surface);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  box-shadow: var(--nr-shadow), inset 0 0 60px rgba(0, 224, 164, 0.02);
}

/* Metodos de pagamento */
[data-payment-method] {
  background: rgba(16, 19, 24, 0.6);
  border: 2px solid rgba(0, 224, 164, 0.08);
  border-radius: var(--nr-radius-sm);
  transition: background 0.2s var(--nr-ease), border-color 0.2s var(--nr-ease), box-shadow 0.2s var(--nr-ease), transform 0.2s var(--nr-ease);
  padding: 1rem;
}

[data-payment-method]:hover {
  background: rgba(0, 224, 164, 0.04);
  border-color: rgba(0, 224, 164, 0.2);
  transform: translateY(-2px);
}

/* Neon ring quando selecionado */
[data-payment-method][data-selected="true"] {
  background: rgba(0, 224, 164, 0.08);
  border-color: var(--nr-primary);
  box-shadow: 0 0 0 3px rgba(0, 224, 164, 0.12), inset 0 0 20px rgba(0, 224, 164, 0.04);
}

/* Inputs do checkout */
.nr-store input[type="text"],
.nr-store input[type="email"],
.nr-store select {
  background: rgba(16, 19, 24, 0.8);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius-sm);
  color: var(--nr-text);
  padding: 12px 16px;
  transition: border-color 0.2s var(--nr-ease), box-shadow 0.2s var(--nr-ease);
}

.nr-store input[type="text"]:focus,
.nr-store input[type="email"]:focus,
.nr-store select:focus {
  border-color: var(--nr-primary);
  box-shadow: 0 2px 0 0 var(--nr-primary), 0 0 15px rgba(0, 224, 164, 0.1);
  outline: none;
}

/* Botao de pagamento principal */
#pay-button {
  background: var(--nr-grad-primary);
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
  color: var(--nr-bg);
  font-weight: var(--nr-fw-black);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: var(--nr-radius);
  box-shadow: var(--nr-shadow-cta);
  transition: transform 0.2s var(--nr-ease), box-shadow 0.2s var(--nr-ease);
  min-height: 64px;
  border: none;
  position: relative;
  overflow: hidden;
}

#pay-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(0, 224, 164, 0.35);
}

#pay-button:active {
  transform: translateY(-1px);
}

/* Shimmer no botao de pagamento */
#pay-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s;
  pointer-events: none;
}

#pay-button:hover::before {
  left: 100%;
}

/* Pricing do checkout */
#checkout #pricing {
  background: rgba(16, 19, 24, 0.8);
  border: 1px solid rgba(0, 224, 164, 0.15);
  border-radius: var(--nr-radius-sm);
}

/* Checkbox de termos */
#terms-checkbox {
  accent-color: var(--nr-primary);
  width: 1.25rem;
  height: 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════════ */

footer {
  background: var(--nr-surface);
  border-top: 1px solid var(--nr-border);
  position: relative;
}

/* Linha gradiente decorativa no topo */
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--nr-primary), var(--nr-accent), transparent);
  pointer-events: none;
}

footer h1,
footer h3 {
  color: var(--nr-text);
  font-weight: var(--nr-fw-semibold);
}

footer .text-muted-foreground {
  color: var(--nr-text-muted);
}

/* Links do footer com underline animado */
footer ul li a {
  color: var(--nr-text-muted);
  transition: color 0.2s var(--nr-ease);
  position: relative;
  display: inline-block;
}

footer ul li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--nr-primary);
  transition: width 0.3s var(--nr-ease);
}

footer ul li a:hover {
  color: var(--nr-primary);
}

footer ul li a:hover::after {
  width: 100%;
}

/* Link primario no footer */
footer a.text-primary {
  color: var(--nr-primary);
}

footer a.text-primary:hover {
  color: var(--nr-accent);
}

/* Social icons com glow */
footer a[aria-label] {
  transition: all 0.2s var(--nr-ease);
}

footer a[aria-label]:hover {
  box-shadow: 0 0 12px rgba(0, 224, 164, 0.3);
  border-color: var(--nr-primary);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CATEGORY CARDS
   ═══════════════════════════════════════════════════════════════════════════════ */

.nr-store [href*="/category/"] {
  background: var(--nr-grad-surface);
  border: 1px solid var(--nr-border);
  border-radius: var(--nr-radius);
  transition: transform 0.3s var(--nr-ease), border-color 0.3s var(--nr-ease), box-shadow 0.3s var(--nr-ease);
}

.nr-store [href*="/category/"]:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 224, 164, 0.2);
  box-shadow: var(--nr-shadow-lg);
}

.nr-store [href*="/category/"] img {
  transition: transform 0.4s var(--nr-ease);
}

.nr-store [href*="/category/"]:hover img {
  transform: scale(1.08);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════════ */

.nr-store .container h1 .text-primary {
  background: var(--nr-grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nr-store .container h2 {
  color: var(--nr-text);
  font-weight: var(--nr-fw-bold);
  font-size: 28px;
  letter-spacing: -0.5px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .nr-store .btn-primary,
  .nr-store .button,
  .nr-store button[type="submit"] {
    min-height: 44px;
    font-size: 16px;
    padding: 14px 20px;
  }

  .nr-store .package {
    border-radius: var(--nr-radius-sm);
  }

  header h1 {
    font-size: 18px;
  }

  footer .container > div {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  footer .lg\:col-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  footer h3 {
    font-size: 0.8125rem;
  }

  footer ul li a {
    font-size: 0.8125rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   POINTER EVENTS FIX
   ═══════════════════════════════════════════════════════════════════════════════ */

[onclick],
.dialog,
#cart-drawer,
[id*="search"],
button,
input,
select,
a {
  pointer-events: auto;
}

[data-action="select-variation"],
[data-cart-action] {
  cursor: pointer;
}
