/* ═══════════════════════════════════════════════════════════
   TRU SKOOL MALL — Product Panel Styles
   ═══════════════════════════════════════════════════════════ */

#product-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 10, 0.75);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.pp-card {
  position: relative;
  width: 90%;
  max-width: 520px;
  max-height: 80vh;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}

.pp-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: rgba(30, 28, 44, 0.6);
  color: var(--text-dim);
  font-size: 18px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}

.pp-close:hover {
  border-color: var(--gold);
  color: var(--text);
}

/* ─── Store Header ─── */
.pp-store-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
  padding-right: 40px;
}

#pp-store-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

#pp-store-tag {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ─── Product Grid ─── */
#pp-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.pp-grid-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  background: rgba(20, 18, 30, 0.4);
}

.pp-grid-item:hover {
  border-color: var(--accent, var(--gold));
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.pp-item-visual {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.pp-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pp-grid-item:hover .pp-item-img {
  transform: scale(1.08);
}

.pp-item-icon-fallback {
  font-size: 36px;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.pp-item-icon {
  font-size: 36px;
  opacity: 0.6;
}

.pp-item-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pp-item-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.pp-item-price {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
}

.pp-featured-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--gold);
  color: var(--bg-dark);
}

/* ─── Product Detail ─── */
.pp-back {
  border: none;
  background: none;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 16px;
  transition: color 0.2s;
}

.pp-back:hover { color: var(--gold); }

.pp-detail-content {
  display: flex;
  gap: 20px;
}

.pp-detail-visual {
  width: 160px;
  height: 200px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  overflow: hidden;
}

.pp-detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.pp-detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#pp-detail-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.pp-cat-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
}

#pp-detail-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}

.pp-detail-price {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}

.pp-shop-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s;
}

.pp-shop-btn:hover { opacity: 0.85; }

/* ─── Visit Store Link ─── */
.pp-visit-store {
  display: block;
  text-align: center;
  padding: 12px;
  margin-top: 16px;
  border: 1px solid;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.2s;
}

.pp-visit-store:hover {
  opacity: 0.8;
}

/* ─── Mobile ─── */
@media (max-width: 600px) {
  .pp-card {
    width: 95%;
    padding: 20px;
    max-height: 85vh;
  }

  .pp-detail-content {
    flex-direction: column;
  }

  .pp-detail-visual {
    width: 100%;
    height: 120px;
  }

  #pp-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
