/* ------------------------------------
    쇼핑 페이지 (shopping.html) 전용 스타일
   ------------------------------------ */

.page-header p {
  font-size: 18px;
  color: #6b7280;
}

/* 검색 및 필터 */
.search-filter-section {
  background: white;
  padding: 20px;
  border-radius: 24px;
  margin-bottom: 40px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid #fef7ed;
}

#searchInput {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  padding: 10px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: transparent;
  color: #374151;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: #f3f4f6;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: #f59e0b;
  color: white;
  border-color: #f59e0b;
}

/* 상품 그리드 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3열 고정, 각 열이 1fr씩 */
  gap: 25px;
  width: 100%; /* 그리드 컨테이너가 부모 폭에 맞게 줄어듦 */
  max-width: 1200px; /* 필요시 최대 넓이 제한 */
  margin: 0 auto; /* 가운데 정렬 */
}

.product-card {
  background: white;
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  border: 1px solid #fef7ed;
  width: 100%; /* 각 그리드 셀 내부에서 카드가 꽉 채움 */
  min-height: 350px; /* 높이는 필요하면 고정 */
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.product-img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  background: #f3f4f6;
  transition: transform 0.3s ease;
}

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

.product-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-name {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 10px;
  flex-grow: 1;
  white-space: normal;  
  word-break: break-word;  
  overflow-wrap: break-word; 
}

.product-price {
  font-size: 22px;
  font-weight: bold;
  color: #f59e0b;
  margin-bottom: 20px;
  text-align: right;
}

.product-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  flex-grow: 1;
  padding: 12px;
  border-radius: 999px;
  border: 1px solid;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-cart {
  border-color: #f59e0b;
  color: #f59e0b;
}

.btn-cart:hover {
  background: #f59e0b;
  color: white;
  transform: scale(1.05);
}

.btn-buy {
  background: #f59e0b;
  color: white;
  border-color: #f59e0b;
}

.btn-buy:hover {
  background: #d97706;
  border-color: #d97706;
  transform: scale(1.05);
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
  gap: 10px;
}

.page-link {
  display: block;
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  text-decoration: none;
  color: #374151;
  background-color: #ffffff;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 36px;
  text-align: center;
}

.page-link:hover:not(.active):not(.disabled) {
  background-color: #f3f4f6;
  border-color: #a1a1aa;
  color: #1f2937;
}

.page-link.active {
  background-color: #f59e0b;
  color: white;
  border-color: #f59e0b;
  font-weight: bold;
  cursor: default;
  box-shadow: 0 2px 5px rgba(245, 158, 11, 0.3);
}

.page-link.disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
  border-color: #e5e7eb;
}

.first-last-page-link {
  background-color: #ffdd99;
  color: white;
  border-color: #ffdd99;
  font-weight: bold;
}

.first-last-page-link:hover:not(.active):not(.disabled) {
  background-color: #ffbb33;
  border-color: #ffbb33;
  color: white;
}

.nav-page-link {
  background-color: #ff9933;
  color: white;
  border-color: #ff9933;
  font-weight: bold;
}

.nav-page-link:hover:not(.active):not(.disabled) {
  background-color: #ff6600;
  border-color: #ff6600;
  color: white;
}
