/* ============================================================
   NickAviz — Shop / PLP (Product Listing Page)
   Quiet Luxury catalog · Grid + List that actually switches
   ============================================================ */

.shop-plp {
  --plp-max: 1240px;
  --plp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  padding: 0 0 3.5rem;
}

.shop-plp-hero {
  max-width: var(--plp-max);
  margin: 0 auto;
  padding: 1.75rem clamp(1rem, 3vw, 1.75rem) 0.5rem;
  display: grid;
  gap: 0.65rem;
}
.shop-plp-hero .eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nx-rose, #C86B96);
  font-weight: 600;
}
.shop-plp-hero h2 {
  margin: 0;
  font-family: var(--nx-display, 'Markazi Text', serif);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--nx-ink, #2F2430);
  font-weight: 600;
  line-height: 1.15;
}
.shop-plp-hero p {
  margin: 0;
  max-width: 42ch;
  color: var(--nx-mute, #7A6570);
  line-height: 1.7;
  font-size: 0.95rem;
}

.shop-plp-toolbar {
  max-width: var(--plp-max);
  margin: 0 auto 1.5rem;
  padding: 1rem clamp(1rem, 3vw, 1.75rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  position: sticky;
  top: calc(var(--header, 68px) + var(--announce, 34px));
  z-index: 25;
  background: color-mix(in srgb, var(--nx-bg, #FFF9FB) 90%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--nx-line, #F0D8E4);
}

.shop-plp-toolbar .filter-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.shop-plp-toolbar .filter-tabs::-webkit-scrollbar { display: none; }

.shop-plp-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}

.shop-plp-search {
  display: flex;
  flex: 1;
  min-width: min(100%, 240px);
  max-width: 420px;
  border: 1.5px solid var(--nx-line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.shop-plp-search:focus-within {
  border-color: var(--nx-accent, #EFB4CC);
  box-shadow: 0 10px 28px rgba(200, 107, 150, 0.12);
}
.shop-plp-search input {
  flex: 1;
  border: none !important;
  outline: none;
  background: transparent;
  padding: 0.75rem 1.1rem;
  font-size: 0.9rem;
  color: var(--nx-ink);
  min-width: 0;
}
.shop-plp-search button {
  border: none;
  background: var(--nx-ink);
  color: #fff;
  padding: 0.65rem 1.2rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.3s;
}
.shop-plp-search button:hover { background: var(--nx-rose, #C86B96); }

.view-toggle {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--nx-soft, #FCEEF5);
  border: 1px solid var(--nx-line);
  gap: 2px;
}
.view-toggle button {
  border: none !important;
  background: transparent !important;
  color: var(--nx-mute) !important;
  padding: 0.5rem 0.95rem !important;
  border-radius: 999px !important;
  font-size: 0.82rem !important;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.view-toggle button.active {
  background: #fff !important;
  color: var(--nx-ink) !important;
  box-shadow: 0 6px 16px rgba(47, 36, 48, 0.08);
}

.shop-plp-meta {
  max-width: var(--plp-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.75rem) 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--nx-mute);
  font-size: 0.86rem;
}
.shop-plp-meta strong { color: var(--nx-ink); font-weight: 600; }

#shop-products.products-grid {
  max-width: var(--plp-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.75rem);
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
  gap: 1.5rem !important;
}

/* LIST VIEW — must beat boutique grid rules */
#shop-products.products-grid.list-view {
  grid-template-columns: 1fr !important;
  gap: 1rem !important;
}

#shop-products .product-card.list-mode {
  display: grid !important;
  grid-template-columns: minmax(140px, 220px) 1fr !important;
  align-items: stretch !important;
  transform: none !important;
}
#shop-products .product-card.list-mode:hover {
  transform: translateY(-3px) !important;
}
#shop-products .product-card.list-mode .product-img-wrap {
  aspect-ratio: 1 !important;
  min-height: 140px;
}
#shop-products .product-card.list-mode .product-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.15rem 1.35rem !important;
  gap: 0.45rem;
}
#shop-products .product-card.list-mode .product-actions {
  opacity: 1;
  transform: none;
}
#shop-products .product-card.list-mode h3 {
  font-size: 1.2rem !important;
  margin: 0 !important;
}
#shop-products .product-card.list-mode .product-cta {
  margin-top: 0.35rem;
  align-self: flex-start;
}

#shop-products .product-card {
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--nx-line);
  box-shadow: 0 14px 36px rgba(47, 36, 48, 0.06);
  transition: transform 0.4s var(--plp-ease), box-shadow 0.4s var(--plp-ease), border-color 0.4s;
}
#shop-products .product-card:hover {
  border-color: var(--nx-accent);
  box-shadow: 0 22px 50px rgba(47, 36, 48, 0.1);
}

.shop-plp .pagination {
  max-width: var(--plp-max);
  margin: 2rem auto 0;
  padding: 0 clamp(1rem, 3vw, 1.75rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}
.shop-plp .pagination button {
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--nx-line);
  background: #fff;
  color: var(--nx-mute);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}
.shop-plp .pagination button.active,
.shop-plp .pagination button:hover:not(:disabled) {
  background: var(--nx-ink);
  color: #fff;
  border-color: var(--nx-ink);
}
.shop-plp .pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

@media (min-width: 900px) {
  .shop-plp-toolbar {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .shop-plp-tools { justify-content: flex-end; }
}

@media (max-width: 640px) {
  #shop-products .product-card.list-mode {
    grid-template-columns: 112px 1fr !important;
  }
  #shop-products .product-card.list-mode .product-info {
    padding: 0.85rem !important;
  }
  #shop-products .product-card.list-mode h3 {
    font-size: 0.98rem !important;
  }
  .shop-plp-toolbar {
    top: var(--header, 60px);
  }
}

/* Wishlist active heart */
.pc-act.pc-wish.is-on,
.pdp-util-btn.is-on {
  color: var(--nx-rose, #C86B96) !important;
  border-color: var(--nx-accent) !important;
}
.pc-act.pc-wish.is-on svg path,
.pdp-util-btn.is-on svg path {
  fill: currentColor;
}

/* Compare bar */
.compare-bar {
  position: fixed;
  inset-inline: 0;
  bottom: calc(var(--tabbar, 0px) + env(safe-area-inset-bottom, 0px));
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(47, 36, 48, 0.94);
  color: #fff;
  backdrop-filter: blur(12px);
  box-shadow: 0 -12px 40px rgba(0,0,0,0.18);
}
.compare-bar.is-open { display: flex; }
.compare-bar strong { font-size: 0.92rem; }
.compare-bar .btn-compare-go {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #C86B96, #EFB4CC);
  color: #2F2430;
  font-weight: 700;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
}
.compare-bar .btn-compare-clear {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

/* Compare / Reviews modals reuse simple overlay */
.nx-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(25, 18, 22, 0.55);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.nx-overlay.is-open { display: flex; }
@media (min-width: 768px) {
  .nx-overlay { align-items: center; }
}
.nx-sheet {
  width: min(920px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}
.nx-sheet h3 {
  font-family: var(--nx-display);
  font-size: 1.6rem;
  margin: 0 0 1rem;
  color: var(--nx-ink);
}
.nx-sheet-close {
  float: left;
  border: none;
  background: var(--nx-soft);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
}
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.compare-col {
  border: 1px solid var(--nx-line);
  border-radius: 18px;
  padding: 1rem;
  text-align: center;
}
.compare-col img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 0.75rem;
  background: var(--nx-cream);
}
.compare-col h4 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--nx-ink); }
.compare-col .price { font-weight: 700; color: var(--nx-ink); margin-bottom: 0.75rem; }

.pdp-review-card, .pdp-qa-item {
  border: 1px solid var(--nx-line);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
  background: #fff;
}
.pdp-review-card .meta, .pdp-qa-item .meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--nx-mute);
  margin-bottom: 0.45rem;
}
.pdp-form-row {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0;
}
.pdp-form-row input,
.pdp-form-row textarea,
.pdp-form-row select {
  border: 1.5px solid var(--nx-line);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font: inherit;
  background: #fff;
}
.pdp-form-row button {
  min-height: 46px;
  border: none;
  border-radius: 999px;
  background: var(--nx-ink);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.pdp-hero-frame.is-360 .pdp-hero-img {
  animation: pdpSpinY 2.8s var(--plp-ease) infinite;
}
@keyframes pdpSpinY {
  0% { transform: perspective(800px) rotateY(0deg) scale(1); }
  50% { transform: perspective(800px) rotateY(18deg) scale(1.04); }
  100% { transform: perspective(800px) rotateY(0deg) scale(1); }
}
