/* ═══════════════════════════════════════════════
   PRODUCTS — Refined editorial grid
═══════════════════════════════════════════════ */
.products { 
  background: var(--cream); 
  padding: 2px 0 0 0;
}

/* ── Empty State ── */
.products-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 120px 24px;
  color: var(--text-3);
}
.products-empty::before {
  content: '⌕';
  display: block; 
  font-size: 56px; 
  margin-bottom: 24px;
  opacity: 0.15;
}
.products-empty p { 
  font-size: 15px; 
  line-height: 1.8; 
  max-width: 500px;
  margin: 0 auto;
}
.products-empty strong { 
  color: var(--text-2); 
  font-weight: 500;
}

/* ── Product Grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  background: transparent;
  padding: 0;
}

/* ═══════════════════════════════════════════════
   PRODUCT CARD — Refined & Cohesive
═══════════════════════════════════════════════ */

/* Staggered reveal animation */
@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Subtle shimmer sweep */
@keyframes cardShine {
  0%   { left: -100%; }
  100% { left: 120%; }
}

/* Shine glow effect */
@keyframes glowPulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.8; }
}

.pc {
  background: #ffffff;
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid var(--border-d);
  box-shadow: 
    0 2px 8px rgba(0,0,0,0.02), 
    0 1px 3px rgba(0,0,0,0.015);
  overflow: hidden;
  /* Smooth multi-property transition */
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s ease,
    background 0.4s ease;
  will-change: transform, box-shadow, border-color;
}

/* Stagger animation for cards on first render */
.pc[data-index="0"] { animation: cardReveal 0.7s 0.05s cubic-bezier(0.16,1,0.3,1) both; }
.pc[data-index="1"] { animation: cardReveal 0.7s 0.13s cubic-bezier(0.16,1,0.3,1) both; }
.pc[data-index="2"] { animation: cardReveal 0.7s 0.21s cubic-bezier(0.16,1,0.3,1) both; }
.pc[data-index="3"] { animation: cardReveal 0.7s 0.29s cubic-bezier(0.16,1,0.3,1) both; }
.pc[data-index="4"] { animation: cardReveal 0.7s 0.37s cubic-bezier(0.16,1,0.3,1) both; }
.pc[data-index="5"] { animation: cardReveal 0.7s 0.45s cubic-bezier(0.16,1,0.3,1) both; }
.pc[data-index="6"] { animation: cardReveal 0.7s 0.53s cubic-bezier(0.16,1,0.3,1) both; }
.pc[data-index="7"] { animation: cardReveal 0.7s 0.61s cubic-bezier(0.16,1,0.3,1) both; }

/* Hover — refined elevation + glow */
.pc:hover {
  background: white;
  box-shadow:
    0 20px 50px rgba(0,0,0,0.09),
    0 8px 24px rgba(0,0,0,0.05),
    0 2px 8px rgba(0,0,0,0.03),
    inset 0 1px 0 rgba(255,255,255,0.4);
  transform: translateY(-12px) scale(1.02);
  border-color: rgba(26,24,20,0.2);
  z-index: 10;
}

/* Shine pseudo-element */
.pc::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 70%;
  height: 100%;
  background: linear-gradient(
    110deg,
    transparent 15%,
    rgba(255,255,255,0.25) 45%,
    rgba(255,255,255,0.12) 55%,
    transparent 85%
  );
  transform: skewX(-12deg);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.pc:hover::before {
  animation: cardShine 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  opacity: 1;
}

/* Glow effect on hover */
.pc::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at top right, rgba(46,107,69,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.pc:hover::after {
  opacity: 1;
}

/* ── Visual (image zone) ── */
.pc__visual {
  height: 200px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.2) 100%);
  transition: background 0.5s ease;
}

/* Organic texture for dairy background */
.pc__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(200,220,200,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(46,107,69,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.pc:hover .pc__visual::before {
  opacity: 1;
}

.pc__visual--photo img {
  width: 100%; 
  height: 100%;
  object-fit: cover;
  object-position: center;
  padding: 0;
  box-sizing: border-box;
  transition: 
    filter 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  filter: saturate(0.82) brightness(1.01);
  position: relative;
  z-index: 2;
}
.pc:hover .pc__visual--photo img {
  filter: saturate(1.08) brightness(1.02);
  transform: scale(1.04);
}

/* Uniform editorial placeholder visuals */
.pc__visual--symbio  { background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(240,245,240,0.3) 100%); }
.pc__visual--yogurt  { background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(245,240,240,0.3) 100%); }
.pc__visual--milk    { background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(240,245,250,0.3) 100%); }
.pc__visual--ryazh   { background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(245,242,238,0.3) 100%); }
.pc__visual--butter  { background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(250,245,238,0.3) 100%); }
.pc__visual--cottage { background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(248,245,242,0.3) 100%); }
.pc__visual--sour    { background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(248,248,245,0.3) 100%); }
.pc__visual--cultures{ background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(245,240,242,0.3) 100%); }

/* Elegant serif watermark */
.pc__visual:not(.pc__visual--photo)::after {
  content: 'К';
  font-family: 'Cormorant Garant', serif;
  font-size: 96px;
  font-weight: 300;
  color: var(--text);
  opacity: 0.05;
  display: block;
  pointer-events: none;
  position: relative;
  z-index: 2;
  transition: 
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.pc:hover .pc__visual:not(.pc__visual--photo)::after {
  opacity: 0.12;
  transform: scale(1.08) rotate(2deg);
}

/* Badge */
.pc__badge {
  position: absolute; 
  top: 14px; 
  left: 14px; 
  z-index: 4;
  font-size: 8px; 
  font-weight: 700; 
  letter-spacing: 1.8px;
  text-transform: uppercase; 
  color: var(--green);
  background: rgba(255,255,255,0.92);
  padding: 5px 11px;
  border-radius: 100px;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}
.pc:hover .pc__badge {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Body — better spacing */
.pc__body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 1;
}

.pc__cat {
  font-size: 9px; 
  font-weight: 700; 
  letter-spacing: 2.2px;
  text-transform: uppercase; 
  color: var(--text-3);
  margin-bottom: 8px;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.pc:hover .pc__cat { 
  color: var(--green); 
}

.pc__name {
  font-family: 'Cormorant Garant', serif;
  font-size: 20px; 
  font-weight: 400;
  color: var(--text); 
  line-height: 1.25;
  margin-bottom: 8px;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: -0.3px;
}
.pc:hover .pc__name { 
  color: var(--black); 
}

.pc__desc {
  font-size: 12px; 
  color: var(--text-3);
  line-height: 1.65; 
  flex: 1;
  margin-bottom: 4px;
}

.pc__variants {
  display: flex; 
  gap: 6px; 
  flex-wrap: wrap;
  margin-top: 12px;
}
.pc__variants span {
  font-size: 10px; 
  color: var(--text-3);
  padding: 4px 10px;
  border: 1px solid var(--border-d);
  border-radius: var(--radius-sm);
  background: rgba(245,245,242,0.6);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 500;
}
.pc:hover .pc__variants span {
  background: rgba(46,107,69,0.08);
  border-color: rgba(46,107,69,0.25);
  color: var(--green);
  transform: translateY(-1px);
}

/* Button — refined interaction */
.pc__btn {
  margin-top: 16px;
  display: block; 
  width: 100%; 
  text-align: center;
  font-size: 10.5px; 
  font-weight: 700; 
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text); 
  padding: 11px 0;
  border: 1px solid var(--border-d);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  position: relative;
  overflow: hidden;
}

.pc__btn::before {
  content: '';
  position: absolute; 
  inset: 0;
  background: linear-gradient(135deg, var(--black) 0%, rgba(26,24,20,0.95) 100%);
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  z-index: 0;
}

.pc__btn span, .pc__btn:not(:has(span)) {
  position: relative; 
  z-index: 1;
}

.pc__btn:hover {
  color: var(--cream);
  border-color: var(--black);
  box-shadow: 
    0 8px 28px rgba(10,9,7,0.16),
    inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.pc__btn:hover::before {
  transform: translateY(0);
}

.pc__btn--dark { 
  color: var(--text); 
}

.pc__btn:active {
  transform: translateY(0px);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .products-grid { 
    grid-template-columns: repeat(3, 1fr); 
    gap: 22px;
  }
}

@media (max-width: 900px) {
  .products-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 18px; 
  }
  
  .pc {
    border-radius: 12px;
  }
  
  .pc__visual {
    height: 180px;
  }
}

@media (max-width: 640px) {
  .products-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
  }
  
  /* Compact cards on small screens */
  .pc__visual { 
    height: 130px; 
  }
  .pc__visual--photo img { 
    padding: 0; 
  }
  
  .pc__body { 
    padding: 12px 14px 14px; 
  }
  
  .pc__cat {
    font-size: 8px;
    margin-bottom: 6px;
  }
  
  .pc__name { 
    font-size: 16px; 
    line-height: 1.2;
  }
  
  .pc__desc { 
    font-size: 11px;
    display: none; 
  }
  
  .pc__badge {
    font-size: 7px;
    padding: 4px 8px;
    top: 10px;
    left: 10px;
  }
  
  .pc__variants { 
    margin-top: 8px; 
    gap: 4px; 
  }
  .pc__variants span { 
    font-size: 9px; 
    padding: 3px 8px; 
  }
  
  .pc__btn { 
    margin-top: 10px; 
    padding: 9px 0;
    font-size: 9px;
    letter-spacing: 1.2px;
  }
  
  /* Reduce animations on mobile */
  .pc:hover { 
    transform: translateY(-6px) scale(1.01); 
  }
  .pc:hover::before { 
    animation: none; 
    opacity: 0;
  }
}

/* ═══════════════════════════════════════════════
   CATEGORY BUTTONS — refined styling
═══════════════════════════════════════════════ */
.cat-buttons {
  display: flex; 
  flex-wrap: wrap; 
  gap: 12px;
  margin-bottom: 48px;
}

.cat-btn {
  padding: 12px 26px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 12px; 
  font-weight: 600; 
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.cat-btn:hover {
  border-color: rgba(26,24,20,0.2);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.cat-btn.active {
  background: var(--black);
  color: var(--cream);
  border-color: var(--black);
  box-shadow: 
    0 8px 28px rgba(10,9,7,0.18),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

.cat-btn.active:hover {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 
    0 12px 32px rgba(46,107,69,0.25),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

@media (max-width: 640px) {
  .cat-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px; 
    margin-bottom: 32px;
  }
  .cat-btn {
    padding: 10px 6px;
    font-size: 10px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ═══════════════════════════════════════════════
   LOAD MORE — "Показати ще"
═══════════════════════════════════════════════ */
.products-loadmore {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.products-loadmore__btn {
  display: inline-flex; 
  align-items: center; 
  gap: 10px;
  padding: 13px 36px;
  background: transparent;
  border: 1px solid rgba(26,24,20,0.16);
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 11px; 
  font-weight: 700; 
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 44px;
  position: relative;
  overflow: hidden;
}

.products-loadmore__btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--black);
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}

.products-loadmore__btn span,
.products-loadmore__btn:not(:has(span)) {
  position: relative;
  z-index: 1;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.products-loadmore__btn:hover {
  border-color: var(--black);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(10,9,7,0.15);
}

.products-loadmore__btn:hover span,
.products-loadmore__btn:hover:not(:has(span)) {
  color: var(--cream);
}

.products-loadmore__btn:hover::before {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .products-loadmore { 
    margin-top: 32px; 
  }
  .products-loadmore__btn { 
    width: 100%; 
  }
}
