/* ============================================================
   PRODUCTS / GALLERY PAGE STYLES
   ============================================================ */

.products-hero {
  background: var(--gradient-dark);
  padding: var(--space-16) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.products-hero h1 {
  font-size: var(--text-4xl);
  font-weight: 900;
  color: white;
  margin-bottom: var(--space-4);
}

.products-hero p {
  color: rgba(255,255,255,0.65);
  font-size: var(--text-lg);
}

.products-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,59,92,0.2) 0%, transparent 70%);
}

/* ---- Products Layout ---- */
.products-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-8);
  padding: var(--space-10) 0;
  align-items: start;
}

/* ---- Filter Sidebar ---- */
.filter-sidebar {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  padding: var(--space-6);
  position: sticky;
  top: calc(68px + var(--space-6));
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.filter-header h3 {
  font-size: var(--text-base);
  font-weight: 700;
}

.filter-clear {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.filter-clear:hover { opacity: 0.7; }

.filter-section {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.filter-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-section h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.filter-option:hover { color: var(--color-primary); }

.filter-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.filter-count {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* Price Range Slider */
.price-range-wrap {
  margin-top: var(--space-3);
}

.price-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.price-range-slider {
  width: 100%;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* ---- Products Grid ---- */
.products-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.products-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.products-sort {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.products-sort label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.product-grid-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  position: relative;
}

.product-grid-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.14), 0 0 0 1px rgba(255,59,92,0.15);
  border-color: rgba(255,59,92,0.2);
}

/* Product badge (Best Seller etc) */
.sp-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  background: rgba(15,15,25,0.82);
  color: rgba(255,255,255,0.92);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
}

.product-grid-img {
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  /* Subtle dark background so stickers pop */
  background: #13131f;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Sticker Preview ---- */
.sp-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
.product-grid-card:hover .sp-wrap { transform: scale(1.1) rotate(-2deg); }

/* The sticker itself */
.sp {
  position: relative;
  width: 138px;
  height: 138px;
  background: #fff;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.5));
  flex-shrink: 0;
}
/* Shape variants */
.sp.circle    { border-radius: 50%; }
.sp.square    { border-radius: 14px; }
.sp.rectangle { border-radius: 12px; width: 162px; height: 108px; }
.sp.oval      { border-radius: 50%; width: 162px; height: 108px; }
.sp.diecut    {
  clip-path: polygon(50% 0%,82% 10%,100% 38%,90% 72%,65% 95%,35% 95%,10% 72%,0% 38%,18% 10%);
  border-radius: 0;
}
/* 5-pointed star shape */
.sp.star {
  clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
  border-radius: 0;
}

/* Inner artwork (leaves white border around it) */
.sp-inner {
  position: absolute;
  inset: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp.circle  .sp-inner { border-radius: 50%; }
.sp.square  .sp-inner { border-radius: 7px; }
.sp.rectangle .sp-inner { border-radius: 5px; }
.sp.oval    .sp-inner { border-radius: 50%; }
.sp.diecut  .sp-inner {
  inset: 5px;
  clip-path: polygon(50% 0%,82% 10%,100% 38%,90% 72%,65% 95%,35% 95%,10% 72%,0% 38%,18% 10%);
}
.sp.star .sp-inner {
  inset: 5px;
  clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}

.sp-inner svg { width: 52%; height: 52%; flex-shrink: 0; }

/* Glossy sheen */
.sp-gloss {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.35) 0%, transparent 55%);
  pointer-events: none;
  border-radius: inherit;
}
.sp.circle .sp-gloss, .sp.oval .sp-gloss { border-radius: 50%; }

/* Holographic rainbow shift */
@keyframes holo-shift {
  0%   { background-position: 0% 50%;   filter: hue-rotate(0deg); }
  50%  { background-position: 100% 50%; filter: hue-rotate(180deg); }
  100% { background-position: 0% 50%;   filter: hue-rotate(360deg); }
}
.sp-holo {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,0,128,0.45) 0%,
    rgba(255,165,0,0.35) 16%,
    rgba(255,255,0,0.35) 32%,
    rgba(0,255,128,0.35) 48%,
    rgba(0,200,255,0.35) 64%,
    rgba(128,0,255,0.40) 80%,
    rgba(255,0,128,0.45) 100%
  );
  background-size: 300% 300%;
  animation: holo-shift 3s ease infinite;
  mix-blend-mode: color;
  pointer-events: none;
  border-radius: inherit;
}
.sp.circle .sp-holo, .sp.oval .sp-holo { border-radius: 50%; }
.sp.diecut .sp-holo {
  clip-path: polygon(50% 0%,82% 10%,100% 38%,90% 72%,65% 95%,35% 95%,10% 72%,0% 38%,18% 10%);
}
.sp.star .sp-holo {
  clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}

/* Matte badge */
.sp-matte-badge {
  position: absolute;
  bottom: -6px;
  right: -6px;
  background: rgba(30,30,50,0.85);
  color: rgba(255,255,255,0.7);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  pointer-events: none;
}

/* Small shadow under card to look like it's floating */
.product-grid-img::after {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 12px;
  background: rgba(0,0,0,0.35);
  border-radius: 50%;
  filter: blur(6px);
  pointer-events: none;
}

.product-grid-img-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  transition: transform var(--transition-base);
}

.product-grid-card:hover .product-grid-img-inner {
  transform: scale(1.08);
}

.product-grid-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,26,46,0.85);
  opacity: 0;
  transition: opacity var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.product-grid-card:hover .product-grid-overlay {
  opacity: 1;
}

.product-grid-info {
  padding: var(--space-4) var(--space-5) var(--space-5);
}

.product-grid-name {
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--color-text);
  line-height: 1.3;
}

/* Shape · Material · Finish meta row */
.product-grid-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.pgm-dot { opacity: 0.4; }
.pgm-shape { font-weight: 600; }
.pgm-holo {
  background: linear-gradient(90deg,#f72585,#7209b7,#4cc9f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.product-grid-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.product-grid-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-primary);
}
.pgp-unit {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Small Customize button on the card */
.pgc-btn {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.product-grid-card:hover .pgc-btn {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.product-grid-tags {
  display: flex;
  gap: var(--space-1);
}

.product-tag {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--color-surface-2);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
  background: var(--color-surface);
}

.page-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.page-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .products-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .products-toolbar { flex-direction: column; align-items: flex-start; }
}
