/* =============================================
   GOPADEL — UX ENHANCEMENTS
============================================= */

/* ---- Scroll progress bar ---- */
#gp-progress-bar {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, #9B7B2E, #C9A84C, #E8D5A3);
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ---- Scroll reveal ---- */
.gp-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.gp-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.gp-reveal-left  { opacity: 0; transform: translateX(-32px); transition: opacity 0.65s ease, transform 0.65s ease; }
.gp-reveal-right { opacity: 0; transform: translateX(32px);  transition: opacity 0.65s ease, transform 0.65s ease; }
.gp-reveal-left.visible, .gp-reveal-right.visible { opacity: 1; transform: translateX(0); }

/* Delay cascata para grids */
.gp-reveal:nth-child(1) { transition-delay: 0s; }
.gp-reveal:nth-child(2) { transition-delay: 0.1s; }
.gp-reveal:nth-child(3) { transition-delay: 0.2s; }
.gp-reveal:nth-child(4) { transition-delay: 0.3s; }
.gp-reveal:nth-child(5) { transition-delay: 0.35s; }

/* ---- Back to top ---- */
#gp-back-top {
  position: fixed; bottom: 96px; right: 24px; z-index: 900;
  width: 44px; height: 44px;
  background: #0A0A0A; color: #fff;
  border: 2px solid #C9A84C;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; visibility: hidden;
  transition: all 0.3s ease;
  font-size: 18px;
}
#gp-back-top.visible { opacity: 1; visibility: visible; }
#gp-back-top:hover { background: #C9A84C; color: #0A0A0A; }

/* ---- WhatsApp flutuante ---- */
#gp-whatsapp {
  position: fixed; bottom: 24px; right: 24px; z-index: 900;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  transition: all 0.3s ease;
  text-decoration: none;
}
#gp-whatsapp:hover {
  background: #1EBE5A;
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,0.5);
}
#gp-whatsapp svg { display: block; }

/* Tooltip */
#gp-whatsapp::before {
  content: 'Fale conosco';
  position: absolute; right: calc(100% + 12px); bottom: 50%;
  transform: translateY(50%);
  background: #0A0A0A; color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  padding: 6px 12px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
#gp-whatsapp:hover::before { opacity: 1; }

/* ---- Page loader ---- */
#gp-loader {
  position: fixed; inset: 0; z-index: 99999;
  background: #0A0A0A;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#gp-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.gp-loader-logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px; font-weight: 800;
  letter-spacing: 0.12em; color: #fff;
  animation: gpPulse 1.2s ease-in-out infinite;
}
.gp-loader-logo span { color: #C9A84C; }
@keyframes gpPulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* ---- Micro-interação nos botões ---- */
.gp-btn {
  position: relative; overflow: hidden;
}
.gp-btn::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
}
.gp-btn:active::after { width: 200px; height: 200px; opacity: 0; }

/* ---- Hover no card de categoria (overlay dourado sutil) ---- */
.gp-cat-card::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(201,168,76,0.15) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.4s;
}
.gp-cat-card:hover::before { opacity: 1; }

/* ---- Subcategoria: borda dourada no hover ---- */
.gp-subcat-card {
  outline: 2px solid transparent;
  outline-offset: -2px;
  transition: outline-color 0.3s;
}
.gp-subcat-card:hover { outline-color: #C9A84C; }

/* ---- Produto: quick info na base ---- */
.woocommerce ul.products li.product {
  cursor: pointer;
}
.woocommerce ul.products li.product::after {
  content: 'Ver Produto';
  position: absolute; bottom: 0; left: 0; right: 0;
  background: #C9A84C; color: #0A0A0A;
  font-size: 10px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase;
  text-align: center; padding: 10px;
  transform: translateY(100%); transition: transform 0.3s ease;
}
.woocommerce ul.products li.product:hover::after { transform: translateY(0); }

/* ---- Smooth scroll global ---- */
html { scroll-behavior: smooth; }

/* ---- Seleção de texto dourada ---- */
::selection { background: #C9A84C; color: #0A0A0A; }

/* ---- Focus acessível ---- */
:focus-visible {
  outline: 2px solid #C9A84C;
  outline-offset: 3px;
}

/* ---- Input animado (label flutua) ---- */
.gp-field-wrap {
  position: relative; margin-bottom: 24px;
}
.gp-field-wrap input,
.gp-field-wrap textarea {
  padding-top: 20px !important; padding-bottom: 8px !important;
}
.gp-field-wrap label {
  position: absolute; top: 14px; left: 16px;
  font-size: 12px; color: #999; pointer-events: none;
  transition: all 0.2s ease;
}
.gp-field-wrap input:focus ~ label,
.gp-field-wrap input:not(:placeholder-shown) ~ label {
  top: 6px; font-size: 9px; color: #C9A84C; letter-spacing: 0.1em; text-transform: uppercase;
}

/* ---- Mini carrinho slide ---- */
#gp-minicart-drawer {
  position: fixed; top: 0; right: -420px; bottom: 0;
  width: 420px; max-width: 95vw;
  background: #fff; z-index: 1100;
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
#gp-minicart-drawer.open { right: 0; }

#gp-minicart-overlay {
  position: fixed; inset: 0; z-index: 1090;
  background: rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden;
  transition: all 0.3s;
}
#gp-minicart-overlay.open { opacity: 1; visibility: visible; }

.gp-minicart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.gp-minicart-header h3 {
  font-size: 13px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
}
.gp-minicart-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: #666; padding: 4px; line-height: 1;
}
.gp-minicart-body { flex: 1; overflow-y: auto; padding: 24px; }
.gp-minicart-empty { text-align: center; padding: 60px 20px; color: #999; }
.gp-minicart-empty svg { margin: 0 auto 16px; opacity: 0.3; }
.gp-minicart-empty p { font-size: 13px; }
.gp-minicart-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.gp-minicart-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
  font-size: 14px; font-weight: 700;
}
.gp-minicart-total span:last-child { color: #C9A84C; }
.gp-minicart-actions { display: flex; flex-direction: column; gap: 10px; }
.gp-minicart-actions a {
  display: block; text-align: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 14px;
}
.gp-minicart-checkout { background: #C9A84C; color: #0A0A0A !important; }
.gp-minicart-checkout:hover { background: #9B7B2E; color: #fff !important; }
.gp-minicart-view { background: transparent; color: #0A0A0A !important; border: 2px solid #0A0A0A; }
.gp-minicart-view:hover { background: #0A0A0A; color: #fff !important; }

/* ---- Breadcrumb ---- */
.gp-breadcrumb {
  padding: 12px max(20px,5vw);
  font-size: 11px; color: #999; letter-spacing: 0.05em;
  background: #F7F5F0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.gp-breadcrumb a { color: #666; }
.gp-breadcrumb a:hover { color: #C9A84C; }
.gp-breadcrumb span { color: #C9A84C; }

/* ---- Anúncio deslizante no header-top ---- */
.gp-header-top {
  overflow: hidden; position: relative;
}
.gp-ticker-wrap {
  display: flex; width: max-content;
  animation: gpTicker 22s linear infinite;
}
.gp-ticker-item { padding: 0 64px; white-space: nowrap; }
@keyframes gpTicker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.gp-header-top:hover .gp-ticker-wrap { animation-play-state: paused; }

/* ---- Skeleton loading para produtos ---- */
@keyframes gpSkeleton {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.gp-skeleton {
  background: linear-gradient(90deg, #e8e8e8 25%, #f0f0f0 50%, #e8e8e8 75%);
  background-size: 800px 100%;
  animation: gpSkeleton 1.5s infinite linear;
}

/* ---- Notificação toast ---- */
#gp-toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #0A0A0A; color: #fff;
  padding: 12px 24px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  z-index: 9998; opacity: 0; transition: all 0.3s ease;
  border-left: 3px solid #C9A84C; white-space: nowrap;
  pointer-events: none;
}
#gp-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Mini cart: itens injetados via AJAX fragment ---- */
.gp-minicart-body { padding: 0 24px; }

.gp-minicart-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.gp-minicart-item-img img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.gp-minicart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.gp-minicart-item-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1A1A1A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gp-minicart-item-qty {
  font-size: 11px;
  color: #999;
}
.gp-minicart-item-price {
  font-size: 13px;
  font-weight: 600;
  color: #9B7B2E;
}

/* Garantir que o total-amount seja dourado (alvo do fragment) */
.gp-minicart-total-amount { color: #C9A84C; font-weight: 700; }
