/* ============================================================
   PAVI'S LAB — products.css
   Products listing page. Shared prod-card styles also used
   by the related-products section on the product detail page.
   ============================================================ */

/* ── Fixed background (same across public pages) ── */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('https://res.cloudinary.com/dhpxr9ubq/image/upload/v1779472936/bg_xzjklr.png') center / cover no-repeat;
  filter: brightness(0.35);
  pointer-events: none;
}

/* ── Products page wrapper ── */
.products-page {
  min-height: calc(100vh - 80px);
  padding: 32px 0 80px;
}

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 8px;
}

.page-title {
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 700;
  color: #fff;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--pink-light); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--pink); }
.breadcrumb span { color: rgba(255, 255, 255, 0.3); }

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(10, 10, 10, 0.88);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ff007f' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1px solid rgba(255, 0, 127, 0.35);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 36px 10px 14px;
  cursor: pointer;
  min-width: 148px;
  backdrop-filter: blur(8px);
  transition: border-color var(--transition);
}
.filter-select:focus { outline: none; border-color: var(--pink); }
.filter-select option { background: #1a1a1a; color: #fff; }

.filter-count {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

/* ── Product grid ── */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* ── Product card ── */
.prod-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.prod-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.58);
  border-color: rgba(255, 0, 127, 0.24);
}

/* Image wrapper — square */
.prod-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(15, 15, 15, 0.9);
}

.prod-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.prod-card:hover .prod-img-wrap img { transform: scale(1.07); }

.prod-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  background: rgba(255, 0, 127, 0.06);
}

/* Wish button */
.wish-btn {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.55);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.wish-btn:hover { background: rgba(255, 0, 127, 0.3); transform: scale(1.12); }
.wish-btn.wishlisted { color: var(--pink); background: rgba(255, 0, 127, 0.18); }

/* Tag badge */
.prod-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  background: var(--pink);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Card text body */
.prod-info {
  padding: 12px 14px 14px;
}

.prod-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.prod-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--pink);
}

.prod-packing-note {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 2px;
}

/* ── Empty / error state ── */
.prod-empty-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 15px;
}

/* ── Skeleton loading ── */
.skeleton-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.skeleton-img {
  aspect-ratio: 1 / 1;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 200% 100%;
  animation: prod-shimmer 1.4s infinite;
}

.skeleton-text { padding: 12px 14px; }

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  margin-bottom: 8px;
}
.skeleton-line.short { width: 52%; }

@keyframes prod-shimmer { to { background-position: -200% 0; } }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .prod-grid { gap: 10px; }
  .prod-info { padding: 10px 11px 12px; }
  .prod-name { font-size: 13px; }
  .prod-price { font-size: 14px; }
  .filter-select { min-width: 120px; font-size: 13px; }
}
