/* ============================================================
   COMPONENT: Product Card + Grid + Lightbox
   Sitemap: 03 — Catálogo · 10 Modelos · Catalog Images 899×1350
   Card: Image (clickable → lightbox) + Name + Price + CTA
   ============================================================ */

#produtos {
  background: var(--bg-alt);
}

/* Tighten gap between hero and catalog on mobile */
@media (max-width: 768px) {
  #produtos {
    padding-top: 40px;
  }
}

/* ── Grid ────────────────────────────────────────────────── */
.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ── Card ────────────────────────────────────────────────── */
.pcard {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
  display: flex;
  flex-direction: column;
}

.pcard:hover {
  transform: translateY(-8px);
  border-color: var(--orange-border);
  box-shadow: 0 20px 56px rgba(255, 73, 0, 0.11);
}

/* Disable hover-lift on touch devices */
@media (hover: none) {
  .pcard:hover { transform: none; box-shadow: none; }
  .pcard:active {
    border-color: var(--orange-border);
    box-shadow: 0 8px 24px rgba(255, 73, 0, 0.08);
  }
}

/* ── Image area (catalog 899×1350 = 2:3 ratio) ──────────── */
.pimg {
  aspect-ratio: 899 / 1350;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
}

.pimg:hover .pimg-catalog {
  transform: scale(1.03);
}

.pimg:hover .pimg-zoom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.pimg .orb { width: 130px; height: 130px; top: -30px; right: -20px; }
.pimg .orb2 { width: 80px; height: 80px; bottom: -20px; left: -10px; opacity: .45; }

/* Catalog image */
.pimg-catalog {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  transition: transform .4s ease;
}

/* Emoji fallback (shown when image fails to load) */
.pimg-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.pemi {
  font-size: 68px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 16px rgba(255, 73, 0, 0.3));
  user-select: none;
}

/* Zoom hint icon */
.pimg-zoom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 3;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}

.pimg-zoom svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

/* ── Tag badge (Novo / Mais Vendido) ─────────────────────── */
.ptag {
  position: absolute;
  top: 11px;
  left: 11px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ccc;
  z-index: 4;
}

.ptag.new  { border-color: rgba(255, 73, 0, 0.4);  color: var(--orange); }
.ptag.best { border-color: rgba(255, 210, 0, 0.4); color: #FFD700; }

/* ── Body (simplified: name + price + CTA) ──────────────── */
.pbody {
  padding: 17px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pname {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -.01em;
}

.pprice {
  font-size: 21px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -.02em;
  margin-bottom: 14px;
}

.pprice span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── CTA ─────────────────────────────────────────────────── */
.pcta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--orange);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  padding: 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .2s, transform .15s;
  margin-top: auto;
  /* Touch target compliance */
  min-height: var(--touch-min);
}

.pcta:hover {
  background: var(--orange-hover);
  transform: scale(0.98);
}

@media (hover: none) {
  .pcta:hover { transform: none; }
}

/* ── Catalog CTA (below grid) ────────────────────────────── */
.catalog-cta {
  margin-top: 40px;
  text-align: center;
  padding: 36px 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.catalog-cta-text {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 560px;
}

.catalog-cta-btn {
  font-size: 15px;
  padding: 16px 32px;
}

@media (max-width: 768px) {
  .catalog-cta {
    margin-top: 28px;
    padding: 28px 20px;
  }

  .catalog-cta-btn {
    width: 100%;
  }
}

/* ============================================================
   LIGHTBOX — Full-screen catalog image viewer
   ============================================================ */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Close button */
.lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s, transform .15s;
  z-index: 10;
}

.lb-close:hover {
  background: rgba(255, 73, 0, 0.2);
  border-color: var(--orange-border);
  transform: scale(1.05);
}

/* Image container */
.lb-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 90vw;
  max-height: 85vh;
  transform: scale(0.92);
  transition: transform .3s ease;
}

.lightbox-overlay.active .lb-content {
  transform: scale(1);
}

.lb-img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

/* Emoji fallback in lightbox */
.lb-fallback {
  width: 300px;
  height: 450px;
  background: #1a1a1a;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

/* Product name below image */
.lb-name {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── Tablet (≤768px): feed single column ─────────────────── */
@media (max-width: 768px) {
  .pgrid {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 480px;
    margin: 0 auto;
  }

  .pimg-zoom {
    /* Always visible on mobile (no hover) */
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1);
  }

  .ptag {
    font-size: 10px;
    padding: 4px 10px;
  }

  .pbody {
    padding: 20px;
  }

  .pname {
    font-size: 18px;
  }

  .pprice {
    font-size: 24px;
    margin-bottom: 16px;
  }

  .pprice span {
    font-size: 12px;
  }

  .pcta {
    font-size: 15px;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
  }

  /* Lightbox mobile adjustments */
  .lightbox-overlay {
    padding: 16px;
  }

  .lb-close {
    top: 12px;
    right: 12px;
  }

  .lb-img {
    max-height: 75vh;
    border-radius: 8px;
  }

  .lb-content {
    max-width: 95vw;
    max-height: 88vh;
  }

  .lb-fallback {
    width: 250px;
    height: 375px;
    font-size: 90px;
  }
}

/* ── Small mobile (≤375px) ───────────────────────────────── */
@media (max-width: 375px) {
  .pgrid {
    gap: 14px;
  }

  .pemi {
    font-size: 60px;
  }

  .pbody {
    padding: 16px;
  }

  .pname {
    font-size: 17px;
  }

  .pprice {
    font-size: 22px;
  }

  .lb-fallback {
    width: 220px;
    height: 330px;
    font-size: 72px;
  }
}
