/* ==========================================================================
   왕립 마법 동물 농장 (Royal Pet Farm) - Shop & Inventory CSS
   ========================================================================== */

/* 상점 모달 스타일 */
.shop-modal-card {
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.shop-header-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px dashed #fbcfe8;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.shop-title-wrap {
  display: flex;
  flex-direction: column;
}

.shop-main-title {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 700;
  color: #db2777;
}

.shop-sub-desc {
  font-size: 12px;
  color: #64748b;
}

.shop-points-badge {
  background: #fef3c7;
  border: 2px solid #fde047;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 800;
  color: #b45309;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

/* 상점 서브 탭 (요리집, 잡화점, 훈장) */
.shop-tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 14px;
}

.shop-tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.shop-tab-btn.active {
  background: #ffffff;
  color: #db2777;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 상점 아이템 그리드 */
.shop-item-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  overflow-y: auto;
  max-height: 52vh;
  padding: 2px 4px 10px;
}

.shop-item-card {
  background: #ffffff;
  border: 2px solid #f1f5f9;
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.shop-item-card:hover {
  border-color: #fbcfe8;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(236, 72, 153, 0.12);
}

.shop-item-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.shop-item-icon {
  font-size: 30px;
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fdf2f8;
  border-radius: 12px;
}

.shop-item-meta {
  flex: 1;
  min-width: 0;
}

.shop-item-name {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-item-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 2px;
}

.effect-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
}

.effect-love { background: #fce7f3; color: #be185d; }
.effect-charm { background: #f3e8ff; color: #7e22ce; }
.effect-knowledge { background: #dbeafe; color: #1d4ed8; }
.effect-health { background: #d1fae5; color: #047857; }
.effect-all { background: #fef3c7; color: #b45309; }

.shop-item-desc {
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
  min-height: 30px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed #f1f5f9;
}

.shop-item-price {
  font-size: 13px;
  font-weight: 800;
  color: #b45309;
}

.btn-buy {
  background: linear-gradient(135deg, #f472b6, #db2777);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-buy:active {
  transform: scale(0.95);
}

.btn-buy.cant-afford {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

/* ==========================================================================
   인벤토리 배낭 모달
   ========================================================================== */
.inv-modal-card {
  max-width: 480px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.inv-header-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px dashed #fbcfe8;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.inv-target-pet-bar {
  background: #fdf2f8;
  border: 1px solid #fbcfe8;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  color: #be185d;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.inv-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 52vh;
  padding-right: 4px;
}

.inv-item-row {
  background: #ffffff;
  border: 2px solid #f1f5f9;
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.inv-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.inv-item-icon-box {
  position: relative;
  font-size: 28px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.inv-count-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #db2777;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  border-radius: 999px;
  padding: 1px 6px;
  box-shadow: 0 2px 4px rgba(219, 39, 119, 0.4);
}

.inv-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.inv-item-name {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
}

.inv-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-use-item {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-use-item:active {
  transform: scale(0.95);
}

/* 인벤토리 빈 상태 */
.inv-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  gap: 12px;
  color: #94a3b8;
  text-align: center;
}

.inv-empty-icon {
  font-size: 48px;
  opacity: 0.6;
}

.inv-empty-text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

/* 농장 뷰포트 인벤토리 퀵 버튼 */
.btn-quick-bag {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid #fbcfe8;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  color: #db2777;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-quick-bag:hover {
  transform: scale(1.05);
  background: #ffffff;
}

.btn-quick-bag:active {
  transform: scale(0.95);
}

.bag-count-indicator {
  background: #db2777;
  color: #ffffff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
}
