/* shop-sale.css - 업소매매 페이지 */

:root {
  --shop-bg: #ffffff;
  --shop-card: #fff;
  --shop-text: #222;
  --shop-muted: #667085;
  --shop-line: #eaedf3;
  --shop-blue: var(--primary-color);
  --shop-chip: var(--primary-accent);
  --shop-chip-text: var(--primary-color);
  --shop-radius: 14px;
}

.shop-sale-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  min-height: calc(100vh - 200px);
}

/* Hero/Search Section */
.hero {
  background: linear-gradient(180deg, #ffffff, #f4f7ff);
  border-radius: 18px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--shop-line);
  margin-bottom: 32px;
}

.hero-content h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  color: var(--shop-text);
}

.hero-content p {
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.5;
}

.search-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.search-form .select,
.search-form .input {
  appearance: none;
  border: 1px solid var(--shop-line);
  background: var(--shop-card);
  padding: 10px 12px;
  border-radius: 10px;
  min-width: 140px;
  font-weight: 600;
  font-size: 16px;
  color: var(--shop-text);
}

.search-form .input {
  flex: 1;
  min-width: 200px;
}

.search-form .select:focus,
.search-form .input:focus {
  outline: none;
  border-color: var(--shop-blue);
}

.btn-search {
  appearance: none;
  border: 0;
  background: var(--primary-color);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-search:hover {
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.action-chip {
  background: var(--shop-chip);
  color: var(--shop-chip-text);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s;
}

.action-chip:hover {
  transform: translateY(-2px);
}

.btn-post {
  background: var(--primary-color);
  color: #fff;
  font-weight: 900;
  padding: 10px 14px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.btn-post:hover {
  opacity: 0.9;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.section-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--shop-text);
}

.section-muted {
  color: #98a2b3;
  font-size: 15px;
}

/* Grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* Card */
.shop-card {
  background: var(--shop-card);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.shop-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20, 20, 50, 0.06);
}

.shop-thumb {
  position: relative;
  height: 150px;
  background: #dfe7f4;
  overflow: hidden;
}

.shop-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-wrap {
  position: absolute;
  left: 8px;
  top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-color, #A50808);
  color: #fff;
  opacity: 0.9;
  font-weight: 700;
}

.badge-blue {
  background: var(--brand-color, #A50808);
}

.badge-green {
  background: var(--brand-color, #A50808);
}

.badge-gray {
  background: var(--brand-color, #A50808);
}

.shop-content {
  padding: 12px 12px 14px;
}

.shop-title {
  font-weight: 800;
  line-height: 1.35;
  height: 44px;
  overflow: hidden;
  color: var(--shop-text);
  font-size: 16px;
}

.shop-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 14px;
  color: #6b7280;
}

.shop-tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  font-size: 14px;
  color: #3b3b3b;
  flex-wrap: wrap;
}

.tag-chip {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 700;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  padding: 20px 0;
}

.page-btn {
  appearance: none;
  border: 1px solid var(--shop-line);
  background: var(--shop-card);
  color: var(--shop-text);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: var(--shop-chip);
  border-color: var(--shop-blue);
  color: var(--shop-chip-text);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-num {
  appearance: none;
  border: 1px solid var(--shop-line);
  background: var(--shop-card);
  color: var(--shop-text);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 40px;
}

.page-num:hover {
  background: var(--shop-chip);
  border-color: var(--shop-blue);
  color: var(--shop-chip-text);
}

.page-num.active {
  background: var(--shop-blue);
  border-color: var(--shop-blue);
  color: #fff;
}

.page-dots {
  color: var(--shop-muted);
  padding: 0 4px;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 1100px) {
  .shop-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .shop-sale-container {
    padding: 16px 12px 80px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .search-form {
    flex-direction: column;
  }

  .search-form .select,
  .search-form .input {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .hero-content h2 {
    font-size: 20px;
  }

  .hero-content p {
    font-size: 12px;
  }
}
