/* ===== 상점 컨테이너 ===== */
.shop-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ===== 상점 헤더 ===== */
.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--primary-color);
}

.title-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0;
}

.help-text {
  font-size: 13px;
  color: #ff6b35;
  margin: 0;
  font-weight: 500;
}

.user-points {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.user-points span {
  color: var(--primary-color);
  font-size: 24px;
}

@media (max-width: 768px) {
  .shop-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .shop-title {
    font-size: 24px;
  }

  .user-points {
    font-size: 16px;
  }

  .user-points span {
    font-size: 20px;
  }
}

/* ===== 카테고리 필터 ===== */
.category-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.category-btn {
  padding: 10px 20px;
  border: 1px solid #ddd;
  background-color: white;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.category-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.category-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ===== 상품 그리드 ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }
}

/* ===== 상품 카드 ===== */
.product-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.product-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: #f5f5f5;
}

.product-no-image-card {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  color: #999;
  font-size: 14px;
}

.product-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-brand {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.product-card-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-card-price {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
  margin-top: auto;
}

.product-card-stock {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}

.product-card-stock.low {
  color: #f44336;
}

.product-card-stock.out {
  color: #999;
  font-weight: bold;
}

@media (max-width: 768px) {
  .product-card-image,
  .product-no-image-card {
    height: 150px;
  }

  .product-card-body {
    padding: 12px;
  }

  .product-card-name {
    font-size: 14px;
  }

  .product-card-price {
    font-size: 18px;
  }
}

/* ===== 상품 상세 페이지 ===== */
.product-detail-page {
  max-width: 900px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
}

.back-link:hover {
  text-decoration: underline;
}

.product-detail-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: white;
  padding: 32px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
  .product-detail-container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px;
  }
}

.product-image-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-image {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
}

.product-no-image {
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  color: #999;
  border-radius: 8px;
}

.product-info-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-detail-title {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.product-brand {
  font-size: 16px;
  color: #666;
}

.product-price {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-color);
}

.product-stock {
  font-size: 14px;
  color: #666;
}

.product-description-section {
  margin-top: 16px;
}

.product-description-section h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #333;
}

.product-description {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

.product-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-purchase {
  padding: 16px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-purchase:hover {
  background-color: #138d74;
  transform: scale(1.02);
}

.btn-purchase:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}

.user-points-info {
  text-align: center;
  font-size: 14px;
  color: #666;
}

.user-points-info span {
  color: var(--primary-color);
  font-weight: 600;
}

/* ===== 내 기프티콘 페이지 ===== */
.my-gifts-page {
  max-width: 1000px;
  margin: 0 auto;
}

.page-title {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.gifts-section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

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

/* ===== 기프티콘 카드 ===== */
.gift-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gift-card.used {
  opacity: 0.7;
  background-color: #f9f9f9;
}

.gift-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.gift-card-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.gift-card-brand {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
}

.gift-card-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.gift-card-status.available {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.gift-card-status.used {
  background-color: #f5f5f5;
  color: #999;
}

.gift-card-status.expired {
  background-color: #ffebee;
  color: #c62828;
}

.gift-card-code-section {
  background-color: #f5f5f5;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}

.gift-card-code-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

.gift-card-code {
  font-size: 20px;
  font-weight: 600;
  font-family: monospace;
  color: #333;
  letter-spacing: 2px;
}

.gift-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #666;
}

.gift-card-info-row {
  display: flex;
  justify-content: space-between;
}

.btn-mark-used {
  padding: 10px;
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mark-used:hover {
  background-color: var(--primary-color);
  color: white;
}

/* ===== 공통 ===== */
.loading {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 14px;
}

.empty-message {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 14px;
  background-color: #f9f9f9;
  border-radius: 8px;
}
