@keyframes spin-modern {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn-modern {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes loading-modern {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.product-card-modern {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  animation: fadeIn-modern 0.5s ease-out;
  margin: 8px;
  text-align: left; /* Rata kiri */
}

.product-card-modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.product-image-wrapper-modern {
  position: relative;
  background: #f5f5f5;
  overflow: hidden;
}

.image-link-modern {
  display: block;
  text-decoration: none;
}

.image-container-modern {
  position: relative;
  padding-bottom: 100%;
  background: #fafafa;
}

.product-image-modern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-image-modern.image-visible-modern {
  opacity: 1;
}

.product-card-modern:hover .product-image-modern {
  transform: scale(1.05);
}

.image-skeleton-modern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-modern 1.5s infinite;
}

.spinner-modern {
  width: 32px;
  height: 32px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #ff30a5; /* Warna brand */
  border-radius: 50%;
  animation: spin-modern 1s linear infinite;
}

.image-overlay-modern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.quick-view-btn-modern {
  background: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #ff30a5; /* Warna brand */
  cursor: pointer;
  transition: transform 0.2s;
}

.quick-view-btn-modern:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #ff30a5, #ff6b6b);
  color: white;
}

.badge-official-modern {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(4px);
  background: rgba(0,0,0,0.7);
  color: #FFB300;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.badge-discount-modern {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(4px);
  background: linear-gradient(135deg, #ff30a5, #ff6b6b);
  color: white;
  z-index: 2;
}

.flash-sale-timer-modern {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  padding: 6px;
  z-index: 2;
}

.timer-header-modern {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ff6b6b;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 4px;
  justify-content: flex-start; /* Rata kiri */
}

.timer-countdown-modern {
  display: flex;
  gap: 4px;
  justify-content: flex-start; /* Rata kiri */
}

.time-unit-modern {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0,0,0,0.8);
  border-radius: 4px;
  padding: 2px 4px;
  min-width: 32px;
}

.time-value-modern {
  color: white;
  font-size: 12px;
  font-weight: 700;
  font-family: monospace;
}

.time-label-modern {
  color: rgba(255,255,255,0.7);
  font-size: 8px;
  font-weight: 500;
}

.product-info-modern {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left; /* Rata kiri */
}

.product-title-modern {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 38px;
  text-align: left; /* Rata kiri */
}

.product-title-modern:hover {
  color: #ff30a5; /* Warna brand */
}

.seller-name-modern {
  font-size: 11px;
  color: #666;
  text-align: left; /* Rata kiri */
}

.price-section-modern {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
  justify-content: flex-start; /* Rata kiri */
}

.current-price-modern {
  font-size: 16px;
  font-weight: 700;
  color: #ff30a5; /* Warna brand */
}

.price-before-discount-modern {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
}

.stock-info-modern {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  margin-top: 4px;
  text-align: left; /* Rata kiri */
}

.in-stock-modern {
  color: #28a745;
}

.low-stock-modern {
  color: #ff9800;
}

.out-of-stock-modern {
  color: #dc3545;
}

.stock-status-modern {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  margin-top: 4px;
  text-align: left; /* Rata kiri */
}

.variant-info-modern {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #999;
  margin-top: 2px;
  text-align: left; /* Rata kiri */
}

.variant-text-modern {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
}

.preorder-timer-modern {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  padding: 6px;
  z-index: 2;
}

.outofstock-overlay-modern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
  z-index: 3;
}

.no-image-modern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}