/* 팝업 스타일 */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.popup-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f5f5;
}

.popup-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.popup-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.popup-close:hover {
  color: #333;
}

.popup-content {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.popup-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 16px;
}

.popup-content p {
  margin: 0 0 16px 0;
  line-height: 1.6;
  color: #666;
}

.popup-link {
  display: inline-block;
  padding: 10px 20px;
  background: #1890ff;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s;
}

.popup-link:hover {
  background: #40a9ff;
}

.popup-footer {
  padding: 12px 20px;
  border-top: 1px solid #e8e8e8;
  background: #fafafa;
}

.popup-footer label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

.popup-footer input[type="checkbox"] {
  cursor: pointer;
}

/* 제품 카드 스타일 */
#products-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-card h3 {
  margin: 16px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.product-card .category {
  margin: 0 16px 8px;
  font-size: 14px;
  color: #1890ff;
  font-weight: 500;
}

.product-card .brand {
  margin: 0 16px 8px;
  font-size: 13px;
  color: #999;
}

.product-card .price {
  margin: 0 16px 16px;
  font-size: 20px;
  font-weight: 700;
  color: #ff4d4f;
}

.product-card .description {
  margin: 0 16px 16px;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .popup-container {
    width: 90% !important;
    max-width: 400px;
    height: auto !important;
    max-height: 80vh;
  }

  #products-container {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 480px) {
  #products-container {
    grid-template-columns: 1fr;
  }
}
